Enable ADAU7002 In IMX8ULP-EVK9

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Enable ADAU7002 In IMX8ULP-EVK9

5,578 次查看
dhruvinrajpura
Contributor III

Hello,

I am using IMX8ULP EVK9 and i want to connect mic with SAI5 peripheral. To convert PDM data to PCM i'm using adau7002 and i have attached patch which i applied to enable adau7002.

I also enable adau7002 from menuconfig, but when i apply "arecord -l" command i'm not getting my device and on dmseg log i'm getting following log

"[ 21.860836] platform sound-adau7002: deferred probe pending"

Let me know if i need to do any other changes.

Thanks

0 项奖励
回复
7 回复数

5,539 次查看
jimmychan
NXP TechSupport
NXP TechSupport

Hello,

 

Which version of BSP are you using?

What you added in the device tree file?

0 项奖励
回复

5,517 次查看
dhruvinrajpura
Contributor III

Hi @jimmychan 

Here I am attching patch that I applied in dts file and I am using 6.1.36-mickledore version as BSP.

0 项奖励
回复

5,470 次查看
jimmychan
NXP TechSupport
NXP TechSupport

In your simple-audio-card setting, please add the driver you want to use. Like compatible = "simple-audio-card";

 

 

0 项奖励
回复

5,385 次查看
dhruvinrajpura
Contributor III

Hello,

 

I have added "simple-audio-card" in compatible field, still I'm facing "[ 21.851678] platform sound-adau7002: deferred probe pending" Error.

 

additionally When i check "/sys/kernel/debug/devices_deferred" file on that time i'm getting following log.

root@imx8ulp-9x9-lpddr4-evk:~# cat /sys/kernel/debug/devices_deferred
sound-adau7002 asoc-simple-card: parse error

It's look like something is mismatch to parse asoc-simple-card.

 

I have attached patch file for reference. Let me know if any other information required.

0 项奖励
回复

5,350 次查看
jimmychan
NXP TechSupport
NXP TechSupport

You could check the "simple_parse_of()" in the simple-card.c. Check which parameter you passed to the driver is not proper.

https://github.com/nxp-imx/linux-imx/blob/lf-6.6.y/sound/soc/generic/simple-card.c

 

 

0 项奖励
回复

5,343 次查看
dhruvinrajpura
Contributor III

I looked into the simple_parse_of() function and found that the error is coming from the simple_for_each_link() function. It seems there's a problem parsing the DAI link during that process.

0 项奖励
回复

5,322 次查看
dhruvinrajpura
Contributor III

Additionally When I debugged inside simple_for_each_link() function, I got an error in the snd_soc_of_get_dai_name() function. In the driver code, there's a FIXME comment above this function, which I’ve included below.

 

 

	/*
	 * FIXME
	 *
	 * Here, dlc->dai_name is pointer to CPU/Codec DAI name.
	 * If user unbinded CPU or Codec driver, but not for Sound Card,
	 * dlc->dai_name is keeping unbinded CPU or Codec
	 * driver's pointer.
	 *
	 * If user re-bind CPU or Codec driver again, ALSA SoC will try
	 * to rebind Card via snd_soc_try_rebind_card(), but because of
	 * above reason, it might can't bind Sound Card.
	 * Because Sound Card is pointing to released dai_name pointer.
	 *
	 * To avoid this rebind Card issue,
	 * 1) It needs to alloc memory to keep dai_name eventhough
	 *    CPU or Codec driver was unbinded, or
	 * 2) user need to rebind Sound Card everytime
	 *    if he unbinded CPU or Codec.
	 */
	ret = snd_soc_of_get_dai_name(node, &dlc->dai_name);
	if (ret < 0)
		return ret;

 

 

0 项奖励
回复