ASoC: arizona: Use actual rather than desired BCLK when calculating LRCLK
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 17 Jan 2013 05:15:59 +0000 (14:15 +0900)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 17 Jan 2013 05:36:07 +0000 (14:36 +0900)
Otherwise we'll get the wrong LRCLK if we need to pick a higher BCLK than
is required.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
sound/soc/codecs/arizona.c

index c3592db994a8b5052b2ac7f94eded90455d56963..ef62c435848eb776421776d7e80e90527e3f2b72 100644 (file)
@@ -685,7 +685,7 @@ static int arizona_hw_params(struct snd_pcm_substream *substream,
        }
        sr_val = i;
 
-       lrclk = snd_soc_params_to_bclk(params) / params_rate(params);
+       lrclk = rates[bclk] / params_rate(params);
 
        arizona_aif_dbg(dai, "BCLK %dHz LRCLK %dHz\n",
                        rates[bclk], rates[bclk] / lrclk);