Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 248267
b: refs/heads/master
c: 0d86733
h: refs/heads/master
i:
  248265: 280c621
  248263: f83f98f
v: v3
  • Loading branch information
Mark Brown committed Apr 9, 2011
1 parent 68afc82 commit 45e2bad
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 52ba67bf85889828b3766207fa43ce7159c84c78
refs/heads/master: 0d86733cce776ca0262b850ee8eb46bc52dc8244
24 changes: 24 additions & 0 deletions trunk/sound/soc/soc-dapm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 45e2bad

Please sign in to comment.