Hi NV team,
Do you have sample code for I2S audio codec that is succesfully integrated on Orin Nano/NX?
Our SW team is frustrated when dealing with 3rd party I2S audio codec: Realtek ALC5616 on Orin Nano, and we are currently seaking technical help from Realtek one side , but it sounds that we need both NVIDIA team and Realtek for co-tuning ALC5616, so do you have some technical engineer contact window for that tuning issue, i am very aprreciated if you may provide related engineer email window for technical discussion, thanks.
Hi Jasperni,
You are at right place. We are happy to help your team to resolve the issue.
Before we can provide some valuable feedback or solution, would like to know couple of details from your side.
Jetpack version used
Where are you exactly stuck in the RT5616 integration flow for e.g is it code integration or no sound issue or any other. Please provide specific info here
Attach the files (DT and driver) changed to support RT5616
Our SW engineer will provide related information for your team’s deep analysis.
Here first provide related HW design schematic if you need your HW engineer to check first. we use I2C2 to communicate with ALC5616(rt5616), and its ok for I2C2 recoginition.
Hi Jasperni,
As you mentioned I2C2 recognition is successful. I believe for SW Sound Card registration this should be good. Let me wait for your SW engineer on the details asked in my first comment.
Playback device is hw:APE,0
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 = 0.053350
0 - Front Left
Time per period = 0.056119
0 - Front Left
Time per period = 0.056134
0 - Front Left
Time per period = 0.056135
0 - Front Left
^CTime per period = 0.009699
root@tegra-ubuntu:/home/blakesu# cat /sys/kernel/debug/tracing/trace_pipe | grep *
speaker-test-3601 [001] … 5558.352488: snd_soc_dapm_path: *ADMAIF1 XBAR-Playback ← (direct) ← tegra-dlink-44-playback
speaker-test-3601 [001] … 5558.352490: snd_soc_dapm_path: *ADMAIF1 XBAR-Playback ← (direct) ← ADMAIF1 Playback
^C
root@tegra-ubuntu:/home/blakesu#
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
Added our custom carrier board hw info: firstly we still not got right GPIO09_I2S0_MCLK(around 11.29MHz)/I2S0_SCLK(1.41MHz)/I2S0_LRCLK(44.1KHz)clocks,so I think some SW configuration must be ignored here.
Please confirm with all this changes you could be able to probe I2S2 signals out of 40 Pin header
Note: With my change the Codec mixer controls would be prefixed with CVB-RT, So please take care while executing the route path with mixer controls before running usecase
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
[ 59.969235] rt5616 0-001b: rt5616: Unsupported clock setting
[ 59.975101] rt5616 0-001b: ASoC: error at snd_soc_dai_hw_params on rt5616-aif1: -22
[ 59.983033] tegra-asoc: sound: ASoC: PRE_PMU: rt5616-playback-playback event failed: -22
was set period_size = 2048
was set buffer_size = 8192
0 - Front Left
Time per period = 1.407275
0 - Front Left
Time per period = 1.493434
0 - Front Left
^CTime per period = 0.339604
Hi,
I believe the codec sysclk configuration is missing in the machine driver.
Can you provide the output of below command
cat /sys/kernel/debug/clk/clk_summary
Also, we need to make sure we set right cock rate with snd_soc_dai_set_sysclk(), Please check the other codec support under kernel/sound/soc/tegra/tegra_codecs.c , can you try adding similar callback for RT5616
you can attach the change file if you already have same.
Playback device is hw:APE,1
Stream parameters are 44100Hz, S16_LE, 1 channels
Sine wave rate is 1000.0000Hz
Rate set to 44100Hz (requested 44100Hz)
Buffer size range from 64 to 16384
Period size range from 64 to 8192
Using max buffer size 16384
Periods = 4
was set period_size = 4096
was set buffer_size = 16384
0 - Front Left
Time per period = 1.299463
0 - Front Left
^CTime per period = 0.526450
root@tegra-ubuntu:/sys/kernel/debug/asoc/NVIDIA Jetson Orin nano APE# grep -rns ‘On’
290e400.arad/dapm/Lane6 SIG:1:Lane6 SIG: On in 1 out 0
290e400.arad/dapm/Lane5 SIG:1:Lane5 SIG: On in 1 out 0
290e400.arad/dapm/Lane4 SIG:1:Lane4 SIG: On in 1 out 0
290e400.arad/dapm/Lane3 SIG:1:Lane3 SIG: On in 1 out 0
290e400.arad/dapm/Lane2 SIG:1:Lane2 SIG: On in 1 out 0
290e400.arad/dapm/Lane1 SIG:1:Lane1 SIG: On in 1 out 0
rt5616.0-001b/dapm/CVB-RT AIF1 Playback:1:CVB-RT AIF1 Playback: On in 1 out 8
rt5616.0-001b/dapm/CVB-RT HPOR:1:CVB-RT HPOR: On in 4 out 1
rt5616.0-001b/dapm/CVB-RT HPOL:1:CVB-RT HPOL: On in 4 out 1
rt5616.0-001b/dapm/CVB-RT Charge Pump:1:CVB-RT Charge Pump: On in 0 out 0
rt5616.0-001b/dapm/CVB-RT HP amp:1:CVB-RT HP amp: On in 4 out 2
rt5616.0-001b/dapm/CVB-RT HPO MIX:1:CVB-RT HPO MIX: On in 4 out 2
rt5616.0-001b/dapm/CVB-RT DAC 1:1:CVB-RT DAC 1: On in 4 out 2
rt5616.0-001b/dapm/CVB-RT DAC R1:1:CVB-RT DAC R1: On in 2 out 2 - R97(0x61) mask 0x800
rt5616.0-001b/dapm/CVB-RT DAC L1:1:CVB-RT DAC L1: On in 2 out 2 - R97(0x61) mask 0x1000
rt5616.0-001b/dapm/CVB-RT Stereo DAC MIXR:1:CVB-RT Stereo DAC MIXR: On in 2 out 2
rt5616.0-001b/dapm/CVB-RT Stereo DAC MIXL:1:CVB-RT Stereo DAC MIXL: On in 2 out 2
rt5616.0-001b/dapm/CVB-RT Stero1 DAC Power:1:CVB-RT Stero1 DAC Power: On in 0 out 0 - R98(0x62) mask 0x800
rt5616.0-001b/dapm/CVB-RT DAC MIXR:1:CVB-RT DAC MIXR: On in 1 out 4
rt5616.0-001b/dapm/CVB-RT DAC MIXL:1:CVB-RT DAC MIXL: On in 1 out 4
rt5616.0-001b/dapm/CVB-RT Audio DSP:1:CVB-RT Audio DSP: On in 2 out 4
rt5616.0-001b/dapm/CVB-RT AIF1RX:1:CVB-RT AIF1RX: On in 1 out 8
rt5616.0-001b/dapm/CVB-RT IF1 DAC1 R:1:CVB-RT IF1 DAC1 R: On in 1 out 4
rt5616.0-001b/dapm/CVB-RT IF1 DAC1 L:1:CVB-RT IF1 DAC1 L: On in 1 out 4
rt5616.0-001b/dapm/CVB-RT IF1 DAC:1:CVB-RT IF1 DAC: On in 1 out 8
rt5616.0-001b/dapm/CVB-RT I2S1:1:CVB-RT I2S1: On in 0 out 0 - R97(0x61) mask 0x8000
rt5616.0-001b/dapm/bias_level:1:On
2901300.i2s/dapm/I2S4 Dummy-Playback:1:I2S4 Dummy-Playback: On in 1 out 1
2901300.i2s/dapm/I2S4 DAP-Capture:1:I2S4 DAP-Capture: On in 1 out 1
2901300.i2s/dapm/I2S4 CIF-Playback:1:I2S4 CIF-Playback: On in 1 out 1
2901300.i2s/dapm/I2S4 SPK:1:I2S4 SPK: On in 1 out 1
2901300.i2s/dapm/I2S4 RX:1:I2S4 RX: On in 1 out 1 - R0(0x0) mask 0x1
2901300.i2s/dapm/bias_level:1:On
2901100.i2s/dapm/I2S2 DAP-Capture:1:I2S2 DAP-Capture: On in 1 out 8
2901100.i2s/dapm/I2S2 CIF-Playback:1:I2S2 CIF-Playback: On in 1 out 8
2901100.i2s/dapm/I2S2 RX:1:I2S2 RX: On in 1 out 8 - R0(0x0) mask 0x1
2901100.i2s/dapm/bias_level:1:On
2900800.ahub/dapm/I2S4 XBAR-Capture:1:I2S4 XBAR-Capture: On in 1 out 1
2900800.ahub/dapm/I2S2 XBAR-Capture:1:I2S2 XBAR-Capture: On in 1 out 8
2900800.ahub/dapm/ADMAIF2 XBAR-Playback:1:ADMAIF2 XBAR-Playback: On in 1 out 9
2900800.ahub/dapm/I2S4 Mux:1:I2S4 Mux: On in 1 out 1
2900800.ahub/dapm/I2S4 XBAR-TX:1:I2S4 XBAR-TX: On in 1 out 1
2900800.ahub/dapm/I2S2 Mux:1:I2S2 Mux: On in 1 out 8
2900800.ahub/dapm/I2S2 XBAR-TX:1:I2S2 XBAR-TX: On in 1 out 8
2900800.ahub/dapm/ADMAIF2 XBAR-RX:1:ADMAIF2 XBAR-RX: On in 1 out 9
2900800.ahub/dapm/bias_level:1:On
290f000.admaif/dapm/ADMAIF2 Playback:1:ADMAIF2 Playback: On in 1 out 9
290f000.admaif/dapm/bias_level:1:On
dapm/tegra-dlink-79-playback:1:tegra-dlink-79-playback: On in 1 out 1
dapm/rt5616-playback-playback:1:rt5616-playback-playback: On in 1 out 8
dapm/tegra-dlink-67-playback:1:tegra-dlink-67-playback: On in 1 out 1
dapm/tegra-dlink-65-playback:1:tegra-dlink-65-playback: On in 1 out 8
dapm/CVB-RT Headphone Jack:1:CVB-RT Headphone Jack: On in 8 out 1