[alsa-devel] [PATCH 20/20] ASoC: fsl: add imx-sgtl5000 machine driver

Mark Brown broonie at opensource.wolfsonmicro.com
Tue Mar 6 21:11:53 CET 2012

On Tue, Mar 06, 2012 at 11:19:20AM -0700, Stephen Warren wrote:

> > In this case (and probably in the i.MX case, at a guess the structure is
> > the same) I'd just have the DAI drivers kick off registration of the
> > ASoC DMA stuff, it's all part of the ASoC driver for the hardware really.
> How would that work when there are multiple DAIs, e.g. on a system with
> 2 I2S and 1 SPDIF DAI and they all want to register the PCM driver? I
> guess I could just add some utility function in the PCM driver file to
> ensure that the platform device only gets created once, and probably
> would also need to refcount it for when the DAIs get unloaded etc.

You could just create a DMA device per DAI since it's just a wrapper,
you shouldn't even need to allocate a new struct device but just use the
DAI device when registering the ASoC DMA driver.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20120306/6289f0aa/attachment.sig 

More information about the Alsa-devel mailing list