From 32b213f271f7259c86c10ce2db2657568fb4ce96 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Wed, 24 Nov 2021 14:09:23 +0100 Subject: [PATCH] pipeline: move parts of the pipeline API to pipeline.h struct pipeline_task and pipeline_task_get() belong to the pipeline API, not to the scheduler API. Move them to pipeline.h Signed-off-by: Guennadi Liakhovetski --- src/include/sof/audio/pipeline.h | 11 ++++++++++- src/include/sof/schedule/task.h | 8 -------- src/schedule/ll_schedule.c | 1 + 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/include/sof/audio/pipeline.h b/src/include/sof/audio/pipeline.h index 3bb9cdf86..8c14b5eec 100644 --- a/src/include/sof/audio/pipeline.h +++ b/src/include/sof/audio/pipeline.h @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -25,7 +26,6 @@ struct comp_buffer; struct comp_dev; struct ipc; struct ipc_msg; -struct task; /* Pipeline status to stop execution of current path */ #define PPL_STATUS_PATH_STOP 1 @@ -108,6 +108,15 @@ struct pipeline_data { uint32_t delay_ms; /* between PRE_{START,RELEASE} and {START,RELEASE} */ }; +/** \brief Task type registered by pipelines. */ +struct pipeline_task { + struct task task; /**< parent structure */ + bool registrable; /**< should task be registered on irq */ + struct comp_dev *sched_comp; /**< pipeline scheduling component */ +}; + +#define pipeline_task_get(t) container_of(t, struct pipeline_task, task) + /* * Pipeline Graph APIs * diff --git a/src/include/sof/schedule/task.h b/src/include/sof/schedule/task.h index e38cf0b9a..e59acf275 100644 --- a/src/include/sof/schedule/task.h +++ b/src/include/sof/schedule/task.h @@ -75,14 +75,6 @@ struct task { #endif }; -/** \brief Task type registered by pipelines. */ -struct pipeline_task { - struct task task; /**< parent structure */ - bool registrable; /**< should task be registered on irq */ - struct comp_dev *sched_comp; /**< pipeline scheduling component */ -}; - -#define pipeline_task_get(t) container_of(t, struct pipeline_task, task) static inline enum task_state task_run(struct task *task) { diff --git a/src/schedule/ll_schedule.c b/src/schedule/ll_schedule.c index ed97d97bd..bb1ef1d9c 100644 --- a/src/schedule/ll_schedule.c +++ b/src/schedule/ll_schedule.c @@ -7,6 +7,7 @@ // Tomasz Lauda #include +#include #include #include #include