Skip to content
Unverified Commit d00887c1 authored by Ahmad Fatoum's avatar Ahmad Fatoum Committed by Mark Brown
Browse files

ASoC: fsl_sai: fix 1:1 bclk:mclk ratio support

Refactoring in commit a50b7926 ("ASoC: fsl_sai: implement 1:1
bclk:mclk ratio support") led to the bypass never happening
as (ratio = 1) was caught in the existing if (ratio & 1) continue;
check. The correct check sequence instead is:

 - skip all ratios lower than one and higher than 512
 - skip all odd ratios except for 1:1
 - skip 1:1 ratio if and only if !support_1_1_ratio

And for all others, calculate the appropriate divider. Adjust the
code to facilitate this.

Fixes: a50b7926

 ("ASoC: fsl_sai: implement 1:1 bclk:mclk ratio support")
Signed-off-by: default avatarAhmad Fatoum <a.fatoum@pengutronix.de>
Acked-by: default avatarShengjiu Wang <shengjiu.wang@gmail.com>
Reviewed-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
Link: https://lore.kernel.org/r/20220405155731.745413-1-a.fatoum@pengutronix.de


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 51a630a7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment