[Pkg-alsa-devel] [Debian ALSA CVS] debian/alsa-driver/debian (alsa-base.init)

Thomas Hood jdthood@aglu.demon.nl
Tue, 21 Sep 2004 15:45:02 +0200


On Tue, 2004-09-21 at 13:32, Steve Kowalik wrote:
> 	You know there is an easy way to do this. We always load the
> OSS modules, so we could always run alsactl restore after loading, say
> snd-pcm-oss.


I don't think that that will work reliably.

alsactl opens sound devices controlled by the sound card driver.  We
want both:

* "alsactl restore" only after the sound card driver loads
* "alsactl restore" every time the sound card driver loads

The only reliable way to guarantee both (that I can think of) is to hook
the module loader so that it runs "alsactl restore" after loading the
sound card driver.

As an experiment I removed my sound card driver (snd_cs46xx) and hid the
.ko file.  Then I tried running "alsactl restore".

# lsmod
Module                  Size  Used by
snd_pcm_oss            55080  0
snd_mixer_oss          20160  1 snd_pcm_oss
snd_pcm                98824  1 snd_pcm_oss
snd_timer              25796  1 snd_pcm
snd_page_alloc         11752  1 snd_pcm
gameport                4704  0
snd                    57060  4 snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer
soundcore               9984  1 snd
airo_cs                 7588  1
airo                   69328  1 airo_cs
ds                     18692  5 airo_cs
yenta_socket           21728  1
pcmcia_core            67428  3 airo_cs,ds,yenta_socket
psmouse                20360  0
lp                     10760  0
binfmt_misc            11688  1
smapi                   4260  0
thinkpad                6180  1 smapi
usbhid                 24928  0
uhci_hcd               33136  0
usbcore               118532  4 usbhid,uhci_hcd
8250_pnp                8384  0
8250                   21120  1 8250_pnp
serial_core            23648  1 8250
parport_pc             35392  1
parport                41192  2 lp,parport_pc
floppy                 59664  0
pcspkr                  3592  0
evdev                   9344  0
rtc                    12696  0
root@thanatos:/lib/modules/2.6.8.1/kernel# alsactl restore
alsactl: load_state:1134: No soundcards found...

-- 
Thomas