summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-dapm.c
diff options
context:
space:
mode:
authorLars-Peter Clausen2014-10-25 17:42:01 +0200
committerMark Brown2014-10-28 01:19:59 +0100
commit8be4da29cf5b8ec65e974c36e7ae4d90b381ac5e (patch)
tree1b2fc6fd4bf6d3190cd23d53fff77ddb019e55d8 /sound/soc/soc-dapm.c
parentASoC: dapm: Add a flag to mark paths connected to supply widgets (diff)
downloadkernel-qcow2-linux-8be4da29cf5b8ec65e974c36e7ae4d90b381ac5e.tar.gz
kernel-qcow2-linux-8be4da29cf5b8ec65e974c36e7ae4d90b381ac5e.tar.xz
kernel-qcow2-linux-8be4da29cf5b8ec65e974c36e7ae4d90b381ac5e.zip
ASoC: dapm: Mark endpoints instead of IO widgets dirty during suspend/resume
The state of endpoint widgets is affected by that card's power state. Endpoint widgets that do no have the ignore_suspend flag set will be considered inactive during suspend. So they have to be re-checked and marked dirty after the card's power state changes. Currently the input and output widgets are marked dirty instead, this works most of the time since typically a path from one endpoint to another will go via a input or output widget. But marking the endpoints dirty is technically more correct and will also work for odd corner cases. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r--sound/soc/soc-dapm.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index d89be153a9e0..ffcda7ecd832 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -159,27 +159,20 @@ static void dapm_mark_dirty(struct snd_soc_dapm_widget *w, const char *reason)
}
}
-void dapm_mark_io_dirty(struct snd_soc_dapm_context *dapm)
+void dapm_mark_endpoints_dirty(struct snd_soc_card *card)
{
- struct snd_soc_card *card = dapm->card;
struct snd_soc_dapm_widget *w;
mutex_lock(&card->dapm_mutex);
list_for_each_entry(w, &card->widgets, list) {
- switch (w->id) {
- case snd_soc_dapm_input:
- case snd_soc_dapm_output:
- dapm_mark_dirty(w, "Rechecking inputs and outputs");
- break;
- default:
- break;
- }
+ if (w->is_sink || w->is_source)
+ dapm_mark_dirty(w, "Rechecking endpoints");
}
mutex_unlock(&card->dapm_mutex);
}
-EXPORT_SYMBOL_GPL(dapm_mark_io_dirty);
+EXPORT_SYMBOL_GPL(dapm_mark_endpoints_dirty);
/* create a new dapm widget */
static inline struct snd_soc_dapm_widget *dapm_cnew_widget(