diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-02-16 15:48:48 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-02-16 15:48:48 +0100 |
commit | c881f80ba8c50a1f7697dac360210337808d7774 (patch) | |
tree | 1789ac393f37ba74e7a1b8d87851a08558ec78d6 /sound/soc/codecs/arizona.c | |
parent | ALSA: au88x0 - Define channel map for au88x0 (diff) | |
parent | Merge remote-tracking branch 'asoc/topic/da7213' into asoc-next (diff) | |
download | linux-c881f80ba8c50a1f7697dac360210337808d7774.tar.xz linux-c881f80ba8c50a1f7697dac360210337808d7774.zip |
Merge tag 'asoc-3.9-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Final updates for v3.9
A few more updates from the past week - a new driver from Dialog and
some small fixes and tweaks.
Diffstat (limited to 'sound/soc/codecs/arizona.c')
-rw-r--r-- | sound/soc/codecs/arizona.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c index d824c984c8a4..ac948a671ea6 100644 --- a/sound/soc/codecs/arizona.c +++ b/sound/soc/codecs/arizona.c @@ -335,6 +335,23 @@ EXPORT_SYMBOL_GPL(arizona_ng_hold); int arizona_in_ev(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { + unsigned int reg; + + if (w->shift % 2) + reg = ARIZONA_ADC_DIGITAL_VOLUME_1L + ((w->shift / 2) * 8); + else + reg = ARIZONA_ADC_DIGITAL_VOLUME_1R + ((w->shift / 2) * 8); + + switch (event) { + case SND_SOC_DAPM_POST_PMU: + snd_soc_update_bits(w->codec, reg, ARIZONA_IN1L_MUTE, 0); + break; + case SND_SOC_DAPM_PRE_PMD: + snd_soc_update_bits(w->codec, reg, ARIZONA_IN1L_MUTE, + ARIZONA_IN1L_MUTE); + break; + } + return 0; } EXPORT_SYMBOL_GPL(arizona_in_ev); |