Can't get PCM5102A development board to work using the SDK
Posted: 2025-10-25 11:50
Hello everyone, I am currently working on a project that requires sound reproduction. To do this, I am using an external DAC module based on the PCM5102A via I2S protocol. I can't get it to work properly because when I play sound, nothing comes out of the speakers. I have made the following modifications:
- Modified the device tree in order to declare the I2S interface:
- And also, I added a simple-audio-card in the dt:
- Also I installed SAI drivers and PCM5102A codec in the kernel
Linux detects the sound card but when playing audio files, no sound is comming through the speakers. Can someone give me som hel troubleshooting this?
Thanks in advance.
- Modified the device tree in order to declare the I2S interface:
Code: Select all
/**********i2s**********/
&sai1 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = < &rm_io8_sai1_mclk
&rm_io7_sai1_sclk
&rm_io6_sai1_lrck
&rm_io5_sai1_sdi
&rm_io4_sai1_sdo0>;
assigned-clocks = <&cru MCLK_SAI1>;
assigned-clock-rates = <12288000>;
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <32>;
};
Code: Select all
/**********soundcards**********/
/ {
pcm5102a: pcm5102a {
compatible = "ti,pcm5102a";
#sound-dai-cells = <0>;
status = "okay";
};
sound: pcm5102a-sound {
compatible = "simple-audio-card";
simple-audio-card,name = "Lyra-PCM5102A";
simple-audio-card,format = "i2s";
simple-audio-card,bitclock-master = <&sound_cpu>;
simple-audio-card,frame-master = <&sound_cpu>;
status = "okay";
sound_cpu: simple-audio-card,cpu {
sound-dai = <&sai1>;
/* Configuración específica para SAI */
system-clock-frequency = <12288000>;
};
sound_codec: simple-audio-card,codec {
sound-dai = <&pcm5102a>;
/* No necesita configuración adicional */
};
};
};
Linux detects the sound card but when playing audio files, no sound is comming through the speakers. Can someone give me som hel troubleshooting this?
Thanks in advance.