aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/soc-dapm.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r--sound/soc/soc-dapm.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 68879209b31..2ee738c08ca 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -1477,6 +1477,19 @@ static int snd_soc_dapm_set_pin(struct snd_soc_dapm_context *dapm,
}
}
+ /* Try again in other contexts */
+ list_for_each_entry(w, &dapm->card->widgets, list) {
+ if (!strcmp(w->name, pin)) {
+ dev_dbg(w->dapm->dev, "dapm: pin %s = %d\n",
+ pin, status);
+ w->connected = status;
+ /* Allow disabling of forced pins */
+ if (status == 0)
+ w->force = 0;
+ return 0;
+ }
+ }
+
dev_err(dapm->dev, "dapm: unknown pin %s\n", pin);
return -EINVAL;
}
@@ -2317,6 +2330,17 @@ int snd_soc_dapm_force_enable_pin(struct snd_soc_dapm_context *dapm,
}
}
+ /* Try again with other contexts */
+ list_for_each_entry(w, &dapm->card->widgets, list) {
+ if (!strcmp(w->name, pin)) {
+ dev_dbg(w->dapm->dev,
+ "dapm: force enable pin %s\n", pin);
+ w->connected = 1;
+ w->force = 1;
+ return 0;
+ }
+ }
+
dev_err(dapm->dev, "dapm: unknown pin %s\n", pin);
return -EINVAL;
}