aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2013-04-12 13:56:48 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-04-12 13:56:48 +0100
commit280200d63be865c6818239ef697aa66f03fe2ba7 (patch)
treeab1b2ec748fc6875b6c474445ebbe078a7a9c46d /sound
parentMerge remote-tracking branch 'asoc/fix/wm8903' into asoc-next (diff)
parentASoC: adau1373: adau1373_hw_params: Silence overflow warning (diff)
downloadlinux-dev-280200d63be865c6818239ef697aa66f03fe2ba7.tar.xz
linux-dev-280200d63be865c6818239ef697aa66f03fe2ba7.zip
Merge remote-tracking branch 'asoc/topic/adau1373' into asoc-next
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/adau1373.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/soc/codecs/adau1373.c b/sound/soc/codecs/adau1373.c
index 068b3ae56a17..1aa10ddf3a61 100644
--- a/sound/soc/codecs/adau1373.c
+++ b/sound/soc/codecs/adau1373.c
@@ -133,6 +133,8 @@ struct adau1373 {
#define ADAU1373_DAI_FORMAT_DSP 0x3
#define ADAU1373_BCLKDIV_SOURCE BIT(5)
+#define ADAU1373_BCLKDIV_SR_MASK (0x07 << 2)
+#define ADAU1373_BCLKDIV_BCLK_MASK 0x03
#define ADAU1373_BCLKDIV_32 0x03
#define ADAU1373_BCLKDIV_64 0x02
#define ADAU1373_BCLKDIV_128 0x01
@@ -937,7 +939,8 @@ static int adau1373_hw_params(struct snd_pcm_substream *substream,
adau1373_dai->enable_src = (div != 0);
snd_soc_update_bits(codec, ADAU1373_BCLKDIV(dai->id),
- ~ADAU1373_BCLKDIV_SOURCE, (div << 2) | ADAU1373_BCLKDIV_64);
+ ADAU1373_BCLKDIV_SR_MASK | ADAU1373_BCLKDIV_BCLK_MASK,
+ (div << 2) | ADAU1373_BCLKDIV_64);
switch (params_format(params)) {
case SNDRV_PCM_FORMAT_S16_LE: