How can I debug by using mc-err error information?

Hello,

I’ porting the sound card wm8960 from raspberry Pi to jetson nano.

For now, I have created a PCM device in /dev directory, but when I tried to use “aplay” cmd to play a .wav file, the kernel outputs some errors:

Aug  1 14:06:14 seeed-desktop kernel: [ 8963.375166] mc-err: (255) csr_aper: EMEM decode error o                                      n PDE or PTE entry
Aug  1 14:06:14 seeed-desktop kernel: [ 8963.382212] mc-err:   status = 0x6000507a; addr = 0xfad                                      10540
Aug  1 14:06:14 seeed-desktop kernel: [ 8963.388315] mc-err:   secure: no, access-type: read, SM                                      MU fault: nr-nw-s
Aug  1 14:06:15 seeed-desktop kernel: [ 8964.089408] mc-err: Too many MC errors; throttling prin                                      ts
Aug  1 14:06:16 seeed-desktop kernel: [ 8964.991329] smmu_dump_pagetable(): No valid page table
Aug  1 14:06:16 seeed-desktop kernel: [ 8964.996525] mc-err: (255) csr_aper: EMEM decode error o                                      n PDE or PTE entry
Aug  1 14:06:16 seeed-desktop kernel: [ 8965.003582] mc-err:   status = 0x6000007a; addr = 0xfad                                      10000
Aug  1 14:06:16 seeed-desktop kernel: [ 8965.009738] mc-err:   secure: no, access-type: read, SM                                      MU fault: nr-nw-s
Aug  1 14:06:16 seeed-desktop kernel: [ 8965.017176] smmu_dump_pagetable(): No valid page table
Aug  1 14:06:16 seeed-desktop kernel: [ 8965.022778] mc-err: (255) csr_aper: EMEM decode error o                                      n PDE or PTE entry

It seems that these messsage are the specific t210’s error msg format.

It defined in “mcerr-t21.c”, But I can not find where does it invoked.

I have no idea to use these error information to debug, it seems some address about MEM.

So, is there anybody can help me? thanks a lot.

Hello!

Porting a soundcard driver for Raspberry Pi to Jetson Nano will be quite difficult because the underlying hardware architecture of the audio subsystem is very different. Therefore, the recommendation would be to use the existing soundcard driver for Jetson Nano and add support for the WM8906. The good news is that other uses have been looking into using this same codec with Jetson Nano and you can find some suggestions on this on the following thread …

https://devtalk.nvidia.com/default/topic/1052068/jetson-nano/nano-compatible-i2s-soundcard/post/5344933/#5344933

Let me know if this helps.

Regards,
Jon

@jonathanh
Hi I followed the accepted answer’s instructions from :

https://devtalk.nvidia.com/default/topic/1052068/jetson-nano/nano-compatible-i2s-soundcard/post/5344933/#5344933

But it doesn’t work.
I can sure that the wm8960 has been loaded .and the device tree has been changed.

The demsg shows that :
[ 4.027815] tegra-asoc: sound: ASoC: no source widget found for HP_L
[ 4.027818] tegra-asoc: sound: ASoC: Failed to add route HP_L -> direct -> x Headphone
[ 4.027834] tegra-asoc: sound: ASoC: no source widget found for HP_R
[ 4.027836] tegra-asoc: sound: ASoC: Failed to add route HP_R -> direct -> x Headphone
[ 4.027849] tegra-asoc: sound: ASoC: no source widget found for SPK_LP
[ 4.027852] tegra-asoc: sound: ASoC: Failed to add route SPK_LP -> direct -> x Int Spk
[ 4.027875] tegra-asoc: sound: ASoC: no source widget found for SPK_LN
[ 4.027877] tegra-asoc: sound: ASoC: Failed to add route SPK_LN -> direct -> x Int Spkr
[ 4.027890] tegra-asoc: sound: ASoC: no sink widget found for LINPUT1
[ 4.027892] tegra-asoc: sound: ASoC: Failed to add route x Mic -> direct -> LINPUT1
[ 4.027904] tegra-asoc: sound: ASoC: no sink widget found for LINPUT3
[ 4.027906] tegra-asoc: sound: ASoC: Failed to add route x Mic -> direct -> LINPUT3
[ 4.027918] tegra-asoc: sound: ASoC: no sink widget found for RINPUT1
[ 4.027920] tegra-asoc: sound: ASoC: Failed to add route x Mic -> direct -> RINPUT1
[ 4.027932] tegra-asoc: sound: ASoC: no sink widget found for RINPUT2
[ 4.027934] tegra-asoc: sound: ASoC: Failed to add route x Mic -> direct -> RINPUT2

and it doesn’t create any pcm device.

Hello!

The above tells me that the audio codec has not been registered. Please attach the complete output from dmesg.

Regards,
Jon

Hi, Jon:

Thanks for your reply!!

I upload the output for the command “dmesg”,“aplay -l”, “aplay -L”,and the file “common.dtsi” , “tegra_machine_driver_mobile.c” on my github repo.

and I add some “printk()” in the source file, please ignore it.

I’m sure that the wm8960 has been loaded in the kernel, and the corresponding I2S interface has been enabled.

Could you please help me?

the github url :
https://github.com/linux-downey/nvidia_debug_info

@jonathanh

Hi jon :

Do you have continuous attention to this issue?

I found the system’s own sound card driver named ADMAIF1 can play audio and output I2S data.

I tried to replace the codec part of this driver dai-link from xbar to wm8960, and then replaced the routing content you shared in the link, the driver after modified can be successfully registered to the system,

but it will not output I2S data when playing an audio file, can you provide some ideas?

Hi

The sound card is registered that’s why ADMAIF1 can play audio over I2S. However, can see few obvious issues in DAPM routes:

[ 4.027815] tegra-asoc: sound: ASoC: no source widget found for HP_L
[ 4.027818] tegra-asoc: sound: ASoC: Failed to add route HP_L -> direct -> x Headphone
[ 4.027834] tegra-asoc: sound: ASoC: no source widget found for HP_R

To fix above errors, in the DT tegra210-porg-p3448-common.dtsi, Please add prefix “x” for all DAPM widgets exposed by the WM8906 Codec in the routing array.

		"x Headphone", "x HP_L",
		"x Headphone", "x HP_R", 
		"x Int Spk", "x SPK_LP", 
		"x LINPUT1", "x Mic",  
		"x LINPUT3", "x Mic",
		"x RINPUT1", "x Mic",
		"x RINPUT2", "x Mic",

Kindly make changes and check again.

Regards,
Sharad