Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f3aa7219 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown
Browse files

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: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 79d07265
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -298,7 +298,7 @@ static int ad193x_hw_params(struct snd_pcm_substream *substream,
	}
	}


	reg = snd_soc_read(codec, AD193X_PLL_CLK_CTRL0);
	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);
	snd_soc_write(codec, AD193X_PLL_CLK_CTRL0, reg);


	reg = snd_soc_read(codec, AD193X_DAC_CTRL2);
	reg = snd_soc_read(codec, AD193X_DAC_CTRL2);
+1 −1
Original line number Original line Diff line number Diff line
@@ -11,7 +11,7 @@


#define AD193X_PLL_CLK_CTRL0    0x00
#define AD193X_PLL_CLK_CTRL0    0x00
#define AD193X_PLL_POWERDOWN           0x01
#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_256    (0 << 1)
#define AD193X_PLL_INPUT_384    (1 << 1)
#define AD193X_PLL_INPUT_384    (1 << 1)
#define AD193X_PLL_INPUT_512    (2 << 1)
#define AD193X_PLL_INPUT_512    (2 << 1)