[alsa-devel] Thoughts on ASOC v2 driver architecture

Jon Smirl jonsmirl at gmail.com
Mon Jun 16 18:11:31 CEST 2008


A more familiar example of this problem is unified graphics drivers.
NVidia probably has 100 variations on their GPUs. They used to have
dozens of device drivers for these chips. Figuring out exactly which
GPU you have and loading the right driver for it is too hard for the
customer to do. So nvidia has built a unified driver for all their
hardware. When it initializes it detects the exact GPU type and
discards all the unneeded code.

I have the same problem. We have four devices that are almost
identical but not quite. Each of these devices has a different product
name in their device tree. I want to be able to send out a single
kernel image that can support all four devices.

To do this I'll put all of the device drivers on an initrd. Then as
the kernel processes the device tree the right drivers will get
loaded. After the boot process is finished the initrd and unused
drivers disappear. Moving the fabric device creation in the my
equivalent of arch/powerpc/platforms/86xx/mpc8610_hpcd.c will let me
do this.

BTW, if you read in /Documentation about platform drivers they say not
to make the devices in the module init function because it causes
problems like the one I'm having.

-- 
Jon Smirl
jonsmirl at gmail.com


More information about the Alsa-devel mailing list