aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/ak4535.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2010-12-01 04:22:34 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-12-01 06:50:09 -0500
commitcca67a3668392857641e9440ca6dc16a48b12e37 (patch)
treefef3724769e50dda11805c21da40ebdf589f36db /sound/soc/codecs/ak4535.c
parent806bfedfb124b85d2e2b8ecdb8a451b23abed386 (diff)
ASoC: ak4535: Improve readability for setting mute
The mute/unmute is controled by SMUTE (Soft Mute Control bit): 0: Normal Operation (Default) 1: DAC outputs soft-muted I think this change improves readability. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/ak4535.c')
-rw-r--r--sound/soc/codecs/ak4535.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/soc/codecs/ak4535.c b/sound/soc/codecs/ak4535.c
index 73675458076d..8b38739c88f8 100644
--- a/sound/soc/codecs/ak4535.c
+++ b/sound/soc/codecs/ak4535.c
@@ -366,9 +366,9 @@ static int ak4535_set_dai_fmt(struct snd_soc_dai *codec_dai,
366static int ak4535_mute(struct snd_soc_dai *dai, int mute) 366static int ak4535_mute(struct snd_soc_dai *dai, int mute)
367{ 367{
368 struct snd_soc_codec *codec = dai->codec; 368 struct snd_soc_codec *codec = dai->codec;
369 u16 mute_reg = ak4535_read_reg_cache(codec, AK4535_DAC) & 0xffdf; 369 u16 mute_reg = ak4535_read_reg_cache(codec, AK4535_DAC);
370 if (!mute) 370 if (!mute)
371 ak4535_write(codec, AK4535_DAC, mute_reg); 371 ak4535_write(codec, AK4535_DAC, mute_reg & ~0x20);
372 else 372 else
373 ak4535_write(codec, AK4535_DAC, mute_reg | 0x20); 373 ak4535_write(codec, AK4535_DAC, mute_reg | 0x20);
374 return 0; 374 return 0;
@@ -381,11 +381,11 @@ static int ak4535_set_bias_level(struct snd_soc_codec *codec,
381 381
382 switch (level) { 382 switch (level) {
383 case SND_SOC_BIAS_ON: 383 case SND_SOC_BIAS_ON:
384 mute_reg = ak4535_read_reg_cache(codec, AK4535_DAC) & 0xffdf; 384 mute_reg = ak4535_read_reg_cache(codec, AK4535_DAC);
385 ak4535_write(codec, AK4535_DAC, mute_reg); 385 ak4535_write(codec, AK4535_DAC, mute_reg & ~0x20);
386 break; 386 break;
387 case SND_SOC_BIAS_PREPARE: 387 case SND_SOC_BIAS_PREPARE:
388 mute_reg = ak4535_read_reg_cache(codec, AK4535_DAC) & 0xffdf; 388 mute_reg = ak4535_read_reg_cache(codec, AK4535_DAC);
389 ak4535_write(codec, AK4535_DAC, mute_reg | 0x20); 389 ak4535_write(codec, AK4535_DAC, mute_reg | 0x20);
390 break; 390 break;
391 case SND_SOC_BIAS_STANDBY: 391 case SND_SOC_BIAS_STANDBY: