In Tx2 board, in J21 connector, I2S1 pins are connected to other board I2S pins.
Here, other board, I2S controller is master and Tx2 board’s I2S controller is slave.
In device tree, how to configure the Tx2’s I2S controller is slave?
The bitclock-slave and frame-slave indicate that the codec is the bitclock and frame-clock slave. If you want the codec to be the bitclock and frame-clock master, then you need to change these to ‘bitclock-master’ and ‘frame-master’. However, when do this you also need to consider how the codec mclk is being provided to the codec. Do you know what is providing the codec mclk in the case where the codec is the bitclock and frame master?
With regard to the other properties these are …
bitclock-noninversion: bitclock is NOT inverted
frame-noninversion: frame clock is NOT inverted
bclk_ratio = <0> This sets a 1:1 ratio between the bitclock and the I2S data input/outputs. For example, if you have 16-bit samples, 2 channels at 48kHz, then the I2S data rate will be 1.538Mbps. With a 1:1 ratio, the I2S bitclock will work at 1.538MHz, if you set the ratio to 2, then it would be 3.072MHz.
Hello All,
In slave mode, it is working fine. It is configured as Receiver.
But I have some doubts:
In register, I2S_CTRL_0, FSYNC_WIDTH (in terms of no. of bit clocks) field
In register, I2S_TIMING_0, CHANNEL_BIT_CNT (I2S, LJM, RJM mode: Number of bit clocks in left or right channel.) field
These bits will be programmed only in Master mode. Since these clocks are generated by the master.
In slave mode, it does not affect anything.
Please confirm.
However, that said I did a bit of testing with a codec that is the I2S master, and it appears that although it is not necessary to program the FSYNC_WIDTH, it is necessary to program the I2S_TIMING register otherwise only noise is heard.
I am not sure that I understand the question. The sample-rate is typically set by the application when playback/capture is initiated. The I2S registers will not indicate the sample-rate, but if Tegra is the I2S master you can always look at the clock frequency for the I2S to see what the bit clock is operating at …