English
Language : 

VS1053B Datasheet, PDF (53/79 Pages) List of Unclassifed Manufacturers – Ogg Vorbis/MP3/AAC/WMA/MIDI AUDIO CODEC
VLSI
Solution y
VS1053b preliminary
VS1053B
9. OPERATION
9.8 ADPCM Recording
This chapter explains how to create RIFF/WAV file with IMA ADPCM format. This is a widely sup-
ported ADPCM format and many PC audio playback programs can play it. IMA ADPCM recording
gives roughly a compression ratio of 4:1 compared to linear, 16-bit audio. This makes it possible to
record for example ono 8 kHz audio at 32.44 kbit/s.
VS1053 has a stereo ADC, thus also two-channel (separate AGC, if AGC enabled) and stereo (common
AGC, if AGC enabled) modes are available. Mono recording mode selects either left or right channel.
Left channel is either MIC or LINE1 depending on the SCI MODE register.
9.8.1 Activating ADPCM mode
Register
Bits
Description
SCI MODE 2, 12, 14 Start ADPCM mode, select MIC/LINE1
SCI AICTRL0 15..0
Sample rate 8000..48000 Hz (read at recording startup)
SCI AICTRL1 15..0
Recording gain (1024 = 1×) or 0 for automatic gain control
SCI AICTRL2 15..0
Maximum autogain amplification (1024 = 1×, 65535 = 64×)
SCI AICTRL3 1..0
2
0 = joint stereo (common AGC), 1 = dual channel (separate AGC),
2 = left channel, 3 = right channel
0 = IMA ADPCM mode, 1 = LINEAR PCM mode
15..3
reserved, set to 0
IMA ADPCM recording mode is activated by setting bits SM RESET and SM ADPCM in SCI MODE.
Line input 1 is used instead of differential mic input if SM LINE1 is set. Before activating ADPCM
recording, user must write the right values to SCI AICTRL0 and SCI AICTRL3. These values are only
read at recording startup. SCI AICTRL1 and SCI AICTRL2 can be altered anytime, but it is preferable
to write good init values before activation.
SCI AICTRL1 controls linear recording gain. 1024 is equal to digital gain 1, 512 is equal to digital gain
0.5 and so on. If the user wants to use automatic gain control (AGC), SCI AICTRL1 should be set to
0. Typical speech applications usually are better off using AGC, as this takes care of relatively uniform
speech loudness in recordings.
SCI AICTRL2 controls the maximum AGC gain. This can be used to limit the amplification of noise
when there is no signal. If SCI AICTRL2 is zero, the maximum gain is initialized to 65535 (64×), i.e.
whole range is used.
For example:
WriteVS10xxRegister(SCI_AICTRL0, 16000U);
WriteVS10xxRegister(SCI_AICTRL1, 0);
WriteVS10xxRegister(SCI_AICTRL2, 16384U);
WriteVS10xxRegister(SCI_AICTRL3, 0);
WriteVS10xxRegister(SCI_MODE, ReadVS10xxRegister(SCI_MODE) |
SM_RESET | SM_ADPCM | SM_LINE1);
selects 16 kHz, stereo mode with automatic gain control and maximum amplification of 16×.
Version 0.5, 2007-12-03
53