No sound with wm8731 on i.MX6UL

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

No sound with wm8731 on i.MX6UL

1,477 Views
garras
Contributor I

Hi, 

I am trying to use wm8731 codec with i.MX6UL.

The wm8731 codec is on a MIKROE-506 proto board and is wired this way for the SAI part : 

imx6ul                        <=>            MIKROE-506   <=>   wm8731

CSI_D6 (SAI1_RX_DATA)                  MISO                    ADCDAT

CSI_D2 (SAI1_RX_SYNC)                 ADCL                  ADCLRC

CSI_D3 (SAI1_RX_BCLK)                  SCK                     BCLK

CSI_D7 (SAI1_TX_DATA)                  MOSI                   DACDAT

CSI_D4 (SAI1_TX_SYNC)                  DACL                  DACLRC

CSI_D1 (SAI1_MCLK)                        SCK                     BCLK

The I2C wiring is OK, I am able to send control command to the codec, for example I can make a loop between microphone and HP with amixer.

I'm using linux 4.8.10 and the here is the relevant parts of the device tree : 

sound {
   compatible = "simple-audio-card";
   simple-audio-card,model = "wm8731-audio";
   simple-audio-card,format = "i2s";
   simple-audio-card,audio-routing =
      "Line Out", "LOUT",
      "Line Out", "ROUT",
      "Headphone Jack", "RHPOUT",
      "Headphone Jack", "LHPOUT",
      "LLINEIN","Line In",
      "RLINEIN","Line In";
   simple-audio-card,cpu {
      sound-dai = <&sai1>;
      bitclock-master;
      frame-master;
   };
   simple-audio-card,codec {
      sound-dai = <&codec>;
   };
};

&sai1 {
   pinctrl-names = "default";
   pinctrl-0 = <&pinctrl_sai1>;
   assigned-clocks = <&clks IMX6UL_CLK_SAI1_SEL>,<&clks IMX6UL_CLK_SAI1>;
   assigned-clock-parents = <&clks IMX6UL_CLK_PLL4_AUDIO_DIV>;
   assigned-clock-rates = <0>,<12288000>,<11289600>;
   status = "okay";
};

&i2c1 {
   pinctrl-names = "default";
   pinctrl-0 = <&pinctrl_i2c1>;
   clock_frequency = <400000>;
   status = "okay";
};

pinctrl_sai1: sai1grp {
fsl,pins = <

   MX6UL_PAD_CSI_DATA05__SAI1_TX_BCLK 0x17088
   MX6UL_PAD_CSI_DATA03__SAI1_RX_BCLK 0x17088
   MX6UL_PAD_CSI_DATA04__SAI1_TX_SYNC 0x17088
   MX6UL_PAD_CSI_DATA02__SAI1_RX_SYNC 0x17088
   MX6UL_PAD_CSI_DATA07__SAI1_TX_DATA 0x11088
   MX6UL_PAD_CSI_DATA06__SAI1_RX_DATA 0x11088
   MX6UL_PAD_JTAG_TMS__CCM_CLKO1 0x17088
>;
};

When trying to play a sound with aplay, I can hear the codec sending some kind of noise during aplay execution but nothing related with the sound I am trying to play.

I am really not sure with the sai1grp part of the device tree.

Any help will be really appreciated.

Regards 

Yann

Labels (1)
0 Kudos
3 Replies

883 Views
paolosantini
Contributor III

Hi,

I'm facing this same problem with my VARISCITE DART6 UL based on i.MX 6UL.

DTSI configuration file seems to be OK. Connection for analog audio is OK (pins are HPROUT and HPLOUT).

Cheking on the evaluation board VAR-6UL (made by VARISCITE) and launch "aplay" command from terminal, sound regularly comes from the headphones socket.

Thus: board configuration and hardware connection seem to be OK. Whatelse trial or check could I perform in order to go on?

0 Kudos

883 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello Yann,

    The latest linux BSP released by NXP  is Linux 4.1.15_2.0.0 BSP, but your kernel is 4.8, so we have no way to support you!

Best Regards,

weidong

0 Kudos

883 Views
garras
Contributor I

Hi,

Same problem with your BSP.

Any hints ?

Regards

Yann

0 Kudos