Re: New snapshot of modutils

David Woodhouse (David.Woodhouse@mvhi.com)
Wed, 24 Feb 1999 12:45:03 +0000


uixjjji1@umail.furryterror.org said:
> There will always be a delay between loading the module and setting
> the levels. Both cannot physically happen at the same time unless you
> have a sound card which can have its mixer settings set in the same I/
> O cycle as the activation of the card.

I wasn't aware that the sound blaster with which I was testing my previous
patches had a 'deactivated' state. At power-on, I believe the levels would be
set to zero, but on module unloading and soft-reboot, the start of the
hardware wouldn't change. You can be quite happily listening to the radio
through the 'line in' port of the card while you reboot, or listening to a CD
while the module is unloaded and reloaded.

The sb driver then sets up the levels again when it loads, and it is this
which causes the problem. If, however, the sb driver initialises the card with
the levels which were saved last time the card was unloaded, then the problem
is solved. This is what my patches did. First I read the original levels back
from the hardware - effectively just not resetting the mixer levels on
initialisation. That wasn't particularly reliable, so I changed to using
kerneld to store the mixer levels.

This problem could be worked around by adding a parameter to each sound card
driver, allowing the startup levels to be set at insmod time. The levels could
be recorded by a userspace utility just before unloading the module, and
automatically added to the module's arguments by modprobe.

---- ---- ----
David Woodhouse David.Woodhouse@mvhi.com Office: (+44) 1223 810302
Project Leader, Process Information Systems Mobile: (+44) 976 658355
Axiom (Cambridge) Ltd., Swaffham Bulbeck, Cambridge, CB5 0NA, UK.
finger dwmw2@ferret.lmh.ox.ac.uk for PGP key.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/