On Fri, Jun 03, 2011 at 05:04:12PM -0700, Caleb Crome wrote:
> static char *my_codec_dais[] = {
> "tlv320aic3x-hifi.0", <---- in this case, the '.0'
> "tlv320aic3x-hifi.1", ---- means that it's slot 0
> "tlv320aic3x-hifi.2", ---- on the TDM bus.
> "tlv320aic3x-hifi.3",
> };
> static char *my_codec_names[] = {
> "tlv320aic3x-codec.2-0018", <--- codec on i2c bus 2, addr 0x18
> "tlv320aic3x-codec.2-0019", <--- codec on i2c bus 2, addr 0x19
> "tlv320aic3x-codec.2-001a", <--- codec on i2c bus 2, addr 0x1a
> "tlv320aic3x-codec.2-001b", <--- codec on i2c bus 2, addr 0x1b
> };
I don't like the need to line the two arrays up, and the DAI names
really ought to be enough anyway (this applies in general, not just
here).
> The core will parse the dai name for the slot order, and pass it on to the
> codec during hw_params. Then the codec can properly set the TDM slot on the
> hardware interface.
No, the machine driver needs to own the TDM configuration. We need to
have the flexibiltiy for the system to use arbatrary arrangements for
things like buses with more than two devices on them and we need to be
able to cope with random layouts of the channels (for example, all the
left channels on one device, all the right channels on another device).
We also need to be able to change this dynamically at runtime depending
on the current needs of the system.