Other Parts Discussed in Thread: AM5729
I currently have a 4-channel audio recording setup from a TLV320ADC6140 to an AM5729 over MCASP using TDM. Unfortunately, I have another device on the same MCASP that is not compatible with TDM. I am just looking for some guidance on the modifications required to communicate the 4 analog input channels over I2S instead of TDM. I understand that the simple-audio-card-format will need to change to "i2s", mcasp tdm-slots will change to 2, and all tdm-based fields will need to be removed. Here are my device, mcasp and sound configurations:
sound {
compatible = "simple-audio-card";
simple-audio-card,name = "tlv320adc6140";
simple-audio-card,format = "dsp_a";
simple-audio-card,bitclock-master = <&mcasp>;
simple-audio-card,frame-master = <&mcasp>;
mcasp: simple-audio-card,cpu {
sound-dai = <&mcasp1>;
system-clock-direction-out;
system-clock-frequency = <24576000>;
dai-tdm-slot-num = <4>;
dai-tdm-slot-width = <32>;
dai-tdm-slot-tx-mask = <1 1 1 1>;
dai-tdm-slot-rx-mask = <1 1 1 1>;
};
codec: simple-audio-card,codec {
sound-dai = <&tlv320adc6140>;
};
};
&mcasp1 {
compatible = "ti,dra7-mcasp-audio";
#sound-dai-cells = <0>;
status = "okay";
op-mode = <0>; // I2S Mode
tdm-slots = <4>; // 4 channels active
num-serializer = <16>; // define all 16. Keep inactive ones for completeness and to ensure axr10 and axr11 used
serial-dir = < // 0: INACTIVE, 1: TX, 2: RX - ax10 Tx | ax11 Rx
0 0 0 0
0 0 0 0
0 0 1 2
0 0 0 0
>;
tx-num-evt = <32>; // configures WFIFIO threshold. 1 - if properpty missing FIFO use disabled. 0 - disabled
rx-num-evt = <32>; // configures RFIFO threshold. ^
};
tlv320adc6140: tlv320adc6140@4c {
compatible = "ti,tlv320adc6140";
#sound-dai-cells = <0>;
reg = <0x4c>;
ti,mic-bias-source = <6>; // Unconnected -> can probably leave it off
ti,gpi-config = <1 1 1 1>; // All configured as general-purpose input
ti,gpio-config = <2 2>; // GPIO1 is configured as ADC_INT. check output drive type
ti,gpo-config-1 = <1 0>; // GPO1 configured as general pupose output - check drive type
ti,gpo-config-2 = <1 0>; // GPO2 configured as general pupose output - check drive type
ti,gpo-config-3 = <1 0>; // GPO3 configured as general pupose output - check drive type
ti,gpo-config-4 = <1 0>; // GPO4 configured as general pupose output - check drive type
reset-gpios = <&gpio6 20 GPIO_ACTIVE_HIGH>; // Check: Only GPIO on ball C23
status = "okay";
};