Other Parts Discussed in Thread: TDA4VM
Hi
Our project use TDA4vm k3-j721e
audio codec : tlv320aic32x4
~# aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=tlv320aic32x4
tlv320aic32x4, davinci-mcasp.0-tlv320aic32x4-hifi tlv320aic32x4-hifi-0
Default Audio Device
sysdefault:CARD=tlv320aic32x4
tlv320aic32x4, davinci-mcasp.0-tlv320aic32x4-hifi tlv320aic32x4-hifi-0
Default Audio Device
~# aplay -D sysdefault:CARD=tlv320aic32x4 /usr/share/sounds/alsa/Side_Left.wav
Playing WAVE '/usr/share/sounds/alsa/Side_Left.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
aplay: pcm_write:2059: write error: Input/output error
My device tree about audio is as below:
We use AUDIO_EXT_REFCLK0 for audio mclk and mcasp6 for i2s.
Could this pinmux AUDIO_EXT_REFCLK0 for mclk ?
Does my settings be correct or something missed ?
sound {
compatible = "simple-audio-card";
simple-audio-card,name = "tlv320aic32x4";
simple-audio-card,widgets =
"Headphone", "Headphone Jack",
"Speaker", "Speaker",
"Line", "Line In",
"Line", "Line Out";
simple-audio-card,routing =
"IN2_L", "Line In",
"IN2_R", "Line In",
"Line Out", "LOL",
"Line Out", "LOR";
simple-audio-card,format = "i2s";
simple-audio-card,bitclock-master = <&sound_master>;
simple-audio-card,frame-master = <&sound_master>;
simple-audio-card,bitclock-inversion;
sound_master: simple-audio-card,cpu {
sound-dai = <&mcasp6>;
system-clock-frequency = <24576000>;
system-clock-direction = "out";
};
simple-audio-card,codec {
sound-dai = <&tlv320aic32x4_codec>;
system-clock-frequency = <24576000>;
};
};
audio_ext_refclk0_pins_default: audio-ext-refclk0-pins-default {
pinctrl-single,pins = <
J721E_IOPAD(0x1c, PIN_OUTPUT, 6) /* (AD22) PRG1_PRU0_GPO6.AUDIO_EXT_REFCLK0 */ /* mclk */
>;
};
mcasp6_pins_default: mcasp6-pins-default {
pinctrl-single,pins = <
J721E_IOPAD(0x04, PIN_OUTPUT_PULLDOWN, 12) /* (AC23) PRG1_PRU0_GPO0.MCASP6_ACLKX */ /* bclk */
J721E_IOPAD(0x08, PIN_OUTPUT_PULLDOWN, 12) /* (AG22) PRG1_PRU0_GPO1.MCASP6_AFSX */ /* wclk */
J721E_IOPAD(0x0c, PIN_OUTPUT_PULLDOWN, 12) /* (AF22) PRG1_PRU0_GPO2.MCASP6_AXR0 */ /* CODEC_DIN */
J721E_IOPAD(0x10, PIN_INPUT_PULLDOWN, 12) /* (AJ23) PRG1_PRU0_GPO3.MCASP6_AXR1 */ /* CODEC_DOUT */
>;
};
&k3_clks {
pinctrl-names = "default";
pinctrl-0 = <&audio_ext_refclk0_pins_default>;
};
&main_i2c4 {
pinctrl-names = "default";
pinctrl-0 = <&main_i2c4_pins_default>;
clock-frequency = <400000>;
tlv320aic32x4_codec: tlv320aic32x4@18 {
compatible = "ti,tlv320aic32x4";
reg = <0x18>;
#sound-dai-cells = <0>;
clocks = <&k3_clks 157 371>;
clock-names = "mclk";
assigned-clocks = <&k3_clks 157 371>;
assigned-clock-parents = <&k3_clks 157 400>;
assigned-clock-rates = <24576000>;
pinctrl-names = "default";
pinctrl-0 = <&codec_reset_pins_default>;
reset-gpios = <&main_gpio0 40 GPIO_ACTIVE_LOW>;
iov-supply = <&vsys_3v3>;
ldoin-supply = <&vsys_3v3>;
};
&mcasp6 {
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&mcasp6_pins_default>;
op-mode = <0>; /* MCASP_IIS_MODE */
tdm-slots = <16>;
auxclk-fs-ratio = <256>;
/* 16 serializers */
serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
1 2 0 0
0 0 0 0
0 0 0 0
0 0 0 0
>;
tx-num-evt = <1>;
rx-num-evt = <1>;
status = "okay";
};
BR
Addis