Several important parameters of audio: BCLK, MCLK, LRCLK

Several important parameters of audio: B CLK, MCLK, LRCLK

Reference link: https://cloud.tencent.com/developer/article/154687 5

What is the sample rate of the audio?

If the audio is regarded as a curve, then the sampling rate is the number of samples taken from this curve in one second.

  • 8,000 Hz - the sampling rate used by telephones, enough for human speech
  • 11,025 Hz - Sampling rate used for AM broadcasting
  • 22,050 Hz and 24,000 Hz - Sampling rates used by FM radio
  • 32,000 Hz - sampling rate used by miniDV digital video camcorder, DAT (LP mode)
  • 44,100 Hz - sample rate used by audio CDs, also commonly used for MPEG-1 audio (VCD, SVCD, MP3)
  • 47,250 Hz - Sampling rate used by commercial PCM recorders
  • 48,000 Hz - sampling rate used for digital sound used by miniDV, digital TV, DVD, DAT, movies, and professional audio
  • 50,000 Hz - Sampling rate used by commercial digital recorders
  • 96,000 or 192,000 Hz - sample rate used by DVD-Audio, some LPCM DVD audio tracks, BD-ROM (Blu-ray Disc) audio tracks, and HD-DVD (High Definition DVD) audio tracks
  • 2.8224 MHz - The sampling rate used by Direct Stream Digital's 1-bit sigma-delta modulation process.

The higher the sampling rate, the more realistic and natural the sound reproduction will be. Humans can recognize frequencies from 20HZ to 20000HZ . If 20000 sound samples can be made per second, the playback will be sufficient to meet the needs of the human ear. Therefore, the sampling frequency of 22050 is commonly used, 44100 is already CD sound quality, and the sampling frequency of more than 48000 is meaningless to the human ear.

What is sampling bit width/sampling depth?

Looking at the picture, we know that the sampling bit depth is 32bit (bit). This 32bit corresponds to the data sampling bit width in the ADC chip, and the number of bits to convert an analog signal into a digital signal. For example, a 3.3V voltage, the sampling depth is 32bit, Then he can divide 3.3v into 2^32 powers. If the sampling depth is 8bit, then he can divide 3.3v into 2^8 powers. From this comparison, we can know that the larger the sampling depth, the more evenly divided The more copies, the more delicate the sound will sound.

As shown in the figure above, the abscissa is the sampling rate, and the ordinate is the sampling depth. If the sampling depth is greater, the sound will be more delicate. It can be understood that I can use more digital quantities to express a voltage.

How is BCLK calculated?

We read the explanation above and know something like the sampling rate, but BCLK is not exactly equal to the sampling rate, it is calculated. We know communication protocols such as I2C and SPI, and the communication protocol of I2S is the same. When the clock rises or falls, the data is valid. So the meaning of BCLK is that there are as many bits of data as there are BCLKs.

BCLK = sampling rate x sampling width x number of sampling channels

sample_rate=44.1Khz,

sample_length=16,channel=2时

Then BCLK should be

2×44.1Khz×16=32xsample_rate=1.4112Mhz

What are MCLKs?

There is a certain relationship between MCLK and BCLK, which generally depends on the chip.

If there is this 4 times relationship, then: MCLK = 4* BCLK=5.6448Mhz As for the choice of MCLK, it depends on the external crystal oscillator.

What is LRCLK?

The frame clock LRCK is used to switch the data of the left and right channels. When LRCK is "0", it means that the data of the left channel is being transmitted, and when it is "1", it means that the data of the right channel is being transmitted. LRCLK == FS, which is the sampling frequency. LRCLK is the size of the sampling frequency, which can be understood as changing the name, changing the soup without changing the medicine.

(Yellow is LRCLK, blue is BCLK)

(Yellow is LRCLK, blue is data DIN)

We read a lot of information about fs. The fs mentioned here is actually the sampling frequency, the meaning of the sampling frequency, such as 256 fs, 128 fs, etc. The larger the fs, the more realistic the audio will be restored. The storage space required to store audio is also larger.

Guess you like

Origin blog.csdn.net/a1809032425/article/details/128651994