AnsweredAssumed Answered

WM8960 on audmux interafce

Question asked by Jeroen van der Laan on Mar 23, 2017
Latest reply on Mar 24, 2017 by Jeroen van der Laan

I'm having trouble with the WM8960 on my board. It is connected to the AUDMUX of my imx6sx. My .dts file contains an entry for an audio codec defiend as follows:

sound {
    compatible = "fsl,imx-audio-wm8960";
    model = "wm8960-audio";
    cpu-dai = <&sai1>;
    audio-codec = <&wm8960>;
    ssi-controller = <&ssi1>;
    codec-master;
    audio-routing =
        "Headphone Jack", "HP_L",
        "Headphone Jack", "HP_R",
        "Ext Spk", "SPK_LP",
        "Ext Spk", "SPK_LN",
        "Ext Spk", "SPK_RP",
        "Ext Spk", "SPK_RN",
        "LINPUT1", "Main MIC",
        "Main MIC", "MICB";
        mux-int-port = <1>;
        mux-ext-port = <6>;
};

&i2c3 {
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c3>;
status = "okay";

wm8960:codec@1a {
compatible = "wlf,wm8960";
reg = <0x1a>;
clocks = <&clks IMX6SX_CLK_SSI1_IPG>,
<&clks IMX6SX_CLK_SSI1>;
clock-names = "ipg", "mclk";
wlf,shared-lrclk;
};
};
&ssi1{
    fsl,mode = "i2s-slave";
    assigned-clocks = <&clks IMX6SX_CLK_SSI1_SEL>,
              <&clks IMX6SX_CLK_SSI1>;
    assigned-clock-rates = <0>, <12288000>;
    status = "okay";


};

&sai1{
    pinctrl-names = "default";
   format  = "i2s";
   status = "okay";
};

&audmux{
    pinctrl-names = "default";
    pinctrl-0 = <&AUDIO>;
    status = "okay";
};
   AUDIO: AUDIOgrp {

            fsl,pins = <
                MX6SX_PAD_ENET1_MDIO__AUDMUX_MCLK          0x000010B0
                MX6SX_PAD_SD2_CLK__AUDMUX_AUD6_RXFS        0x000010B0
                MX6SX_PAD_SD2_DATA0__AUDMUX_AUD6_RXD       0x000010B0
                MX6SX_PAD_SD2_DATA1__AUDMUX_AUD6_TXC       0x000010B0
                MX6SX_PAD_SD2_DATA2__AUDMUX_AUD6_TXFS      0x000010B0
                MX6SX_PAD_SD2_DATA3__AUDMUX_AUD6_TXD       0x000010B0
            >;
        };

ALSA sees the codec with this configuration and I can playback audio files, but there is no sound and there are PCM write errors. My main concern is that I don't know how to connect the SAI to the MUX. I think I've got the SAI in the right mode for the communication with the wm8960.

 

Can somebody give me pointers on how to continue?

 

Best regards Jeroen van der Laan

Outcomes