Integrating TLV320AIC3104 driver to Jetson Orin NX

We are trying to integrate TLV320AIC3104 audio codec driver into Orin NX Linux build. As per the datasheet we have connected I2C2 bus to TLV320’s control interface and I2S1 for audio interface. but looking at the Pinmux spreadsheet, the customer usage column for I2C2 says I2C1 and for I2S1 it says I2S4, for the TRM the I2C bus numbers starts from 1 and for the datasheet it start from 0. and the spreadsheet numbers in customer usage column are altogether different!
There is so much confusion with the bus numbers and we are not able to configure them in the device tree.
We also looked at audio codec customization part, but it is not clear how to use external audio codec with aconnect and ahub peripherals on chip. It will be really helpful if you can give simple example for whatever additions are needed in the device tree source file for external audio codec interface.

Thank you.

Dear NVidia Support team ,

We are looking forward to your support on above technical issue.

Priority resolution is critical for our product release due immediately.

Thank you.

regards,
Vijay

These below links might help for how to add device tree changes for your codec:

https://docs.nvidia.com/jetson/archives/r35.3.1/DeveloperGuide/text/SD/Communications/AudioSetupAndDevelopment.html#device-tree-configuration-for-a-custom-audio-card

1 Like

Hi Pranal,

Could you progress further on this?

If not, lets start with populating the codec under appropriate I2C node. To identify the i2c bus connected to codec, make use of below steps

To list available i2c buses, use β€œi2cdetect -l”. This shall provide o/p as below (this is some random o/p, not specific to Orin NX)

ubuntu@jetson:~$ i2cdetect -l
i2c-0 i2c 810c630000.i2c I2C adapter
i2c-1 i2c 810c640000.i2c I2C adapter
i2c-2 i2c c600000.i2c I2C adapter
i2c-3 i2c c610000.i2c I2C adapter
i2c-4 i2c 810c650000.i2c I2C adapter
i2c-6 i2c 810c670000.i2c I2C adapter
i2c-7 i2c 810c680000.i2c I2C adapter
i2c-8 i2c 810c690000.i2c I2C adapter
i2c-9 i2c 810c6a0000.i2c I2C adapter
i2c-10 i2c 810c6b0000.i2c I2C adapter
i2c-11 i2c 810c6c0000.i2c I2C adapter
i2c-12 i2c 810c6d0000.i2c I2C adapter
i2c-14 i2c 810c410000.i2c I2C adapter
i2c-15 i2c 810c420000.i2c I2C adapter
i2c-16 i2c 810c430000.i2c I2C adapter

Then scan each i2c bus for availability of codecs, lets say your codec id is 0x1c, you may see entry like below on relevant i2c bus

Below is the comamnd for scanning i2c bus id 3

ubuntu@jetson:~$ i2cdetect -y -r 3
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – – – – – – – –
10: – – – – – – – – – – – – UU – – –
20: – – – – – – – – – – – – – – – –
30: – – – – – – – – – – – – – – – –
40: – – – – – – – – – – – – – – – –
50: – – – – – – – – – – – – – – – –
60: – – – – – – – – – – – – – – – –
70: – – – – – – – –

Which means c610000 is the relevant DT node entry for placing your codec
i2c-3 i2c c610000.i2c I2C adapter

Once you add relevant DT entry and enable codec compilation as mentioned in earlier comments, you shall start seeing your codec entry in β€œcat /sys/kernel/debug/asoc/components”

Please share update based on above guideline provided

Thanks

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.