x1000: Fix AIC I2S divider clamping with EXCLK source

Change-Id: I19c2d25bbd7276ac5efd6f6b3b9ee64d6801f972
This commit is contained in:
Aidan MacDonald 2021-11-26 12:49:44 +00:00
parent f1215a338b
commit 98f1271aec

View file

@ -84,8 +84,10 @@ static int calc_i2s_clock_params(x1000_clk_t clksrc,
*i2sdiv = X1000_EXCLK_FREQ / 64 / fs; *i2sdiv = X1000_EXCLK_FREQ / 64 / fs;
/* clamp to maximum value */ /* clamp to maximum value */
if(*i2sdiv > 0x200) if(*i2sdiv > 512)
*i2sdiv = 0x200; *i2sdiv = 512;
if(*i2sdiv == 0)
*i2sdiv = 1;
return 0; return 0;
} }