From: Mark Brown Date: Mon, 22 Mar 2010 13:36:13 +0000 (+0000) Subject: ASoC: Allow force enabled pins to be disabled X-Git-Tag: v2.6.35-rc6~9^2~7^2~77 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5b9e87ccccf77f46c006c2cf0988a66d0f3f310d;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git ASoC: Allow force enabled pins to be disabled Some systems, such as those with mechanical jack detection, may wish to force enable a pin (typically mic bias) only some of the time. Support such systems by having disable_pin() also coveer force enabled pins. Signed-off-by: Mark Brown Acked-by: Liam Girdwood --- diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 6112841..476dbe6 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -1266,6 +1266,9 @@ static int snd_soc_dapm_set_pin(struct snd_soc_codec *codec, if (!strcmp(w->name, pin)) { pr_debug("dapm: %s: pin %s\n", codec->name, pin); w->connected = status; + /* Allow disabling of forced pins */ + if (status == 0) + w->force = 0; return 0; } }