Skip to content

Commit 66e41b0

Browse files
ipc4: assert IPC4 pipeline triggering logic
With IPC4, each pipeline is triggered separately. Exactly 1 pipeline is expected in the pipelines list in pipeline_schedule_triggered(). Unfortunately, we still have considerable complex IPC3 pipeline triggering code being used with IPC4. This assertion ensures that the code works correctly for the IPC4 case. Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
1 parent 81d76d1 commit 66e41b0

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/audio/pipeline/pipeline-schedule.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,16 @@ void pipeline_schedule_triggered(struct pipeline_walk_context *ctx,
284284
struct pipeline *p;
285285
uint32_t flags;
286286

287+
#ifdef CONFIG_IPC_MAJOR_4
288+
/*
289+
* With IPC4, each pipeline is triggered separately. Exactly 1 pipeline
290+
* is expected in the pipelines list (it's unclear whether an empty list
291+
* should be tolerated).
292+
*/
293+
assert(list_is_empty(&ctx->pipelines) ||
294+
list_item_is_last(ctx->pipelines.next, &ctx->pipelines));
295+
#endif
296+
287297
/*
288298
* Interrupts have to be disabled while adding tasks to or removing them
289299
* from the scheduler list. Without that scheduling can begin

0 commit comments

Comments
 (0)