From 0836a79cd9b4808472363bf95b76eb3f13a97751 Mon Sep 17 00:00:00 2001 From: Jari Vanhala Date: Thu, 29 Oct 2009 11:58:09 +0200 Subject: [PATCH] --- yaml --- r: 170193 b: refs/heads/master c: 86139a13ced74b3911c33940f0049b8f97bae07a h: refs/heads/master i: 170191: c31e4cf47c3c763b2a09241361c63dc2d38c7672 v: v3 --- [refs] | 2 +- trunk/sound/soc/codecs/twl4030.c | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 65751c51549f..630ded296f32 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7e1aa1dcd0d886df72586e3a94b1a7382952f21f +refs/heads/master: 86139a13ced74b3911c33940f0049b8f97bae07a diff --git a/trunk/sound/soc/codecs/twl4030.c b/trunk/sound/soc/codecs/twl4030.c index 9163713a0307..ccaeb366eb7c 100644 --- a/trunk/sound/soc/codecs/twl4030.c +++ b/trunk/sound/soc/codecs/twl4030.c @@ -613,6 +613,13 @@ static int handsfreerpga_event(struct snd_soc_dapm_widget *w, return 0; } +static int vibramux_event(struct snd_soc_dapm_widget *w, + struct snd_kcontrol *kcontrol, int event) +{ + twl4030_write(w->codec, TWL4030_REG_VIBRA_SET, 0xff); + return 0; +} + static void headset_ramp(struct snd_soc_codec *codec, int ramp) { struct snd_soc_device *socdev = codec->socdev; @@ -1243,8 +1250,9 @@ static const struct snd_soc_dapm_widget twl4030_dapm_widgets[] = { 0, 0, NULL, 0, handsfreerpga_event, SND_SOC_DAPM_POST_PMU|SND_SOC_DAPM_POST_PMD), /* Vibra */ - SND_SOC_DAPM_MUX("Vibra Mux", TWL4030_REG_VIBRA_CTL, 0, 0, - &twl4030_dapm_vibra_control), + SND_SOC_DAPM_MUX_E("Vibra Mux", TWL4030_REG_VIBRA_CTL, 0, 0, + &twl4030_dapm_vibra_control, vibramux_event, + SND_SOC_DAPM_PRE_PMU), SND_SOC_DAPM_MUX("Vibra Route", SND_SOC_NOPM, 0, 0, &twl4030_dapm_vibrapath_control),