some question about imx8mm on android9

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

some question about imx8mm on android9

1,585 Views
13660284951
Contributor III

hello:

i configuration dts to support wm8954 as below

wm8524: wm8524 {
compatible = "wlf,wm8524";
clocks = <&clk IMX8MM_CLK_SAI3_ROOT>;
clock-names = "mclk";
wlf,mute-gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
};

sound-wm8524 {
compatible = "fsl,imx-audio-wm8524";
model = "wm8524-audio";
audio-cpu = <&sai3>;
audio-codec = <&wm8524>;
audio-routing =
"Line Out Jack", "LINEVOUTL",
"Line Out Jack", "LINEVOUTR";
};

while in configure file enable 

CONFIG_SND_SOC_IMX_WM8524=y

CONFIG_SND_SOC_FSL_SAI=y

CONFIG_SND_IMX_SOC=y

CONFIG_SND_SOC_WM8524=y

and result i found the sound_card register fail as below logs

[ 2.853770] imx-wm8524 sound-wm8524: snd_soc_register_card failed (-517)

0 Kudos
7 Replies

1,431 Views
igorpadykov
NXP Employee
NXP Employee

Hi zhou

"wm8524-hifi not registered" may be due to connection of  wm8954, not wm8524

as expects driver. For wm8954 codec layer file should be created, please look at

Table 7-1. Stereo Codec SoC Driver Files,Figure 7-1. ALSA SoC Software Architecture

attached Linux Manual.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,431 Views
13660284951
Contributor III

HI igorpadykov

the filesystem show us below,the wm8524 dai is not register

evk_8mm:/sys/kernel/debug/asoc # ls
codecs dais imx-audio-micfil platforms
evk_8mm:/sys/kernel/debug/asoc # cat codecs
wm8524
snd-soc-dummy
evk_8mm:/sys/kernel/debug/asoc # cat dais
30080000.micfil
30030000.sai
snd-soc-dummy-dai
evk_8mm:/sys/kernel/debug/asoc # cat platforms
30080000.micfil
30030000.sai
snd-soc-dummy

0 Kudos

1,431 Views
igorpadykov
NXP Employee
NXP Employee

there is wm8524 :

imx-wm8524.c\fsl\soc\sound - linux-imx - i.MX Linux kernel 

and you should create similar for wm8954, use Figure 7-1. ALSA SoC Software

Architecture Linux Manual for guide.

0 Kudos

1,431 Views
13660284951
Contributor III

thks for you replay igorpadykov

wm8524 is ok now。

by the way: i add audio Power amplifier in dts

pinctl_pam_io:pam_io_grp{
  fsl,pins = <
    MX8MM_IOMUXC_GPIO1_IO13_GPIO1_IO13 0x19
    MX8MM_IOMUXC_GPIO1_IO15_GPIO1_IO15 0x19
  >;
};

sound-wm8524 {
    compatible = "fsl,imx-audio-wm8524";
    model = "wm8524-audio";
    audio-cpu = <&sai3>;
    audio-codec = <&wm8524>;
    pinctrl-names = "default";
    pinctrl-0 = <&pinctl_pam_io>;
    pam-mute = <&gpio1 15 0>;
    pam-shdn = <&gpio1 13 0>;
    audio-routing =
    "Line Out Jack", "LINEVOUTL",
    "Line Out Jack", "LINEVOUTR";
};

while in audio machine file,

pam_mute_gpio = of_get_named_gpio(pdev->dev.of_node, "pam-mute", 0);
pam_shdn_gpio = of_get_named_gpio(pdev->dev.of_node, "pam-shdn", 0);
if(!gpio_is_valid(pam_mute_gpio) || !gpio_is_valid(pam_shdn_gpio)){
dev_err(&pdev->dev, "pam gpio is invalid\n");
goto fail;
}

this code return us gpio is invalid。

how did i add  Power amplifier????

thks

@igorpadykov

0 Kudos

1,431 Views
13660284951
Contributor III

Hi igorpadykov

check android_defconfig file carfully,there is not wm8954 code config,below is my sound config

CONFIG_SOUND=y CONFIG_SND=y
CONFIG_SND_USB_AUDIO=y

CONFIG_SND_SOC=y

CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y

CONFIG_SND_BCM2835_SOC_I2S=m

CONFIG_SND_SOC_FSL_ACM=y

CONFIG_SND_SOC_FSL_EASRC=y

CONFIG_SND_IMX_SOC=y

CONFIG_SND_SOC_IMX_WM8524=y
#CONFIG_SND_SOC_IMX_AK4458=n

#CONFIG_SND_SOC_IMX_AK5558=y

#CONFIG_SND_SOC_IMX_AK4497=y

#CONFIG_SND_SOC_IMX_WM8960=y

#CONFIG_SND_SOC_IMX_CS42888=y

#CONFIG_SND_SOC_IMX_WM8962=y

#CONFIG_SND_SOC_AK4613=y
CONFIG_SND_SOC_IMX_MICFIL=y

CONFIG_SND_SOC_IMX_RPMSG=y

CONFIG_SND_SOC_IMX_XTOR=y

CONFIG_SND_SOC_IMX_MQS=y

CONFIG_SND_SOC_IMX_PCM_DMA=y

CONFIG_SND_SOC_FSL_SAI=y

CONFIG_SND_SOC_FSL_UTILS=y

CONFIG_SND_KCTL_JACK=y

CONFIG_SND_SOC_IMX_SPDIF=y

CONFIG_SND_SOC_IMX_AMIX=y

CONFIG_SND_SOC_IMX_CDNHDMI=y

CONFIG_SND_SOC_IMX_DSP=y

CONFIG_SND_SOC_SAMSUNG=y

CONFIG_SND_SOC_RCAR=y

CONFIG_SND_SIMPLE_CARD=y

0 Kudos

1,431 Views
13660284951
Contributor III

++CONFIG_SND_SOC_WM8524=y 

0 Kudos

1,431 Views
13660284951
Contributor III

by the way:

[    2.842426] imx-wm8524 sound-wm8524: ASoC: CODEC DAI wm8524-hifi not registered

[ 2.853770] imx-wm8524 sound-wm8524: snd_soc_register_card failed (-517)

is any audio bug on android9 sound driver?

0 Kudos