Page 1 of 1

Can't get PCM5102A development board to work using the SDK

Posted: 2025-10-25 11:50
by jquesadagr
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:

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>;
};
- And also, I added a simple-audio-card in the dt:

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 */
        };
    };
};
- 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.

Re: Can't get PCM5102A development board to work using the SDK

Posted: 2025-11-10 2:22
by Crocodile
Hello. We do not provide technical support for the adaptation of third-party hardware. From the information in your device tree, it seems that the part for loading I2C/SPI drivers is still missing.

Re: Can't get PCM5102A development board to work using the SDK

Posted: 2025-11-13 20:01
by nehemiah
The PCM5102A works fine. Here is a quote from the datasheet:
Integrated High-Performance Audio PLL with BCK
Reference to Generate SCK Internally
Just pull SCK low and it'll output audio just fine.

Re: Can't get PCM5102A development board to work using the SDK

Posted: 2026-02-03 11:07
by felix34
Hello,

Just for information, did you succeded?
I have a similar need ( on pico ultra w) but I don't want to spend time if not working.
Which board are you using?

thank you for your tips or advices.

Best regards.

Félix

Re: Can't get PCM5102A development board to work using the SDK

Posted: 2026-02-07 7:39
by cnadler
Are someone if you trying to use the pimoroni audio hat?
I have build an image with apparently support for it (my lyra should arrive next week, so until then I cannot test it, but if someone here wants to join forces, here the repo: https://github.com/cnadler86/rk3506-ubuntu

Re: Can't get PCM5102A development board to work using the SDK

Posted: 2026-02-12 17:42
by cnadler
cnadler wrote: 2026-02-07 7:39 Are someone if you trying to use the pimoroni audio hat?
I have build an image with apparently support for it (my lyra should arrive next week, so until then I cannot test it, but if someone here wants to join forces, here the repo: https://github.com/cnadler86/rk3506-ubuntu
Ok, I had similar problems but finally got Audio!!!

Will publish a short how-to on the repo

Re: Can't get PCM5102A development board to work using the SDK

Posted: 2026-04-27 13:29
by kumarbr
felix34 wrote: 2026-02-03 11:07 Hello,

Just for information, did you succeded?
I have a similar need ( on pico ultra w) but I don't want to spend time if not working.
Which board are you using?

thank you for your tips or advices.

Best regards.

Félix
Yeah I did get it working, but it needed a bit of tweaking to be stable. I used a Luckfox Pico Mini, not the Ultra W, so your results might vary a bit. Main thing is getting the config right, otherwise it just refuses to work properly.