AnsweredAssumed Answered

wm8974 audio codec imx machine driver help

Question asked by Vikas Gahlan on Oct 17, 2016
Latest reply on Oct 18, 2016 by igorpadykov

Hi,

I am doing bring-up of imx6qp based custom board. Last part of my bring up is audio codec.We are using wm8974 codec connected as slave device on i2c3 bus. I can see codec address on I2C bus using i2cdetect but i2cdump fails. 

 

I found wm-8974 codec driver is kernel and written small imx-wm8974 driver after modifying imx-sgtl5000.

# insmod /lib/modules/snd-soc-imx-wm8974.ko
imx-wm8974 sound: ASoC: CODEC DAI wm8974 not registered
imx-wm8974 sound: snd_soc_register_card failed (-517)

 

codec: wm8974@1a {
compatible = "wlf,wm8974";
reg = <0x1a>;
clocks = <&clks IMX6QDL_CLK_CKO>;
};

 

sound {
compatible = "fsl,imx6q-sabresd-wm8974",
"fsl,imx-audio-wm8974";
model = "wm8974-audio";
cpu-dai = <&ssi1>;
audio-codec = <&codec>;
audio-routing =
"Ext Spk", "SPKOUTL",
"Ext Spk", "SPKOUTR",
"Mic Jack", "Mic Bias";
mux-int-port = <1>;
mux-ext-port = <4>;
status = "okay";
};

 

Here is my audmux pin mappings:

MX6QDL_PAD_GPIO_0__CCM_CLKO1 0x130b0 /* Audio MCLK */
>;
};

pinctrl_audmux: audmuxgrp {
fsl,pins = <
MX6QDL_PAD_DISP0_DAT23__AUD4_RXD 0x130b0
MX6QDL_PAD_DISP0_DAT20__AUD4_TXC 0x130b0
MX6QDL_PAD_DISP0_DAT21__AUD4_TXD 0x110b0
MX6QDL_PAD_DISP0_DAT22__AUD4_TXFS 0x130b0
>;
};

Does external and internal port setting is correct for above pin configuration ? Will appreciate if someone already wm8974 machine driver or some good working reference that I can cross check.

Will appreciate quick help.

 

Thanks

Vikas

Outcomes