[SGVLUG] Populating /dev (audio problem)

David Lawyer dave at lafn.org
Tue Aug 28 11:09:26 PDT 2007


Yesterday I submitted a bug report about the alsa sound package.  I've
got an ISA sound card that's supported by a driver module and it
seems to work.  Except that if I type "aplay ..." the driver module
never gets loaded.  So I used strace to find out why.

This is an example of why Linux can't seem to make inroads on the
desktop.  Do we expect desktop users to use strace and look at system
calls in order to be able to use sound on an old PC?

It turns out that alsa is trying to open /dev/snd/controlC0 but
unfortunately that device file is actually at
/dev/.static/dev/snd/controlC0 which it doesn't try.  If it could open
this device, I think that my sound module would load and sound would
work (based on the contents of /etc/udev/alsa-utils.rules:
KERNEL=="controlC[0-7]", ACTION=="add", RUN+="/lib/udev/alsa-utils").

Do we expect desktop users to learn the format of udev rules?
Even the explanation of this (see man udev) is poorly written and I
don't fully understand this line.  I think it's an if-then statement
with the RUN+=... being the then part, where RUN is an array of
programs to run and += appends a new array element to the array.

At boottime, how do I get this device put into the /dev file?  At
boottime, the kernel detects (using udev) what devices are present and
populates the /dev directory with them.  But there's no way for the
kernel to detect devicies that are legacy ISA cards (without PnP).
Only drivers can find them since the driver uses a default IO address.
Of couse the driver module doesn't load since the device to load it
doesn't exist in /dev --the chicken and the egg problem.  I could of
course load the sound module at boottime but it loads a lot of
dependency modules and I only expect to use sound in about 0.5 % of my
sessions so I should be able to conserve memory and load the sound
drivers only when I'm using sound.

			David Lawyer


More information about the SGVLUG mailing list