Am Mittwoch, 8. März 2006 20:17 schrieb Lee Revell:
> On Wed, 2006-03-08 at 21:02 +0200, Милен Панков wrote:
> > Lee Revell написа:
> > > On Wed, 2006-03-08 at 11:43 +0200, Милен Панков wrote:
> > >> But there appears there is no an overall master volume.
> > >> I read everything I found in the mailing list archives and it seems
> > >> this
> > >> question is asked many times, but I found no answer given.
> > >> How can I control the overall volume of the card no meter if I play a
> > >> stereo or 6-channel sound? Is there a way to do this from the drivers?
> > >> And
> > >> if not is there a possibility to do this in some other way? I was
> > >> thinking
> > >> of making a softvolume in asound.conf called for example
> > >> 'GrandVolume'
> > >> where to attach as slaves all the controls mentioned above - for
> > >> stereo and
> > >> for 6-channel sound. I was trying for some time to make such a thing,
> > >> but
> > >> my understandings of the syntax of the file seems not to be so good
> > >> althought I read several times the explanations... Can somebody help
> > >> me in
> > >> implementing this if it is possible?
> > >
> > > This is a very old problem.  There's no easy fix.
> > >
> > > Lee
> >
> > Ok.
> > But as I understand there is some possibility to fix this, although not
> > an easy one...
> > Where to look for some documentation on that, what to try? Am I on the
> > right way trying to find a solution with software mixer as I continue
> > trying with these attempts.
> > Thanks,
> > Milen
>
> Unless you can read and understand the emu10k1 driver code, you will
> have a very hard time.  And if you can read and understand it you know
> what to do.
>
> The best workaround for the time being (if you can't simply reduce the
> volume in the app) is to just write a script that implements "Master
> volume" by controlling Front, Rear, Center/LFE at the same time.
>
> You can probably find such a script in the list archive.
>
> Lee
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live
> webcast and join the prime developer group breaking into this new coding
> territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> _______________________________________________
> Alsa-user mailing list
> Alsa-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/alsa-user



Hi There!

I have discussed this topic for a very long time on this mailing list, too. 
And guess what: a "good" (where good means pretty easy to realize) fix *is* 
available. I have attached the patch file that does the job. You need to 
recompile alsa drivers that for. with the Patch included you will have a new 
volume slider that indeed sets the overall volume for all channels. Since i 
am no developer i cant tell you exactly why this patch is not included in the 
drivers, but for emu10k1 and sb live i have found out it works great. i am 
using it with alsa-driver and -lib version 1.0.10 and have had no *real* 
issues yet. unfortunately i know people reporting that this patch causes the 
overall output volume to be a bit quiter than normal, but i cannot confirm. 
Thanks again to whoever has send that patch to me.

Greetz
Christian Haertwig
Alsa User :)
diff -u alsa-kernel/pci/emu10k1/emufx.c alsa-kernel/pci/emu10k1/emufx.c
--- alsa-kernel/pci/emu10k1/emufx.c	23 Feb 2005 10:35:55 -0000
+++ alsa-kernel/pci/emu10k1/emufx.c	23 Feb 2005 10:37:52 -0000
@@ -934,7 +934,7 @@
 	return err;
 }
 
-#define SND_EMU10K1_GPR_CONTROLS	44
+#define SND_EMU10K1_GPR_CONTROLS	46
 #define SND_EMU10K1_INPUTS		12
 #define SND_EMU10K1_PLAYBACK_CHANNELS	8
 #define SND_EMU10K1_CAPTURE_CHANNELS	4
@@ -1803,6 +1803,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 */

Reply via email to