Drive the audio codec chip RT5616 on Orin Nano

Hi, all:
I tried driving RT5616 to Orin Nano and modified it to tegra234-soc-i2c.dts and tegra234-p3767-common-audio.dtsi. Now the i2c is ok, but did not found the sound card. Additionally, my RT5616 uses i2S0, but is it not included in DTS?

Hi 2639376969,

Are you using the devkit or custom board for Orin Nano?
What’s your Jetpack version in use?

Please share the full dmesg for further check.

I am using a Custom Board, Jetpack version is 5.1.3(sdk35.5),
dmesg.log (62.7 KB)

These are my modifications, Do I need to modify other files besides this, such as tegra_machine-drive.c?
D3M5HFR9{VVTXU~S1N64_NN
T($5$GR}V5@2FUXK0S6}D

The i2S0 interface used by RT5616,So which node should be modified under tegra186-audio-dai-links.dtsi
D53VL8IGOR5U%LLVW4UXZM1

[   12.985027] rt5616 0-001b: ASoC: error at snd_soc_dai_set_fmt on rt5616-aif1: -22
[   12.992732] rt5616 0-001b: ASoC: Failed to set DAI format: -22
[   13.004853] tegra-asoc: sound: snd_soc_register_card failed (-22)
[   13.011464] tegra-asoc:: probe of sound failed with error -22

It seems probe failed in your driver.

Have you referred to Audio Setup and Development — NVIDIA Jetson Linux Developer Guide 1 documentation to port Audio driver?

Yes, I have read this document, but I think there is i2s0 in the document, but there are only i2s1 to i2s6 in tegra234-soc-audio.dtsi. How can I use i2s0?

I think it is caused from the naming different in the document and the device tree.
It should be I2S2.

Please modify tegra_i2s2: i2s@2901100 { node in device tree.

Thanks, can this be found from which document?Then I don’t need to modify tegra_machine-drive.c, I just need to modify dtsi?

You have to check the device tree and also document for this.
From the link I shared, you would know that the I2S on 40-pins expansion header is I2S2 as following.

It seems you don’t need to modify the driver during porting.
Please modify the device tree first and check if there’s the error in dmesg.

I have obtained the routing settings for the HPO of RT5616, and they said that the SOC settings should still be needed to play sound. Can you provide them? Thank you!

This is the routing setting for rt5616:
amixer -c2 cset name=‘DAC MIXL INF1 Switch’ 1
amixer -c2 cset name=‘DAC MIXR INF1 Switch’ 1
amixer -c2 cset name=‘Stereo DAC MIXL DAC L1 Switch’ 1
amixer -c2 cset name=‘Stereo DAC MIXR DAC R1 Switch’ 1
amixer -c2 cset name=‘HPO MIX DAC1 Switch’ 1
amixer -c2 cset name=‘HP Playback Volume’ [0-39]

Please share what you have done so far and also the result of the following commands.

$ cat /proc/asound/cards
$ sudo cat /sys/kernel/debug/asoc/components|grep i2s

I have modified the following files:
tegra234-p3767-common-audio.dtsi.log (6.5 KB)
tegra234-soc-i2c.dtsi.txt (8.5 KB)
dmesg.log (65.8 KB)

cat /proc/asound/cards
0 [SafetyI2Ssoun ]: -

1 [HDA ]: tegra-hda - NVIDIA Jetson Orin NX HDA
NVIDIA Jetson Orin NX HDA at 0x3518000 irq 111
2 [rt5616 ]: tegra-ape - NVIDIA Jetson Orin nano rt5616
NVIDIA Jetson Orin nano rt5616

sudo cat /sys/kernel/debug/asoc/components|grep i2s
2901500.i2s
2901400.i2s
2901300.i2s
2901200.i2s
2901100.i2s
2901000.i2s

[   12.622263] rt5616: enter rt5616_probe
[   12.622280] rt5616: exit rt5616_probe

Are the above messages added from you?

From the dmesg and the result you shared, it looks good to me.
What’s your current issue about using rt5616 codec?

Yes, I added it, but the problem now is that there is no sound when executing ‘mplayer ao: device=hw=2.0 Music/xxx. mp3’, and it plays very quickly。

And in dmesg, there are:
ALSA device list:
[ 9.419739] No soundcards found.

It seems your audio sound card got registered, only playback has issue.
If playback completing fast then DAPM path is not complete, may be due to ADMAIF is not connected to I2S2
Or you are not using right ADMAIF pcm device to play

Could you try running the following 2 commands after setting all mixerr controls for codec?

$ amixer -c APE cset name="I2S2 MUX" "ADMAIF2"
$ speaker-test -D hw:APE,1 -r 48000 -c 2 -F S32_LE -t sine -f 1000

There is no information about ADMAIF in my dmesg. Are there still some driver modules that have not been installed?

I measured the MCLK of the codec and it is 50MHz. How can I configure it to 44.1KHz? The pin used is soc_gpio59_mac6
tegra234-p3767-common-audio.dtsi.log (7.9 KB)

Hello, KevinFFF:
I found that after adding this node, I2S2 doesn’t work anymore

&i2s2_to_codec {
status = “okay”;
link-name = “rt5616-playback”;
codec {
sound-dai = <&rt5616_codec 0>;
};
};

Before adding:

root@tegra-ubuntu:/home/blakesu# speaker-test -D hw:APE,1 -r 48000 -c 1 -F S32_LE -t sine -f 1000

speaker-test 1.2.2

Playback device is hw:APE,1
Stream parameters are 48000Hz, S32_LE, 1 channels
Sine wave rate is 1000.0000Hz
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 32 to 8192
Period size range from 32 to 4096
Using max buffer size 8192
Periods = 4
was set period_size = 2048
was set buffer_size = 8192
0 - Front Left
Time per period = 1.407176
0 - Front Left
^CTime per period = 0.394205 cat /sys/kernel/debug/tracing/trace_pipe | grep *
speaker-test-3065 [003] … 170.367586: snd_soc_dapm_path: *ADMAIF2 XBAR-RX ← (direct) ← ADMAIF2 XBAR-Playback
speaker-test-3065 [003] … 170.367644: snd_soc_dapm_path: *I2S4 Mux ← ADMAIF2 ← ADMAIF2 XBAR-RX
speaker-test-3065 [003] … 170.367671: snd_soc_dapm_path: *I2S2 Mux ← ADMAIF2 ← ADMAIF2 XBAR-RX
speaker-test-3065 [003] … 170.367673: snd_soc_dapm_path: *I2S4 XBAR-TX ← (direct) ← I2S4 Mux
speaker-test-3065 [003] … 170.367674: snd_soc_dapm_path: *I2S2 XBAR-TX ← (direct) ← I2S2 Mux
speaker-test-3065 [003] … 170.367676: snd_soc_dapm_path: *I2S4 XBAR-Capture ← (direct) ← I2S4 XBAR-TX
speaker-test-3065 [003] … 170.367677: snd_soc_dapm_path: *I2S2 XBAR-Capture ← (direct) ← I2S2 XBAR-TX
speaker-test-3065 [003] … 170.367678: snd_soc_dapm_path: *tegra-dlink-67-playback ← (direct) ← I2S4 XBAR-Capture
speaker-test-3065 [003] … 170.367679: snd_soc_dapm_path: *tegra-dlink-65-playback ← (direct) ← I2S2 XBAR-Capture
speaker-test-3065 [003] … 170.367681: snd_soc_dapm_path: *I2S4 CIF-Playback ← (direct) ← tegra-dlink-67-playback
speaker-test-3065 [003] … 170.367682: snd_soc_dapm_path: *I2S2 CIF-Playback ← (direct) ← tegra-dlink-65-playback
speaker-test-3065 [003] … 170.367683: snd_soc_dapm_path: *I2S4 RX ← (direct) ← I2S4 CIF-Playback
speaker-test-3065 [003] … 170.367684: snd_soc_dapm_path: *I2S2 RX ← (direct) ← I2S2 CIF-Playback
speaker-test-3065 [003] … 170.367685: snd_soc_dapm_path: *I2S4 DAP-Capture ← (direct) ← I2S4 RX
speaker-test-3065 [003] … 170.367686: snd_soc_dapm_path: *I2S2 DAP-Capture ← (direct) ← I2S2 RX
speaker-test-3065 [003] … 170.367687: snd_soc_dapm_path: *tegra-dlink-79-playback ← (direct) ← I2S4 DAP-Capture
speaker-test-3065 [003] … 170.367688: snd_soc_dapm_path: *tegra-dlink-77-playback ← (direct) ← I2S2 DAP-Capture
speaker-test-3065 [003] … 170.367689: snd_soc_dapm_path: *I2S4 Dummy-Playback ← (direct) ← tegra-dlink-79-playback
speaker-test-3065 [003] … 170.367690: snd_soc_dapm_path: *I2S2 Dummy-Playback ← (direct) ← tegra-dlink-77-playback
speaker-test-3065 [003] … 170.367692: snd_soc_dapm_path: *I2S4 SPK ← (direct) ← I2S4 Dummy-Playback
speaker-test-3065 [003] … 170.367693: snd_soc_dapm_path: *I2S2 SPK ← (direct) ← I2S2 Dummy-Playback
speaker-test-3065 [003] … 172.172473: snd_soc_dapm_path: *ADMAIF2 XBAR-Playback ← (direct) ← tegra-dlink-45-playback
speaker-test-3065 [003] … 172.172474: snd_soc_dapm_path: *ADMAIF2 XBAR-Playback ← (direct) ← ADMAIF2 Playback
speaker-test-3065 [003] … 172.172477: snd_soc_dapm_path: *ADMAIF2 XBAR-RX ← (direct) ← ADMAIF2 XBAR-Playback
speaker-test-3065 [003] … 172.172565: snd_soc_dapm_path: *I2S4 Mux ← ADMAIF2 ← ADMAIF2 XBAR-RX
speaker-test-3065 [003] … 172.172614: snd_soc_dapm_path: *I2S2 Mux ← ADMAIF2 ← ADMAIF2 XBAR-RX
speaker-test-3065 [003] … 172.172617: snd_soc_dapm_path: *I2S4 XBAR-TX ← (direct) ← I2S4 Mux
speaker-test-3065 [003] … 172.172619: snd_soc_dapm_path: *I2S2 XBAR-TX ← (direct) ← I2S2 Mux
speaker-test-3065 [003] … 172.172621: snd_soc_dapm_path: *I2S4 XBAR-Capture ← (direct) ← I2S4 XBAR-TX
speaker-test-3065 [003] … 172.172622: snd_soc_dapm_path: *I2S2 XBAR-Capture ← (direct) ← I2S2 XBAR-TX
speaker-test-3065 [003] … 172.172624: snd_soc_dapm_path: *tegra-dlink-67-playback ← (direct) ← I2S4 XBAR-Capture
speaker-test-3065 [003] … 172.172626: snd_soc_dapm_path: *tegra-dlink-65-playback ← (direct) ← I2S2 XBAR-Capture
speaker-test-3065 [003] … 172.172628: snd_soc_dapm_path: *I2S4 CIF-Playback ← (direct) ← tegra-dlink-67-playback
speaker-test-3065 [003] … 172.172630: snd_soc_dapm_path: *I2S2 CIF-Playback ← (direct) ← tegra-dlink-65-playback
speaker-test-3065 [003] … 172.172631: snd_soc_dapm_path: *I2S4 RX ← (direct) ← I2S4 CIF-Playback
speaker-test-3065 [003] … 172.172633: snd_soc_dapm_path: *I2S2 RX ← (direct) ← I2S2 CIF-Playback
speaker-test-3065 [003] … 172.172635: snd_soc_dapm_path: *I2S4 DAP-Capture ← (direct) ← I2S4 RX
speaker-test-3065 [003] … 172.172636: snd_soc_dapm_path: *I2S2 DAP-Capture ← (direct) ← I2S2 RX
speaker-test-3065 [003] … 172.172639: snd_soc_dapm_path: *tegra-dlink-79-playback ← (direct) ← I2S4 DAP-Capture
speaker-test-3065 [003] … 172.172640: snd_soc_dapm_path: *tegra-dlink-77-playback ← (direct) ← I2S2 DAP-Capture
speaker-test-3065 [003] … 172.172642: snd_soc_dapm_path: *I2S4 Dummy-Playback ← (direct) ← tegra-dlink-79-playback
speaker-test-3065 [003] … 172.172644: snd_soc_dapm_path: *I2S2 Dummy-Playback ← (direct) ← tegra-dlink-77-playback
speaker-test-3065 [003] … 172.172646: snd_soc_dapm_path: *I2S4 SPK ← (direct) ← I2S4 Dummy-Playback
speaker-test-3065 [003] … 172.172647: snd_soc_dapm_path: *I2S2 SPK ← (direct) ← I2S2 Dummy-Playback

After adding:

root@tegra-ubuntu:/home/blakesu# amixer -c1 cset name=“I2S2 Mux” “ADMAIF2”
numid=1288,iface=MIXER,name=‘I2S2 Mux’
; type=ENUMERATED,access=rw------,values=1,items=81
; Item #0 ‘None’
; Item #1 ‘ADMAIF1’
; Item #2 ‘ADMAIF2’
; Item #3 ‘ADMAIF3’
; Item #4 ‘ADMAIF4’
; Item #5 ‘ADMAIF5’
; Item #6 ‘ADMAIF6’
; Item #7 ‘ADMAIF7’
; Item #8 ‘ADMAIF8’
; Item #9 ‘ADMAIF9’
; Item #10 ‘ADMAIF10’
; Item #11 ‘ADMAIF11’
; Item #12 ‘ADMAIF12’
; Item #13 ‘ADMAIF13’
; Item #14 ‘ADMAIF14’
; Item #15 ‘ADMAIF15’
; Item #16 ‘ADMAIF16’
; Item #17 ‘I2S1’
; Item #18 ‘I2S2’
; Item #19 ‘I2S3’
; Item #20 ‘I2S4’
; Item #21 ‘I2S5’
; Item #22 ‘I2S6’
; Item #23 ‘SFC1’
; Item #24 ‘SFC2’
; Item #25 ‘SFC3’
; Item #26 ‘SFC4’
; Item #27 ‘MIXER1 TX1’
; Item #28 ‘MIXER1 TX2’
; Item #29 ‘MIXER1 TX3’
; Item #30 ‘MIXER1 TX4’
; Item #31 ‘MIXER1 TX5’
; Item #32 ‘AMX1’
; Item #33 ‘AMX2’
; Item #34 ‘AMX3’
; Item #35 ‘AMX4’
; Item #36 ‘ARAD1’
; Item #37 ‘AFC1’
; Item #38 ‘AFC2’
; Item #39 ‘AFC3’
; Item #40 ‘AFC4’
; Item #41 ‘AFC5’
; Item #42 ‘AFC6’
; Item #43 ‘OPE1’
; Item #44 ‘SPKPROT1’
; Item #45 ‘MVC1’
; Item #46 ‘MVC2’
; Item #47 ‘IQC1-1’
; Item #48 ‘IQC1-2’
; Item #49 ‘IQC2-1’
; Item #50 ‘IQC2-2’
; Item #51 ‘DMIC1’
; Item #52 ‘DMIC2’
; Item #53 ‘DMIC3’
; Item #54 ‘DMIC4’
; Item #55 ‘ADX1 TX1’
; Item #56 ‘ADX1 TX2’
; Item #57 ‘ADX1 TX3’
; Item #58 ‘ADX1 TX4’
; Item #59 ‘ADX2 TX1’
; Item #60 ‘ADX2 TX2’
; Item #61 ‘ADX2 TX3’
; Item #62 ‘ADX2 TX4’
; Item #63 ‘ADX3 TX1’
; Item #64 ‘ADX3 TX2’
; Item #65 ‘ADX3 TX3’
; Item #66 ‘ADX3 TX4’
; Item #67 ‘ADX4 TX1’
; Item #68 ‘ADX4 TX2’
; Item #69 ‘ADX4 TX3’
; Item #70 ‘ADX4 TX4’
; Item #71 ‘ADMAIF17’
; Item #72 ‘ADMAIF18’
; Item #73 ‘ADMAIF19’
; Item #74 ‘ADMAIF20’
; Item #75 ‘ASRC1 TX1’
; Item #76 ‘ASRC1 TX2’
; Item #77 ‘ASRC1 TX3’
; Item #78 ‘ASRC1 TX4’
; Item #79 ‘ASRC1 TX5’
; Item #80 ‘ASRC1 TX6’
: values=2
root@tegra-ubuntu:/home/blakesu# amixer -c1 cset name=‘DAC MIXL INF1 Switch’ 1
numid=1496,iface=MIXER,name=‘DAC MIXL INF1 Switch’
; type=BOOLEAN,access=rw------,values=1
: values=on
root@tegra-ubuntu:/home/blakesu# amixer -c1 cset name=‘DAC MIXR INF1 Switch’ 1
numid=1498,iface=MIXER,name=‘DAC MIXR INF1 Switch’
; type=BOOLEAN,access=rw------,values=1
: values=on
root@tegra-ubuntu:/home/blakesu# amixer -c1 cset name=‘Stereo DAC MIXL DAC L1 Switch’ 1
numid=1499,iface=MIXER,name=‘Stereo DAC MIXL DAC L1 Switch’
; type=BOOLEAN,access=rw------,values=1
: values=on
root@tegra-ubuntu:/home/blakesu# amixer -c1 cset name=‘Stereo DAC MIXR DAC R1 Switch’ 1
numid=1501,iface=MIXER,name=‘Stereo DAC MIXR DAC R1 Switch’
; type=BOOLEAN,access=rw------,values=1
: values=on
root@tegra-ubuntu:/home/blakesu# amixer -c1 cset name=‘HPO MIX DAC1 Switch’ 1
numid=1513,iface=MIXER,name=‘HPO MIX DAC1 Switch’
; type=BOOLEAN,access=rw------,values=1
: values=on
root@tegra-ubuntu:/home/blakesu# amixer -c1 cset name=‘HP Playback Volume’ 39
numid=439,iface=MIXER,name=‘HP Playback Volume’
; type=INTEGER,access=rw—R–,values=2,min=0,max=39,step=0
: values=39,39
| dBscale-min=-46.50dB,step=1.50dB,mute=0
root@tegra-ubuntu:/home/blakesu# L DAC Loot@tegra-ubuntu:/home/blakesu# amixer -c1 cset name=‘Stereo DAC MIXR DAC R1 Switch’ 1
^C
root@tegra-ubuntu:/home/blakesu# ^C
root@tegra-ubuntu:/home/blakesu# ^C
root@tegra-ubuntu:/home/blakesu# speaker-test -D hw:APE,1 -r 48000 -c 1 -F S32_LE -t sine -f 1000

speaker-test 1.2.2

Playback device is hw:APE,1
Stream parameters are 48000Hz, S32_LE, 1 channels
Sine wave rate is 1000.0000Hz
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 32 to 8192
Period size range from 32 to 4096
Using max buffer size 8192
Periods = 4
was set period_size = 2048
was set buffer_size = 8192
0 - Front Left
Time per period = 1.407448
0 - Front Left
^CTime per period = 0.355851 ^C
root@tegra-ubuntu:/home/blakesu# ^C
root@tegra-ubuntu:/home/blakesu# cat /sys/kernel/debug/tracing/trace_pipe | grep *
amixer-3168 [003] … 620.348209: snd_soc_dapm_path: *Audio DSP ← (direct) ← DAC MIXR
amixer-3168 [003] … 620.348210: snd_soc_dapm_path: *DAC MIXR ← INF1 Switch ← IF1 DAC1 R
amixer-3168 [003] … 620.348211: snd_soc_dapm_path: *IF1 DAC1 R ← (direct) ← IF1 DAC
amixer-3168 [003] … 620.348213: snd_soc_dapm_path: *IF1 DAC ← (direct) ← AIF1RX
amixer-3168 [003] … 620.348214: snd_soc_dapm_path: *AIF1RX ← (direct) ← AIF1 Playback
amixer-3168 [003] … 620.348215: snd_soc_dapm_path: *AIF1 Playback ← (direct) ← rt5616-playback-playback
amixer-3168 [003] … 620.348217: snd_soc_dapm_path: *rt5616-playback-playback ← (direct) ← I2S2 DAP-Capture
amixer-3168 [003] … 620.348218: snd_soc_dapm_path: *I2S2 DAP-Capture ← (direct) ← I2S2 RX
amixer-3168 [003] … 620.348219: snd_soc_dapm_path: *I2S2 RX ← (direct) ← I2S2 CIF-Playback
amixer-3168 [003] … 620.348220: snd_soc_dapm_path: *I2S2 CIF-Playback ← (direct) ← tegra-dlink-65-playback
amixer-3168 [003] … 620.348221: snd_soc_dapm_path: *tegra-dlink-65-playback ← (direct) ← I2S2 XBAR-Capture
amixer-3168 [003] … 620.348221: snd_soc_dapm_path: *I2S2 XBAR-Capture ← (direct) ← I2S2 XBAR-TX
amixer-3168 [003] … 620.348222: snd_soc_dapm_path: *I2S2 XBAR-TX ← (direct) ← I2S2 Mux
amixer-3168 [003] … 620.348273: snd_soc_dapm_path: *I2S2 Mux ← ADMAIF2 ← ADMAIF2 XBAR-RX
amixer-3168 [003] … 620.348275: snd_soc_dapm_path: *Audio DSP ← (direct) ← DAC MIXL
amixer-3168 [003] … 620.348276: snd_soc_dapm_path: *DAC MIXL ← INF1 Switch ← IF1 DAC1 L
amixer-3168 [003] … 620.348276: snd_soc_dapm_path: *IF1 DAC1 L ← (direct) ← IF1 DAC
amixer-3168 [003] … 620.348278: snd_soc_dapm_path: *Stereo DAC MIXL ← DAC L1 Switch ← Audio DSP
amixer-3170 [002] … 620.594157: snd_soc_dapm_path: *DAC 1 ← (direct) ← DAC R1
amixer-3170 [002] … 620.594158: snd_soc_dapm_path: *DAC 1 ← (direct) ← DAC L1
amixer-3170 [002] … 620.594159: snd_soc_dapm_path: *DAC L1 ← (direct) ← Stereo DAC MIXL
amixer-3170 [002] … 620.594160: snd_soc_dapm_path: *HPO MIX ← DAC1 Switch ← DAC 1
speaker-test-3172 [001] … 630.960927: snd_soc_dapm_path: *ADMAIF2 XBAR-RX ← (direct) ← ADMAIF2 XBAR-Playback
speaker-test-3172 [001] … 630.960983: snd_soc_dapm_path: *I2S4 Mux ← ADMAIF2 ← ADMAIF2 XBAR-RX
speaker-test-3172 [001] … 630.961008: snd_soc_dapm_path: *I2S2 Mux ← ADMAIF2 ← ADMAIF2 XBAR-RX
speaker-test-3172 [001] … 630.961009: snd_soc_dapm_path: *I2S4 XBAR-TX ← (direct) ← I2S4 Mux
speaker-test-3172 [001] … 630.961010: snd_soc_dapm_path: *I2S4 XBAR-Capture ← (direct) ← I2S4 XBAR-TX
speaker-test-3172 [001] … 630.961012: snd_soc_dapm_path: *tegra-dlink-67-playback ← (direct) ← I2S4 XBAR-Capture
speaker-test-3172 [001] … 630.961013: snd_soc_dapm_path: *I2S4 CIF-Playback ← (direct) ← tegra-dlink-67-playback
speaker-test-3172 [001] … 630.961014: snd_soc_dapm_path: *I2S4 RX ← (direct) ← I2S4 CIF-Playback
speaker-test-3172 [001] … 630.961015: snd_soc_dapm_path: *I2S4 DAP-Capture ← (direct) ← I2S4 RX
speaker-test-3172 [001] … 630.961016: snd_soc_dapm_path: *tegra-dlink-79-playback ← (direct) ← I2S4 DAP-Capture
speaker-test-3172 [001] … 630.961018: snd_soc_dapm_path: *I2S4 Dummy-Playback ← (direct) ← tegra-dlink-79-playback
speaker-test-3172 [001] … 630.961019: snd_soc_dapm_path: *I2S4 SPK ← (direct) ← I2S4 Dummy-Playback
speaker-test-3172 [002] … 632.727694: snd_soc_dapm_path: *ADMAIF2 XBAR-Playback ← (direct) ← tegra-dlink-45-playback
speaker-test-3172 [002] … 632.727695: snd_soc_dapm_path: *ADMAIF2 XBAR-Playback ← (direct) ← ADMAIF2 Playback
speaker-test-3172 [002] … 632.727697: snd_soc_dapm_path: *ADMAIF2 XBAR-RX ← (direct) ← ADMAIF2 XBAR-Playback
speaker-test-3172 [002] … 632.727790: snd_soc_dapm_path: *I2S4 Mux ← ADMAIF2 ← ADMAIF2 XBAR-RX
speaker-test-3172 [002] … 632.727793: snd_soc_dapm_path: *I2S4 XBAR-TX ← (direct) ← I2S4 Mux
speaker-test-3172 [002] … 632.727795: snd_soc_dapm_path: *I2S4 XBAR-Capture ← (direct) ← I2S4 XBAR-TX
speaker-test-3172 [002] … 632.727797: snd_soc_dapm_path: *tegra-dlink-67-playback ← (direct) ← I2S4 XBAR-Capture
speaker-test-3172 [002] … 632.727798: snd_soc_dapm_path: *I2S4 CIF-Playback ← (direct) ← tegra-dlink-67-playback
speaker-test-3172 [002] … 632.727800: snd_soc_dapm_path: *I2S4 RX ← (direct) ← I2S4 CIF-Playback
speaker-test-3172 [002] … 632.727802: snd_soc_dapm_path: *I2S4 DAP-Capture ← (direct) ← I2S4 RX
speaker-test-3172 [002] … 632.727803: snd_soc_dapm_path: *tegra-dlink-79-playback ← (direct) ← I2S4 DAP-Capture
speaker-test-3172 [002] … 632.727805: snd_soc_dapm_path: *I2S4 Dummy-Playback ← (direct) ← tegra-dlink-79-playback
speaker-test-3172 [002] … 632.727807: snd_soc_dapm_path: *I2S4 SPK ← (direct) ← I2S4 Dummy-Playback

Do you mean adding i2s2_to_codec node causing the issue?

Is there errors showing in dmesg currently?

I guess so. dmesg seems to have no error, but after adding this node, there is no signal in i2s.

Have you confirmed that you are using I2S from 40-pins expansion header?

Could you compare the dmesg before and after you add i2s2_to_codec node?

Yes, I have confirmed that I am using the I2S interface from the 40-pin expansion header.

The following are dmesg with added nodes and dmesg without added nodes:
dmesg.log (65.4 KB)
no_add_i2s2_node_dmesg.log (65.4 KB)

Here are the files that I have modified:
tegra234-p3767-common-audio.dtsi.log (7.7 KB)
tegra234-soc-i2c.dtsi.log (8.5 KB)
rt5616.c.log (41.1 KB)