Other Parts Discussed in Thread: SK-AM62B-P1
Tool/software:
Hi Expert,
Our custom board mcasp0 can not play audio wav with codec rt5628
Here are the setting we have now
[Device tree]
codec_audio: sound {
compatible = "simple-audio-card";
simple-audio-card,name = "am62xx-G04";
simple-audio-card,widgets =
"Headphone", "Headphone Jack",
"Line", "Line Out",
"Microphone", "Mic Jack",
"Line", "Line In";
simple-audio-card,routing =
"Headphone Jack", "HPL Mux Out",
"Headphone Jack", "HPR Mux Out";
simple-audio-card,format = "i2s";/* i2s */
simple-audio-card,bitclock-master = <&cpu_master>;
simple-audio-card,frame-master = <&cpu_master>;
simple-audio-card,bitclock-inversion;
cpu_master: simple-audio-card,cpu {
sound-dai = <&mcasp0>;
system-clock-direction-out;
};
sound_master: simple-audio-card,codec {
sound-dai = <&audio>;
/delete-property/ clocks; /* to remove tlv320_mclk on SK-AM62B-P1 */
};
};
main_mcasp0_pins_default: main-mcasp0-default-pins {
pinctrl-single,pins = <
AM62X_IOPAD(0x1a4, PIN_INPUT, 0) /* (B20) MCASP0_ACLKX.MCASP0_ACLKX */
AM62X_IOPAD(0x1a8, PIN_INPUT, 0) /* (D20) MCASP0_AFSX.MCASP0_AFSX */
AM62X_IOPAD(0x1a0, PIN_OUTPUT, 0) /* (E18) MCASP0_AXR0.MCASP0_AXR0 */
>;
};
&mcasp0 {
status = "okay";
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&main_mcasp0_pins_default>;
op-mode = <0>; /* MCASP_IIS_MODE */
tdm-slots = <2>;
serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
1 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
>;
tx-num-evt = <0>;
rx-num-evt = <0>;
};
&main_i2c0 {
status = "okay";
clock-frequency = <100000>;
/* use rt5628 for audio */
audio: audio-codec@18 {
#sound-dai-cells = <0>;
compatible = "realtek,rt5628";
reg = <0x18>;
};
};
[Kernel log we have]
[ 1.548344] RT5628 Audio Codec probed
[ 1.895897] ALSA device list:
[ 1.898894] #0: am62xx-G04
[SCHEMATICS]
[PINMUX]
B20 |
MCASP0_ACLKX |
Audio |
Audio out,Audio DAC ALC5629 |
D20 |
MCASP0_AFSX |
Audio |
|
E18 |
MCASP0_AXR0 |
Audio |
Thanks
Daniel