* [PATCH] emu10k1: Front channels via fxbus 8 and 9
@ 2005-09-08 22:01 Mikael Magnusson
2005-09-12 10:40 ` Takashi Iwai
0 siblings, 1 reply; 5+ messages in thread
From: Mikael Magnusson @ 2005-09-08 22:01 UTC (permalink / raw)
To: alsa-devel
[-- Attachment #1: Type: text/plain, Size: 1132 bytes --]
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.
Signed-Off-By: Mikael Magnusson <mikma@users.sourceforge.net>
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.
Signed-Off-By: Mikael Magnusson <mikma@users.sourceforge.net>
[-- Attachment #2: front_fx_v3.patch --]
[-- Type: text/plain, Size: 2229 bytes --]
Index: alsa-kernel/pci/emu10k1/emufx.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/emu10k1/emufx.c,v
retrieving revision 1.76
diff -u -r1.76 emufx.c
--- alsa-kernel/pci/emu10k1/emufx.c 5 Sep 2005 09:35:22 -0000 1.76
+++ alsa-kernel/pci/emu10k1/emufx.c 8 Sep 2005 15:59:45 -0000
@@ -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
*/
[-- Attachment #3: front_config_v3.patch --]
[-- Type: text/plain, Size: 2040 bytes --]
Index: alsa-lib/src/conf/cards/EMU10K1.conf
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/src/conf/cards/EMU10K1.conf,v
retrieving revision 1.16
diff -u -r1.16 EMU10K1.conf
--- alsa-lib/src/conf/cards/EMU10K1.conf 3 Aug 2005 12:50:32 -0000 1.16
+++ alsa-lib/src/conf/cards/EMU10K1.conf 8 Sep 2005 16:11:50 -0000
@@ -9,9 +9,51 @@
@args.CARD {
type string
}
- type hw
- card $CARD
- device 0
+ type hooks
+ slave.pcm {
+ type hw
+ card $CARD
+ device 0
+ }
+ hooks.0 {
+ type ctl_elems
+ hook_args [
+ {
+ interface PCM
+ device 0
+ name "EMU10K1 PCM Send Volume"
+ index { @func private_pcm_subdevice }
+ lock true
+ optional true
+ value [ 255 255 0 0 255 0 0 0 0 255 0 0 ]
+ }
+ {
+ # for compatibility with older drivers
+ name "EMU10K1 PCM Send Volume"
+ index { @func private_pcm_subdevice }
+ lock true
+ optional true
+ value [ 255 255 0 0 255 0 0 0 0 255 0 0 ]
+ }
+ {
+ interface PCM
+ device 0
+ name "EMU10K1 PCM Send Routing"
+ index { @func private_pcm_subdevice }
+ lock true
+ optional true
+ value [ 8 9 0 0 8 9 0 0 8 9 0 0 ]
+ }
+ {
+ # for compatibility with older drivers
+ name "EMU10K1 PCM Send Routing"
+ index { @func private_pcm_subdevice }
+ lock true
+ optional true
+ value [ 8 9 0 0 8 9 0 0 8 9 0 0 ]
+ }
+ ]
+ }
}
<confdir:pcm/rear.conf>
@@ -31,13 +73,6 @@
type ctl_elems
hook_args [
{
- name "Wave Surround Playback Volume"
- preserve true
- # don't lock a global control
- # lock true
- value [ 0 0 ]
- }
- {
interface PCM
device 0
name "EMU10K1 PCM Send Volume"
@@ -75,18 +110,6 @@
type ctl_elems
hook_args [
{
- name "Wave Center Playback Volume"
- preserve true
- # lock true
- value 0
- }
- {
- name "Wave LFE Playback Volume"
- preserve true
- # lock true
- value 0
- }
- {
name "Headphone Center Playback Switch"
index 1
preserve true
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] emu10k1: Front channels via fxbus 8 and 9
2005-09-08 22:01 [PATCH] emu10k1: Front channels via fxbus 8 and 9 Mikael Magnusson
@ 2005-09-12 10:40 ` Takashi Iwai
2005-09-12 14:09 ` Lee Revell
0 siblings, 1 reply; 5+ messages in thread
From: Takashi Iwai @ 2005-09-12 10:40 UTC (permalink / raw)
To: Mikael Magnusson; +Cc: alsa-devel
At Fri, 9 Sep 2005 00:01:56 +0200,
Mikael Magnusson wrote:
>
> 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.
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] emu10k1: Front channels via fxbus 8 and 9
2005-09-12 10:40 ` Takashi Iwai
@ 2005-09-12 14:09 ` Lee Revell
2005-09-12 22:16 ` Mikael Magnusson
2005-09-13 10:36 ` Takashi Iwai
0 siblings, 2 replies; 5+ messages in thread
From: Lee Revell @ 2005-09-12 14:09 UTC (permalink / raw)
To: Takashi Iwai; +Cc: Mikael Magnusson, alsa-devel
On Mon, 2005-09-12 at 12:40 +0200, Takashi Iwai wrote:
> At Fri, 9 Sep 2005 00:01:56 +0200,
> Mikael Magnusson wrote:
> >
> > 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.
>
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] emu10k1: Front channels via fxbus 8 and 9
2005-09-12 14:09 ` Lee Revell
@ 2005-09-12 22:16 ` Mikael Magnusson
2005-09-13 10:36 ` Takashi Iwai
1 sibling, 0 replies; 5+ messages in thread
From: Mikael Magnusson @ 2005-09-12 22:16 UTC (permalink / raw)
To: alsa-devel
On Mon, Sep 12, 2005 at 10:09:59AM -0400, Lee Revell wrote:
> On Mon, 2005-09-12 at 12:40 +0200, Takashi Iwai wrote:
> > At Fri, 9 Sep 2005 00:01:56 +0200,
> > Mikael Magnusson wrote:
> > >
> > > 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.
> >
> > 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] emu10k1: Front channels via fxbus 8 and 9
2005-09-12 14:09 ` Lee Revell
2005-09-12 22:16 ` Mikael Magnusson
@ 2005-09-13 10:36 ` Takashi Iwai
1 sibling, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2005-09-13 10:36 UTC (permalink / raw)
To: Mikael Magnusson; +Cc: Lee Revell, alsa-devel
At Mon, 12 Sep 2005 10:09:59 -0400,
Lee Revell wrote:
>
> On Mon, 2005-09-12 at 12:40 +0200, Takashi Iwai wrote:
> > At Fri, 9 Sep 2005 00:01:56 +0200,
> > Mikael Magnusson wrote:
> > >
> > > 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.
> >
> > 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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-09-13 10:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-08 22:01 [PATCH] emu10k1: Front channels via fxbus 8 and 9 Mikael Magnusson
2005-09-12 10:40 ` Takashi Iwai
2005-09-12 14:09 ` Lee Revell
2005-09-12 22:16 ` Mikael Magnusson
2005-09-13 10:36 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.