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...
Mike.