AnsweredAssumed Answered

Audio issue with IMX6 board (max98357a)

Question asked by Souleymane Conte on Oct 24, 2018
Latest reply on Oct 24, 2018 by igorpadykov

Hello NXP Community,

I'am working on a custom board based on IMX6 Solo processor and TX6S-8035 module, trying to play audio with MAX98357a codec. I just start leaning how works the device-tree I implement a simple-audio-card on the 4.1.15 linux kernel and use the following DTS as suggested in i.MX6 and MA98357a with simple-audio-card:

    codec: max98357a@0 {
        compatible = "maxim,max98357a";
        #sound-dai-cells = <0>;
    };

    sound {
        compatible = "simple-audio-card";
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_ssi1>;
        simple-audio-card,name = "TI3 Audio";
        simple-audio-card,format = "i2s";
        simple-audio-card,widgets = "Speaker", "Speakers";
        simple-audio-card,routing = "Speakers", "Speaker";
        simple-audio-card,bitclock-master = <&cpu_dai>;
        simple-audio-card,frame-master = <&cpu_dai>;
        cpu_dai: simple-audio-card,cpu {
            sound-dai = <&ssi1>;
            system-clock-frequency = <883200>;
            dai-tdm-slot-num = <2>;
            dai-tdm-slot-width = <16>;
        };
        codec_dai: simple-audio-card,codec {
            sound-dai = <&codec>;
        };
    };
&audmux {
status = "okay";
// Note: 'ssi1' (node of first SSI) corresponds to '_SSI0' below.
ssi1 {
     fsl,audmux-port = <MX31_AUDMUX_PORT1_SSI0>;
     fsl,port-config = <
           0x00000000
           IMX_AUDMUX_V2_PDCR_RXDSEL(MX31_AUDMUX_PORT3_SSI_PINS_3)
           >;
       };

 

aud3 {
      fsl,audmux-port = <MX31_AUDMUX_PORT3_SSI_PINS_3>;
      fsl,port-config = <
          (IMX_AUDMUX_V2_PTCR_TFSDIR |
          IMX_AUDMUX_V2_PTCR_TFSEL(MX31_AUDMUX_PORT1_SSI0) |
          IMX_AUDMUX_V2_PTCR_TCLKDIR |
          IMX_AUDMUX_V2_PTCR_TCSEL(MX31_AUDMUX_PORT1_SSI0))
          IMX_AUDMUX_V2_PDCR_RXDSEL(MX31_AUDMUX_PORT1_SSI0)
          >;
     };
};

 

&ssi1 {
      fsl,mode = "i2s-master";
      assigned-clocks = <&clks IMX6QDL_CLK_SSI1_SEL>, <&clks IMX6QDL_CLK_SSI1>;
      assigned-clock-parents = <&clks IMX6QDL_CLK_PLL4_AUDIO_DIV>;
      assigned-clock-rates = <0>, <49152000>; // 48kHz on SSI1 clock
      status = "okay";    
};
The MAX98357a codec is connected to SSI1. The soundcard is detected by ALSA. But when i try to play an audio file, i have nothing out on the speaker and there is no I2S signal on the SSI1 pin. Does somebody has any idea for this issue.
Thanks.
Best Regard!
Souleymane

Outcomes