Other Parts Discussed in Thread: AM4377, , AM4372
Hi TI team,
We have an AM4377 board MCASP0 connect to TLV320ADC3140, AM4377 is Slave and TLV320ADC3140 is Master, TLV320ADC3140 is configured as 8xDMIC.
we meet a problem is 'read error: Input/output error' when running 'arecord' command and test.wav has no data:
root@am437x-evm:~# arecord -Dhw:0,0 -c 8 -d 10 -r 48000 -f S32_LE test.wav
Recording WAVE 'test.wav' :
Signed 32 bit Little Endian, Rate 48000 Hz, Channels 8
arecord: pcm_read:2143: read error: Input/output error
root@am437x-evm:~#
Please help to check it, thanks.
here are some our information:
1. block diagram:

2. TLV320ADC3140 driver source code download from:
git.kernel.org/.../codecs
/tlv320adcx140.c?h=v5.9.6
git.kernel.org/.../codecs
/tlv320adcx140.h?h=v5.9.6
3. SDK is:
ti-processor-sdk-linux-rt-am437x-evm-06.03.00.106 (linux-rt-4.19.94+gitAUTOINC+a242ccf3f1-ga242ccf3f1).
4. Audio-releted device tree config:
#include "am4372.dtsi"
clk_mcasp0_fixed: clk_mcasp0_fixed {
#clock-cells = <0>;
compatible = "fixed-clock";
clock-frequency = <24576000>;
};
clk_mcasp0: clk_mcasp0 {
#clock-cells = <0>;
compatible = "gpio-gate-clock";
clocks = <&clk_mcasp0_fixed>;
enable-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>; /* Clk enable on GPIO4_13 */
};
sound {
compatible = "simple-audio-card";
simple-audio-card,name = "AM4377-Audio-Card";
#sound-dai-cells = <0>;
simple-audio-card,dai-link@0 {
format = "dsp_b";
bitclock-inversion;
bitclock-master = <&sound0_master>;
frame-master = <&sound0_master>;
cpu {
sound-dai = <&mcasp0>;
dai-tdm-slot-num = <8>;
dai-tdm-slot-width = <32>;
dai-tdm-slot-tx-mask = <1 1 1 1 1 1 1 1>;
dai-tdm-slot-rx-mask = <1 1 1 1 1 1 1 1>;
};
sound0_master: codec {
sound-dai = <&tlv320adc3140>;
clocks = <&clk_mcasp0>;
};
};
};
&i2c2 {
tlv320adc3140: codecadc@4c {
reg = <0x4c>;
};
};
&tlv320adc3140 {
status = "okay";
#sound-dai-cells = <0>;
compatible = "ti,tlv320adc3140";
/* areg-supply = <&vsys_1v8>; */
ti,mic-bias-source = <6>;
ti,pdm-edge-select = <0 0 0 0>;
/* GPI1 ~ GPI4 */
ti,gpi-config = <4 5 6 7>;
ti,gpio-config = <10 0>;
ti,gpo-config-1 = <4 1>;
ti,gpo-config-2 = <4 1>;
ti,gpo-config-3 = <4 1>;
ti,gpo-config-4 = <4 1>;
ti,asi-tx-driver = <1>;
reset-gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>;
};
&mcasp0 {
status = "okay";
#sound-dai-cells = <0>;
pinctrl-names = "default", "sleep";
pinctrl-0 = <&mcasp0_pins_default>;
pinctrl-1 = <&mcasp0_pins_sleep>;
op-mode = <0>; /* MCASP_IIS_MODE */
tdm-slots = <8>;
/* 4 serializers ARX0, ARX1, ARX2, ARX3 */
serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
2 0 0 0
>;
tx-num-evt = <32>;
rx-num-evt = <32>;
};
&am43xx_pinmux {
gpio4_pins: gpio4_pins_default {
pinctrl-single,pins = <
AM4372_IOPAD(0x9e0 , PIN_OUTPUT_PULLUP | MUX_MODE7) /* CAM1_FIELD.GPIO4_12 */
AM4372_IOPAD(0x9e4 , PIN_OUTPUT_PULLUP | MUX_MODE7) /* cam1_wen.GPIO4_13 */
>;
};
mcasp0_pins_default: mcasp0_pins_default {
pinctrl-single,pins = <
AM4372_IOPAD(0x99c, PIN_INPUT_PULLUP | MUX_MODE0 ) /* (M24) mcasp0_ahclkr.mcasp0_ahclkr*/
AM4372_IOPAD(0x9ac, PIN_INPUT_PULLUP | MUX_MODE0 ) /* (N24) mcasp0_ahclkx.mcasp0_ahclkx */
AM4372_IOPAD(0x998, PIN_INPUT_PULLUP | MUX_MODE0 ) /* (H23) mcasp0_axr0.mcasp0_axr0 */
AM4372_IOPAD(0x9a8, PIN_INPUT_PULLUP | MUX_MODE0 ) /* (L24) mcasp0_axr1.mcasp0_axr1 */
AM4372_IOPAD(0x994, PIN_OUTPUT_PULLUP | MUX_MODE0 ) /* (N22) mcasp0_fsx.mcasp0_fsx */
AM4372_IOPAD(0x9a4, PIN_INPUT_PULLUP | MUX_MODE0 ) /* (N24) mcasp0_fsr.mcasp0_fsr */
AM4372_IOPAD(0x990, PIN_OUTPUT_PULLDOWN | MUX_MODE0 ) /* (N24) mcasp0_aclkx.mcasp0_aclkx, */
AM4372_IOPAD(0x9a0, PIN_INPUT_PULLUP | MUX_MODE0 ) /* (N22) mcasp0_aclkr.mcasp0_aclkr */
>;
};
mcasp0_pins_sleep: mcasp0_pins_sleep {
pinctrl-single,pins = <
AM4372_IOPAD(0x99c, PIN_INPUT_PULLUP | MUX_MODE7 ) /* (M24) mcasp0_ahclkr.mcasp0_ahclkr*/
AM4372_IOPAD(0x9ac, PIN_INPUT_PULLUP | MUX_MODE7 ) /* (N24) mcasp0_ahclkx.mcasp0_ahclkx */
AM4372_IOPAD(0x998, PIN_INPUT_PULLUP | MUX_MODE7 ) /* (H23) mcasp0_axr0.mcasp0_axr0 */
AM4372_IOPAD(0x9a8, PIN_INPUT_PULLUP | MUX_MODE7 ) /* (L24) mcasp0_axr1.mcasp0_axr1 */
AM4372_IOPAD(0x994, PIN_OUTPUT_PULLUP | MUX_MODE7 ) /* (N22) mcasp0_fsx.mcasp0_fsx */
AM4372_IOPAD(0x9a4, PIN_INPUT_PULLUP | MUX_MODE7 ) /* (N24) mcasp0_fsr.mcasp0_fsr */
AM4372_IOPAD(0x990, PIN_OUTPUT_PULLDOWN | MUX_MODE7 ) /* (N24) mcasp0_aclkx.mcasp0_aclkx, */
AM4372_IOPAD(0x9a0, PIN_INPUT_PULLUP | MUX_MODE7 ) /* (N22) mcasp0_aclkr.mcasp0_aclkr */
>;
};
};
5. I dumped TLV320ADC3140's all registers by i2cdump when running 'arecord' command and show them as below:

Regards,
Xing-Qin


