Skip to content
Merged
Changes from all commits
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
17 changes: 14 additions & 3 deletions src/audio/pipeline/pipeline-schedule.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <sof/lib/agent.h>
#include <sof/list.h>
#include <sof/schedule/ll_schedule.h>
#include <sof/schedule/ll_schedule_domain.h>
#include <sof/schedule/dp_schedule.h>
#include <sof/schedule/schedule.h>
#include <sof/audio/module_adapter/module/generic.h>
Expand Down Expand Up @@ -282,7 +283,6 @@ void pipeline_schedule_triggered(struct pipeline_walk_context *ctx,
struct pipeline_data *ppl_data = ctx->comp_data;
struct list_item *tlist;
struct pipeline *p;
uint32_t flags;

#ifdef CONFIG_IPC_MAJOR_4
/*
Expand All @@ -295,11 +295,19 @@ void pipeline_schedule_triggered(struct pipeline_walk_context *ctx,
#endif

/*
* Interrupts have to be disabled while adding tasks to or removing them
* Block scheduler execution when adding tasks or removing them
* from the scheduler list. Without that scheduling can begin
* immediately before all pipelines achieved a consistent state.
*/
#ifdef CONFIG_SOF_USERSPACE_LL
int sched_core = ppl_data->start->ipc_config.core;

user_ll_lock_sched(sched_core);
#else
uint32_t flags;

irq_local_disable(flags);
#endif

switch (cmd) {
case COMP_TRIGGER_PAUSE:
Expand Down Expand Up @@ -355,8 +363,11 @@ void pipeline_schedule_triggered(struct pipeline_walk_context *ctx,
p->xrun_bytes = 1;
}
}

#ifdef CONFIG_SOF_USERSPACE_LL
user_ll_unlock_sched(sched_core);
#else
irq_local_enable(flags);
#endif
}

int pipeline_comp_ll_task_init(struct pipeline *p)
Expand Down
Loading