Want to use I2S3 s Audio on my custom carrier board

how to provide kernel uart log

Use the below command

dmesg > uart.log

Also on side note, I don’t see the i2c node for your codec on your attached dts file. Am I missing something?

i2c@ {
sgtl5000: sgtl5000@0a {
compatible = “fsl,sgtl5000”;
reg = <0x0a>;
clocks = <&sgtl5000_mclk>;
micbias-resistor-k-ohms = <2>;
micbias-voltage-m-volts = <3000>;
VDDA-supply = <&vdd_3v3>;
VDDIO-supply = <&vdd_3v3>;
status = “okay”;

pls find the log of this command:

" cat /sys/kernel/debug/asoc/components"

20_nov_snd_components.txt (866 Bytes)

As suspected, codec is not registered. You need to have i2c entry for codec probe enable. Please do the same.

Here my requirement is to enable I2S4 line output to my external SGTL5000 codec on the carrier board. i2c does not come in to picture here, as per my understanding.

The same example given in the website has taken i2c for explanation purpose.

to check if the codec driver is enabled or not we need to use this command as per the website documentation:

“$ zcat /proc/config.gz | grep <codec_config>”

i2c is taken as example for explanation. In my case it is I2S4@addr { ,

Please refer to my audio.dtsi file I have attached for more details.

Is that SGTL5000 is a external evaluation board. Does it takes only I2S as input. How about I2C for codec?.

I don’t get the audio.dtsi. Please re-attach the file to take a look

This is the file, I have re attached.

Here I have modified the file to add SGTLCodec on my customized carrier board which is connected to I2S4. Please have a look. I have made modifications are many places as required , based on the website documentation.

I still have some doubts like:

  1. I already had one existing widgets, routing elements declared. I have added my own for my SGTL5000 codec along with it. But i Have not commented the other one. Should I comment the other existing routing widgets?

  2. Also I am getting parse error when I use these lines in the i2s@2901300 structure. Any idea where can I get my voltage property values that need to be filled. From which .h or .dtsi file??
    Because all these need to be correct for codec STGL5000 to be detected and for working.

//VDDA-supply = <&vdd_3v3>;
//VDDIO-supply = <&vdd_3v3>;

tegra194-audio-p2822-0000.txt (11.8 KB)

It is present on my customized carrier board.

It takes connection from I2S4/I2S3( both I2S3 and I2S4 are same for my SOM - Jetson AGX Xavier Industrial version ) to SGTL5000 codec present on customized carrier board.

no idea. In my requirement this is the scenario. Mostly in the website, they have taken a example where I2C is connected to your codec. My opinion it is.

Hi Nagesh,
The DT file you attached is not right way to do the codec change. Codec entry can’t be added under I2S node. Again, Can you refer rt5658 node in the same file. That is how we need to write codec entry. Please go through the bsp doc link I have attached on how to make codec node changes.

Better to clean unncessary widgets and route which are not required though you overwritten. But these comes to action only after codec registered and sound registration. The issue is your codec is not even detected.

Also, I need clear picture on how you connected SGTL5000 to Tegra board. Is both I2S and I2C required for that carrier board. Can you point me to the link of the SGTL5000 carrier board used.

I have attached the complete data sheet document of SGTL5000 also for FYI.

Also just now got clarity from our Hardware team that I2C1 is used for connecting to Data and Clock as shown in the below schematics.
SGTL5000.pdf (2.0 MB)

No. only I2S3 line is directly connected to SGTL5000 Codec. As far the information my hardware team is giving and also as per the schematic diagram above.

Yes. This is the concern. My Audio sound registration for my sound card “NVIDIA Jetson AGX Xavier APE” should appear in the Alsamixer or in my output of the command in the below example as per the website. But it is not appearing still.

$ cat /proc/asound/cards

0 [HDA ]: tegra-hda - NVIDIA Jetson AGX Xavier HDA
NVIDIA Jetson AGX Xavier HDA at 0x3518000 irq 54

1 [APE ]: tegra-ape - NVIDIA Jetson AGX Xavier APE
NVIDIA Jetson AGX Xavier APE


Please see the below documentation from the website link:
it clearly says our codec node ( SGTL5000) has to be present inside the device tree node ( I2S4/I2S3) that is used to access the codec. Based on this I have updated my audio dtsi file.

Populate Codec Node

To enable the codec, you must add the codec under the device tree node of the device that is used to access the codec. Most codecs use either I2C or SPI for access. In the example below, the codec uses I2C for its control interface, and so is added to the appropriate I2C node:

i2c@ {
sgtl5000: sgtl5000@0a {
compatible = “fsl,sgtl5000”;
reg = <0x0a>;
clocks = <&sgtl5000_mclk>;
micbias-resistor-k-ohms = <2>;
micbias-voltage-m-volts = <3000>;
VDDA-supply = <&vdd_3v3>;
VDDIO-supply = <&vdd_3v3>;
status = “okay”;

This refers to version r35.3.1 where as we are working on r35.4.1


Both should be similar more of less, I suppose.

uart.log.txt (130.3 KB)

On a side-note, I have enabled SGTL5000 driver loading in defconfig file by making the entry as “m”

I like to correct your understanding. Based on the doc only the phandle of codec should be present on the I2S node. For enabling the code probe you need to follow dts entry similar to Audio Setup and Development — Jetson Linux Developer Guide documentation (nvidia.com)

Enabling the defconfig doesn’t gaurantee the codec registration. DTS node for codec should be proper in dts. Can you update your audio dts properly and attach for review

After thorough. discussion with my hardware came to know that there is evenI2C1 clock and data lines are connected to the SGTL5000 Codec as Control data and Control Clock data, we can see this in the schematics diagram.

So you were actually right, codec node entry should be present inside i2c@… {… } node.

I will share the updated sound dtsi file tmrw. Thanks a lot for the clarification.

Oh ok. But enabling this codec entry in defconfig was also part of documentation to make sound work on I2S to codec setup so added this entry.
But if I assign =y it’s giving compile error in some other. C file.
It compiles fine only, if I assign =m only in the defconfig. Any idea why this happens. Thanks.

All audio drivers are built as module i.e =m due to upstream requirement. So, I recommend to use =m for codec config too.