[alsa-devel] How to structure CPU DAI
jonsmirl at gmail.com
jonsmirl at gmail.com
Sun Nov 18 23:04:15 CET 2012
The LPC3130 has two independent I2S channels but it is not two copies
of the same hardware block. Instead it is a single hardware block
implementing the two channels. Some setup registers contain setup bits
for both channels.
So I have one CPU DAI with two independent CODECs hung off from it.
So in a function like hw_params() for the CPU DAI, how do I know which
I2S channel I'm supposed to be using? At the point where I created the
soc_card I know the right channel. But I can't use the card pointer in
the CPU DAI, since there are two cards and only on CPU DAI. The card
pointer points to the last one registered. Can I put the info into the
substream?
Or should I register two CPU DAIs from a single I2S device driver and
give then two different names?
A device tree like this describes the hardware..
i2s at 16000000 {
#address-cells = <2>;
#size-cells = <0>;
compatible = "nxp,lpc31xx-i2s";
reg = <0x16000000 0x1000>;
i2s0:i2s at 0 {
interrupts = <13 15>;
reg = <0x80 0x180>;
/*receive-slave;*/ /* default is master */
};
i2s1:i2s at 1 {
interrupts = <14 16>;
reg = <0x100 0x200>;
/*receive-slave;*/ /* default is master */
};
};
sound at 1 {
compatible = "ea,ea3131-uda1380";
audio-codec = <&uda1380-0>;
i2s-controller = <&i2s0>;
};
sound at 2 {
compatible = "ea,ea3131-uda1380";
audio-codec = <&uda1380-1>;
i2s-controller = <&i2s1>;
};
--
Jon Smirl
jonsmirl at gmail.com
More information about the Alsa-devel
mailing list