Skip to content

Commit

Permalink
ASoC: rl6231: avoid using divisible by 3 for DMIC clk
Browse files Browse the repository at this point in the history
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 <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Bard Liao authored and Mark Brown committed Nov 10, 2015
1 parent 6ff33f3 commit 2f64b6e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/soc/codecs/rl6231.c
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 2f64b6e

Please sign in to comment.