Audio Codec for sgtl5000 is not working for L4T 32.6.1 and L4T32.7.2

We have made modifications in attached diff file for sgtl5000 audio codec and it is working for L4T 32.4.3 but same changes are not working for L4T32.6.1 or higher. I have attached my source files which I have changed for audio and also the diff file. attached the dmesg log. Do I need to make any other changes? Am I missing something here? Pleasu suggest

This is our earlier discussion for L4T32.4.3:

tegra194-fixed-regulator-p2888-0001.dtsi (1.1 KB)
tegra_defconfig (27.9 KB)
tegra194-audio-p2822-0000.dtsi (3.8 KB)
tegra_machine_driver_mobile.c (22.6 KB)

May I know what exact failure encountered with L4T32.6.1 or higher?. Can you attach the kernel log which will help us to provide quick fix.

I don’t see kernel log attached as per your earlier comment

Audio line out is not coming in L4T32.6.1 and higher BSPs. I have tested the same setup with L4T32.4.3 BSP and I get line out properly.

attached kernel log file for Xavier AGX 32Gb module from the setup for your reference.

kern.log (621.5 KB)
Xorg.0.log (14.9 KB)

another observation I found is audio line works fine on a fresh flash. If I reboot or shutdown the system manually, then after line-out do not work. I tried this 2-3 times

Ok, This specifies driver registration and other DT settings are configured properly.

We need to check few things after reboot.

  • During playback probe whether I2S signal reaching codec I2S pin.
  • Compare Codec registers values in working and non-working case.
  • Compare the clock tree for both working and non-working case.
1 Like

can you let me know what are the files to check for these? I will probe the I2S signals

For codec registers dump check path with "# cat /sys/kernel/debug/regmap/<\sgtl codec node>/registers "

For clock tree dump "# cat /sys/kernel/debug/clk/clk_summary "


I do not see any sgtl node here:

but I see it in dmsg or logs.

regmap.txt (898 Bytes)

SGTL codec is under 7-000a folder.

cat /sys/kernel/debug/regmap/7-000a/registers

Here I see the difference.
Compare_L4T32.4.3_L4T32.6.1.html (322.3 KB)

Sorry, If I missed earlier. We might need to take clock tree dump during the playback. I see I2S is not enabled.

Even the codec dump should be during playback.

Please provide the updated log with above point.


You mean I need to enable I2S in public/hardware/nvidia/soc/t19x/kernel-dts/tegra194-soc/tegra194-soc-audio.dtsi ?

i2s@2901000 (I2S1_CLK) is the one which we have connected to the codec
in dts file I can see it enabled.

I will take the correct log during playback and share it soon

I meant, I2S1 clock is not enabled from your log attached earlier which is due to dump was taken when playback was not running.

Yes, provide the dump logs during the Playback.

Also confirm whether you were able to probe the I2S signals from Tegra during Playback. This will help us to concentrate on either Tegra or Codec side issues.

we are getting the data I2S DOUT and clock till codec

This confirms Tegra I2S was working and sending data.

Can we check register configuration on codec side.

I got this value, how to map them to the registers? this is working module scenario
codec_reg_copmare.html (9.1 KB)

Got the issue, The Codec output is muted with non-working case.
024: 0022 <> 024: 0132

From codec datasheet, bit 4 and 8 are set which will mute the output.

Can you check if any mixer control exposed by codec to unmute before you playback.

OK I will check that, but I have used the same codec code in both working and non working BSPs. only non working BSP is L4T32.6.1 and L4T 32.4.3 BSP is working. You can check my code and files in my very first message. I will check the codec section now. let me know if you find anything.

And one more doubt, if it is muted sound should not come for the first time on fresh flash, I could hear the sound for at least 2-3 boots and then suddenly no sound then after.

Can you try enable mixer control “Lineout Playback Switch” using amixer tool. This should unmute the Line out path.


It is not allowing me to run amixer commands as it throughs below error:
nvidia@nvidia-desktop:~$ amixer
amixer: Mixer attach default error: No such device

Any help? can you check my codec changes are correct? anything missing there? attaching my dts file for referance.

tegra194-p2888-0006-p2822-0000.dts (355.7 KB)