Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion esp-hal-common/src/i2s.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1978,7 +1978,9 @@ mod private {
//
// main difference is we are using fixed-point arithmetic here

let mclk_multiple = 256;
// If data_bits is a power of two, use 256 as the mclk_multiple
// If data_bits is 24, use 192 (24 * 8) as the mclk_multiple
let mclk_multiple = if data_bits == 24 { 192 } else { 256 };
let sclk = 160_000_000; // for now it's fixed PLL_160M_CLK

let rate_hz: HertzU32 = sample_rate.into();
Expand Down