Messages in this thread | | | Date | Fri, 9 May 1997 09:23:24 +0300 (EET DST) | From | Hannu Savolainen <> | Subject | Re: Question, regarding sound initialization with SB16 cards... |
| |
On Fri, 9 May 1997, The Deviant wrote:
> -----BEGIN PGP SIGNED MESSAGE----- > > > How would I go about changing the default (bootup) mixer settings on an > SB16, in kernelspace? > > I'm fairly new to working in kernelspace, but I was thinking it would > probably be a good idea to have the initialization functions set all the > mixer values to zero, so that if you have multiple output sources, you > don't need to worry about what plugged in at bootup... > > Case in point, one of my inputs is usually plugged into a radio, and my > output is often an amplified speaker set, but just as often earphones > > If the speakers are plugged in at bootup, it blairs the radio very very > loudly for a minute or so until it gets to my rc files (yes, its a slow > machine) > > Any ideas on how to change this in kernel? Just change the default volumes given in sb_mixer.h in case you are looking for a simple solution which works on your computer.
A more general solution is possible when using the driver as a loadable module with kerneld. There is an almost ready interface for this if somebody is willing to implement support for this. Just look at how SOUND_MIXER_GETLEVELS and SOUND_MIXER_SETLEVELS calls are implemented in sound_switch.c. SOUND_MIXER_GETLEVELS call can be used to implement a user space program that dumps the currently active settings to a disk file. These settings can then be loaded using kerneld but this needs to be done before soundcard_init() gets called from soundcard.c.
Best regards,
Hannu ------ Hannu Savolainen (hannu@voxware.pp.fi, hannu@4front-tech.com) http://www.4Front-Tech.com/oss.html (Open Sound System (OSS)) http://personal.eunet.fi/pp/voxware (OSS Free/TASD/VoxWare)
| |