Audio issue with IMX6 board (max98357a)

cancel
Showing results for 
Search instead for 
Did you mean: 

Audio issue with IMX6 board (max98357a)

Jump to solution
2,023 Views
vladzouth
Contributor II

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
0 Kudos
1 Solution
1,154 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Souleymane

statement "MAX98357a codec is connected to SSI1" is not fully correct as

SSI ports are connected through AUDMUX and described in Table 81. AUDMUX Port Allocatio,

Figure 16-1. AUDMUX Block Diagram i.MX6SDL Datasheet and i.MX6SDL Reference Manual

http://www.nxp.com/assets/documents/data/en/reference-manuals/IMX6SDLRM.pdf 
http://www.nxp.com/docs/en/data-sheet/IMX6SDLCEC.pdf

So one can check TX6S-8035 module schematic to find what AUDMUX port used for codec

connection.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
2 Replies
1,154 Views
brobin
Contributor I

I had some trouble getting the sound card (MA98357a codec with the simple-audio-card) to work with a recent revision of the imx6q (i.MX 6 Quad), so I am sharing my solution, posted here: linux device driver - Audio issue with IMX6 board (max98357a codec) - Stack Overflow 

0 Kudos
1,155 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Souleymane

statement "MAX98357a codec is connected to SSI1" is not fully correct as

SSI ports are connected through AUDMUX and described in Table 81. AUDMUX Port Allocatio,

Figure 16-1. AUDMUX Block Diagram i.MX6SDL Datasheet and i.MX6SDL Reference Manual

http://www.nxp.com/assets/documents/data/en/reference-manuals/IMX6SDLRM.pdf 
http://www.nxp.com/docs/en/data-sheet/IMX6SDLCEC.pdf

So one can check TX6S-8035 module schematic to find what AUDMUX port used for codec

connection.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos