Datasheet
HH
VS1053B OGG VORBIS ENCODER VSMPG
2.4 Recording Levels and Automatic Gain Control (AGC)
The VS1053b Ogg Vorbis Encoder offers signal level monitoring through SCI_AICTRL0.
It is recommended that devices that offer recording would show a signal level in a decibel
scale. For the decibel scale, see Chapter 2.4.4. This can be done by showing and
clearing SCI_AICTRL0 contents at regular intervals.
A good VU meter should be implemented in such a way that it visually advices the user
to avoid using the last 6 dB of the available dynamic range.
2.4.1 Reading the Recording Level
The recording level meter has two settings: mono and stereo. You can use mono mode
with both mono and stereo streams, but you should use the stereo mode only with
stereo profiles. The new meter is compatible with versions pre 1.60 if SCI_MODE bit
SM_LAYER12 is cleared first.
Recording Level Meter: Mono Mode
Activate mono mode by clearing SCI_MODE (0) register bit SM_LAYER12 (1) to 0.
To read the level, repeat the following loop:
• Write 0x8000 to SCI_AICTRL0.
• Wait for at least 1/50 s. Note: Constant reading of side information causes load on
the VS1053 and may cause unexpected crackles in sound.
• Check whether SCI_AICTRL0 & 0x8000 is 0. If not, wait a little more and read
again.
• Use the value as explained in this Chapter. Repeat the loop.
Recording Level Meter: Stereo Mode
Activate stereo mode by setting SCI_MODE (0) register bit SM_LAYER12 (1) to 1.
To read the left and right channel levels, repeat the following loop:
• Write 0x8080 to SCI_AICTRL0.
• Wait for at least 1/50 s. Note: Constant reading of side information causes load on
the VS1053 and may cause unexpected crackles in sound.
• Check whether SCI_AICTRL0 & 0x8080 is 0. If not, wait a little more and read
again.
• Left channel value is SCI_AICTRL0 & 0x7F00.
• Right channel value is (SCI_AICTRL0 & 0x7F) × 256.
• Use the values as explained in this Chapter. Repeat the loop.
Rev. 1.70c 2012-11-16
Page 12(39)