www.ti.com
SLAS653 – FEBRUARY 2010
5.5.2
Automatic Gain Control (AGC)
The TLV320AIC3120 includes automatic gain control (AGC) for the microphone inputs. AGC can be used
to maintain nominally constant output-signal amplitude when recording speech signals. This circuitry
automatically adjusts the MIC PGA gain as the input signal becomes overly loud or very soft, such as
when a person speaking into a microphone moves closer to or farther from the microphone. The AGC
algorithm has several programmable settings, including target gain, attack and decay time constants,
noise threshold, and maximum PGA applicable, that allow the algorithm to be fine-tuned for any particular
application. The algorithm uses the absolute average of the signal (which is the average of the absolute
value of the signal) as a measure of the nominal amplitude of the output signal. Because the gain can be
changed at the sample interval time, the AGC algorithm operates at the ADC_fS clock rate.
Target level represents the nominal output level at which the AGC attempts to hold the ADC output signal
level. The TLV320AIC3120 allows programming of eight different target levels, which can be programmed
from –5.5 dB to –24 dB relative to a full-scale signal. Because the TLV320AIC3120 reacts to the signal
absolute average and not to peak levels, it is recommended that the target level be set with enough
margin to avoid clipping at the occurrence of loud sounds.
An AGC low-pass filter is used to help determine the average level of the input signal. This average level
is compared to the programmed detection levels in the AGC to provide the correct functionality. This
low-pass filter is in the form of a first-order IIR filter. Programming this filter is done by writing to page 4 /
register 2 through page 4 / register 7. Two 8-bit registers are used to form the 16-bit digital coefficient as
shown on the register map. In this way, a total of six registers are programmed to form the three IIR
coefficients.
Attack time determines how quickly the AGC circuitry reduces the PGA gain when the input signal is too
loud. Programming the attack time is done by writing to page 0 / register 89, bits D7–D0.
Decay time determines how quickly the PGA gain is increased when the input signal is too low.
Programming the decay time is done by writing to page 0 / register 90, bits D7–D0.
Noise threshold is a reference level. If the input speech average value falls below the noise threshold,
the AGC considers it as a silence and hence brings down the gain to 0 dB in steps of 0.5 dB every sample
period and sets the noise-threshold flag. The gain stays at 0 dB unless the input speech signal average
rises above the noise-threshold setting. This ensures that noise is not amplified in the absence of speech.
The noise-threshold level in the AGC algorithm is programmable from –30 dB to –90 dB for the
microphone input. When the AGC noise threshold is set to –70 dB, –80 db, or –90 dB, the microphone
input maximum PGA applicable setting must be greater than or equal to 11.5 dB, 21.5 dB, or 31.5 dB,
respectively. This operation includes debounce and hysteresis to prevent the AGC gain from cycling
between high gain and 0 dB when signals are near the noise threshold level. When the noise-threshold
flag is set, the status of the gain applied by the AGC and the saturation flag should be ignored by the
system software. Programming the noise debounce is done by writing to page 0 / register 91, bits D4–D0.
Programming the signal debounce is done by writing to page 0 / register 92, bits D3–D0.
Max PGA applicable allows the user to restrict maximum gain applied by AGC. This can be used for
limiting PGA gain in situations where environmental noise is greater than the programmed noise threshold.
Microphone input maximum PGA can be programmed from 0 dB to 59.5 dB in steps of 0.5 dB.
Programming the maximum PGA gain allowed by the AGC is done by writing to page 0 / register 88,
bits D6–D0.
See
Table 5-10 for various AGC programming options. AGC can be used only if the microphone input is
routed to the ADC channel.
Copyright 2010, Texas Instruments Incorporated
APPLICATION INFORMATION
25