Leonardo Giordano

WM8974 codec setup

Discussion created by Leonardo Giordano on Jun 25, 2018


I have a custom board using Vybrid processor.

We are trying to add audio support using WM8974 codec, using i2c + i2c

IC codec seems to be working (i2cdetect shows is at 0x1A)

However, Im not sure about changes on devicetree and/or linux/sound/soc/fsl/fsl-asoc-card.c)

This is my device tree sound related:

sound {
compatible = "fsl,imx-audio-wm8974";
audio-cpu = <&sai3>;
audio-codec = <&wm8974_codec>;
status = "okay";


wm8974_codec: wm8974@1a {
#sound-dai-cells = <0>;
compatible = "wlf,wm8974";
reg = <0x1a>;
clocks = <&osc 0>;

I also added at fsl-asoc-card.c:


} else if (of_device_is_compatible(np, "fsl,imx-audio-wm8974")) {
codec_dai_name = "wlf,wm8974";
priv->card.set_bias_level = fsl_asoc_card_set_bias_level;
priv->dai_fmt |= SND_SOC_DAIFMT_CBM_CFM;



On dmesg I got:


[ 0.283707] fsl-asoc-card sound: ASoC: CPU DAI (null) not registered

[ 0.321637] fsl-asoc-card sound: ASoC: CODEC DAI wlf,wm8974 not registered



WM8974 is enabled at kernel (not as a module).

Any tips or suggestions?