emu10k1: Front channels via fxbus 8 and 9
PATCH 1/1 emu10k1: Front channels via fxbus 8 and 9
Hello,
I'm resending my patches that add front channels that can be used independently of the "default" pcm device. I think the patches are really useful. When you use the current SB Live driver it will automatically mute "Wave Surround", "Wave Center" and "Wave LFE" when playing 5.1, since otherwise the front signal would be played on all channels. With these patches this isn't necessary since the "front" device is routed to the front outputs only.
One potential problem is that you won't get any front output during 5.1 playback if you use an old EMU10K1.conf with a patched driver.
Regards,
Mikael Magnusson
front_fx_v3.patch:
Adds left and right front channel outputs using fxbus 8 and 9 and "Front" playback and capture volume controls.
front_config_v3.patch:
Routes front channels via fxbus 8 and 9 instead of fxbus 0 and 1. This makes the front and default devices independent of each other, and "Wave Surround", "Wave Center" and "Wave LFE" don't have to be muted during 5.1 playback.
Index: alsa-kernel/pci/emu10k1/emufx.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/emu10k1/emufx.c,v retrieving revision 1.76
pci/emu10k1/emufx.c +20 -3
@@ -964,8 +964,8 @@return err; } -#define SND_EMU10K1_GPR_CONTROLS 41 -#define SND_EMU10K1_INPUTS 10 +#define SND_EMU10K1_GPR_CONTROLS 44 +#define SND_EMU10K1_INPUTS 12#define SND_EMU10K1_PLAYBACK_CHANNELS 8#define SND_EMU10K1_CAPTURE_CHANNELS 4
@@ -1527,7 +1527,7 @@strcpy (icode->name,"SB Live! FX8010 code for ALSA v1.2 by Jaroslav Kysela" ); ptr =0 ; i =0 ; -/* we have 10 inputs */ +/* we have 12 inputs */ playback =SND_EMU10K1_INPUTS ;/* we have 6 playback channels and tone control doubles */ capture = playback + (SND_EMU10K1_PLAYBACK_CHANNELS *2 );
@@ -1551,6 +1551,8 @@OP (icode, &ptr, iMACINT0,GPR (7 ),C_00000000 ,FXBUS (FXBUS_PCM_LFE ),C_00000004 );OP (icode, &ptr, iMACINT0,GPR (8 ),C_00000000 ,C_00000000 ,C_00000000 );/* S/PDIF left */ OP (icode, &ptr, iMACINT0,GPR (9 ),C_00000000 ,C_00000000 ,C_00000000 );/* S/PDIF right */ +OP (icode, &ptr, iMACINT0,GPR (10 ),C_00000000 ,FXBUS (FXBUS_PCM_LEFT_FRONT ),C_00000004 ); +OP (icode, &ptr, iMACINT0,GPR (11 ),C_00000000 ,FXBUS (FXBUS_PCM_RIGHT_FRONT ),C_00000004 );/* Raw S/PDIF PCM */ ipcm->substream =0 ;
@@ -1697,6 +1699,21 @@VOLUME_ADD (icode, &ptr, playback +5 ,7 , gpr);snd_emu10k1_init_mono_control (controls + i++,"LFE Digital Playback Volume" , gpr++,100 ); +/* Front Playback Volume */ +for (z =0 ; z <2 ; z++) +VOLUME_ADD (icode, &ptr, playback + z,10 + z, gpr + z); +snd_emu10k1_init_stereo_control (controls + i++,"Front Playback Volume" , gpr,100 ); + gpr +=2 ; + +/* Front Capture Volume + Switch */ +for (z =0 ; z <2 ; z++) { +SWITCH (icode, &ptr, tmp +0 ,10 + z, gpr +2 ); +VOLUME_ADD (icode, &ptr, capture + z, tmp +0 , gpr + z); + } +snd_emu10k1_init_stereo_control (controls + i++,"Front Capture Volume" , gpr,0 ); +snd_emu10k1_init_mono_onoff_control (controls + i++,"Front Capture Switch" , gpr +2 ,0 ); + gpr +=3 ; +/* * Process inputs */
Index: alsa-lib/src/conf/cards/EMU10K1.conf
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/src/conf/cards/EMU10K1.conf,v retrieving revision 1.16
src/conf/cards/EMU10K1.conf +45 -22
85 lines not on this page · raw message
At Fri, 9 Sep 2005 00:01:56 +0200,
Quoted 10 lines · Mikael Magnusson
Hello,
I'm resending my patches that add front channels that can be used independently of the "default" pcm device. I think the patches are really useful. When you use the current SB Live driver it will automatically mute "Wave Surround", "Wave Center" and "Wave LFE" when playing 5.1, since otherwise the front signal would be played on all channels. With these patches this isn't necessary since the "front" device is routed to the front outputs only.
Quoted 2 lines
One potential problem is that you won't get any front output during 5.1 playback if you use an old EMU10K1.conf with a patched driver.
I think it's OK to merge.
Any objections?
Takashi
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
Quoted 12 lines · Takashi Iwai
At Fri, 9 Sep 2005 00:01:56 +0200,
Quoted 10 lines · Mikael Magnusson
Hello,
I'm resending my patches that add front channels that can be used independently of the "default" pcm device. I think the patches are really useful. When you use the current SB Live driver it will automatically mute "Wave Surround", "Wave Center" and "Wave LFE" when playing 5.1, since otherwise the front signal would be played on all channels. With these patches this isn't necessary since the "front" device is routed to the front outputs only.
Quoted 5 lines
Quoted 2 lines
One potential problem is that you won't get any front output during 5.1 playback if you use an old EMU10K1.conf with a patched driver.
I think it's OK to merge.
Any objections?
I agree, merge it.
Does this also solve the "master only controls front output" bug?
Lee
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
Quoted 16 lines · Lee Revell
Quoted 15 lines · Takashi Iwai
At Fri, 9 Sep 2005 00:01:56 +0200,
Quoted 12 lines · Mikael Magnusson
Hello,
I'm resending my patches that add front channels that can be used independently of the "default" pcm device. I think the patches are really useful. When you use the current SB Live driver it will automatically mute "Wave Surround", "Wave Center" and "Wave LFE" when playing 5.1, since otherwise the front signal would be played on all channels. With these patches this isn't necessary since the "front" device is routed to the front outputs only.
One potential problem is that you won't get any front output during 5.1 playback if you use an old EMU10K1.conf with a patched driver.
Quoted 9 lines
Quoted 2 lines
I think it's OK to merge.
Any objections?I agree, merge it.
Does this also solve the "master only controls front output" bug?
Lee
Not this patch but I have another that creates an additional master volume controller in DSP code for 5.1 PCM output.
/Mikael
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
At Mon, 12 Sep 2005 10:09:59 -0400,
Quoted 14 lines · Lee Revell
Quoted 12 lines · Takashi Iwai
At Fri, 9 Sep 2005 00:01:56 +0200,
Quoted 10 lines · Mikael Magnusson
Hello,
I'm resending my patches that add front channels that can be used independently of the "default" pcm device. I think the patches are really useful. When you use the current SB Live driver it will automatically mute "Wave Surround", "Wave Center" and "Wave LFE" when playing 5.1, since otherwise the front signal would be played on all channels. With these patches this isn't necessary since the "front" device is routed to the front outputs only.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
One potential problem is that you won't get any front output during 5.1 playback if you use an old EMU10K1.conf with a patched driver.
I think it's OK to merge.
Any objections?I agree, merge it.
OK, now it's on CVS.
Thanks for the patch!
Takashi
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf