Commit 08820902 authored by Mark Brown's avatar Mark Brown

ASoC: SOF: sof-audio: fix prepare/unprepare

Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

2 patches from Rander required to enable mixing usages with multiple
pipelines.
parents 899a8e7d 9862dcf7
......@@ -271,14 +271,16 @@ sof_unprepare_widgets_in_path(struct snd_sof_dev *sdev, struct snd_soc_dapm_widg
struct snd_sof_widget *swidget = widget->dobj.private;
struct snd_soc_dapm_path *p;
if (!widget_ops[widget->id].ipc_unprepare || !swidget->prepared)
goto sink_unprepare;
/* return if the widget is in use or if it is already unprepared */
if (!swidget->prepared || swidget->use_count > 1)
return;
if (widget_ops[widget->id].ipc_unprepare)
/* unprepare the source widget */
widget_ops[widget->id].ipc_unprepare(swidget);
/* unprepare the source widget */
widget_ops[widget->id].ipc_unprepare(swidget);
swidget->prepared = false;
sink_unprepare:
/* unprepare all widgets in the sink paths */
snd_soc_dapm_widget_for_each_sink_path(widget, p) {
if (!p->walking && p->sink->dobj.private) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment