《深入浅出:I2S音频接口解析》

1. 相关概念

通常IIS接口由MCLK、SCLK、LRCK、SDI、SDO组成。

LRCK

用于切换左右声道的数据。一般来说,LRCK为0表示正在传输的是左声道的数据,为1则表示正在传输的是右声道的数据。

FS

采样频率,等于LRCK。一般音频使用16K。还有多种采样频率,看需求。

MCLK

主时钟,也叫系统时钟(Sys Clock),又名过采样率,一般是采样频率的128、或256、或384或512倍。

SCLK

串行时钟SCLK,也叫位时钟BCLK,即对应数字音频的每一位数据,SCLK有1个脉冲。SCLK的频率=2×采样频率×量化位数(BCLK = 2 * 采样频率 * 量化位数)。

量化位数

常见的位数有16bit、24bit、32bit、20bit。

2. MCLK计算

Following are some example for clock divider, DLL and clock doubler setting. 
 Example 1, CPU/SOC provides 12.288MHz MCLK and 48KHz LRCK to ES7210, So the external MCLK/LRCK ratio is 256. In this clock condition, 
the clock divider ratio should be 1, and DLL should be bypassed. But clock doubler should be enabled to get internal clock which 
is 24.576MHz. Now the internal ADC clock is 24.576MHz, and it equals to 512 × LRCK. 
 
 Example 2, CPU/SOC provides 18.432MHz MCLK and 48KHz LRCK to ES7210, So the MCLK/LRCK ratio is 384. In this clock condition, the 
clock divider ratio should be 3 to get 6.144MHz clock. DLL should be enabled to get 24.576MHz (4 × 6.144MHz) clock. The clock doubler 
should be disabled. Now the internal ADC clock is 24.576MHz, and it equals to 512 × LRCK. 
 

物联沃分享整理
物联沃-IOTWORD物联网 » 《深入浅出:I2S音频接口解析》

发表评论