How to set i2s's clock and frame signal to external input?Which registers need to be configured?

How to set i2s’s clock and frame signal to external input?Which registers need to be configured?

Hello!

This is configured via the device-tree. For example, on TX2, to set I2S1 to be bit-clock and frame-sync slaves, the following changes would be made …

diff --git a/kernel-dts/t18x-common-platforms/tegra186-quill-common.dtsi b/kernel-dts/t18x-common-platforms/tegra186-quill-common.dtsi
index 46de427f71f8..86ab33c8d4ac 100644
--- a/kernel-dts/t18x-common-platforms/tegra186-quill-common.dtsi
+++ b/kernel-dts/t18x-common-platforms/tegra186-quill-common.dtsi
@@ -843,8 +843,8 @@
                        cpu-dai-name = "I2S1";
                        codec-dai-name = "dit-hifi";
                        format = "i2s";
-                       bitclock-slave;
-                       frame-slave;
+                       bitclock-master;
+                       frame-master;
                        bitclock-noninversion;
                        frame-noninversion;
                        bit-format = "s16_le";

Regards,
Jon

Hello,
Which file configured bit-clock and frame-sync slaves,and which registers are configured?I can’t find bitclock-slave and frame-slave in the kernel code.
Set I2S1 to be bit-clock and frame-sync slaves can set i2s1’s clock and frame signal to external input?
There is a lot of confusion because I want to directly use i2s interface to do data interaction with fpga with my own driver instead of using sound card driver.
thanks for your quick answer.

Hello,

Assuming you are using L4T rel28.x, then the kernel file you want is “sound/soc/tegra-alt/tegra210_i2s_alt.c” and you should refer to the function ‘tegra210_i2s_set_fmt()’.

https://nv-tegra.nvidia.com/gitweb/?p=linux-4.4.git;a=blob;f=sound/soc/tegra-alt/tegra210_i2s_alt.c;h=3631655f1f460ac784f9139c0a0a74803f303201;hb=refs/heads/l4t/l4t-r28.2#l312

Regards,
Jon

Hello,
Am I setting the 10th bit of the I2S_CTRL_0 register to DISABLE so that both the i2s clock and frame become input at the same time?

Hello,

Correct. There is a single bit for both.

Regards,
Jon

thank you very much.