From: Bard Liao Date: Tue, 10 Nov 2015 06:40:55 +0000 (+0800) Subject: ASoC: rl6231: avoid using divisible by 3 for DMIC clk X-Git-Tag: v4.14-rc1~4199^2~9^2~1^5~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2f64b6ed44c26eeb3d1bf5428936629cf552eda7;p=platform%2Fkernel%2Flinux-rpi.git ASoC: rl6231: avoid using divisible by 3 for DMIC clk Few codecs will meet no DMIC clock output issue when select a divided number which is divisible by 3. To prevent this issue, the patch ignore the numbers when calculating the DMIC clock divider. Signed-off-by: Bard Liao Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/rl6231.c b/sound/soc/codecs/rl6231.c index aca479f..18b4292 100644 --- a/sound/soc/codecs/rl6231.c +++ b/sound/soc/codecs/rl6231.c @@ -80,6 +80,8 @@ int rl6231_calc_dmic_clk(int rate) } for (i = 0; i < ARRAY_SIZE(div); i++) { + if ((div[i] % 3) == 0) + continue; /* find divider that gives DMIC frequency below 3MHz */ if (3000000 * div[i] >= rate) return i;