[alsa-devel] Dynamically registering a codec

Mark Brown broonie at opensource.wolfsonmicro.com
Thu May 14 20:38:51 CEST 2009

On Thu, May 14, 2009 at 01:57:37PM -0400, Jon Smirl wrote:

> Now I see what you mean. I need to make the codec into a device so
> that I can dynamically load and find it. On PowerPC the codecs don't
> have to be compiled in, they can be on an initrd.

This is the case for all platforms, it's not in any way PowerPC specific.

>                                                   The code in
> of_simple will find the right driver and get it into memory. The
> platform device is what triggers the kernel to go searching for the
> module on initrd.

On every other platform the codec driver is linked to directly by the
machine driver so loading the machine driver will also cause the codec
driver to be loaded - at this stage of_simple isn't involved at all
except in that it has removed the usual way of getting the codec driver
loaded for AC97 devices.

> This isn't platform specific, other platforms could implement this but
> they don't have anything like a device tree telling them which modules
> to load. A device tree is a probing mechanism for devices that can't
> be probed.

Other platforms use platform devices in just the same way, they just
happen to set them up in a C file rather than a .dts file.  The
mechanisms for loading things after that are identical.  What's PowerPC
specific here is that you are trying to use this of-simple mechainsm and
that's defeating the way this is handled for AC97 codec drivers.

Please re-read my comments about the specific problems with AC97 - this
is key here.

More information about the Alsa-devel mailing list