This invention relates generally to digital signal processing and more particularly to sample rate conversion.
In digital audio applications, an audio Codec (coder/decoder) is required to convert input analog audio signals into digital audio signals and to convert processed digital audio signals into output analog audio signals. Accordingly, the audio Codec includes an analog to digital converter (ADC) to convert the input analog audio signals into the digital input signals and a digital to analog converter (DAC) to convert the processed digital signals into the output analog audio signals.
One implementation of an ADC includes a Sigma Delta modulator that is operably coupled to receive the input analog audio signal and to produce therefrom an oversampled digital signal. A digital decimation filter receives the oversampled digital signal and filters it at a rate that is a fraction, for example xc2xdn, of the oversampling rate used by the Sigma Delta modulator. Depending on the desired rate of the digital data, the output of the decimation filter may be the digital output audio signal or the decimation filter output may be further filtered. For an AC97 specification compliant audio Codec, the Codec includes a master clock that operates at a rate of 24.576 MHz. The oversampling rate of the Sigma Delta modulator is produced by dividing the master clock by a factor of n. For example, the oversampling rate may be 12.288 MHz (divide by 2) or 6.144 MHz (divide by 4). The decimation filter of an AC 97 audio Codec may operate at a rate that is {fraction (1/32)}nd of the oversampling rate. As such the decimation filter outputs a digital data stream at a rate of 384 KHz for a 12.288 MHz oversampling rate and at a rate of 192 KHz for a 6.144 MHz oversampling rate.
Current digital audio rates are specified, for various applications, to be 48 KHz, 44.1 KHz, 22.05 KHz, 16 KHz, 11.025 KHz or 8 KHz. To achieve the 48 KHz sampling rate, the output digital data stream of the decimation filter is further filtered at a rate that is a fraction of the rate used by the decimation filter. As such, to achieve the 48 KHz output, the further filtering divides the decimation filter rate by 8 for the 384 KHz rate. To achieve a 48 KHz output stream when the oversampling rate is 6.144 MHz, the rate of the decimation filter may be adjusted to produce a 384 KHz data stream and the further filtering would be the same as just discussed. To achieve the 24 KHz output rate, the rate of the decimation filter rate is adjusted such that the further filtering stage produces a xe2x85x9th of the rate of the decimation filter. To obtain other output rates with the further filtering remaining a divide by 8 rate converter, the rate of the decimation filter is changed. For example, if the output sample rate is 16 KHz, the decimation filter rate would be a divide by 96 for a 12.288 MHz oversampling rate and would be a divide by 48 for a 6.144 MHz.
The rates of 44.1 KHz, 22.05 KHz and 11.025 KHz cannot be directly obtained by dividing the master clock by an integer. To obtain such rates, sample rate conversion is employed. One known sample rate conversion technique determines an integer ratio between a xc2xdn multiplier rate and the desired rate. The numerator of the ratio is used to upscale the oversampling rate of the Sigma Delta modulator and the denominator of the ratio is used to divide the resultant to obtain the new oversampling rate. For example, assume that the xc2xdn multiplier rate corresponds to 48 KHz and the desired rate is 44.1 KHz. An integer ratio of N to M for 44.1 to 48, equals 147 to 160. For this example, the oversampling rate to produce a 48 KHz output is upscaled by 147. For an oversampling rate of 12.288 MHz, the upscaled rate is approximately 1.8 GHz. The converted oversampling rate equals 1.8 GHz divided by 160 which is approximately 11.29 MHz. With this converted oversampling rate, xc2xdn multipliers may be used to obtain the desired output rates.
While the above described implementation works, it is impractical for commercial grade audio Codecs due to the costs associated with a 1.8 GHz clock. Therefore, a need exists for a sample rate conversion technique that is commercially viable for AC97 and other types of audio Codec.