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

Mike Looijmans mike.looijmans at topic.nl
Wed Apr 10 13:08:14 CEST 2013

On 03/11/2013 09:56 AM, Bedia, Vaibhav wrote:
> On Mon, Mar 11, 2013 at 14:03:50, Mike Looijmans wrote:
>> 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
>> mainstream.
> Thanks. In my opinion any proof of concept will be good to get some
> discussion going on this topic.

It has been way to long since I last replied, and there's still much to do.

Anyway, I attached the "multiplex" codec source code. The multiplex 
assumes that all its child codecs share the same (cpu) dai and that the 
dai is capable of handling multiple codecs (either using TDM or multiple 
pins, or whatever combination). The machine part must take care of 
forwarding the "mask" setting of the multiplexer and translate it to 
something the CPU DAI understands.
(If the codecs do not share the DAI, you don't need the multiplexer...)

The multiplex only supports capture.

To use it, compile it in (change Kconfig) and have the board file 
register codecs with the multiplexer. The multiplexer creates a mixer 
switch control for each codec. To use a set of codecs, set their switch 
to "on" (which is default) and record from the multiplex codec. The 
multiplex will control the codecs.

Codecs can also be used without the multiplex in between, no change there.

See it as a proof of concept. It works fine for me...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: multiplex.c
Type: text/x-csrc
Size: 12131 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20130410/bb008b40/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: multiplex.h
Type: text/x-chdr
Size: 132 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20130410/bb008b40/attachment-0001.bin>

More information about the Alsa-devel mailing list