Skip to content

Commit 7d2a67e

Browse files
bardliaobroonie
authored andcommitted
ASoC: SOF: sof-audio: unprepare when swidget->use_count > 0
We should unprepare the widget if its use_count = 1. Fixes: 9862dcf ("ASoC: SOF: don't unprepare widget used other pipelines") Cc: <[email protected]> # 6.1 Signed-off-by: Bard Liao <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Rander Wang <[email protected]> Signed-off-by: Peter Ujfalusi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent f89d783 commit 7d2a67e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/soc/sof/sof-audio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ sof_unprepare_widgets_in_path(struct snd_sof_dev *sdev, struct snd_soc_dapm_widg
272272
struct snd_soc_dapm_path *p;
273273

274274
/* return if the widget is in use or if it is already unprepared */
275-
if (!swidget->prepared || swidget->use_count > 1)
275+
if (!swidget->prepared || swidget->use_count > 0)
276276
return;
277277

278278
if (widget_ops[widget->id].ipc_unprepare)

0 commit comments

Comments
 (0)