summaryrefslogtreecommitdiff
path: root/sound/soc/sof/sof-audio.h
diff options
context:
space:
mode:
authorRanjani Sridharan <ranjani.sridharan@linux.intel.com>2023-01-27 14:00:25 +0200
committerMark Brown <broonie@kernel.org>2023-01-27 12:14:08 +0000
commit9c04363d222bc94d49d883458b2854334a848b5f (patch)
tree425932b2a1edc2ed429594e8d62f1c3242f4ab1c /sound/soc/sof/sof-audio.h
parent2d271af1af241e64726ada07c6bef6572f1be6a5 (diff)
downloadlwn-9c04363d222bc94d49d883458b2854334a848b5f.tar.gz
lwn-9c04363d222bc94d49d883458b2854334a848b5f.zip
ASoC: SOF: Introduce struct snd_sof_pipeline
Introduce struct snd_sof_pipeline to save the information about pipelines including the pipeline widget, their status wrt how many PCM's are using them and whether they are complete or not. In struct snd_sof_widget, replace pipe_widget with spipe and remove complete. In struct snd_sof_pcm_stream_pipeline_list, replace pipe_widgets with pipelines. Update all users accordingly. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20230127120031.10709-13-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/sof-audio.h')
-rw-r--r--sound/soc/sof/sof-audio.h27
1 files changed, 19 insertions, 8 deletions
diff --git a/sound/soc/sof/sof-audio.h b/sound/soc/sof/sof-audio.h
index bb5c61dd9b1e..f1bbd1adc8b6 100644
--- a/sound/soc/sof/sof-audio.h
+++ b/sound/soc/sof/sof-audio.h
@@ -288,11 +288,11 @@ struct sof_token_info {
/**
* struct snd_sof_pcm_stream_pipeline_list - List of pipelines associated with a PCM stream
* @count: number of pipeline widgets in the @pipe_widgets array
- * @pipe_widgets: array of pipeline widgets
+ * @pipelines: array of pipelines
*/
struct snd_sof_pcm_stream_pipeline_list {
u32 count;
- struct snd_sof_widget **pipe_widgets;
+ struct snd_sof_pipeline **pipelines;
};
/* PCM stream, mapped to FW component */
@@ -383,11 +383,6 @@ struct snd_sof_widget {
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;
- /*
* the prepared flag is used to indicate that a widget has been prepared for getting set
* up in the DSP.
*/
@@ -413,7 +408,7 @@ struct snd_sof_widget {
struct snd_soc_dapm_widget *widget;
struct list_head list; /* list in sdev widget list */
- struct snd_sof_widget *pipe_widget;
+ struct snd_sof_pipeline *spipe;
void *module_info;
const guid_t uuid;
@@ -451,6 +446,22 @@ struct snd_sof_widget {
void *private; /* core does not touch this */
};
+/** struct snd_sof_pipeline - ASoC SOF pipeline
+ * @pipe_widget: Pointer to the pipeline widget
+ * @started_count: Count of number of PCM's that have started this pipeline
+ * @paused_count: Count of number of PCM's that have started and have currently paused this
+ pipeline
+ * @complete: flag used to indicate that pipeline set up is complete.
+ * @list: List item in sdev pipeline_list
+ */
+struct snd_sof_pipeline {
+ struct snd_sof_widget *pipe_widget;
+ int started_count;
+ int paused_count;
+ int complete;
+ struct list_head list;
+};
+
/* ASoC SOF DAPM route */
struct snd_sof_route {
struct snd_soc_component *scomp;