Want to use I2S3 s Audio on my custom carrier board

Ok. But I want these drivers to be built as part of my kernel image always. For that what should be set. I read we should set it as “y” to make them as part of kernel image during build always.

It said “m” means they will be built as loadable kernel modules (.ko) where we may need to load them explicitly using Insmod, etc. Please clarify about this. Thanks.

“y” makes the kernel image bulky, that’s the reason most of the non-core kernel drivers are built as “m”. Yes, it will be built as loadable modules, but if you enable probe, kernel will take care to insmod of all dependencies. This is the way our drivers are also done. So, you don’t need to explicitly insmod the codec driver.

How to enable the probe. Pls. Let me know. Thanks

Set status=“okay” in DT node should do it.

1 Like

Thanks for the info.

How to enter phandle of SGTLcodec under I2S4 node.

currently my I2S4 node is like this:

/* Default for all I2S is long fsync width(31) /
aconnect@2a41000 {
ahub {
/
I2S4 in Short frame sync for BT SCO */
i2s@2901300 {
bclk-ratio = <4>;
fsync-width = <0>;
};
};
};

phandle will be generated during compiling the dts to dtb.

Have you enabled this node?

1 Like

Pls find the updated dtsi file for review attached here.

tegra194-audio-p2822-0000_21_Nov.txt (12.0 KB)

Note:

  1. I have added SGTLcodec5000 node under the i2c node: i2c@c250000. Again not sure if the address of i2c c25000 is correct.
  2. Also I am getting parse error for the Voltage property field so I have commented them, as shown below. Not sure from which file it is taking and which file we need to include in our dtsi file.

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

  1. I am getting parse error for this line “//prefix = “H40-SGTL”;” in my &i2s4_to_codec{ } node… so i have commented this line also.

&i2s4_to_codec {

//Nagesh - Trident changes start
link-name = “fe-pi-audio-z-v2”;
codec {
sound-dai = <&sgtl5000>;
//prefix = “H40-SGTL”;
//sound-name-prefix = “H40-SGTL”;
};

   //bitclock-master;
   bitclock-inversion;

frame-master;
format = “dsp_a”;
//Nagesh - Trident changes end
};

Yes. I have enabled this node I2S4 - by adding:
status = “okay”

as shown below:

/* Default for all I2S is long fsync width(31) /
aconnect@2a41000 {
ahub {
/
I2S4 in Short frame sync for BT SCO */
i2s@2901300 {
bclk-ratio = <4>;
fsync-width = <0>;
//Trident - Nagesh enabling this I2S4 node.
status = “okay”;
};
};
};

It seems you should add sgtl5000: sgtl5000@0a { in i2c@0x031e0000 since you are using AGX Xavier Industrial.

Could you build the source and enable codec as expected after you follow the porting steps in instruction?

I will do this update and build the kernel/dtb and flash and check, if my SGTL5000 codec is enabled or not. Will let you know. Thanks.

The above configuration is based on that you are using the I2C from 40-pins header.

You have to check where is your I2C1_CLK_3V3 and I2C_DAT_3V3 coming from which pin of the AGX Xavier Industrial module.

ok.Will check this with my hardware team. I will also try to look in to the data sheet/schematics.

Based on our schematics K5 & L8 pins are used for I2C interface in Audio. can you suggest how to decode the address from this.

Pls find the device tree, kernel log and audio components log attached obtained from the target board.

We are still not able to see the sound card “NVIDIA Jetson AGX Xavier APE”" getting displayed.

How to check my SGTL5000 Codec is enabled or not?
Because we see the component log we can see, that my address@I2S4 entry is there. Is this the proof that my I2S4_Codec line is enabled?

dt.txt (478.7 KB)
sound_comp.txt (865 Bytes)
kernel_log_21_nov.txt (80.9 KB)

It seems you are using the following pins for I2C1.

It is gen1_i2c so that you should add sgtl5000: sgtl5000@0a { in i2c@3160000

Thanks very much for the information. Please let us know how did you map the address @3160000 to ‘gen1_i2c’, is there any documentation for it. Thanks.

Please just refer to hardware/nvidia/soc/t19x/kernel-dts/tegra194-soc/tegra194-soc-i2c.dtsi and you would find the following.

gen1_i2c: i2c@3160000 {

Thanks for the info.

I have one more doubt.

I found that all the nodes related to audio are “status = disabled” in the parent file “tegra194-soc-audio.dtsi” present inside the “/r35_4_1/Linux_for_Tegra/source/public/hardware/nvidia/soc/t19x/kernel-dts/tegra194-soc/tegra-soc-audio.dtsi” directory.

Is this causing any issue? and thats why were not able see the sound card “NVIDIA Jetson AGX Xavier APE” being displayed on the target sound card list .

Please clarify.As I am planning to edit this file to “status=okay” for all the various sound related nodes present in the file. Thanks.

The file is attached for your reference.
tegra194-soc-audio.dtsi.txt (26.7 KB)