Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5b9e87cc authored by Mark Brown's avatar Mark Brown
Browse files

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: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
parent d5021ec9
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -1266,6 +1266,9 @@ static int snd_soc_dapm_set_pin(struct snd_soc_codec *codec,
		if (!strcmp(w->name, pin)) {
		if (!strcmp(w->name, pin)) {
			pr_debug("dapm: %s: pin %s\n", codec->name, pin);
			pr_debug("dapm: %s: pin %s\n", codec->name, pin);
			w->connected = status;
			w->connected = status;
			/* Allow disabling of forced pins */
			if (status == 0)
				w->force = 0;
			return 0;
			return 0;
		}
		}
	}
	}