未验证 提交 9862dcf7 编写于 作者: R Rander Wang 提交者: Mark Brown

ASoC: SOF: don't unprepare widget used other pipelines

If multiple pipeline are mixed into one, we can't unprepare
the widget used by other pipelines. This patch checks use_count
to address this case.
Reviewed-by: NBard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: NRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: NRander Wang <rander.wang@intel.com>
Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220920150107.2090695-3-pierre-louis.bossart@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
上级 ce59804d
...@@ -271,8 +271,8 @@ sof_unprepare_widgets_in_path(struct snd_sof_dev *sdev, struct snd_soc_dapm_widg ...@@ -271,8 +271,8 @@ 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_sof_widget *swidget = widget->dobj.private;
struct snd_soc_dapm_path *p; struct snd_soc_dapm_path *p;
/* it is already unprepared */ /* return if the widget is in use or if it is already unprepared */
if (!swidget->prepared) if (!swidget->prepared || swidget->use_count > 1)
return; return;
if (widget_ops[widget->id].ipc_unprepare) if (widget_ops[widget->id].ipc_unprepare)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册