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.

PCM1865: connecting to am335x ti-sdk

Part Number: PCM1865
Other Parts Discussed in Thread: AM3358

HI, acording to https://e2e.ti.com/support/legacy_forums/embedded/linux/f/354/t/602825?Linux-PCM1865-AM3358-McASP-no-data-while-recording I am trying to configure pcm1865 with am335x board. 

I am using codecs from ti-sdk. I build device tree and board configure pcm 1865 while starting (clocks are visible with osciloscope) but when I am trying to record I got: arecord: pcm_read:2143: read error: Input/output error.

From dtsi I use only pin lcd_data14, lcd_data11, lcd_data13, lcd_data12.

My dtsi file:

&am33xx_pinmux {
mymcasp0_pins_default: mymcasp0_pins_default {
pinctrl-single,pins = <
0xc0 ( PIN_INPUT_PULLUP | MUX_MODE3 ) /* (U1) lcd_data8.mcasp0_aclkx */
0xc4 ( PIN_INPUT_PULLUP | MUX_MODE3 ) /* (U2) lcd_data9.mcasp0_fsx */
0xd0 ( PIN_INPUT_PULLUP | MUX_MODE3 ) /* (V2) lcd_data12.mcasp0_aclkr */
0xd4 ( PIN_INPUT_PULLUP | MUX_MODE3 ) /* (V3) lcd_data13.mcasp0_fsr */
0xc8 ( PIN_OUTPUT | MUX_MODE3 ) /* (U3) lcd_data10.mcasp0_axr0 */
0xd8 ( PIN_INPUT_PULLUP | MUX_MODE3 ) /* (V4) lcd_data14.mcasp0_axr1 */
0xcc ( PIN_INPUT_PULLUP | MUX_MODE4 ) /* (U4) lcd_data11.mcasp0_axr2 */
>;
};
};

&i2c2 {

status = "okay";
clock-frequency = <100000>;

pcm1865: pcm1865@4a {
compatible = "ti,pcm1865";
#sound-dai-cells = <0>;
reg = <0x4a>;
status = "okay";

};
};

&mcasp0 {
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&mymcasp0_pins_default>;

status = "okay";

op-mode = <0>; /* MCASP_IIS_MODE */
tdm-slots = <2>;
serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
0 2 2 0
>;
tx-num-evt = <32>;
rx-num-evt = <32>;
};

/ {

sound {
compatible = "simple-audio-card";
simple-audio-card,name = "ADC Sound";

simple-audio-card,widgets =
"Line", "Line In Jack 1",
"Line", "Line In Jack 2",
"Line", "Line In Jack 3",
"Line", "Line In Jack 4";
simple-audio-card,routing =
"Line In Jack 1", "VINL1",
"Line In Jack 1", "VINR1",
"Line In Jack 2", "VINL2",
"Line In Jack 2", "VINR2",
"Line In Jack 3", "VINL3",
"Line In Jack 3", "VINR3",
"Line In Jack 4", "VINL4",
"Line In Jack 4", "VINR4";

simple-audio-card,format = "i2s";

simple-audio-card,bitclock-master = <&sound0_master>;
simple-audio-card,frame-master = <&sound0_master>;

simple-audio-card,cpu {
sound-dai = <&mcasp0>;
system-clock-frequency = <24000000>;
system-clock-direction = "out";
};

sound0_master: simple-audio-card,codec {
sound-dai = <&pcm1865>;
system-clock-frequency = <12000000>;
};
};

};

my logs:

[    1.326577] pcm186x 2-004a: 2-004a supply avdd not found, using dummy regulator
[    1.334068] pcm186x 2-004a: Linked as a consumer to regulator.0
[    1.340024] pcm186x 2-004a: 2-004a supply dvdd not found, using dummy regulator
[    1.347434] pcm186x 2-004a: 2-004a supply iovdd not found, using dummy regulator
[    1.381085] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz
[    1.387266] cpu cpu0: Linked as a consumer to regulator.4
[    1.392808] cpu cpu0: Dropping the link to regulator.4
[    1.398396] cpu cpu0: Linked as a consumer to regulator.4
[    1.410470] asoc-simple-card sound: pcm1865-aif <-> 48038000.mcasp mapping ok
[    1.417811] asoc-simple-card sound: ASoC: no DMI vendor name!
[    1.428081] hctosys: unable to open rtc device (rtc0)
[    1.435253] wlan-en-regulator: disabling
[    1.439294] ALSA device list:
[    1.442526]   #0: ADC Sound