I2S Clock Calculator
embedcalc_i2s_clocksCalculate I2S bit clock (BCLK) and frame clock (LRCLK) frequencies from audio sample rate, bits per sample, and channel count.
Instructions
I2S bit clock (BCLK/SCK) from audio format: BCLK = Fs x bits x channels. Args: sample_rate_hz (e.g. 48000), bits_per_sample (e.g. 16/24/32), channels (default 2). Returns (structured): { bclk_hz, bclk_period_ns, lrclk_hz }. Example: 48 kHz, 24-bit, stereo -> BCLK 2.304 MHz (434.03 ns), LRCLK 48 kHz.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channels | No | Channel count (2 = stereo) | |
| sample_rate_hz | Yes | Sample rate Fs in Hz (44100, 48000, ...) | |
| bits_per_sample | Yes | Bits per sample per channel (16/24/32) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bclk_hz | Yes | ||
| lrclk_hz | Yes | ||
| bclk_period_ns | Yes |