ASoC: rl6231: Simplify DMIC divider calculation expression
authorAnatol Pomozov <anatol.pomozov@gmail.com>
Wed, 5 Aug 2015 21:58:33 +0000 (14:58 -0700)
committerMark Brown <broonie@kernel.org>
Thu, 6 Aug 2015 09:51:12 +0000 (10:51 +0100)
commitac1125daf02b81cabb19f35963906335e3d4a155
tree78f65f1df70cecc1ea61ae9fa65ed8473e85b587
parent00a6d6e50ff34aa2351746422e4a1c85c7765b15
ASoC: rl6231: Simplify DMIC divider calculation expression

Existing implementation checks all divider values and tracks
'red' proximity value for the frequency.

But as divider array is monotonically increasing the first
divider that gives DMIC rate in 3MHz range is the best one
we should use. No need for 'red' zone tracking.

Additionally make sure that DMIC frequency is higher 1MHz.

Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Acked-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rl6231.c