Connecting TX2 with external codec through I2S in TDM mode

Can Nvidia dev team please confirm if any of the ASoc machine drivers under t18x/sound/soc/tegra-alt has been tested working with any codec through I2S TDM? In the L2T 28.1 release, there are a few machine drivers:

tegra_t186ref_p4573_alt.c
tegra_t186ref_p2382_alt.c
tegra_t186ref_mobile_rt565x.c
tegra_t186ref_m3420_alt.c
tegra_t186ref_bali_alt.c
tegra_t186ref_alt.c

It seems only tegra_t186ref_alt.c, tegra_t186ref_p2382_alt.c, and tegra_t186ref_bali_alt.c have TDM channel mapping configuration. The generic driver that the L4T documentation (Tegra ASoC Driver section) describes somewhat resembles tegra_t186ref_alt.c, but the documentation is outdated as usual (please, please do update all documentations with each release!), so I’m not sure whatever it says about TX1 would still work for TX2.

I did try to configure my DT to use tegra_t186ref_alt.c, but I found it was not even compiled into the kernel due to a mismatching between the KConfig and Makefile. I checked this issue exists in both R27.1 and R28.1:

SND_SOC_TEGRA_T186REF_ALT in t18x/sound/soc/tegra-alt/KConfig.t18x:
config SND_SOC_TEGRA_T186REF_ALT
        tristate "SoC Audio support for T186Ref"

SND_SOC_TEGRA_T186REF_FPGA_ALT in t18x/sound/soc/tegra-alt/Makefile.t18x:
snd-soc-tegra-alt-t186ref-objs := tegra_t186ref_alt.o
...
obj-$(CONFIG_SND_SOC_TEGRA_T186REF_FPGA_ALT) += snd-soc-tegra-alt-t186ref.o

I’ll be really appreciated if someone could confirm if there’s a known working driver I can experiment with before I invest more time into this. Thank you.

Hi
The CONFIG_SND_SOC_TEGRA_ALT is enable as default in tegra18_defconfig it must not have compile issue, Did you follow the document to compile your kernel?

Surely I did. CONFIG_SND_SOC_TEGRA_ALT enables some ASoC modules, but ASoC machine drivers are enabled through a bunch of other configs: CONFIG_SND_SOC_TEGRA_T186REF_ALT, CONFIG_SND_SOC_TEGRA_T186REF_MOBILE_ALT… If you read through the code section in my last post (SND_SOC_TEGRA_T186REF_ALT at line 1 vs SND_SOC_TEGRA_T186REF_FPGA_ALT line 5), it’ll probably make sense

Hello, I have just stumbled across this thread, but wanted to confirm that I have tested TDM modes on TX1 and TX2 using the tegra_t186ref_mobile_rt565x.c driver. Please note that I have found some issues with things like frame-sync polarity in L4T 28.1 for TDM modes such as dsp-a and dsp-b. These issues have been fixed for L4T rel 28.2 (there is a developer preview available now for TX2).

If you have any questions let me know.