ASoC: cs4265: Fix setting of functional mode and clock divider
authorPaul Handrigan <Paul.Handrigan@cirrus.com>
Thu, 28 Aug 2014 15:54:10 +0000 (10:54 -0500)
committerMark Brown <broonie@linaro.org>
Thu, 28 Aug 2014 18:01:12 +0000 (19:01 +0100)
Reported-by: Zoltán Szenczi <zoltan@raspberrypi.org>
Signed-off-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
sound/soc/codecs/cs4265.c

index 8811689e372b90449b8ad39590fdf3dfd45bbb1f..98523209f7391852cb0e517fb373c6635e2ded99 100644 (file)
@@ -435,10 +435,10 @@ static int cs4265_pcm_hw_params(struct snd_pcm_substream *substream,
        index = cs4265_get_clk_index(cs4265->sysclk, params_rate(params));
        if (index >= 0) {
                snd_soc_update_bits(codec, CS4265_ADC_CTL,
-                       CS4265_ADC_FM, clk_map_table[index].fm_mode);
+                       CS4265_ADC_FM, clk_map_table[index].fm_mode << 6);
                snd_soc_update_bits(codec, CS4265_MCLK_FREQ,
                        CS4265_MCLK_FREQ_MASK,
-                       clk_map_table[index].mclkdiv);
+                       clk_map_table[index].mclkdiv << 4);
 
        } else {
                dev_err(codec->dev, "can't get correct mclk\n");