[alsa-devel] ASoC - Support for multiple components

Mark Brown broonie at opensource.wolfsonmicro.com
Mon Apr 19 19:14:19 CEST 2010

On Mon, Apr 19, 2010 at 05:25:14PM +0100, Liam Girdwood wrote:
> On Mon, 2010-04-19 at 09:15 -0600, Grant Likely wrote:

> > - Related to that, how are things like i2c codecs handled?  By rights,
> > there will be an i2c device registered under the i2c bus device for
> > the control interface.  How will this relate to the ASoC model?

> I2C/SPI codecs can now register with the driver core as I2C/SPI drivers.
> e.g. the I2C/SPI device probe registers the ASoC device :-

This is very similar to the current code structurally, from the driver
point of view the main change here is that it's now become mandatory to
use device model style stuff.  This means that there's not much to be
scared about if your drivers are using that already, though
soc_of_simple never got converted.

> > - None of the drivers appear to include struct device_driver; which
> > tells me that they don't use the driver core binding model.  How do
> > drivers get bound to devices?  Why does the ASoC code create an driver
> > interface instead of using the core code (what does the core code not
> > provide)?

> ASoC doesn't fully use the driver model for components in this changeset
> (or at all) due to the complex relationships between the individual
> components for probing() and for control of PM operations (i.e. we cant
> have pops and clicks at suspend). 

> This is not to say ASoC wont use the full driver model for components in
> the future. This work is an important step on the way to achieving this
> aim. 

The ordering requirements here mean this is a *very* open question.
Linus just nacked a bunch of stuff for 2.6.34 which would have added
some ability to waiting for components to probe stuff that things like
ASoC would need to use the driver core fully.  At the minute subsystems
like ASoC which are built up of components that don't have much to do
with each other have to do something like ASoC is doing and waiting for
all the components to come online before bringing the subsystem level
devices up.

Again, this isn't much change from a driver point of view from the
situation in 2.6.34, it's more moving forward to making it mandatory
and taking advantage of the features that can be brought than anything

More information about the Alsa-devel mailing list