Techniques for performing automatic gain control are described. In some aspects, the gain control is achieved with an apparatus having an analog-to-digital converter (ADC) and a digital variable gain amplifier (DVGA), the DVGA configured to receive a digital signal from the ADC, the DVGA having a processor configured to compute a gain using a base n logarithm based on the power of the digital signal output from the ADC, the processor being further configured to apply the gain to the digital signal.