Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/audio/pipeline/pipeline-schedule.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,16 @@ void pipeline_schedule_triggered(struct pipeline_walk_context *ctx,
struct pipeline *p;
uint32_t flags;

#ifdef CONFIG_IPC_MAJOR_4
/*
* With IPC4, each pipeline is triggered separately. Exactly 1 pipeline
* is expected in the pipelines list (it's unclear whether an empty list
* should be tolerated).
*/
assert(list_is_empty(&ctx->pipelines) ||

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@serhiy-katsyuba-intel have you ever seen empty lists here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, but the function will work without errors if an empty list is passed as a parameter. So I decided to add this check just to avoid introducing a crash when accessing the first list element without checking whether it exists.

list_item_is_last(ctx->pipelines.next, &ctx->pipelines));
#endif

/*
* Interrupts have to be disabled while adding tasks to or removing them
* from the scheduler list. Without that scheduling can begin
Expand Down