Specialist Supplier of Crystals & Frequency Control Componentssales@mecxtal.com.cn0755-26500570
MERLIN home / Rednote / System Validation and Replacement

Locating the First Data Bit in an I²S Amplifier With Correct Clock Frequencies

A digital amplifier can produce noise even when the master clock, bit clock and left/right clock measure correctly. Before replacing an oscillator, find which bit period carries the most significant bit at the amplifier input after the channel-select transition.

Three correct frequency readings can hide this fault. A frequency counter reports edges per second. It cannot tell which edge carries which serial bit. Consider a small desktop speaker whose controller sends digital audio over I²S and derives audio clocks from its own quartz oscillator. This example covers that bench setup without identifying how any commercial product is wired.

Correct clock frequencies do not establish the word boundary

Start with three signals. BCLK clocks each bit. Word select (WS), often called LRCLK, distinguishes left and right slots. SD carries serial data. Some devices also need the separate master clock MCLK, which is outside the three-wire I²S bus. Some can derive their internal timing from BCLK. Others need MCLK. Check the chip's actual mode rather than assuming a nearby oscillator feeds its master clock input.

Standard I²S places the next word's most significant bit one bit-clock period after the WS transition. Common left-justified formats place the MSB at the new word boundary. Verify the timing diagrams for both ends. With only this setting mismatched, BCLK and WS can still agree exactly. The receiver may read the next bit as the MSB or include the last bit from the previous slot. Effects depend on sign, channel content, padding and truncation, and cannot all be treated as a doubling of volume.

Distinguish valid word width from slot width. In stereo with 24 valid bits per word and 32 bits per slot, a frame needs more than 48 BCLK periods. Check whether the remaining bits are zero-filled, sign-extended, ignored or otherwise defined by the interface. Verify slot placement. The application's “24-bit audio” label cannot establish the bus format.

Capture the three signals on the bench

Use synthetic digital samples on a development board outside production. Lower the output level and mute the power stage according to the design. Capture BCLK, WS and SD at the amplifier inputs. Use the device's specified sampling edge and trigger on one consistent WS transition. Choose appropriate probes and sample rate, and save several complete frames. If the instrument supports I²S and left-justified decoding, try both. Use the raw bits to verify actual transmitter settings.

Avoid all-zero test words, which can be unchanged by a one-bit shift. Send different known low-amplitude samples in the left and right slots, switch to signed samples with asymmetric bit patterns, then swap left and right. Compare expected words, decoded words and amplifier state. If the trace decodes to all expected words only in a mode different from the amplifier configuration, correct the format first. If the data is valid at the controller but wrong at the amplifier pins, check logic levels, soldering, setup and hold timing along the path.

CheckWhat to recordHow to use it
Oscillator and dividersSupply, frequency, jitter integration band, receiver point and divider configurationEvaluate clock quality separately from bit alignment
Receiver BCLK and WSEdge count per frame, channel polarity and edge alignmentVerify slots and channels beyond clock-counter readings
Receiver SDMSB position relative to WS, sampling edge and raw traceCheck format and signal integrity
Settings and resultsTransmit and receive registers and readback, plus three digital test sequencesDistinguish writes, applied settings and interface output

Worked example: correct frequencies can still conceal a one-bit shift

Assume 48,000 stereo frames per second, 32 bits per slot and MCLK at 512 times the frame rate. BCLK is 48,000 × 2 × 32 = 3.072 MHz and MCLK is 48,000 × 512 = 24.576 MHz. WS is 48 kHz per complete left/right frame. Each BCLK period is about 325.52 ns. Even if all three frequencies agree across transmitter and receiver, the expected start of the word can differ by one bit period.

For a signed example that is easy to verify manually, take an eight-bit sequence 01001011 followed by a zero padding bit. This example does not specify the speaker's real word width. The correct signed eight-bit two's-complement value is +75. If the receiver starts one bit late and reads the extra zero, it takes 10010110 as −106. Verify this on a logic analyzer without sending unexpected words to a speaker. Real decoded values depend on slots, padding and active transmit and receive formats.

Specify and qualify the 24.576 MHz oscillator

Japan's Epson SG-8018CB is a programmable active quartz oscillator family that covers this master clock frequency, with output-enable or standby options. Select a full order code for the actual board. Specify nominal frequency, intended use, supply and input logic levels, package, temperature and frequency requirements, control pin option and receiver load. If the project specifies phase jitter over an integration band, verify that band under comparable conditions. The purchase agreement or specification check should link received lots to the approved manufacturing configuration. Matching packages and a single frequency reading are insufficient.

For programmable samples, retain supplier, complete part number, test date, supply and load during frequency and output verification. Keep board revision, firmware audio settings, supply state and test words with the engineering record. If two boards use the same oscillator and different audio formats, associate the difference with board configuration. If two oscillator options in the same series have different control pins, levels or guaranteed frequency tolerance, give those conditions explicit coverage in the part records.

Prevent a firmware update from reintroducing the fault

Add the digital check to firmware regression. Use a short deterministic sequence for both slots and the expected edge positions. For cold boot, resume and input switching, capture the first valid frames and record when mute is released. If mute releases before valid frames arrive, an aligned interface can still make a pop. Qualify startup sound separately from a persistent one-bit error to avoid modifying the serial format for a one-time transient.

Use the same samples to check routing. If isolated left and right test words decode correctly but reach opposite channels, verify WS polarity and software mapping. If errors move unpredictably with probing, temperature or load, check timing margin and supply. When comparing original and candidate boards, change only the approved item and keep trigger, sample, receive point and probes fixed. Save samples and raw captures from before and after the fix.

Frequently asked questions

Can a tighter oscillator tolerance clear up rough audio? First find out whether the shift is consistent or bit errors vary with voltage and waveform. A consistent shift points to format. Variable errors call for checking receiver timing margin, supply and signal quality, along with the oscillator where relevant.

Does a correct WS reading prove left and right are not swapped? Verify which logic level represents each channel and whether software and transmit buffers put samples in the right order. Distinct digital words for left and right identify the boundary more reliably than listening to the same sine wave on both channels.

WeChat

MERLIN · TIMING COMPONENTS

Scan with WeChat to contact Sales

Add our WeCom contacts from your usual WeChat app.

On desktop, scan with your phone. On mobile, save the QR image and select it from your album in WeChat Scan.