[alsa-devel] [PATCH 1/2] powerpc: add platform registration for ALSA SoC drivers

Timur Tabi timur at freescale.com
Fri Apr 30 23:46:57 CEST 2010


On Tue, Apr 27, 2010 at 10:20 AM, Liam Girdwood <lrg at slimlogic.co.uk> wrote:

>> Another problem is that ASoC won't let me probe the DMA channels
>> independently.  That is, I cannot tell ASoC that I have a playback DMA
>> and a capture DMA.  ASoC does not recognize two DMA devices for a
>> single SSI.  If you can fix that, then I can turn the DMA driver into
>> an OF driver.
>>
>
> Iirc, the SSI and DMA controllers on your SoC mean that each DMA device
> can only do one direction (either Playback or Capture). So I'm thinking
> we create two DAI link entries for your sound card (one for playback and
> the other for capture) and they both use the same SSI device but each
> would have it's own DMA device.
>
> This would result in two separate pcm devices being exported to
> userspace i.e one for playback only and the other for capture only. I
> think this is also a more accurate representation of your hardware too
> (since we have different DMA devices for each pcm stream direction).

Ok, I'm trying to do this now, and I'm running into problems.

So here's the device list:

One machine
One SSI
Two DMA channels
One codec

So I create two dai_links in the machine driver.  Each dai_link has
two DAIs in it.  The DAIs are identical, except for the platform_drv
field.  The platform_drv in the first DAI points to the first DMA
channel, and the platform_drv of the second DAI points to the second
DMA channel.

When I boot Linux, I get this:

asoc: cs4270 <-> /soc at e0000000/ssi at 16000 mapping ok
sysfs: cannot create duplicate filename '/devices/platform/soc-audio/cs4270'

so it looks like when asoc is processing the dai_link, it tries to
create a sysfs device for the codec twice.

How do I avoid this?

-- 
Timur Tabi
Linux kernel developer at Freescale


More information about the Alsa-devel mailing list