diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-03-22 09:36:13 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-03-22 13:21:23 -0400 |
commit | 5b9e87ccccf77f46c006c2cf0988a66d0f3f310d (patch) | |
tree | 53ab5d4006ccb37b85a615203a0bc325b5e5dcd8 /sound/soc/soc-dapm.c | |
parent | d5021ec9fc32edc6f512c2375923d757e9825f6a (diff) |
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 <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r-- | sound/soc/soc-dapm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 611284194000..476dbe6dabad 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, | |||
1266 | if (!strcmp(w->name, pin)) { | 1266 | if (!strcmp(w->name, pin)) { |
1267 | pr_debug("dapm: %s: pin %s\n", codec->name, pin); | 1267 | pr_debug("dapm: %s: pin %s\n", codec->name, pin); |
1268 | w->connected = status; | 1268 | w->connected = status; |
1269 | /* Allow disabling of forced pins */ | ||
1270 | if (status == 0) | ||
1271 | w->force = 0; | ||
1269 | return 0; | 1272 | return 0; |
1270 | } | 1273 | } |
1271 | } | 1274 | } |