AnsweredAssumed Answered

IMX6 with Android 5.1 WM8958 ssi issue

Question asked by Cristian Sicilia on Jan 23, 2016
Latest reply on Oct 25, 2016 by Cristian Sicilia

Dear *,

 

I have an IMX6 connected via AUD3 to interface 1 of WM8958, with MCLK on CLK2 and have the following configuration in device tree.

 

I would like to configure codec as SLAVE and SSI2 as master (and viceversa to test some other parts).

 

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




        codec: wm8958@1a {
                compatible = "wlf,wm8958";
                reg = <0x1a>;
                clocks = <&clks 201>;
                clock-names = "mclk1";


                DBVDD1-supply = <&vgen3_reg>;
                DBVDD2-supply = <&vgen3_reg>;
                DBVDD3-supply = <&vgen3_reg>;
                DCVDD-supply;
                AVDD1-supply;
                AVDD2-supply = <&vgen3_reg>;
                CPVDD-supply = <&vgen3_reg>;
                SPKVDD1-supply = <&reg_audio>;
                SPKVDD2-supply = <&reg_audio>;


                wlf,ldo1ena = <&gpio3 13 0>;
                wlf,ldo2ena = <&gpio3 14 0>;
        };
 ....
}

....

        sound {
        compatible = "fsl,imx6ul-ddr3-arm2-wm8958",
                   "fsl,imx-audio-wm8958";
                model = "wm8958-audio"; 
                cpu-dai = <&ssi2>;
                audio-codec = <&codec>;
                asrc-controller = <&asrc>;
                audio-routing =
                        "Headphone Jack", "HPOUTL",
                        "Headphone Jack", "HPOUTR",
                        "Ext Spk", "SPKOUTL",
                        "Ext Spk", "SPKOUTR",
                        "MICBIAS", "AMIC",
                        "IN3R", "MICBIAS",
                        "DMIC", "MICBIAS",
                        "DMICDAT", "DMIC",
                        "CPU-Playback", "ASRC-Playback",
                        "Playback", "CPU-Playback",
                        "ASRC-Capture", "CPU-Capture",
                        "CPU-Capture", "Capture";
                mux-int-port = <2>;
                mux-ext-port = <3>;
                //hp-det-gpios = <&gpio7 8 1>; 
                //mic-det-gpios = <&gpio1 9 1>;
                //codec-master;
        };
..
&ssi2 {
        fsl,mode = "i2s-master";
        status = "okay";
};
...

&audmux {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_audmux>;
        status = "okay";
};
                pinctrl_audmux: audmuxgrp {
                        fsl,pins = <
                                MX6QDL_PAD_CSI0_DAT7__AUD3_RXD          0x130b0
                                MX6QDL_PAD_CSI0_DAT4__AUD3_TXC          0x130b0
                                MX6QDL_PAD_CSI0_DAT5__AUD3_TXD          0x110b0
                                MX6QDL_PAD_CSI0_DAT6__AUD3_TXFS         0x130b0
                                MX6QDL_PAD_EIM_DA12__GPIO3_IO12         0x80000000
                                MX6QDL_PAD_GPIO_3__CCM_CLKO2            0x0001B0B0
                        >;
                };

 

 

Now if I will try to play a sound (with tinyplay for wav or with stagefright for mp3), no BCLK/FS/DACDAT will be activate.

If I configure codec as master (uncommenting codec-master in sound) and i2s-master to i2s-slave in &ssi2, I will see BCLK,FS continuously but playing an audio file nothing happens on DACDAT (every time pulled-up).

 

Someone can help me, I'm not expert in device-tree, probably I forgot to configure some parts.

 

I try also codec-master with i2s-slave and i2s-master and without codec-master with i2s-slave and i2s-master, but not work.

 

Thank's

Outcomes