What is I2S? Where is it used? Why might you want to use I2S in an embedded system? Have you ever used it?
I2S (Inter-IC Sound) is a synchronous serial bus dedicated to carrying digital audio (PCM) between chips. It is distinct from I2C despite the similar name — I2S moves audio sample streams, not control/register traffic.
Signals (three lines):
- SCK / BCLK — the bit clock, one pulse per data bit.
- WS / LRCLK — word select (also called left/right clock or frame clock); its level selects the left vs. right audio channel, and its rate equals the audio sample rate (e.g., 44.1 kHz, 48 kHz).
- SD — the serial data line carrying the audio sample bits (typically MSB-first, two's-complement PCM).
One device acts as the clock master generating BCLK and WS; a separate MCLK (master/system clock) is often also distributed to clock the codec's internal oversampling. Variants include left-justified, right-justified, and TDM modes for multi-channel audio.
Where it's used: between an audio source and an audio sink — e.g., an MCU/SoC or dedicated audio processor connected to an audio codec, DAC, ADC, Class-D amplifier, or digital microphone (PDM is related but distinct). It is the standard digital audio link inside phones, smart speakers, headsets, hearables/wearables, and any product with digital audio.
Why use it: it keeps audio in the digital domain all the way to the codec/DAC, avoiding analog noise pickup; it provides a clean, jitter-controlled, sample-synchronous stream with explicit channel framing; and it offloads continuous audio transport from the CPU (usually driven by DMA), which is essential for glitch-free real-time audio. For any embedded system that records or plays high-quality audio, I2S (or a TDM extension of it) is the natural interconnect.
