How to enable es8316 driver

Dear all:

1: Jetpack4.6_R32.6.1 with Jetson XAVIER NX SOM in our customed board, es8316 is worked.

2: Jetpack4.6_R32.6.1 with Jetson TX2 NX SOM in our customed board, es8316 is not worked.  

3:  With the same es8316 driver files,  after change devicetree file for TX2 NX which reference XAVIER NX,  it seem to into rt565x driver rather than es8316. 

tegra194-audio-p3668.dtsi (2.9 KB)

tegra194-p3668-common.dtsi (13.8 KB)
4: es8316 worked in I2S0 and I2C1 .
5:
dmesg.log (62.2 KB)

So how to properly modify devicetree to make it enter the es8316 driver.

Thank you very much . Best Regards .

Hi,

Please refer the troubleshooting guide at link

The guide provides debug depending on the issue. You may need to check various things per guide and provide necessary inputs to rootcause issue further

Also, new codec porting guide is available at link so that you get an idea of the dts/driver changes to be made. Kindly ensure that all of the necessary changes are made

Regards

According to the link and debug log, Now:

  • 1: dmesg show: codec dai es8316-hifi not regisetered.
    dmesg.log (68.6 KB)
    according the link and dmesg log may be i2c or i2s configuration parameters is not suitable.

    addition: kernel/kernel4.9/sound/soc/soc-core.c, debug find error in snd_soc_find_dai function.

1023         /* Find CODEC from registered CODECs */
1024         codec_dais = rtd->codec_dais;
1025         for (i = 0; i < rtd->num_codecs; i++) {
1026                 codec_dais[i] = snd_soc_find_dai(&codecs[i]);
1027                 if (!codec_dais[i]) {
1028                         dev_err(card->dev, "ASoC: CODEC DAI %s not registered\n",
1029                                 codecs[i].dai_name);
1030                         goto _err_defer;
1031                 }
1032         }
  • 2: I change tegra186-p3636-0001-common.dtsi and tegra186-p3636-0001-a00-audio.dtsi file show in temp.txt
    temp.txt (6.1 KB)

  • 3: SOM I2S0 -->pinmux I2S1@2901000

~$ sudo busybox devmem 0x02431020
0x00000440
~$ sudo busybox devmem 0x02431028
0x00000444
~$ sudo busybox devmem 0x02431030
0x00000454
~$ sudo busybox devmem 0x02431038
0x00000404
~$ sudo busybox devmem 0x02431040
0x00000444

  • 4: SOM I2C1–>pinmux I2C2 @c24000

00: 03 03 00 20 11 00 11 00 00 01 00 00 f8 3f 00 00 ??. ?.?..?..??..
10: 01 fc 28 00 00 33 00 00 88 06 22 03 0f 00 80 80 ??(…3…??“??.??
20: 00 00 c0 00 01 08 10 c0 00 1c 00 b0 32 03 00 11 …?.???.?.?2?.?
30: 10 00 00 c0 c0 1f f7 fd ff 1f f7 fd ff 1f f7 fd ?..???.???.???
40: ff 1f f7 fd ff 1f f7 fd ff 1f f7 fd ff 00 00 00 .???.???.???..
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 …
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 …
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 …
80: 03 03 00 20 11 00 11 00 00 01 00 00 f8 3f 00 00 ??. ?.?..?..??..
90: 01 fc 28 00 00 33 00 00 88 06 22 03 0f 00 80 80 ??(…3…??”??.??
a0: 00 00 c0 00 01 08 10 c0 00 1c 00 b0 32 03 00 11 …?.???.?.?2?.?
b0: 10 00 00 c0 c0 1f f7 fd ff 1f f7 fd ff 1f f7 fd ?..???.???.???
c0: ff 1f f7 fd ff 1f f7 fd ff 1f f7 fd ff 00 00 00 .???.???.???..
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 …
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 …
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 …

Could you help me check whether i2c@c240000 and i2s@2901000 is suitable for tx2 nx ?

  1. Yes. If you refer link, i2c table in Populate Codec Node for TX2 mentions i2c address to be used on 40 pin header as 0xc240000. Pls edit your DT suitably and let us know if the codec dai registration is rectified. After codec dai registration you should be able to see your codec name at cat /sys/kernel/debug/asoc/codecs
    Hoping that you have enabled the driver as well. This troubleshooting section has mentioned regarding this

Could you help me check whether i2c@c240000 and i2s@2901000 is suitable for tx2 nx ?

  1. yes I2S on 40 pin header is 0x02901000 and i2c is at 0xc240000
  2. Regarding pinmux, suggest you to avoid doing it from DT. you can do via Jetson-IO tool.
    Link for same is here. Pasting command lines here for easy reference
sudo /opt/nvidia/jetson-io/config-by-function.py -o dtb i2s1 aud
sudo reboot

4.Not sure how to interpret the data provided, Instead could you check i2cdetect -y -r <i2c-bus-number>. This will show if the codec is available at desired address

Thanks

1: that is very stange. Discard pinmux@2430000 in tegra186-p3636-0001-common.dtsi ,

/proc/asounc/cards result means es8316 driver load successful. But at that time, aud_mclk have no signal.

2: After sudo /opt/nvidia/jetson-io/config-by-function.py -o dtb i2s1 aud_mclk, tx2 nx can`t reboot, it stop on the boot screen(this problem I have report, but only get suggestion upgrade Jetpack, but now we have to use JP4.6 version).

Now, es8316 can play and record.

Thank you very much.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.