diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-10-14 05:01:59 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-10-14 15:29:05 -0400 |
commit | f3aa7219b15c140fece2ec6b9240fccc3b7a5afd (patch) | |
tree | 7e7dfe8969dc6fde843137bb270bbb5e4dc2c8a5 /sound | |
parent | 79d07265137c166cf298d74a29038a76458ec46a (diff) |
ASoC: ad193x: Fix define of AD193X_PLL_INPUT_MASK
Current code defines AD193X_PLL_INPUT_MASK as (~0x6) which is quite
different from other MASK defines.
To make it consistent with other mask defines, define AD193X_PLL_INPUT_MASK
as 0x6 and change the code accordingly.
I think this change improves the readability.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/ad193x.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/ad193x.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/ad193x.c b/sound/soc/codecs/ad193x.c index f934670199a5..39056ce66302 100644 --- a/sound/soc/codecs/ad193x.c +++ b/sound/soc/codecs/ad193x.c | |||
@@ -298,7 +298,7 @@ static int ad193x_hw_params(struct snd_pcm_substream *substream, | |||
298 | } | 298 | } |
299 | 299 | ||
300 | reg = snd_soc_read(codec, AD193X_PLL_CLK_CTRL0); | 300 | reg = snd_soc_read(codec, AD193X_PLL_CLK_CTRL0); |
301 | reg = (reg & AD193X_PLL_INPUT_MASK) | master_rate; | 301 | reg = (reg & (~AD193X_PLL_INPUT_MASK)) | master_rate; |
302 | snd_soc_write(codec, AD193X_PLL_CLK_CTRL0, reg); | 302 | snd_soc_write(codec, AD193X_PLL_CLK_CTRL0, reg); |
303 | 303 | ||
304 | reg = snd_soc_read(codec, AD193X_DAC_CTRL2); | 304 | reg = snd_soc_read(codec, AD193X_DAC_CTRL2); |
diff --git a/sound/soc/codecs/ad193x.h b/sound/soc/codecs/ad193x.h index 536e5f2b136e..1507eaa425a3 100644 --- a/sound/soc/codecs/ad193x.h +++ b/sound/soc/codecs/ad193x.h | |||
@@ -11,7 +11,7 @@ | |||
11 | 11 | ||
12 | #define AD193X_PLL_CLK_CTRL0 0x00 | 12 | #define AD193X_PLL_CLK_CTRL0 0x00 |
13 | #define AD193X_PLL_POWERDOWN 0x01 | 13 | #define AD193X_PLL_POWERDOWN 0x01 |
14 | #define AD193X_PLL_INPUT_MASK (~0x6) | 14 | #define AD193X_PLL_INPUT_MASK 0x6 |
15 | #define AD193X_PLL_INPUT_256 (0 << 1) | 15 | #define AD193X_PLL_INPUT_256 (0 << 1) |
16 | #define AD193X_PLL_INPUT_384 (1 << 1) | 16 | #define AD193X_PLL_INPUT_384 (1 << 1) |
17 | #define AD193X_PLL_INPUT_512 (2 << 1) | 17 | #define AD193X_PLL_INPUT_512 (2 << 1) |