Other Parts Discussed in Thread: PCM5102A, PCM5102
Tool/software: Linux
I'm trying to play .wav file on my customboard with PCM5102a codec, connected to McASP6.
I've written a dummy PCM5102a driver, as it describes here, and I've added following strings in the dts file:
pcm5102a: pcm5102a {
#sound-dai-cells = <0>;
compatible = "ti,pcm5102a";
};
sound0: sound@0 {
compatible = "simple-audio-card";
simple-audio-card,name = "PCM5102";
simple-audio-card,format = "i2s";
simple-audio-card,bitclock-master = <&sound0_master>;
simple-audio-card,frame-master = <&sound0_master>;
sound0_master: simple-audio-card,cpu {
sound-dai = <&mcasp6>;
};
simple-audio-card,codec {
sound-dai = <&pcm5102a>;
};
};
&mcasp6 {
#sound-dai-cells = <0>;
assigned-clocks = <&mcasp6_ahclkx_mux>;
assigned-clock-parents = <&sys_clkin2>;
pinctrl-names = "default";
pinctrl-0 = <&mcasp6_pins_default>;
status = "okay";
op-mode = <0>; /* MCASP_IIS_MODE */
tdm-slots = <2>;
/* 4 serializers */
serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
0 1 0 0
>;
tx-num-evt = <32>;
rx-num-evt = <32>;
};
After booting Linux, device was successfully registered:
[ 2.008698] asoc-simple-card sound@0: pcm5102a-hifi <-> 48474000.mcasp mapping ok
[ 6.294296] ALSA device list:
[ 6.297296] #0: PCM5102
But when I'm trying to playing a .wav file, following error appears:
root@am57xx-evm:~# aplay test.wav
Playing WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
ALSA lib ../../../alsa-lib-1.1.0/src/pcm/pcm_params.c:2162:(snd1_pcm_hw_refine_slave) Slave PCM not usable
aplay: set_params:1204: Broken configuration for this PCM: no configurations available
How can I fix this problem?