[alsa-devel] [PATCH 4/7] Alchemy: DB1200 AC97+I2S audio support.

Manuel Lauss manuel.lauss at googlemail.com
Mon Jun 8 15:11:39 CEST 2009

Hi Mark,

>> I see now what you mean, but this is ugly as sin:
>> I now need to register 2 platform devices in the board code: 1 for the DAI
>> (with resources mmio + irq) and 1 for the DMA engine (with ddma id resources),
>> or register the DMA engine device from within the AC97/I2S drivers.
>> This is in my opinion even worse than the current scheme, which at least allows
>> me to group all PSC resources into one struct resource which all audio-related
>> drivers can share without too much uglyness.
> If you trigger registration the DMA engine from within the I2S and AC97
> devices you can still group everything together like you want to so I
> don't really see the problem - they're peering at a different device for
> the data but other than that things are unchanged.  At the minute you're
> loosing a lot of sharing by having this in the individual machine
> drivers.

All 3 drivers are now platform_devices -- and now I still have the
same problem as
before: I can't really share the whole struct resource;  i need to allocate
a new resource struct, fill in the dma ids and register the dma device with it.

Btw, the davinci-evm in asoc-git also registers mmio and dma from within
the machine code.

I can't shake the feeling that there's something wrong with the whole asoc
device model (and that asoc was designed with pxa2xx devices in mind which
have single audio units with fixed resources that the driver code can
hardcode inside it).

> Note that one of the possibilities once multiple sound card support is
> introduced is that DAIs could be shared between multiple cards.  This is

I wrote the au1x audio drivers with this in mind: the DAI really describes how
to interact with a PSC; I didn't see any point in duplicating the dai
for each possible PSC.

To put an end to this thread:  I really don't want to change the machine code
or dai drivers at this time, because I have the feeling that it's a few steps
backwards.  If you don't agree with this then I'll leave the audio parts out of
the submission; I don't really care if it goes in or not, I just saw
it as a nice
sample machine driver for both AC97 and I2S on Alchemy.

        Manuel Lauss

More information about the Alsa-devel mailing list