Patent ID: 7345839

Claim:
An apparatus comprising: a sampling section adapted to sample a signal read from a recording medium based on a local clock signal and a gain signal, the signal being read from the medium based on a control signal; a memory adapted to store the sampled signal based on the local clock signal and timing information to i) select a rate of the local clock signal and enable transfer of the sampled signal into and out of the memory; an orientation timer adapted to generate the timing information based on a loop timing signal; and a software-based processor adapted to generate the control signal so as to process the sampled signal from the memory with one or more routines, wherein the software processor is adapted to implement at least a portion of the processing for: 1) a data processing routine that processes the sampled signal, and 2) an automatic gain control (AGC) routine that i) calculates a gain gradient from the sampled signal processed by the data processing routine and ii) generates the gain signal based on a gain gradient; wherein: the gain routine is at least partially software-based and comprises a coarse AGC sub-routine and a fine AGC sub-routine; the coarse AGC sub-routine adjusts a gain of the sampling section based on a coarse gain value and updates the coarse gain value based on the gain gradient; the fine AGC sub-routine adjusts samples of the sampled signal based on a fine gain value, and updates the fine gain value based on the gain gradient; and the coarse AGC sub-routine updates the coarse gain value by generating a mean of the gain gradient and integrating the mean to provide the updated coarse gain value.