This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM62P: TLV320ADC3101

Part Number: AM62P
Other Parts Discussed in Thread: TLV320ADC3101,

I'm using a AM62p5 processor and a TLV320ADC3101 as my audio in.

I have this configuration on my sound node

	codec_audio: sound {
		compatible = "simple-audio-card";
		simple-audio-card,name = "Lohr-Full-Audio";
		simple-audio-card,mclk-fs = <512>;
		status = "okay";

		simple-audio-card,dai-link@0 {
			format = "i2s";
			bitclock-master = <&mcasp_cpu>;
			frame-master = <&mcasp_cpu>;

			mcasp_cpu: cpu {
				sound-dai = <&mcasp2 0>;
				system-clock-direction-out;
				dai-tdm-slot-num = <2>;
				dai-tdm-slot-width = <32>;
			};

			codec_3: codec@0 {
				sound-dai = <&audio_adc1>;
				clocks = <&audio_refclk0>;
				clock-names = "mclk";
				simple-audio-card,prefix = "ADC1";
				assigned-clock-rates = <24576000>; 
			};
		};
};

this configuration on my mcasp2 node.

&mcasp2 {
	pinctrl-names = "default";
    pinctrl-0 = <&mcasp_audio_in_out_pins_default>;

	op-mode = <0>;          /* Modo I2S */
    tdm-slots = <2>;        /* Stereo */

	serial-dir = <0 0 0 2 0>;

	tx-num-evt = <32>;
	rx-num-evt = <32>;

    status = "okay";

	#sound-dai-cells = <0>;

    clocks = <&k3_clks 192 0>, <&k3_clks 192 27>; 
	clock-names = "fck", "mcasp_aux_clk";

    assigned-clocks = <&k3_clks 192 0>, <&k3_clks 192 27>;
    assigned-clock-parents = <0>, <&k3_clks 192 30>;
    assigned-clock-rates = <0>, <24576000>;

	auxclk-fs-ratio = <512>;
	fck-master;

};


and this configuration on my I2C node

&main_i2c1 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&main_i2c1_pins_default>;
	clock-frequency = <400000>;

	audio_adc1: adc1@19 {
		compatible = "ti,tlv320adc3101";
		reg = <0x19>;
		pinctrl-0 = <&main_rst_adc1_pins_default>;
		pinctrl-names = "default";
		reset-gpios = <&main_gpio0 47 GPIO_ACTIVE_HIGH>;
		
		#sound-dai-cells = <0>;
		clocks = <&k3_clks 192 30>;
		mclk-fs = <512>;
		clock-names = "mclk";

		assigned-clocks = <&k3_clks 192 30>;
    	assigned-clock-rates = <24576000>;

        status = "okay";

        gpio-controller;
        #gpio-cells = <2>;

        ti,dmdin-gpio1 = <0>;
        ti,micbias1-vg = <0>;
    };
};

But when I try to acquire sound using this command

root@am62p-lohr:~# arecord -D hw:0,0 -d 2 -f S16_LE -r 48000 -c 2 /tmp/test.wav

I got this error.

Recording WAVE '/tmp/test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
arecord: pcm_read:2272: read error: Input/output error

is there anything wrong on my configuration?

Best regards.