Re: sound volume and kerneld

Shawn McHorse (riffraff@texas.net)
Tue, 9 Apr 1996 15:17:08 -0500


In article <Pine.LNX.3.92.960409045804.25009D-100000@lum.it.luc.edu> you write:
>I'm running into a problem with using the sound module with kerneld.
>Every time the modules is reloaded by kerneld it re-initalizes the volume.
>An example of the problem can be shown by the output of this script:

Very known problem. I believe a workaround has been introduced into the latest
modutils, which allows you to automagically run the mixer program immediately
after loading the sound module.

>I also would be interested in hearing if anyone has come up with any sort
>of work around (regardless of how hokie it might be).

Well, I did come up with a solution which I've been using practically ever
since I started using kerneld. And I doubt I'll change it to use the new
modutils capability, since my method seems so much easier than running a
program every time the sound module is loaded. *shrug* Basically, I just
patched the default volume levels in the sound driver to the levels I would
normally set with the mixer program. So now I never ever have to fool with
the mixer program, unless I'm just changing the volume temporarily for
something. Here's the patch I always use...

--- sb_mixer.h.OLD Fri Feb 23 06:54:19 1996
+++ linux/drivers/sound/sb_mixer.h Wed Feb 28 00:00:11 1996
@@ -222,23 +222,23 @@

static unsigned short levels[SOUND_MIXER_NRDEVICES] =
{
- 0x5a5a, /* Master Volume */
+ 0x3434, /* Master Volume */
0x4b4b, /* Bass */
0x4b4b, /* Treble */
0x4b4b, /* FM */
0x4b4b, /* PCM */
- 0x4b4b, /* PC Speaker */
+ 0x0000, /* PC Speaker */
0x4b4b, /* Ext Line */
- 0x1010, /* Mic */
- 0x4b4b, /* CD */
+ 0x0000, /* Mic */
+ 0x0000, /* CD */
0x4b4b, /* Recording monitor */
0x4b4b, /* SB PCM */
0x4b4b, /* Recording level */
0x4b4b, /* Input gain */
0x4b4b, /* Output gain */
- 0x4040, /* Line1 */
- 0x4040, /* Line2 */
- 0x1515 /* Line3 */
+ 0x0000, /* Line1 */
+ 0x0000, /* Line2 */
+ 0x0000 /* Line3 */
};
#endif /* SM_GAMES */

Works well for me...:-)

Shawn McHorse
riffraff@texas.net
An Austin NorthCross-Dresser