TLV320AIC32x4 evaluation board with TX2

Hello igal,
Thank you for your reply.
The environment is Ubuntu 18.04. Jetpack 4.4 with 32.4.4

hi,

the files that I’ve uploaded are for 28.3, for the new Jetson releases (32.4, etc.), these files do not comply. Please address NVidia for support.

Hello jonathanh,

I’m currently using Jetpack 4.4 with 32.4.4 is there any changes from 28 to 32. cause not able to some files could you please let me know where we need to add the TLV320AIC32X4 changes.

Any help will be greatly appreciated.

Thanks,
Parashuram

Hello!

For L4T r32.x, the file you need to modify is called tegra_machine_driver_mobile.c. This file was renamed because it is a generic machine driver for Tegra and not specific to the RT565x codec.

By the way, I should also point out that r32 is based upon a Linux v4.9 kernel versus the Linux v4.4 in r28. So simply replacing this file may not be enough.

Regards
Jon

Hello Jonathanh,

I have made changes for TLV320AIC32x4 in tegra_machine_driver_mobile.c (please find the attached) and DT changes tegra186-quill-common.dtsi (Please find the attached).
we have enabled the driver CONFIG_SND_SOC_TLV320AIC32X4=y
But still tx2i is not detecting the TLV320AIC32x4.
[ 1.559623] ALSA device list:
[ 1.559626] #0: tegra-hda at 0x3518000 irq 385
[ 1.559628] #1: tegra-snd-t186ref-mobile-rt565x
please find the attached dmesg.log file. Is there anything need to add for detecting audio codec.

Regards
Parashuram
dmesg.log (97.3 KB) tegra_machine_driver_mobile.c (23.5 KB) tegra186-quill-common.dtsi.txt (34.1 KB) ,

Hello!

Let’s move the discussion to the thread that you opened.

Regards,
Jon

Hi @jonathanh and @igal.kroyter !
I’ve faced several problems and ask you to help please.

  1. It’s not possible to record and play with different sample rate. For example while recording at 44100 if start playing on 24000 the record will be damaged.
    Looking at the forum I found that it’s not possible to record and play on different sample rates because of the same clock parent. It it correct?

  2. Recording at any sample rate except 44100 works correctly only after play something on desired for recording sample rate. Especially for 96000.
    Also for 96000 playing kernel says that:
    aic32x4: master clock and sample rate is not supported
    But still able to play the 96000 wav file and it’s played correctly.
    I’ve looked at tlv320aic32x4.c and found that aic32x4_divs has no deviders for 9600. After searching Internet I found

/* 96k rate */
	{25000000, 96000, 2, 7, 8643, 64, 4, 4, 64, 4, 4, 1}

values and change
#define AIC32X4_RATES SNDRV_PCM_RATE_8000_48000
to
#define AIC32X4_RATES SNDRV_PCM_RATE_8000_96000
Should it help in something?
Why it throws error but still able to play 96000 files?
How to force changing of clocks to be able to record at different rates without needs to play same sample rate before?

rev28.2

Hi @jonathanh and @igal.kroyter ! One more time.
Is this so difficult question?

Is there any patches from future revisions that could be applied to @igal.kroyter 's code for rev28.2?

Hello!

This is correct. Each I2S interface has a single bit-clock and frame clock that is common to the data in and data out. This is consistent with the I2S specification and so there is no way you can support multiple sample rates on the same I2S interface for simultaneous playback/capture. You would need to use different I2S interfaces.

Regards,
Jon

Hello!

This would be a good question for the codec vendor. You may want to look at the codec registers after attempting capture and then after playback to see if something is being configured during playback that needs to be configured for capture. Under the debugfs regmap entry, /sys/kernel/debug/regmap/, you should see an entry for the codec and you should be able to dump the registers from there. Obviously you will need the review the driver/documentation for the codec to under what the various register settings are.

Regards,
Jon

Thank you @jonathanh for the answers.
Thanks for the tip about /sys/kernel/debug/regmap, it’s easier than use i2cset\i2cget.

One little question:
For current revision of JetPack was original @igal.kroyter 's code used? Or there is some patches apart from changes that needed for new kernel’s version?

Hello!

I believe that this was based upon an older version and so the changes do not apply to the current. However, I know that other’s have been able to get this working on more recent releases. Please see this thread.

Jon

Thanks @jonathanh!
BTW i mean that /sys/kernel/debug/regmap is easier to use than i2cset\get. I’ve edited the message =)