[alsa-devel] [PATCH v2] davinci-mcasp: Add support for multichannel playback

Mike Looijmans mike.looijmans at topic.nl
Mon Mar 11 09:33:50 CET 2013

On 03/11/2013 08:01 AM, Bedia, Vaibhav wrote:
> On Fri, Mar 08, 2013 at 12:59:49, Mike Looijmans wrote:
>> I have 9 codecs connected, and the main problem to solve was to get the
>> system to start ALL of them instead of just one.
>> I solved that by creating a "multiplex" codec, which in itself doesn't
>> do anything. It exports a mixer where you can switch on/off the codecs
>> you want to use, and it forwards all commands (_ops) to the codecs that
>> are enabled. The serializer settings are sent to the asp driver as if
>> they are TDM masks (using the bits to enable serializers instead).
>> In userland you see 10 codecs, you can use each separately, or use the
>> 10th codec (the multiplexer) to use any combination of other codecs.
> Interesting approach. I was thinking more on the lines of how to expose
> the different serializer-codec pairs to the core. Since there's only one
> DMA interface for the different serializers doing this in a generic
> manner looked complicated, at least to me.
> I am aware of couple of multi-channel systems that preferred the approach
> that I mentioned. In one, a cascading of codecs was preferred so as to free
> up the extra serializer pads for different functions at the SoC level.
> There was a custom app to split the data coming in from different channels
> but since it freed up a few pads, this approach was preferred. In another,
> sending SPDIF data to an HDMI transmitter was preferred, again to free up
> some pads. It finally depends on what the use-case is and which system level
> constraints are more important to satisfy.
> It would be good if you could post the changes that made so that we can
> discuss on how the approach in detail and possibly enhance the core to
> handle the multi-codec scenarios that use-cases like your require.

I'll post the code, but it's based on a 2.6.37 kernel and it's tailored 
to "my" platform, with numerous changes to clock settings and such. So 
don't expect it to be useful. It's only interesting as an "example" or 
for illustrating the general idea, but entirely useless for inclusion in 

Mike Looijmans - Topic Automation

More information about the Alsa-devel mailing list