]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
ASoC: arizona: Do proper shift for setting AIF rate
authorAxel Lin <axel.lin@ingics.com>
Thu, 20 Dec 2012 15:29:42 +0000 (23:29 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 24 Dec 2012 15:41:44 +0000 (15:41 +0000)
ARIZONA_AIF1_RATE_MASK is 0x7800 /* AIF1_RATE - [14:11] */
Thus we need left shift ARIZONA_AIF1_RATE_SHIFT when setting aif1 rate.

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

index adf397b9d0e650eb19768e7bc6c592352014a595..38248a7a95e3e38777578fe7bf98970246edaead 100644 (file)
@@ -714,7 +714,8 @@ static int arizona_hw_params(struct snd_pcm_substream *substream,
                snd_soc_update_bits(codec, ARIZONA_ASYNC_SAMPLE_RATE_1,
                                    ARIZONA_ASYNC_SAMPLE_RATE_MASK, sr_val);
                snd_soc_update_bits(codec, base + ARIZONA_AIF_RATE_CTRL,
-                                   ARIZONA_AIF1_RATE_MASK, 8);
+                                   ARIZONA_AIF1_RATE_MASK,
+                                   8 << ARIZONA_AIF1_RATE_SHIFT);
                break;
        default:
                arizona_aif_err(dai, "Invalid clock %d\n", dai_priv->clk);