diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-09-01 02:38:32 +0200 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-09-06 02:22:19 +0200 |
commit | e2d32ff6ce4ee9958f3973a086f3fa5d009e6306 (patch) | |
tree | bff37a778887f74c180649f9b86466314306dbf7 /sound/soc/soc-dapm.c | |
parent | ASoC: Davinci: McASP: add support new McASP IP Variant (diff) | |
download | linux-e2d32ff6ce4ee9958f3973a086f3fa5d009e6306.tar.xz linux-e2d32ff6ce4ee9958f3973a086f3fa5d009e6306.zip |
ASoC: dapm: Ensure bypass paths are suspended and resumed
Since bypass paths aren't part of DAPM streams and we may not have any
DAPM streams there may not be anything that triggers a DAPM sync for
them. Mark all input and output widgets as dirty and then sync to do so
at the end of suspend and resume.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r-- | sound/soc/soc-dapm.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index dd7c49fafd75..f7999e949acb 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -141,6 +141,28 @@ void dapm_mark_dirty(struct snd_soc_dapm_widget *w, const char *reason) } EXPORT_SYMBOL_GPL(dapm_mark_dirty); +void dapm_mark_io_dirty(struct snd_soc_dapm_context *dapm) +{ + 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; + } + } + + mutex_unlock(&card->dapm_mutex); +} +EXPORT_SYMBOL_GPL(dapm_mark_io_dirty); + /* create a new dapm widget */ static inline struct snd_soc_dapm_widget *dapm_cnew_widget( const struct snd_soc_dapm_widget *_widget) |