aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sound/soc/sof/sof-audio.c3
-rw-r--r--sound/soc/sof/sof-audio.h4
2 files changed, 5 insertions, 2 deletions
diff --git a/sound/soc/sof/sof-audio.c b/sound/soc/sof/sof-audio.c
index b2da078a1641..791d2454c1d5 100644
--- a/sound/soc/sof/sof-audio.c
+++ b/sound/soc/sof/sof-audio.c
@@ -58,8 +58,6 @@ int sof_widget_free(struct snd_sof_dev *sdev, struct snd_sof_widget *swidget)
err = ret;
}
- swidget->complete = 0;
-
/*
* free the scheduler widget (same as pipe_widget) associated with the current swidget.
* skip for static pipelines
@@ -68,6 +66,7 @@ int sof_widget_free(struct snd_sof_dev *sdev, struct snd_sof_widget *swidget)
ret = sof_widget_free(sdev, swidget->pipe_widget);
if (ret < 0 && !err)
err = ret;
+ swidget->pipe_widget->complete = 0;
}
if (!err)
diff --git a/sound/soc/sof/sof-audio.h b/sound/soc/sof/sof-audio.h
index bf75913a7f10..4dbee02424fe 100644
--- a/sound/soc/sof/sof-audio.h
+++ b/sound/soc/sof/sof-audio.h
@@ -327,6 +327,10 @@ struct snd_sof_widget {
struct snd_soc_component *scomp;
int comp_id;
int pipeline_id;
+ /*
+ * complete flag is used to indicate that pipeline set up is complete for scheduler type
+ * widgets. It is unused for all other widget types.
+ */
int complete;
int use_count; /* use_count will be protected by the PCM mutex held by the core */
int core;