AUDIO does't have BCLK/WCLK

Dear kayccc,

I think I need time to tune the dts file and circuit step by step.
ex : the mclk in other case(TX2i of the post link that atalambedu provided), the audio chip’s mclk seems connect to TEGRA186_CLK_AUD_MCLK which meaning we need to follow their configuration in dts file/circuit/pinmux table…etc.

After adjust, the “Failed getting the mclk” is disappear, but there is the next one need to solve about those below. I will tried to add those argument to the dts file which the TI driver need.

[    9.680719] tlv320aic32x4 1-0018: Missing supply 'iov'
[    9.680723] tlv320aic32x4 1-0018: Failed to setup regulators

Dear kaycc,

There is one news need consult with you guys,
As our reply early, I had tried to add those argument as the dts file show which follow the post to fixed the “tlv320aic32x4 1-0018: Missing supply ‘iov/dv/av’”.
tegra194-audio-p3668.dtsi (3.2 KB)
But It will cause the system crash( as the log show) when I add the av-supply as below.
(the others doesn’t cause system crash such as iov-supply/dv-supply.)

 av-supply = <&battery_reg>;

Xavier_ti_audio_20220113_1527.log (97.3 KB)
Would you mind to give us some suggestion for this configuration??

Best Regards,
MOMO Chen

Dear kaycc,

Sorry to update for this one, it seems not be caused by the regulators’s parameter.
that more like be caused by snd_soc_register_codec(dev, &soc_codec_dev_aic32x4, &aic32x4_dai, 1) which in Linux_for_Tegra/sources/kernel/kernel-4.9/sound/soc/codecs/tlv320aic32x4.c;

int aic32x4_probe(struct device *dev, struct regmap *regmap)
{
...
        ret = aic32x4_setup_regulators(dev, aic32x4);
        if (ret) {
                dev_err(dev, "Failed to setup regulators\n");
                return ret;
        }

        ret = snd_soc_register_codec(dev,
                        &soc_codec_dev_aic32x4, &aic32x4_dai, 1);
        if (ret) {
                dev_err(dev, "Failed to register codec\n");
                aic32x4_disable_regulators(aic32x4);
                return ret;
        }
        return 0;

I’ve been mark the aic32x4_setup_regulators(dev, aic32x4) and the situation is same.
Best Regards,
MOMO Chen

Hi momo_chen,

Did you connect required power supplies to codec. ?
From data sheet I found online, I see that 3.3V supply should be connected to the relevant pins on codec. Assuming you have sourced your power from 40 pin header’s 3.3V pin, try using “&hdr40_vdd_3v3” instead of &battery_reg and check if the codec gets registered.

Thanks

Dear atalambedu,

Sorry to reply late, there’re something we need update/sync with you.

  1. There is an i2c problem between XavierNX DevKit and TI’s EVB, our hardware engineer is still check about it. We may hard to debug with this one before this problem be fixed.

With the Image which built with those file above, the EVB will show no acknowledge as below show via i2cdump, but there is no this problem in our carrier board.
Xavier DevKit + TI EVB log
Xavier_ti_audio_20220119_1641_XavierDevKit.log (51.1 KB)
Our carrier board log
Xavier_ti_audio_20220119_1734.log (37.5 KB)

root@lanner-desktop:~# i2cdump -y 0x1 0x18
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: [ 1459.530727] tegra-i2c c240000.i2c: no acknowledge from address 0x18
XX [ 1459.531215] tegra-i2c c240000.i2c: no acknowledge from address 0x18
XX [ 1459.531583] tegra-i2c c240000.i2c: no acknowledge from address 0x18
  1. According your suggestion before, we’ve been keep the original dts.
    Then the TI has provide some sample command as the Xavier_ti_audio_20220119_1734.log above show. the line out could work even the volume is very small.
    But we’re still prefer to make the kernel/TI driver could work well,
    so we’re still analysis why the codec-dai register fail.

  2. Since the EVB has I2C problem is still exist as item.1 description. we’re only could to debug with our carrier board. About the system crash, it is disappear after I modify the “link-name” of the audio dts file as the post you provide.
    Audio DTSI
    tegra194-audio-p3668.dtsi (3.7 KB)
    DTS
    tegra194-p3668-all-p3509-0000_20220120_1351.dts (230.6 KB)

                hdr40_snd_link_i2s: nvidia,dai-link-5 {
//                      name-prefix = "x";
                        name-prefix = "z";
//                      link-name = "rt565x-playback";
                        link-name = "ti-capture";
                        codec-dai = <&aic32x4>;
                        codec-dai-name = "tlv320aic32x4-hifi";

LOG file
Xavier_ti_audio_20220120_1347.log (96.2 KB)


but, there’re still something need to trace.
a. System feedback two WARNING message to instead of the system crash as the log show.

[    9.876535] WARNING: CPU: 0 PID: 2535 at /home/lanner/workspace/nVIDIA/Jetson_Xavier_1.5.1_7814/nx_nvidia/JetPack_4.5.1_Linux_JETSON_XAVIER_NX_DEVKIT/Linux_for_Tegra/sources/kernel/kernel-4.9/drivers/clk/clk.c:840 clk_core_disable+0x21c/0x240
[    9.883415] Modules linked in: snd_soc_tlv320aic32x4_i2c zram igb spidev overlay cdc_mbim cdc_wdm cdc_ncm usbnet qcserial usb_wwan usbserial userspace_alert nvgpu bluedroid_pm ip_tables x_tables
[    9.883491] CPU: 0 PID: 2535 Comm: kworker/u12:5 Not tainted 4.9.201+ #96
[    9.883495] Hardware name: NVIDIA Jetson Xavier NX Developer Kit (DT)
[    9.883513] Workqueue: events_unbound async_run_entry_fn
[    9.883521] task: ffffffc1e0987000 task.stack: ffffffc1de718000
[    9.883530] PC is at clk_core_disable+0x21c/0x240
[    9.883535] LR is at clk_core_disable_lock+0x28/0x40
[    9.883541] pc : [<ffffff800868962c>] lr : [<ffffff8008689678>] pstate: 80c000c5
[    9.883544] sp : ffffffc1de71bc30
[    9.883557] x29: ffffffc1de71bc30 x28: 0000000000000000
[    9.883566] x27: 0000000000000000 x26: ffffffc1f69d5400
[    9.883576] x25: ffffff800a0ad000 x24: 0000000000000000
[    9.883585] x23: 0000000000000000 x22: ffffffc1f69d3c00
[    9.883595] x21: ffffffc1d0fc1818 x20: ffffffc1e11ddc00
[    9.883604] x19: ffffffc1e11ddc00 x18: 0000000000000000
[    9.883614] x17: 0000007f808004e0 x16: ffffff8008270390
[    9.883623] x15: 0000000000000040 x14: 0000000000030eab
[    9.883633] x13: 000000000007bbc4 x12: 0000000000000400
[    9.883642] x11: 0000000000000400 x10: 0000000000000000
[    9.883652] x9 : 000000000217b9a6 x8 : 0000000000000400
[    9.883661] x7 : 0000000000000800 x6 : 0000000001a93076
[    9.883671] x5 : ffffff8008f59910 x4 : 0000000000000002
[    9.883680] x3 : 0000000000000000 x2 : 00000000098d098d
[    9.883690] x1 : ffffffc1e0987000 x0 : 0000000000000000

[    9.883703] ---[ end trace be65547650375f3c ]---
[    9.887099] Call trace:
[    9.887115] [<ffffff800868962c>] clk_core_disable+0x21c/0x240
[    9.887123] [<ffffff8008689678>] clk_core_disable_lock+0x28/0x40
[    9.887129] [<ffffff80086896bc>] clk_disable+0x2c/0x38
[    9.887138] [<ffffff8008d479c8>] aic32x4_set_bias_level+0x110/0x1d8
[    9.887147] [<ffffff8008d25d94>] snd_soc_codec_set_bias_level+0x34/0x40
[    9.887154] [<ffffff8008d2dabc>] snd_soc_dapm_set_bias_level+0x6c/0x210
[    9.887161] [<ffffff8008d2fedc>] dapm_pre_sequence_async+0x44/0xd0
[    9.887170] [<ffffff80080dee08>] async_run_entry_fn+0x48/0x158
[    9.887178] [<ffffff80080d40cc>] process_one_work+0x1e4/0x4b0
[    9.887184] [<ffffff80080d43e8>] worker_thread+0x50/0x4c8
[    9.887190] [<ffffff80080db074>] kthread+0xec/0xf0
[    9.887197] [<ffffff80080838a0>] ret_from_fork+0x10/0x30
[    9.887455] ------------[ cut here ]------------
[    9.890852] WARNING: CPU: 0 PID: 2535 at /home/lanner/workspace/nVIDIA/Jetson_Xavier_1.5.1_7814/nx_nvidia/JetPack_4.5.1_Linux_JETSON_XAVIER_NX_DEVKIT/Linux_for_Tegra/sources/kernel/kernel-4.9/drivers/clk/clk.c:722 clk_core_unprepare+0x1d8/0x1f8
[    9.898210] Modules linked in: snd_soc_tlv320aic32x4_i2c zram igb spidev overlay cdc_mbim cdc_wdm cdc_ncm usbnet qcserial usb_wwan usbserial userspace_alert nvgpu bluedroid_pm ip_tables x_tables

[    9.898284] CPU: 0 PID: 2535 Comm: kworker/u12:5 Tainted: G        W       4.9.201+ #96
[    9.898289] Hardware name: NVIDIA Jetson Xavier NX Developer Kit (DT)
[    9.898305] Workqueue: events_unbound async_run_entry_fn
[    9.898313] task: ffffffc1e0987000 task.stack: ffffffc1de718000
[    9.898320] PC is at clk_core_unprepare+0x1d8/0x1f8
[    9.898327] LR is at clk_unprepare+0x34/0x48
[    9.898332] pc : [<ffffff8008688e50>] lr : [<ffffff800868ba54>] pstate: 60c00045
[    9.898335] sp : ffffffc1de71bc60
[    9.898339] x29: ffffffc1de71bc60 x28: 0000000000000000
[    9.898349] x27: 0000000000000000 x26: ffffffc1f69d5400
[    9.898359] x25: ffffff800a0ad000 x24: 0000000000000000
[    9.898369] x23: 0000000000000000 x22: ffffffc1f69d3c00
[    9.898379] x21: ffffffc1d0fc1818 x20: 0000000000000000
[    9.898388] x19: ffffffc1e11ddc00 x18: 000000000000108f
[    9.898398] x17: 0000007f808004e0 x16: ffffff8008270390
[    9.898408] x15: 0000000000000000 x14: 00000000000060be
[    9.898417] x13: 0000000000024e96 x12: 00000000000005db
[    9.898427] x11: 0000000000001f18 x10: 0000000000000a10
[    9.898438] x9 : ffffffc1de71bb50 x8 : ffffffc1e0987a70
[    9.898448] x7 : 0000000000000000 x6 : 0000000000000400
[    9.898458] x5 : 0000000000000400 x4 : 0000000000000000
[    9.898468] x3 : 0000000000000000 x2 : 0000000000000000
[    9.898478] x1 : ffffffc1e0987000 x0 : 0000000000000000

[    9.898491] ---[ end trace be65547650375f3d ]---
[    9.902758] Call trace:
[    9.902770] [<ffffff8008688e50>] clk_core_unprepare+0x1d8/0x1f8
[    9.902778] [<ffffff800868ba54>] clk_unprepare+0x34/0x48
[    9.902787] [<ffffff8008d479d0>] aic32x4_set_bias_level+0x118/0x1d8
[    9.902796] [<ffffff8008d25d94>] snd_soc_codec_set_bias_level+0x34/0x40
[    9.902804] [<ffffff8008d2dabc>] snd_soc_dapm_set_bias_level+0x6c/0x210
[    9.902812] [<ffffff8008d2fedc>] dapm_pre_sequence_async+0x44/0xd0
[    9.902820] [<ffffff80080dee08>] async_run_entry_fn+0x48/0x158
[    9.902828] [<ffffff80080d40cc>] process_one_work+0x1e4/0x4b0
[    9.902835] [<ffffff80080d43e8>] worker_thread+0x50/0x4c8
[    9.902841] [<ffffff80080db074>] kthread+0xec/0xf0
[    9.902849] [<ffffff80080838a0>] ret_from_fork+0x10/0x30

b. the codec dai is still not register,

[    5.124091] tegra-asoc: sound: ASoC: CODEC DAI tlv320aic32x4-hifi not registered

c. the i2c adapter seems be bind with TI’s i2c driver

root@lanner-desktop:~# i2cdump -y 0x1 0x18
No size specified (using byte-data access)
Error: Could not set address to 0x18: Device or resource busy
root@lanner-desktop:~# lsmod | grep tlv
snd_soc_tlv320aic32x4_i2c     3119  1

d. The line out is no sound while aplay be executed, and the aplay only executed less 3 sec.
(the song should be play 90 sec).

Best Regards,
MOMO Chen