Dummy audio codec for testing i2S2 (sai2) on imx7d emmc 1GB v2.8

Hi All,

I need to enable i2s2 (sai2) for some testing. I am trying to use linux dummy audio codec to enable the i2s output for testing purpose. Here are my device tree additions. The code compiles fine and board also boots fine. There is no error in dmesg. But the dummy audio card is not visible in the system.

dummycodec: simple-audio-card,codec {
                    compatible = "linux,snd-soc-dummy";
                    status = "okay";
                    #sound-dai-cells = <0>;
                    clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
                    clock-names = "mclk";
                    pinctrl-names = "default";
                    pinctrl-0 = <&pinctrl_sai2_mclk>;
                    assigned-clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_SRC>,
                                    <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
                    assigned-clock-parents = <&clks IMX7D_PLL_AUDIO_POST_DIV>;
                    assigned-clock-rates = <0>, <12288000>;
    sound-dummy {
        model = "snd-soc-dummy";
        compatible = "simple-audio-card";
        status = "okay";
        simple-audio-card,name = "snddaudio_dummy";
        simple-audio-card,format = "i2s";
        simple-audio-card,widgets = "Speaker", "Speakers";
        simple-audio-card,routing = "Speakers", "Speaker";
        simple-audio-card,frame-master = <&dummycodec>;
        simple-audio-card,bitclock-master = <&dummycodec>;
        cpu-dai = <&sai2>;
        audio-codec = <&dummycodec>;

&sai2 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_sai2>;
    assigned-clocks = <&clks IMX7D_SAI2_ROOT_SRC>,
              <&clks IMX7D_SAI2_ROOT_CLK>;
    assigned-clock-parents = <&clks IMX7D_PLL_AUDIO_POST_DIV>;
    assigned-clock-rates = <0>, <36864000>;
    status = "okay";

Hi @xdaco

Thanks for writing to the Community!

Could you share the dmesg log in a text file?
Have you done other changes to device-tree or the kernel config? If yes, could you share these changes?

Best regards,

Hi @jaski.tx

Sorry for the late reply.

Here is the complete dmesg log . I have also changed the kernel config to enable dummy audio driver.
I have also uploaded the complete device tree.



Hi @xdaco

Sorry for the delayed answer. Finally I was able to find a solution, which might work. You need to use the attached kernel config and device-tree changes. Additionally for the correct pinmuxing, you will need to disable the UART1 and SD2 Interface, which I have not done in the device-tree files.

Best regards,