Re: sound in 2.1.71

David Woodhouse (dwmw2@cam.ac.uk)
Sat, 06 Dec 1997 15:08:29 +0000


alan@lxorguk.ukuu.org.uk said:
>
> > modprobe sound set everything up. Now, I have to modprobe sb, which
> > loads the modules uart401 and sound, but rmmod sb does not unload
> > them, so it is necessary to rmmod uart401 and rmmod sound to remove all
> > of the modules.

> Problems with the abilities of the user tools are for someone else to
> look at. There are very very good reasons for modular sound

The user tools are in this case capable of doing what is required, almost.
modprobe -r sb will get rid of uart401 and sound.

With "alias char-major-14 sb" in /etc/conf.modules, at least the audio and
mixer devices will work as expected. More than that will require some
request_module calls in sound.o to call in the extra modules when they're
required.

However, the style of patch that I submitted a day or two ago to do this
doesn't quite address the whole problem. We still have scope for confusion
with device numbers.

For example, if I load awe_wave.o before sb.o, I get the AWE32 equalizer as
/dev/mixer and the proper SB mixer as /dev/mixer1, which breaks a fair amount
of code. We essentially have devices in a random order depending on the order
in which they are accessed.

Maybe we need to be able to pass device numbers to the modules as we load
them, so whenever awe_wave is loaded it takes the second mixer slot, not the
first. What do people think of that idea?

This problem has come up in many different forms. Ethernet device numbering is
another prime example. Dare I mention SCSI? <g>

One possible solution for sound is to give each device a different minor
number, so rather than mixer0, mixer1, etc we have mixersb , mixerawe, etc.
Then the user can make their own symlinks, and working out which module to
request gets very simple.
Unfortunately, that'd take a lot of minor numbers, even if we only allow one
card of each type.

64-bit kdev_t, anyone?

Ah - another more important problem with the current setup is that if you load
sb.o, then load awe_wave.o, unload sb.o and access /dev/mixer0, you get the
predictable oops.

If t'was up to me, I'd go for the profusion of minor numbers - we can always
decide to use different majors for each of mixer, audio, midi, synth, etc., so
we don't really need 64bit devices.

-- 
----                              ----                              ----
David Woodhouse, Robinson College, CB3 9AN, England.   (+44) 0976 658355
	dwmw2@cam.ac.uk		http://dwmw2.robinson.cam.ac.uk
	    finger pgp@dwmw2.robinson.cam.ac.uk for PGP key.