AnsweredAssumed Answered

porting tlv320 audio codec from 4.1.X to 4.9.X

Question asked by Arthur LAMBERT on May 23, 2019
Latest reply on May 27, 2019 by igorpadykov

Hello,

 

We were currently using official NXP BSP 4.1.15 from http://git.freescale.com/git/cgit.cgi/imx/linux-imx.git/.

We are trying to update our BSP to 4.9.x release from Freescale community BSP :

https://github.com/Freescale/linux-fslc

 

I have two customs boards based on imx6ull ref design. One board is using wm8960 audio codec

and the other one is using tlv320aic3110 audio codec. 

 

It was quite easy to port the driver to kernel 4.9. I have only minor change on the driver compare

to 4.1 version due to some change  on codec API which is now using component API instead

 

example :

 

--- linux-4.1.15_2.1.0_v30/sound/soc/fsl/imx-aic31xx.c 2019-05-22 18:00:20.509851519 +0200
+++ linux_v4.9.144_v7/sound/soc/fsl/imx-aic31xx.c 2019-05-23 09:58:56.000000000 +0200
@@ -44,29 +44,30 @@
};

static void
-imx_aic31xx_ext_control (struct snd_soc_codec *codec)
+imx_aic31xx_ext_control (struct snd_soc_component *component)
{
+ struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
if (card_priv.hp_func)
- snd_soc_dapm_enable_pin (&codec->dapm, "HP out");
+ snd_soc_dapm_enable_pin (dapm, "HP out");
else
- snd_soc_dapm_disable_pin (&codec->dapm, "HP out");
+ snd_soc_dapm_disable_pin (dapm, "HP out");

if (card_priv.spk_func)
- snd_soc_dapm_enable_pin (&codec->dapm, "SPK Out");
+ snd_soc_dapm_enable_pin (dapm, "SPK Out");
else
- snd_soc_dapm_disable_pin (&codec->dapm, "SPK Out");
+ snd_soc_dapm_disable_pin (dapm, "SPK Out");

- snd_soc_dapm_sync (&codec->dapm);
+ snd_soc_dapm_sync (dapm);
}

 

It is working perfectly on wm8960 audio codec. But I have always an issue on tlv audio codec. Sound is working but only in one speaker... I have only one speaker on my custom board with wm8960. So I cannot say if the regression

is present on both audio codecs after porting them to 4.9.X. It was working perfectly with kernel 4.1 on two speakers of course. Register configuration seems to be correct in the tlv. I add debug in all functions. The code is running in the same way on the new kernel. Same call graph in my driver between 4.1.X. and 4.9.X. 

 

Is there anything to change in my userspace, device tree or anywhere else due to some change from kernel 4.1 to 4.9?

Any suggestion on the way to debug this kind of issue? Where can I ask help? alsa devel mailing list perhaps?

 

Thanks,

Arthur.

Outcomes