1
15
1
0
z
D
2
z
N
)
z
(
H
-
+
=
www.ti.com
SBAS387A – MAY 2009 – REVISED JUNE 2010
Debounce time (noise and signal) determines the hysteresis in time domain for noise detection. The
AGC continuously calculates the energy of the recorded signal. If the calculated energy is less than the
set Noise Threshold, then the AGC does not increase the input gain to achieve the Target Level.
However, to handle audible artifacts which can occur when the energy of the input signal is very close
to the Noise Threshold, the AGC checks if the energy of the recorded signal is less than the Noise
Threshold for a time greater than the Noise Debounce Time. Similarly the AGC starts increasing the
input-signal gain to reach the Target Level when the calculated energy of the input signal is greater
than the Noise Threshold. Again, to avoid audible artifacts when the input-signal energy is very close
to Noise Threshold, the energy of the input signal needs to continuously exceed the Noise Threshold
value for the Signal Debounce Time. If the debounce times are kept very small, then audible artifacts
can result by rapidly enabling and disabling the AGC function. At the same time, if the Debounce time
is kept too large, then the AGC may take time to respond to changes in levels of input signals with
respect to Noise Threshold. Both noise and signal debounce time can be disabled.
The AGC noise threshold flag is a read-only flag indicating that the input signal has levels lower than
the Noise Threshold, and thus is detected as noise (or silence). In such a condition the AGC applies a
gain of 0 dB.
Gain applied by AGC is a read-only register setting which gives a real-time feedback to the system on
the gain applied by the AGC to the recorded signal. This, along with the Target Setting, can be used to
determine the input signal level. In a steady state situation
Target Level (dB) = Gain Applied by AGC (dB) + Input Signal Level (dB)
When the AGC noise threshold flag is set, then the status of gain applied by AGC should be ignored.
The AGC saturation flag is a read-only flag indicating that the ADC output signal has not reached its
Target Level. However, the AGC is unable to increase the gain further because the required gain is
higher than the Maximum Allowed PGA gain. Such a situation can happen when the input signal has
very low energy and the Noise Threshold is also set very low. When the AGC noise threshold flag is
set, the status of AGC saturation flag should be ignored.
The ADC saturation flag is a read-only flag indicating an overflow condition in the ADC channel. On
overflow, the signal is clipped and distortion results. This typically happens when the AGC Target Level
is kept very high and the energy in the input signal increases faster than the Attack Time.
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. 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. The transfer function of the filter implemented for signal level detection
is given by:
(1)
Where:
Coefficient N0 can be programmed by writing into Page 4, Registers 2 and 3.
Coefficient N1 can be programmed by writing into Page 4, Registers 4 and 5.
Coefficient D1 can be programmed by writing into Page 4, Registers 6 and 7.
N0, N1, and D1 are 16-bit 2’s complement numbers and their default values implement a low-pass
filter with cut-off at 0.002735*ADC_FS.
See
Table 5-3 for various AGC programming options. AGC can be used only if analog microphone
input is routed to the ADC channel.
Table 5-3. AGC Parameter Settings
Function
Control Register
Bit
Left ADC
Right ADC
AGC enable
Page 0, Register 86
Page 0, Register 94
D(7)
Target level
Page 0, Register 86
Page 0, Register 94
D(6:4)
Copyright 2009–2010, Texas Instruments Incorporated
APPLICATION INFORMATION
27