[alsa-devel] [PATCH v2] davinci-mcasp: Add support for multichannel playback
vaibhav.bedia at ti.com
Mon Mar 11 08:01:59 CET 2013
On Fri, Mar 08, 2013 at 19:52:09, Mike Looijmans wrote:
> On 03/06/2013 12:19 PM, Bedia, Vaibhav wrote:
> > On Wed, Mar 06, 2013 at 16:30:48, Daniel Mack wrote:
> >> On 06.03.2013 11:54, Bedia, Vaibhav wrote:
> >>> Hi Daniel,
> >>> On Tue, Mar 05, 2013 at 21:31:59, Daniel Mack wrote:
> >>> [...]
> >>>> As Michal described, we used a board with a multichannel Codec on it,
> >>>> which connects 3 of its I2S inputs to the AM33xx's AXR data lines.
> >>>> Software wise, we tested with 'aplay -cX', and that seems to work just fine.
> >>> Since you are using a multichannel codec things are a lot simplified for you :)
> >>> Someone might want to hook up multiple codecs to get multi-channel behavior.
> >>> There will be only 1 CPU DAI but there can be upto 16 CODEC DAIs operating in
> >>> sync. I haven't really followed the recent ASoC changes so I don't know whether
> >>> something like this can be handled right now.
> >> I would rather instanciate multiple McASP cores for such setups, so you
> >> can (in theory) also make them operate on different bit depths and clock
> >> dividers. You think that's possible as well?
> > Yeah. Using multiple McASPs would be much simpler to handle both in s/w and h/w.
> Would it?
> The McASP has multiple serializers, but they all share the same clocks
> and format settings. The data will come in as "L1 L2 L3 .. R1 R2 R3 .."
> so the code would have keep track of which channels have to go where,
> and rearrange it to the clients. And it must be able to dynamically
> add/remove channels without disturbing the other streams.
I don't see how the grouping of codecs like you are mentioning helps
add/remove channels while capture/playback in on-going. By implementing
a dummy codec you can select which serializers are enabled/disabled but
won't the selection have to be be before starting any streaming since you
can't update the DMA controller configuration on the fly. Or maybe that's
what you meant by add/remove channels without disturbing the other streams.
> So unless you want to physically add more McASP hardware to the system,
> I don't see how this would be "simpler" to handle than other options.
> A way to "group" the codecs together is much simpler to implement (which
> is simply proven by the simple fact that I implemented it on my system)
> and it makes it very easy to control on the user side too - the
> selection of codecs is just a mixer control.
It's good that you have working a implementation. Like I mentioned in the
other thread it would be good if you can post the changes that you did
so that the approach can be discussed in detail, obviously assuming you want
something like to be handled in mainline code.
More information about the Alsa-devel