AnsweredAssumed Answered

I2S1 Slave configuration on iMX7D

Question asked by Vishal Thanki on Nov 21, 2016
Latest reply on Dec 8, 2016 by Vishal Thanki

Hi,

 

I have a custom board based on iMX7D. I want to configure the I2S1 (SAI1) in following fashion:

  • iMX7 SoC is clock master for I2S1 TX  (for BCLK and WCLK)
  • Codec/DSP is clock master for I2S1 RX (for BCLK and WCLK)
Note: The custom module has the clock lines (BCLK and WCLK for TX and RX respectively) connected between SAI1 and SAI3.
I have explicitly made the TX and RX asynchronous in DTS. And for the sake of testing above configuration, I added two DTS property which I am parsing in I2S driver (sound/soc/fsl/fsl_sai.c), and configuring the clocks accordingly. I can see that during playback from SoM, I2S1 TX has correct clocks (BCLK and WCLK), and there are no clocks/activity on I2S RX (BCLK and WCLK). I enabled the I2S config register to report the interrupts for TX and RX. I can see the interrupts for TX when playback is running. When I start the recording (using "arecord"), I can see the DSP/Codec is providing clocks (BCLK and WCLK are probed on scope), but I do not see any I2S RX interrupt, and the "arecord" simply comes out by reporting I/O error. I have configured the IOMUXC settings for the SAI in following manner.
Following is the pinmux configuration for SAI1 group in DTS:
pinctrl_sai1: sai1grp {
fsl,pins = <
MX7D_PAD_ENET1_RX_CLK__SAI1_TX_BCLK 0x14
MX7D_PAD_SAI1_TX_SYNC__SAI1_TX_SYNC 0x14
MX7D_PAD_ENET1_COL__SAI1_TX_DATA0 0x14
MX7D_PAD_SAI1_RX_DATA__SAI1_RX_DATA0 0x14

MX7D_PAD_ENET1_RGMII_TX_CTL__SAI1_RX_SYNC 0x14
MX7D_PAD_SAI1_RX_SYNC__SAI1_RX_SYNC 0x14
MX7D_PAD_SD1_CLK__SAI3_RX_SYNC 0x14
MX7D_PAD_ENET1_RGMII_TXC__SAI1_RX_BCLK 0x14
MX7D_PAD_SD1_CMD__SAI3_RX_BCLK 0x14
>;
};

 

Edit1:

Following are the register details just after I start recording (using "arecord")

# cat /sys/kernel/debug/regmap/308a0000.sai/registers 
00: 00000000
04: 0000000c
08: 07000005
0c: 00000000
10: 00011f1b
14: 1f1f0f00
40: 00000000
60: fffffffc
80: 90000c01
84: 00000005
88: 02000000
8c: 00010000
90: 00011f1a
94: 1f1f0f00
a0: 00000000
c0: 00000000
e0: fffffffc

Any suggestions for debugging this issue further would be helpful.

 

Thanks,

Vishal

Outcomes