a method and system is disclosed for providing an automatic gain control in signal processing . after receiving a stream of analog signals , a gain is adjusted on the received analog signals using a first set of gain compensation parameters . then , the adjusted analog signals are converted to digital signals . a predetermined number of digital signals are collected from the converted digital signals within a predetermined time period . the collected digital signals are delayed from being transferred out for further demodulation processing for a predetermined delay time . at the same time , a second set of gain compensation parameters are estimated based on the collected digital signals . the estimated second set of gain compensation parameters are applied to the delayed digital signals .