Methods of calibrating an analog front end (AFE) of a read/write channel
include measuring a first magnitude of a test signal, measuring a second
magnitude of an output signal of the AFE generated in response to the
test signal, and comparing the first magnitude and the second magnitude
to generate a measure of a gain of the AFE at a frequency of the test
signal. A data storage device includes a read/write head configured to
generate an analog input signal, an AFE coupled to the read/write head
and configured to amplify and filter the analog input signal, a test
signal generator configured to generate a test signal having a frequency
substantially equal to a fundamental frequency of the analog input signal
or any of its harmonics, and an attenuator coupled between the test
signal generator and the AFE.