summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/cs42l56.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2014-05-23 13:05:31 +0800
committerMark Brown <broonie@linaro.org>2014-06-01 11:49:25 +0100
commit4641c771b67e0d1df9395ed789c618dcfbc62709 (patch)
treead14c401cd02a2ac7138d051a3f7a499f9b2ff25 /sound/soc/codecs/cs42l56.c
parent3bb40619aca84905f87dd6bc7f6dce9efb525f28 (diff)
ASoC: cs42l56: Fix new value argument in snd_soc_update_bits calls
The new value argument needs proper shift to match the mask bit fields. Signed-off-by: Axel Lin <axel.lin@ingics.com> Tested-by: Brian Austin <brian.austin@cirrus.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/codecs/cs42l56.c')
-rw-r--r--sound/soc/codecs/cs42l56.c70
1 files changed, 31 insertions, 39 deletions
diff --git a/sound/soc/codecs/cs42l56.c b/sound/soc/codecs/cs42l56.c
index 5bb134b4ab9b..fdc4bd27b0df 100644
--- a/sound/soc/codecs/cs42l56.c
+++ b/sound/soc/codecs/cs42l56.c
@@ -763,14 +763,14 @@ static int cs42l56_set_sysclk(struct snd_soc_dai *codec_dai,
case CS42L56_MCLK_11P2896MHZ:
case CS42L56_MCLK_12MHZ:
case CS42L56_MCLK_12P288MHZ:
- cs42l56->mclk_div2 = 1;
+ cs42l56->mclk_div2 = CS42L56_MCLK_DIV2;
cs42l56->mclk_prediv = 0;
break;
case CS42L56_MCLK_22P5792MHZ:
case CS42L56_MCLK_24MHZ:
case CS42L56_MCLK_24P576MHZ:
- cs42l56->mclk_div2 = 1;
- cs42l56->mclk_prediv = 1;
+ cs42l56->mclk_div2 = CS42L56_MCLK_DIV2;
+ cs42l56->mclk_prediv = CS42L56_MCLK_PREDIV;
break;
default:
return -EINVAL;
@@ -844,57 +844,49 @@ static int cs42l56_digital_mute(struct snd_soc_dai *dai, int mute)
/* Hit the DSP Mixer first */
snd_soc_update_bits(codec, CS42L56_DSP_MUTE_CTL,
CS42L56_ADCAMIX_MUTE_MASK |
- CS42L56_ADCBMIX_MUTE_MASK |
- CS42L56_PCMAMIX_MUTE_MASK |
- CS42L56_PCMBMIX_MUTE_MASK |
- CS42L56_MSTB_MUTE_MASK |
- CS42L56_MSTA_MUTE_MASK,
- CS42L56_MUTE);
+ CS42L56_ADCBMIX_MUTE_MASK |
+ CS42L56_PCMAMIX_MUTE_MASK |
+ CS42L56_PCMBMIX_MUTE_MASK |
+ CS42L56_MSTB_MUTE_MASK |
+ CS42L56_MSTA_MUTE_MASK,
+ CS42L56_MUTE_ALL);
/* Mute ADC's */
snd_soc_update_bits(codec, CS42L56_MISC_ADC_CTL,
- CS42L56_ADCA_MUTE_MASK |
- CS42L56_ADCB_MUTE_MASK,
- CS42L56_MUTE);
+ CS42L56_ADCA_MUTE_MASK |
+ CS42L56_ADCB_MUTE_MASK,
+ CS42L56_MUTE_ALL);
/* HP And LO */
snd_soc_update_bits(codec, CS42L56_HPA_VOLUME,
- CS42L56_HP_MUTE_MASK,
- CS42L56_MUTE);
+ CS42L56_HP_MUTE_MASK, CS42L56_MUTE_ALL);
snd_soc_update_bits(codec, CS42L56_HPB_VOLUME,
- CS42L56_HP_MUTE_MASK,
- CS42L56_MUTE);
+ CS42L56_HP_MUTE_MASK, CS42L56_MUTE_ALL);
snd_soc_update_bits(codec, CS42L56_LOA_VOLUME,
- CS42L56_LO_MUTE_MASK,
- CS42L56_MUTE);
+ CS42L56_LO_MUTE_MASK, CS42L56_MUTE_ALL);
snd_soc_update_bits(codec, CS42L56_LOB_VOLUME,
- CS42L56_LO_MUTE_MASK,
- CS42L56_MUTE);
-
-
+ CS42L56_LO_MUTE_MASK, CS42L56_MUTE_ALL);
} else {
snd_soc_update_bits(codec, CS42L56_DSP_MUTE_CTL,
CS42L56_ADCAMIX_MUTE_MASK |
- CS42L56_ADCBMIX_MUTE_MASK |
- CS42L56_PCMAMIX_MUTE_MASK |
- CS42L56_PCMBMIX_MUTE_MASK |
- CS42L56_MSTB_MUTE_MASK |
- CS42L56_MSTA_MUTE_MASK,
- CS42L56_UNMUTE);
+ CS42L56_ADCBMIX_MUTE_MASK |
+ CS42L56_PCMAMIX_MUTE_MASK |
+ CS42L56_PCMBMIX_MUTE_MASK |
+ CS42L56_MSTB_MUTE_MASK |
+ CS42L56_MSTA_MUTE_MASK,
+ CS42L56_UNMUTE);
+
snd_soc_update_bits(codec, CS42L56_MISC_ADC_CTL,
- CS42L56_ADCA_MUTE_MASK |
- CS42L56_ADCB_MUTE_MASK,
- CS42L56_UNMUTE);
+ CS42L56_ADCA_MUTE_MASK |
+ CS42L56_ADCB_MUTE_MASK,
+ CS42L56_UNMUTE);
+
snd_soc_update_bits(codec, CS42L56_HPA_VOLUME,
- CS42L56_HP_MUTE_MASK,
- CS42L56_UNMUTE);
+ CS42L56_HP_MUTE_MASK, CS42L56_UNMUTE);
snd_soc_update_bits(codec, CS42L56_HPB_VOLUME,
- CS42L56_HP_MUTE_MASK,
- CS42L56_UNMUTE);
+ CS42L56_HP_MUTE_MASK, CS42L56_UNMUTE);
snd_soc_update_bits(codec, CS42L56_LOA_VOLUME,
- CS42L56_LO_MUTE_MASK,
- CS42L56_UNMUTE);
+ CS42L56_LO_MUTE_MASK, CS42L56_UNMUTE);
snd_soc_update_bits(codec, CS42L56_LOB_VOLUME,
- CS42L56_LO_MUTE_MASK,
- CS42L56_UNMUTE);
+ CS42L56_LO_MUTE_MASK, CS42L56_UNMUTE);
}
return 0;
}