Re-purposed Clocks and Digital Audio Measurements in APx


Measurement challenges with re-purposed clocks

While digital audio has long been standardized upon a handful of well-known sample rates (44.1 kHz, 48 kHz, 96 kHz,etc.) these rates cannot easily be derived from clocks used for other purposes in digital systems. Rather than incurring additional costs to add clocks purely for audio, designers have for years found clever ways to re-purpose clocks from other areas of a digital system for use with standard audio sample rates.

APx DSIO Option and USB Audio

Many audio devices today incorporate USB connectivity for various uses. USB chipsets commonly employ 12 MHz bitclocks for both host and receiver; clocks on connected devices are kept synchronized via a digital PLL (phase-locked loop).

Synthesizing a useful 48kHz clock for audio purposes can be complex and expensive. Assuming a 32-bit audio word, 48 kHz x 32 bits x 2 (stereo) = 3.072 MHz, which is not related to 12 MHz in any convenient manner, and would require the use of a DDS (Direct Digital Synthesizer) or other clock generator in order to be realized.

Designers of many USB audio products have realized a far simpler and less expensive method that allows for direct use of the existing 12 MHz bit clock. The relationship between a 12 MHz bitclock and a 48 kHz sample rate is easily expressed as:

12mhz-48khz conversion

USB timing

Each half-cycle of the Frame Clock (FClk) is represented by 125 cycles of the bitclock; as with I2S and other formats, FClk states are used to signal the two different channels. Thus we effectively have created a system that delivers 125-bit words at 48 kHz. Actual audio data with word length n is transmitted in the first n bitclock cycles, and the remaining (125-n) samples of the word are padded with zeros.

USB with audio

The APx DSIO option supports this common method of USB audio transport by allowing engineers to independently specify data words up to 128 bits in length with any smaller size of audio bit depth (e.g., 24 bits). The DSIO option also supports common variations of audio words, including the location of the MSB (most significant bit, first or last), left- or right-justification, and the location of the frame pulse.

APx DSIO output settings

The APx DSIO option automatically calculates certain related items, such as Master Clock rate based upon the MClk/FClk ratio. Additionally, the frame clock (our 48kHz audio data rate) may be defined with a specified pulse width of 50% (instead of 1 sample) and may be inverted to exchange rising and falling edges.

With these flexible options, designers can use the APx DSIO option to test designs that use a wide variety of schemes to accommodate the re-use of existing system clocks.

PDM 50x Oversampling in Cellular Devices

PDM (Pulse Density Modulation) is widely used in DACs and with MEMS microphones in mobile devices. PDM employs a 1-bit datastream with oversampling in order to provide a cost-effective means of transporting digital audio. The APx PDM Option allows designers to connect PDM receivers and transmitters directly to the audio analyzer, avoiding additional conversions and outboard gear.

In most audio applications, the commonly accepted oversampling rate is 64x; hence if one desires to convert 48 kHz PCM data to PDM, the data must be sampled at 64 x 48 kHz = 3.072 MHz. However, in many cellular devices we see 50x oversampling used. Why is this?

The answer once more lies in the re-use of existing clocks. While cellular systems use several different clock rates, a common denominator is 19.2 MHz. This frequency is used as a 3G reference clock, due to it being a least common multiple of W-CDMA chip rate 3.84 MHz (5x) and 200 kHz channel raster (96x), and it is commonly available as TCXO and OCXO on W-CDMA chipsets. It is also used as a reference clock for some consumer GPS receivers and in some Bluetooth systems.

From here, the math is simple:

19.2M to 48k

Hence a simple 8x divider can provide an oversampling frequency of 2.4 MHz, which neatly divides by 48 kHz with a factor of 50. In response to this need, the APx PDM option supports 50x oversampling and 44 additional ratios that support many other clock rates in APx500 v4.5 measurement software.

PDM input settings

The AP family of audio analyzers incorporate tools and settings that allow designers to take advantage of these cost-saving measures by providing measurement capabilities that align with the special requirements of frequently used clock schemes.