🎵

I2S Audio Clock Calculator

Bit clock (BCLK), word clock (LRCLK/WS) and bit period for an I2S audio link.

Input
ℹ BCLK = sample rate × bits × channels (2 = stereo).
Results
BCLK (Bit Clock)—
LRCLK / WS—
BCLK Period—
💡 Usage & Formula

BCLK = fs × bits × channels, LRCLK = fs. MCLK is usually 256·fs.

When you need it: Deriving the I2S bit clock (BCLK), word-select/frame clock (WS/LRCK) and master clock (MCLK) for an audio codec from the sample rate and bit depth during audio bring-up.

Worked example: 48 kHz, 24-bit stereo in 32-bit slots → BCLK = fs × bits × channels = 48000 × 32 × 2 = 3.072 MHz, WS = fs = 48 kHz, and a typical MCLK = 256 × fs = 12.288 MHz.

Tips & gotchas:

  • Many codecs require MCLK at a fixed multiple of fs (256× or 384×) — check the datasheet before picking a PLL setting.
  • The slot width (often 32 bits) must be at least the audio bit depth; WS toggles once per stereo frame at fs.
  • Clock jitter turns into audible artifacts — derive the audio clocks from a clean fractional-N PLL or dedicated audio oscillator.
  • Match the frame format (I2S vs left-justified vs right-justified) on both the controller and the codec, or channels swap or shift.
📖 References:I²S (Wikipedia)