* [PATCH 1/5] emu10k1 SB Live: Master volume and front channels via fxbus 8,9
@ 2005-02-21 19:44 Mikael Magnusson
2005-02-22 8:31 ` Jaroslav Kysela
0 siblings, 1 reply; 12+ messages in thread
From: Mikael Magnusson @ 2005-02-21 19:44 UTC (permalink / raw)
To: alsa-devel
[-- Attachment #1: Type: text/plain, Size: 307 bytes --]
This is the first in a set of five patches that add master volume and
switch controls and front pcm channels via fxbus 8,9 to SB Live.
master_volume.patch:
Adds "Master Digital Playback Volume" which controls all six pcm
playback channels.
Signed-Off-By: Mikael Magnusson <mikma@users.sourceforge.net>
[-- Attachment #2: master_volume.patch --]
[-- Type: text/x-patch, Size: 1020 bytes --]
diff -u alsa-kernel/pci/emu10k1/emufx.c alsa-kernel/pci/emu10k1/emufx.c
--- alsa-kernel/pci/emu10k1/emufx.c 21 Feb 2005 13:33:30 -0000
+++ alsa-kernel/pci/emu10k1/emufx.c 21 Feb 2005 13:33:52 -0000
@@ -934,7 +934,7 @@
return err;
}
-#define SND_EMU10K1_GPR_CONTROLS 41
+#define SND_EMU10K1_GPR_CONTROLS 43
#define SND_EMU10K1_INPUTS 10
#define SND_EMU10K1_PLAYBACK_CHANNELS 8
#define SND_EMU10K1_CAPTURE_CHANNELS 4
@@ -1780,6 +1780,19 @@
}
/*
+ * Master Volume
+ */
+ for (z = 0; z < 6; z++) {
+ SWITCH(icode, &ptr, playback + z, playback + z, gpr + 0);
+ VOLUME(icode, &ptr, playback + z, playback + z, gpr + 1);
+ }
+
+ snd_emu10k1_init_mono_onoff_control(controls + i++, "Master Digital Playback Switch", gpr + 0, 0);
+ snd_emu10k1_init_mono_control(controls + i++, "Master Digital Playback Volume", gpr + 1, 0);
+ gpr += 2;
+
+
+ /*
* Process tone control
*/
OP(icode, &ptr, iACC3, GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 0), GPR(playback + 0), C_00000000, C_00000000); /* left */
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/5] emu10k1 SB Live: Master volume and front channels via fxbus 8,9
2005-02-21 19:44 [PATCH 1/5] emu10k1 SB Live: Master volume and front channels via fxbus 8,9 Mikael Magnusson
@ 2005-02-22 8:31 ` Jaroslav Kysela
2005-02-22 10:19 ` Mikael Magnusson
2005-02-22 22:04 ` Lee Revell
0 siblings, 2 replies; 12+ messages in thread
From: Jaroslav Kysela @ 2005-02-22 8:31 UTC (permalink / raw)
To: Mikael Magnusson; +Cc: ALSA development
On Mon, 21 Feb 2005, Mikael Magnusson wrote:
> This is the first in a set of five patches that add master volume and
> switch controls and front pcm channels via fxbus 8,9 to SB Live.
I still feel that it's broken idea. We have also problems with AC97
where the surround/center&lfe volumes are separate from AC97 Master Volume
control, too (at least for Sigmatel codecs).
We need a layer in user space to handle these issues where we can express
the control relations in very easy way and not mess the kernel with more
dust which is not necessary.
It might be easy to write a small daemon which will create "Master Volume"
control for SB cards at this time until a decent solution in alsa-lib is
finished.
Jaroslav
-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/5] emu10k1 SB Live: Master volume and front channels via fxbus 8,9
2005-02-22 10:19 ` Mikael Magnusson
@ 2005-02-22 10:19 ` Jaroslav Kysela
2005-02-22 11:38 ` Mikael Magnusson
0 siblings, 1 reply; 12+ messages in thread
From: Jaroslav Kysela @ 2005-02-22 10:19 UTC (permalink / raw)
To: Mikael Magnusson; +Cc: ALSA development
On Tue, 22 Feb 2005, Mikael Magnusson wrote:
> Jaroslav Kysela wrote:
> > On Mon, 21 Feb 2005, Mikael Magnusson wrote:
> >
> >
> >>This is the first in a set of five patches that add master volume and
> >>switch controls and front pcm channels via fxbus 8,9 to SB Live.
> >
> >
> > I still feel that it's broken idea. We have also problems with AC97
> > where the surround/center&lfe volumes are separate from AC97 Master Volume
> > control, too (at least for Sigmatel codecs).
> >
> > We need a layer in user space to handle these issues where we can express
> > the control relations in very easy way and not mess the kernel with more
> > dust which is not necessary.
> >
> > It might be easy to write a small daemon which will create "Master Volume"
> > control for SB cards at this time until a decent solution in alsa-lib is
> > finished.
> >
> > Jaroslav
> >
>
> I think a "Master Digital Volume" or separate controls for surround,
> center and lfe are needed.
>
> How are you otherwise going to implement a "Master Volume" control in
> user space if you allow the user to change for example "Wave Surround"
> and "Surround"?
As you noted here, the implemention of Master is only one abstraction view
for this device. Other users might use the card as two virtual PCM devices
(front = card1, rear = card2) and in this case is Master completely
useless for this example.
The control API allow to lock the specific control for writing (and only
application which locked the control can write to it), thus the user space
implementation can use this feature.
Jaroslav
-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/5] emu10k1 SB Live: Master volume and front channels via fxbus 8,9
2005-02-22 8:31 ` Jaroslav Kysela
@ 2005-02-22 10:19 ` Mikael Magnusson
2005-02-22 10:19 ` Jaroslav Kysela
2005-02-22 22:04 ` Lee Revell
1 sibling, 1 reply; 12+ messages in thread
From: Mikael Magnusson @ 2005-02-22 10:19 UTC (permalink / raw)
To: ALSA development
Jaroslav Kysela wrote:
> On Mon, 21 Feb 2005, Mikael Magnusson wrote:
>
>
>>This is the first in a set of five patches that add master volume and
>>switch controls and front pcm channels via fxbus 8,9 to SB Live.
>
>
> I still feel that it's broken idea. We have also problems with AC97
> where the surround/center&lfe volumes are separate from AC97 Master Volume
> control, too (at least for Sigmatel codecs).
>
> We need a layer in user space to handle these issues where we can express
> the control relations in very easy way and not mess the kernel with more
> dust which is not necessary.
>
> It might be easy to write a small daemon which will create "Master Volume"
> control for SB cards at this time until a decent solution in alsa-lib is
> finished.
>
> Jaroslav
>
I think a "Master Digital Volume" or separate controls for surround,
center and lfe are needed.
How are you otherwise going to implement a "Master Volume" control in
user space if you allow the user to change for example "Wave Surround"
and "Surround"?
/Mikael
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/5] emu10k1 SB Live: Master volume and front channels via fxbus 8,9
2005-02-22 10:19 ` Jaroslav Kysela
@ 2005-02-22 11:38 ` Mikael Magnusson
2005-02-22 12:01 ` Jaroslav Kysela
0 siblings, 1 reply; 12+ messages in thread
From: Mikael Magnusson @ 2005-02-22 11:38 UTC (permalink / raw)
To: ALSA development
Jaroslav Kysela wrote:
> On Tue, 22 Feb 2005, Mikael Magnusson wrote:
>
>
>>Jaroslav Kysela wrote:
>>
...
>>
>>I think a "Master Digital Volume" or separate controls for surround,
>>center and lfe are needed.
>>
>>How are you otherwise going to implement a "Master Volume" control in
>>user space if you allow the user to change for example "Wave Surround"
>>and "Surround"?
>
>
> As you noted here, the implemention of Master is only one abstraction view
> for this device. Other users might use the card as two virtual PCM devices
> (front = card1, rear = card2) and in this case is Master completely
> useless for this example.
>
> The control API allow to lock the specific control for writing (and only
> application which locked the control can write to it), thus the user space
> implementation can use this feature.
>
> Jaroslav
And how do I adjust the rear, center and lfe volumes if the controls are
locked? Should I have to use the soft volume plugin?
/Mikael
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/5] emu10k1 SB Live: Master volume and front channels via fxbus 8,9
2005-02-22 11:38 ` Mikael Magnusson
@ 2005-02-22 12:01 ` Jaroslav Kysela
0 siblings, 0 replies; 12+ messages in thread
From: Jaroslav Kysela @ 2005-02-22 12:01 UTC (permalink / raw)
To: ALSA development
On Tue, 22 Feb 2005, Mikael Magnusson wrote:
> Jaroslav Kysela wrote:
> > On Tue, 22 Feb 2005, Mikael Magnusson wrote:
> >
> >
> >>Jaroslav Kysela wrote:
> >>
> ...
> >>
> >>I think a "Master Digital Volume" or separate controls for surround,
> >>center and lfe are needed.
> >>
> >>How are you otherwise going to implement a "Master Volume" control in
> >>user space if you allow the user to change for example "Wave Surround"
> >>and "Surround"?
> >
> >
> > As you noted here, the implemention of Master is only one abstraction view
> > for this device. Other users might use the card as two virtual PCM devices
> > (front = card1, rear = card2) and in this case is Master completely
> > useless for this example.
> >
> > The control API allow to lock the specific control for writing (and only
> > application which locked the control can write to it), thus the user space
> > implementation can use this feature.
> >
> > Jaroslav
>
> And how do I adjust the rear, center and lfe volumes if the controls are
> locked? Should I have to use the soft volume plugin?
You may create new rear/center/lfe volume controls in user space and
define expression:
hw volume = master volume * output specific volume
Jaroslav
-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/5] emu10k1 SB Live: Master volume and front channels via fxbus 8,9
2005-02-22 8:31 ` Jaroslav Kysela
2005-02-22 10:19 ` Mikael Magnusson
@ 2005-02-22 22:04 ` Lee Revell
2005-02-23 8:22 ` Jaroslav Kysela
1 sibling, 1 reply; 12+ messages in thread
From: Lee Revell @ 2005-02-22 22:04 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: Mikael Magnusson, ALSA development
On Tue, 2005-02-22 at 09:31 +0100, Jaroslav Kysela wrote:
> On Mon, 21 Feb 2005, Mikael Magnusson wrote:
>
> > This is the first in a set of five patches that add master volume and
> > switch controls and front pcm channels via fxbus 8,9 to SB Live.
>
> I still feel that it's broken idea. We have also problems with AC97
> where the surround/center&lfe volumes are separate from AC97 Master Volume
> control, too (at least for Sigmatel codecs).
>
> We need a layer in user space to handle these issues where we can express
> the control relations in very easy way and not mess the kernel with more
> dust which is not necessary.
>
> It might be easy to write a small daemon which will create "Master Volume"
> control for SB cards at this time until a decent solution in alsa-lib is
> finished.
I believe Mikael's patch is correct. At least, partially.
There are two separate issues that the patch addresses. One is that
unlike the Audigy configuration, the driver does not use separate FX
buses for front output and PCM. So attenuating the front channels will
attenuate *all* PCM samples. This has to be fixed in the driver. And
it's essentially zero cost as the extra FX buses and GPRs are available.
The other issue is the lack of a master volume control. Provided the
first issue is addressed, perex is correct in that this can be solved in
userspace.
Personally I feel that the entire patch should be applied, until the
required abstraction layer exists in alsa-lib. The second part of the
patch can be trivially reverted when this is available.
Mikael, can you split your patch into the part that moves PCM and front
to separate FX buses, and the part that adds the master volume?
Lee
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/5] emu10k1 SB Live: Master volume and front channels via fxbus 8,9
2005-02-22 22:04 ` Lee Revell
@ 2005-02-23 8:22 ` Jaroslav Kysela
2005-02-23 8:57 ` Mikael Magnusson
0 siblings, 1 reply; 12+ messages in thread
From: Jaroslav Kysela @ 2005-02-23 8:22 UTC (permalink / raw)
To: Lee Revell; +Cc: Mikael Magnusson, ALSA development
On Tue, 22 Feb 2005, Lee Revell wrote:
> There are two separate issues that the patch addresses. One is that
> unlike the Audigy configuration, the driver does not use separate FX
> buses for front output and PCM. So attenuating the front channels will
> attenuate *all* PCM samples. This has to be fixed in the driver. And
> it's essentially zero cost as the extra FX buses and GPRs are available.
Sorry, but I don't understand very well why we need to have "PCM mix" FX
buses. We can do this "down-mix" in the DSP code, but it's better to do it
in application. My original DSP code for emu10k1 have only front, rear,
center+lfe FX buses (6). I must miss something important here.
> The other issue is the lack of a master volume control. Provided the
> first issue is addressed, perex is correct in that this can be solved in
> userspace.
>
> Personally I feel that the entire patch should be applied, until the
> required abstraction layer exists in alsa-lib. The second part of the
> patch can be trivially reverted when this is available.
Maybe..
Jaroslav
-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/5] emu10k1 SB Live: Master volume and front channels via fxbus 8,9
2005-02-23 8:22 ` Jaroslav Kysela
@ 2005-02-23 8:57 ` Mikael Magnusson
2005-02-23 9:00 ` Jaroslav Kysela
0 siblings, 1 reply; 12+ messages in thread
From: Mikael Magnusson @ 2005-02-23 8:57 UTC (permalink / raw)
To: alsa-devel
Jaroslav Kysela wrote:
> On Tue, 22 Feb 2005, Lee Revell wrote:
>
>
>>There are two separate issues that the patch addresses. One is that
>>unlike the Audigy configuration, the driver does not use separate FX
>>buses for front output and PCM. So attenuating the front channels will
>>attenuate *all* PCM samples. This has to be fixed in the driver. And
>>it's essentially zero cost as the extra FX buses and GPRs are available.
>
>
> Sorry, but I don't understand very well why we need to have "PCM mix" FX
> buses. We can do this "down-mix" in the DSP code, but it's better to do it
> in application. My original DSP code for emu10k1 have only front, rear,
> center+lfe FX buses (6). I must miss something important here.
>
I don't understand what you mean with "PCM mix". Are you thinking of the
default output which are up-mixed to 5.1? The patch doesn't down-mix 5.1
to front or something like that. It adds two fx inputs that are routed
to front only and not up-mixed to 5.1. This is how the Audigy driver
works. It also can make the configuration file a little cleaner, since
it doesn't have to mute the up-mixed outputs.
/Mikael
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/5] emu10k1 SB Live: Master volume and front channels via fxbus 8,9
2005-02-23 8:57 ` Mikael Magnusson
@ 2005-02-23 9:00 ` Jaroslav Kysela
2005-02-23 10:22 ` Takashi Iwai
0 siblings, 1 reply; 12+ messages in thread
From: Jaroslav Kysela @ 2005-02-23 9:00 UTC (permalink / raw)
To: alsa-devel
On Wed, 23 Feb 2005, Mikael Magnusson wrote:
> > Sorry, but I don't understand very well why we need to have "PCM mix" FX
> > buses. We can do this "down-mix" in the DSP code, but it's better to do it
> > in application. My original DSP code for emu10k1 have only front, rear,
> > center+lfe FX buses (6). I must miss something important here.
> >
>
> I don't understand what you mean with "PCM mix". Are you thinking of the
> default output which are up-mixed to 5.1? The patch doesn't down-mix 5.1
> to front or something like that. It adds two fx inputs that are routed
> to front only and not up-mixed to 5.1. This is how the Audigy driver
> works. It also can make the configuration file a little cleaner, since
> it doesn't have to mute the up-mixed outputs.
I see now. My behaviour was to "duplicate" front to surround with "Wave
Surround" controls and you propose to have FX buses which will route
signal to both front & rear and separate FX buses to route signal to
front only.
I don't see the real benefit. Both cases are correct and the alsa-lib
configuration won't be much different. Anyway, if you feel that it's
better, then go ahead...
Jaroslav
-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/5] emu10k1 SB Live: Master volume and front channels via fxbus 8,9
2005-02-23 9:00 ` Jaroslav Kysela
@ 2005-02-23 10:22 ` Takashi Iwai
2005-02-25 16:59 ` Lee Revell
0 siblings, 1 reply; 12+ messages in thread
From: Takashi Iwai @ 2005-02-23 10:22 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: alsa-devel
At Wed, 23 Feb 2005 10:00:49 +0100 (CET),
Jaroslav wrote:
>
> On Wed, 23 Feb 2005, Mikael Magnusson wrote:
>
> > > Sorry, but I don't understand very well why we need to have "PCM mix" FX
> > > buses. We can do this "down-mix" in the DSP code, but it's better to do it
> > > in application. My original DSP code for emu10k1 have only front, rear,
> > > center+lfe FX buses (6). I must miss something important here.
> > >
> >
> > I don't understand what you mean with "PCM mix". Are you thinking of the
> > default output which are up-mixed to 5.1? The patch doesn't down-mix 5.1
> > to front or something like that. It adds two fx inputs that are routed
> > to front only and not up-mixed to 5.1. This is how the Audigy driver
> > works. It also can make the configuration file a little cleaner, since
> > it doesn't have to mute the up-mixed outputs.
>
> I see now. My behaviour was to "duplicate" front to surround with "Wave
> Surround" controls and you propose to have FX buses which will route
> signal to both front & rear and separate FX buses to route signal to
> front only.
>
> I don't see the real benefit. Both cases are correct and the alsa-lib
> configuration won't be much different. Anyway, if you feel that it's
> better, then go ahead...
IIRC, the problem was stated in the case that both front and
multi-channel streams are output at the same time.
I think this patch is fine (although not tested yet). At least, it
will decrease the difference between Live and Audigy.
Takashi
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/5] emu10k1 SB Live: Master volume and front channels via fxbus 8,9
2005-02-23 10:22 ` Takashi Iwai
@ 2005-02-25 16:59 ` Lee Revell
0 siblings, 0 replies; 12+ messages in thread
From: Lee Revell @ 2005-02-25 16:59 UTC (permalink / raw)
To: Takashi Iwai; +Cc: Jaroslav Kysela, alsa-devel, mikma@users.sourceforge.net
On Wed, 2005-02-23 at 11:22 +0100, Takashi Iwai wrote:
> IIRC, the problem was stated in the case that both front and
> multi-channel streams are output at the same time.
>
> I think this patch is fine (although not tested yet). At least, it
> will decrease the difference between Live and Audigy.
Agreed. This should be applied, as soon as we have some successful test
reports. I would like for it to be in 1.0.9. But we should be careful
as so many patches will have gone into the emu10k1 driver since 1.0.8.
I'll test this on my SBLive this weekend. And update some of the bug
reports so the users who were really bothered by this can give some
feedback.
Lee
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2005-02-25 16:59 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-21 19:44 [PATCH 1/5] emu10k1 SB Live: Master volume and front channels via fxbus 8,9 Mikael Magnusson
2005-02-22 8:31 ` Jaroslav Kysela
2005-02-22 10:19 ` Mikael Magnusson
2005-02-22 10:19 ` Jaroslav Kysela
2005-02-22 11:38 ` Mikael Magnusson
2005-02-22 12:01 ` Jaroslav Kysela
2005-02-22 22:04 ` Lee Revell
2005-02-23 8:22 ` Jaroslav Kysela
2005-02-23 8:57 ` Mikael Magnusson
2005-02-23 9:00 ` Jaroslav Kysela
2005-02-23 10:22 ` Takashi Iwai
2005-02-25 16:59 ` Lee Revell
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.