English
Language : 

LM4935 Datasheet, PDF (36/112 Pages) National Semiconductor (TI) – Audio Sub-System with Dual-Mode Stereo Headphone and Mono High Efficiency Loudspeaker Amplifiers and Multi-Purpose ADC
12.0 Status & Control Registers (Continued)
12.15 AGC OVERVIEW
The Automatic Gain Control (AGC) system can be used to optimize the dynamic range of the ADC for voice data when the level
of the source is unknown. A target level for the output is set so that any transients on the input won’t clip during normal operation.
The AGC circuit then compares the output of the ADC to this level and increases or decreases the gain of the microphone
preamplifier to compensate. If the audio from the microphone is to be output digitally through the ADC then the full dynamic range
of the ADC can be used automatically. If the output is through the analog mixer then the ADC is used to monitor the microphone
level. In this case, the analog dynamic range is less important than the absolute level, so AGC_TIGHT should be set to tie
transients closely to the target level.
To ensure that the system doesn’t reduce the quality of the speech by constantly modulating the microphone preamplifier gain,
the ADC output is passed through an envelope detector. This frames the output of the ADC into time segments roughly equal to
the phonemes found in speech (AGC_FRAME_TIME). To calculate this, the circuit must also know the sample rate of the data
from the ADC (ADC_SAMPLERATE). If after a programmable number of these segments (AGC_HOLDTIME), the level is
consistently below target, the gain will be increased at a programmable rate (AGC_DECAY). If the signal ever exceeds the target
level (AGC_TARGET) then the gain of the microphone is reduced immediately at a programmable rate (AGC_ATTACK). This is
demonstrated below:
AGC Operation Example
20134112
The signal in the above example starts with a small analog input which, after the hold time has timed out, triggers a rise in the
gain ((1) → (2)). After some time the real analog input increases and it reaches the threshold for a gain reduction which decreases
the gain at a faster rate ((2) → (3)) to allow the elimination of typical popping noises.
Only ADC outputs that are considered signal (rather than noise) are used to adjust the microphone preamplifier gain. The signal
to noise ratio of the expected input signal is set by NOISE_GATE_THRESHOLD. In some situations it is preferable to remove
audio considered to be consisting solely of background noise from the audio output; for example conference calls. This can be
done by setting NOISE_GATE_ON. This does not affect the performance of the AGC algorithm.
The AGC algorithm should not be used where very large background noise is present. If the type of input data, application and
microphone is known then the AGC will typically not be required for good performance, it is intended for use with inputs with a
large dynamic range or unknown nominal level. When setting NOISE_GATE_THRESHOLD be aware that in some mobile phone
scenarios the ADC SNR will be dictated by the microphone performance rather than the ADC or the signal. Gain changes to the
microphone are performed on zero crossings. To eliminate DC offsets, wind noise, and pop sounds from the output of the ADC,
the ADC’s HPF should always be enabled.
www.national.com
36