[PATCH] ASoC: avoid using divisible by 3 for DMIC clk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
---
 sound/soc/codecs/rl6231.c | 2 ++
 1 file changed, 2 insertions(+)

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;
-- 
1.8.1.1.439.g50a6b54

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux