aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/twl4030.c
diff options
context:
space:
mode:
authorJari Vanhala <ext-jari.vanhala@nokia.com>2009-10-29 05:58:09 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-10-29 08:58:21 -0400
commit86139a13ced74b3911c33940f0049b8f97bae07a (patch)
tree8826eda37f8a8c6fd9a79be6f9f8182ce839ab27 /sound/soc/codecs/twl4030.c
parent7e1aa1dcd0d886df72586e3a94b1a7382952f21f (diff)
ASoC: TWL4030: Vibra motor stop fix when it is driven with audio
This patch fixes vibrator playing incoherently, when driven with audio. There is something wrong in switch 3 at H-bridge and VIBRA_SET still affects PWM generator. Slowest value fixes things. Signed-off-by: Jari Vanhala <ext-jari.vanhala@nokia.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/twl4030.c')
-rw-r--r--sound/soc/codecs/twl4030.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
index 9163713a0307..ccaeb366eb7c 100644
--- a/sound/soc/codecs/twl4030.c
+++ b/sound/soc/codecs/twl4030.c
@@ -613,6 +613,13 @@ static int handsfreerpga_event(struct snd_soc_dapm_widget *w,
613 return 0; 613 return 0;
614} 614}
615 615
616static int vibramux_event(struct snd_soc_dapm_widget *w,
617 struct snd_kcontrol *kcontrol, int event)
618{
619 twl4030_write(w->codec, TWL4030_REG_VIBRA_SET, 0xff);
620 return 0;
621}
622
616static void headset_ramp(struct snd_soc_codec *codec, int ramp) 623static void headset_ramp(struct snd_soc_codec *codec, int ramp)
617{ 624{
618 struct snd_soc_device *socdev = codec->socdev; 625 struct snd_soc_device *socdev = codec->socdev;
@@ -1243,8 +1250,9 @@ static const struct snd_soc_dapm_widget twl4030_dapm_widgets[] = {
1243 0, 0, NULL, 0, handsfreerpga_event, 1250 0, 0, NULL, 0, handsfreerpga_event,
1244 SND_SOC_DAPM_POST_PMU|SND_SOC_DAPM_POST_PMD), 1251 SND_SOC_DAPM_POST_PMU|SND_SOC_DAPM_POST_PMD),
1245 /* Vibra */ 1252 /* Vibra */
1246 SND_SOC_DAPM_MUX("Vibra Mux", TWL4030_REG_VIBRA_CTL, 0, 0, 1253 SND_SOC_DAPM_MUX_E("Vibra Mux", TWL4030_REG_VIBRA_CTL, 0, 0,
1247 &twl4030_dapm_vibra_control), 1254 &twl4030_dapm_vibra_control, vibramux_event,
1255 SND_SOC_DAPM_PRE_PMU),
1248 SND_SOC_DAPM_MUX("Vibra Route", SND_SOC_NOPM, 0, 0, 1256 SND_SOC_DAPM_MUX("Vibra Route", SND_SOC_NOPM, 0, 0,
1249 &twl4030_dapm_vibrapath_control), 1257 &twl4030_dapm_vibrapath_control),
1250 1258