[alsa-devel] Thoughts on ASOC v2 driver architecture

Timur Tabi timur at freescale.com
Mon Jun 16 16:23:39 CEST 2008


Jon Smirl wrote:

> I'd like for the fabric driver to be dynamically loaded by the device tree.

You have a PPC problem, not an ASoC problem.  You're trying to use the 
device tree to load a device without specifying a specific node.  This 
is particularly difficult with device trees because once a driver has 
claimed a node via a probe, that node isn't probed again.  So you can't 
use any I2S, DMA, or codec nodes.

> The root of my problem is that I want to handle my four board variants
> with a single kernel. So when the kernel loads, I need to figure out
> which board specific code to load. In the current ASOC design it is
> assumed that this code is permanently linked in as a platform driver.

Not with ASoC V2.  I load my fabric driver as a regular module.  It also 
doesn't matter what order I load the drivers in.  Once the fourth driver 
is loaded, ASoC does its magic and creates a sound card (or two) for me.

So do what I did: deal with the limitations of ASoC V1 as best you can, 
and port your driver to ASoC V2.


More information about the Alsa-devel mailing list