Audio Digital Transmission Bus (IIS)¶
1. Introduction to IIS¶
CI130X has 3-way IIS, which can be used for general or special purposes. IIS0 is a general IIS with TX and RX functions, and can be connected to other CODEC chips; IIS1 has TX function, which is specially used for the internal CODEC DAC of CI130X, and the pins are not externally connected; IIS1 has RX function, which is specially used for the internal CODEC ADC of CI130X, and the pins are not externally connected; IIS2 is specially used by PDM, reused by other GPIO pins, and has only RX function. All IIS share one set of IISDMA0, and the corresponding IISDMAChax channels are different.
At the same time, CI130X has designed a dedicated IISDMA for IIS, which is dedicated to data transmission between memory and IIS. IISDMA can not only generate transmission completion interrupt, but also generate address rollback interrupt, and can also be directly linked with the VAD module.
2. IIS timing¶
2.1 Basic introduction¶
-Generally, the IIS interface consists of MCLK, SCK, LRCK, SDI and SDO -Bit clock BCLK (also known as SCK, which corresponds to each bit of data and has a pulse. SCK is a clock used for alternate transmission of left and right audio channel data at the same time) -BCLK=2 * Sampling frequency * Quantization digit -The quantization bit is relative to the mono. The common bits are 16bit, 24bit, 32bit and 20bit -Sampling frequency (i.e. LRCK, used to switch the data of left and right channels. Generally, 1 represents left channel and 0 represents right channel) -MCLK (master clock, also known as oversampling rate, generally 128, 256, 384 or 512 times the sampling frequency)
2.2 Clock calculation¶
-Assume that the sampling frequency is 16K (LRCK), the MCLK is 256 times, and the quantization bit is 16bit
- MCLK = 16K * 256 = 4096 K = 4M
- BCLK = 2 * 16K * 16 = 16 K * 32 = 512K -Check the correctness of pin clock by oscilloscope
2.3 Sequence diagram¶
- (1) , IIS format
- (2) , Left Justified Format
- (3) , Right aligned format
3、API¶
Function name | Description |
---|---|
iis_ rx_ Config | IIS receive mode initialization |
iis_ rx_ Mute | IIS receive mode, mute |
iis_ tx_ Config | IIS send mode initialization |
iis_ tx_ r_ Mute | IIS sending mode, right channel mute |
iis_ tx_ l_ Mute | IIS sending mode, left channel mute |
iis_ rx_ Enable | IIS receive enable |
iis_ tx_ Enable | IIS send enable |
Example of use¶
For the use example of IIS&IISDMA, please refer to ☞Recording and Playback Equipment Documentation.