AnsweredAssumed Answered

aic3x_hw_params(): unable to setup PLL

Question asked by Marcos Lopez on Feb 26, 2019
Latest reply on Mar 5, 2019 by Marcos Lopez

Hi, I'm trying to configure an ALSA driver with a dummy codec (hadware doesn't exists in my custom board) and I am using as dummy the codec tlv320aic3x. Kernel 4.9.88.

 

In the logs I see the ALSA device recognized:

 

ALSA device list:
#0: tlv320aic3x-audio

 

Almost everything seems to be fine but when the kernel starts I see error:

 

fsl-ssi-dai 202c000.ssi: No cache defaults, reading back from HW
imx-tlv320aic3x sound: tlv320aic3x-hifi <-> 202c000.ssi mapping ok
imx-tlv320aic3x sound: Connecting non-supply widget to supply widget is not supported (MIC3L -> Mic Bias)
imx-tlv320aic3x sound: ASoC: no dapm match for MIC3L --> (null) --> Mic Bias
imx-tlv320aic3x sound: ASoC: Failed to add route MIC3L -> direct -> Mic Bias
imx-tlv320aic3x sound: Connecting non-supply widget to supply widget is not supported (MIC3R -> Mic Bias)
imx-tlv320aic3x sound: ASoC: no dapm match for MIC3R --> (null) --> Mic Bias
imx-tlv320aic3x sound: ASoC: Failed to add route MIC3R -> direct -> Mic Bias
tlv320aic3x-codec 1-001b: Unable to sync registers 0x8-0x9. -6

 

Someone may help me or provide a clue? I'm working with an imx6 solo

 

This is the dts configuration:

 

codec in i2c2:

&i2c2 {
clock-frequency = <400000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c2_1>;
status = "okay";

codec: tlv320aic3x@1b {
#sound-dai-cells = <0>;
compatible = "ti,tlv320aic3x";
reg = <0x1b>;
clocks = <&clks 201>;
clock-names = "clko_clk";
IOVDD-supply = <&reg_audio>;
DVDD-supply = <&reg_audio>;
AVDD-supply = <&reg_audio>;
DRVDD-supply = <&reg_audio>;
gpio-reset = <&gpio1 0 1>;
gpio-cfg = <
0x0000 /* 0:Default */
0x0000 /* 1:Default */
0x0013 /* 2:FN_DMICCLK */
0x0000 /* 3:Default */
0x8014 /* 4:FN_DMICCDAT */
0x0000 /* 5:Default */
>;
status = "okay";
};

 

sound node:

 

sound {
compatible = "fsl,imx6q-var-som-tlv320aic3x", "fsl,imx-audio-tlv320aic3x";
model = "tlv320aic3x-audio";
ssi-controller = <&ssi2>;
audio-codec = <&codec>;
audio-routing =
/* Headphone connected to HPLOUT, HPROUT */
"Headphone Jack", "HPLOUT",
"Headphone Jack", "HPROUT",
/* Line Out connected to LLOUT, RLOUT */
"Line Out", "LLOUT",
"Line Out", "RLOUT",
/* Mic connected to (MIC3L | MIC3R) */
"Mic Bias", "MIC3L",
"Mic Bias", "MIC3R",
"Mic Jack", "Mic Bias",
/* Line In connected to (LINE1L | LINE2L), (LINE1R | LINE2R) */
"Line In", "LINE1L",
"Line In", "LINE2L",
"Line In", "LINE1R",
"Line In", "LINE2R";
mux-int-port = <2>;
mux-ext-port = <4>;
};

 

ssi2 node:

 

&ssi2 {
cell-index = <1>;
fsl,mode = "i2s-slave";
status = "okay";
};

 

 

When I try to play a sound using a raw sound:

 

cat /bin/test.raw > /dev/audio

 

I got:

 

# cat /bin/test.raw > /dev/audio
Division by zero in kernel.
CPU: 0 PID: 113 Comm: cat Not tainted 4.9.88 #180
Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[<8010dfa0>] (unwind_backtrace) from [<8010afc8>] (show_stack+0x10/0x14)
[<8010afc8>] (show_stack) from [<802e8b2c>] (dump_stack+0x84/0x98)
[<802e8b2c>] (dump_stack) from [<802e77fc>] (Ldiv0+0x8/0x14)
[<802e77fc>] (Ldiv0) from [<80558d14>] (aic3x_hw_params+0x1dc/0x4b8)
[<80558d14>] (aic3x_hw_params) from [<80550c5c>] (soc_dai_hw_params+0x28/0x60)
[<80550c5c>] (soc_dai_hw_params) from [<80550e70>] (soc_pcm_hw_params+0x1dc/0x514)
[<80550e70>] (soc_pcm_hw_params) from [<805324c0>] (snd_pcm_common_ioctl1+0xbf8/0x1248)
[<805324c0>] (snd_pcm_common_ioctl1) from [<80532d90>] (snd_pcm_playback_ioctl1+0x280/0x654)
[<80532d90>] (snd_pcm_playback_ioctl1) from [<8053453c>] (snd_pcm_kernel_ioctl+0x78/0x88)
[<8053453c>] (snd_pcm_kernel_ioctl) from [<8053ddc0>] (snd_pcm_oss_change_params+0x6cc/0xb44)
[<8053ddc0>] (snd_pcm_oss_change_params) from [<8053e27c>] (snd_pcm_oss_make_ready+0x44/0x54)
[<8053e27c>] (snd_pcm_oss_make_ready) from [<8053eae8>] (snd_pcm_oss_write+0x44/0x2cc)
[<8053eae8>] (snd_pcm_oss_write) from [<801e9814>] (__vfs_write+0x1c/0x114)
[<801e9814>] (__vfs_write) from [<801e9a80>] (vfs_write+0xa4/0x168)
[<801e9a80>] (vfs_write) from [<801e9c10>] (SyS_write+0x3c/0x90)
[<801e9c10>] (SyS_write) from [<80107480>] (ret_fast_syscall+0x0/0x48)
aic3x_hw_params(): unable to setup PLL
tlv320aic3x-codec 1-001b: ASoC: can't set tlv320aic3x-hifi hw params: -22
cat: write error: Invalid argument

Outcomes