Skip to content

Commit

Permalink
ASoC: Allow force enabled pins to be disabled
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Brown committed Mar 22, 2010
1 parent d5021ec commit 5b9e87c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sound/soc/soc-dapm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 5b9e87c

Please sign in to comment.