MLK-16350-6: ASoC: fsl_esai: fix the slow bit clock rate
authorShengjiu Wang <shengjiu.wang@freescale.com>
Fri, 1 Sep 2017 07:36:58 +0000 (15:36 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:38:26 +0000 (15:38 -0500)
When the mclk is 49M, but hk_rate is 24M, condition for search
the corret pm parameter is wrong. which cause the pm=999, then
the output bit clock rate is very small.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
sound/soc/fsl/fsl_esai.c

index babd9b6..c3bb35a 100644 (file)
@@ -224,7 +224,7 @@ static int fsl_esai_divisor_cal(struct snd_soc_dai *dai, bool tx, u32 ratio,
 
                        /* Calculate the fraction */
                        sub = sub * 1000 / ratio;
-                       if (sub < savesub) {
+                       if (sub <= savesub) {
                                savesub = sub;
                                pm = i;
                                fp = j;