This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TLV320AIC3204: AGC Attack Decay time

Part Number: TLV320AIC3204
Other Parts Discussed in Thread: TLV320AIC3111

Tool/software:

Hi all,

How can I get the number of seconds when setting the "Decay Time" register?

I am considering setting the Decay Time register referring to the application note below.

Using the AGC,DRC and Beep generator Function in TLV320AIC3204/3254/3100/3110/31

From the description below, I think that AGC Attack Decay time= value of register address 0x5A * 10 ms.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2. When noise is relatively large, the following values may be used in the application
(a) Target gain = –10 dB
(b) Attack time = 20 ms and decay time = 500 ms
(c) Noise threshold = –90 dB
(d) Maximum gain applicable= 40 dB
(e) Hysteresis = 2 dB
(f) Debounce time from normal to silence = 2 ms
(g) Debounce time from silence to normal = 0 ms.
Note that the Example 2 settings, even though the noise is above the noise threshold, will not be as
much gain as in Example 1 as the Maximum gain applicable has been reduced.
Script for the above example assuming TLV320AIC3111 device is in use assuming Fs=44.1kHz with:
w 30 00 00 #go to page 0
w 0 56 A0 3#Enable AGC, set Target gain = –10 dB
w 30 57 7E #set hysteresis = 2 dB, Noise threshold = –90 dB
w 30 58 50 #set Maximum gain = 40 dB
w 30 59 08 #set attack time = 20 ms
w 30 5A 32 #Decay time = 500 ms
w 30 5B 00 #Noise debounce time = 0 ms
w 30 5C 06 #signal debounce time = 2 ms
ADC gain and powering up is not taken into account here, That part of code must be added.
~~~~~~~~~~~~~~~~~~~~~~~~~
Is this understanding correct?
Also, is the constant 10 ms inversely proportional to the Sample Rate when the Audio Sample Rate changes from 44.1 kHz?

Best Regards,

Ryusuke

  • Hi Fukunaga-san,

    In the application reference guide for the AIC3204, you can find the register settings and descriptions. Page 0 / Register 89 and 90 are the left channel AGC control registers with settings for attack and decay time. You can select decay times of (1+2*n)*512 ADC word clocks, and attack time of (1+2*n)*32 ADC word clocks. Basically, every other number from 1 to 63 times some multiple of clock cycles. So, if you are operating at 44.1kHz, the smallest decay time would be 1*512cycles/(44100cycles/sec) = 0.0161s or 11.61ms. Since there is a "scale factor" for the time, you can multiply these times by up to 128, so the maximum decay time would be 128 * 63*512/44.1kHz = 93.62s. The decay time is inversely proportional to the sample rate, since it depends on the word clock rate (this is the same thing as sample rate). 

    Let me know if you need more help here. 

    Best,
    Mir