Datasheet
VS1053b Datasheet
10 OPERATION
10.8 PCM / ADPCM Recording
This chapter explains how to record a RIFF/WAV file in PCM or IMA ADPCM format. IME
ADPCM is a widely supported ADPCM format and many PC audio playback programs can play
it. IMA ADPCM recording gives a compression ratio of almost 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 the
left or right channel. Left channel is either MIC or LINE1 depending on the SCI_MODE register.
If absolute best quality stereo PCM recording at 48 kHz is required, download and use the
VS1053 WAV PCM Recorder Application plugin, available for download at
http://www.vlsi.fi/en/support/software/vs10xxapplications.html . If you use it, follow the instruc-
tions of the plugin documentation instead of this datasheet.
10.8.1 Activating PCM / ADPCM Recording 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 0 = joint stereo (common AGC), 1 = dual channel (separate AGC),
2 = left channel, 3 = right channel
2 0 = IMA ADPCM mode, 1 = LINEAR PCM mode
15..3 reserved, set to 0
PCM / 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 acti-
vating 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 al-
tered 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, 4096U);
WriteVS10xxRegister(SCI_AICTRL3, 0);
Version: 1.22, 2014-12-19 53