Re: Sound card support in Debian GNU/kFreeBSD kernel?
On Sunday 17 October 2010 14:04:50 Robert Millan wrote:
> 2010/10/17, Michael Dorrington <firstname.lastname@example.org>:
> > It appears so. Is this the way FreeBSD likes it?
> Probably not, but they don't have a daemon like hotplug/udev AFAIK.
There is devd for hotplugging and udev-like stuff.
For auto-detecting sound the recommended way is loading snd_driver which
loads *all* sound drivers. After that you can cat /dev/sndstat which
will tell you which driver has attached and tell your loader to load
that on a regular basis.
It should be fairly easy to automate that on Debian.
> > Could the plumbing
> > layer surrounding linux be used to detect the need to load a
> > module(s) and load it/them?
> It'd probably be easier to write a new one from scratch. It's very
> simple really:
> - Write a script that extracts a relation of PCI id with associated
> driver from kernel source.
> - Write a small program or script that iterates through PCI devices
> (using libpci in C or lspci in bash), checks each instance
> against the PCI id relation, and loads corresponding module.
> When it comes to dynamically pluggable devices (e.g. USB) things
> aren't so simple as you need to find/implement some kernel facility
> to handle plug/unplug events, but PCI alone would already make lots
> of users happy.
> > Would people want that?
> Would be very useful IMO. Also, a hotplug mechanism would allow
> more modules to be moved out of the kernel than just soundcards.