Skip to content

Commit

Permalink
ASoC: ad193x: Fix define of AD193X_PLL_INPUT_MASK
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Axel Lin authored and Mark Brown committed Oct 14, 2011
1 parent 79d0726 commit f3aa721
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sound/soc/codecs/ad193x.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ static int ad193x_hw_params(struct snd_pcm_substream *substream,
}

reg = snd_soc_read(codec, AD193X_PLL_CLK_CTRL0);
reg = (reg & AD193X_PLL_INPUT_MASK) | master_rate;
reg = (reg & (~AD193X_PLL_INPUT_MASK)) | master_rate;
snd_soc_write(codec, AD193X_PLL_CLK_CTRL0, reg);

reg = snd_soc_read(codec, AD193X_DAC_CTRL2);
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/codecs/ad193x.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#define AD193X_PLL_CLK_CTRL0 0x00
#define AD193X_PLL_POWERDOWN 0x01
#define AD193X_PLL_INPUT_MASK (~0x6)
#define AD193X_PLL_INPUT_MASK 0x6
#define AD193X_PLL_INPUT_256 (0 << 1)
#define AD193X_PLL_INPUT_384 (1 << 1)
#define AD193X_PLL_INPUT_512 (2 << 1)
Expand Down

0 comments on commit f3aa721

Please sign in to comment.