Skip to content
Unverified Commit 1d4cbdf7 authored by Sascha Hauer's avatar Sascha Hauer Committed by Mark Brown
Browse files

ASoC: fsl_sai: use DIV_ROUND_CLOSEST() to calculate divider



In fsl_sai_set_bclk() we want to calculate the divider that gets us
closest to the desired frequency, so use DIV_ROUND_CLOSEST() instead of
just doing a clk_rate/freq.
Also discard invalid ratios earlier.

Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
Link: https://lore.kernel.org/r/20220302083428.3804687-7-s.hauer@pengutronix.de


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent c56359f4
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