Skip to content
Closed
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/include/sof/lib/notifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ enum notify_id {
NOTIFIER_ID_BUFFER_CONSUME, /* struct buffer_cb_transact* */
NOTIFIER_ID_BUFFER_FREE, /* struct buffer_cb_free* */
NOTIFIER_ID_DMA_COPY, /* struct dma_cb_data* */
NOTIFIER_ID_LL_POST_RUN, /* NULL */
NOTIFIER_ID_LL_PRE_RUN, /* NULL */
NOTIFIER_ID_DMA_IRQ, /* struct dma_chan_data * */
NOTIFIER_ID_DAI_TRIGGER, /* struct dai_group * */
NOTIFIER_ID_MIC_PRIVACY_STATE_CHANGE, /* struct mic_privacy_settings * */
Expand Down
6 changes: 3 additions & 3 deletions src/schedule/ll_schedule.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,13 +313,13 @@ static void schedule_ll_tasks_run(void *data)

perf_cnt_init(&sch->pcd);

notifier_event(sch, NOTIFIER_ID_LL_PRE_RUN,
NOTIFIER_TARGET_CORE_LOCAL, NULL, 0);

/* run tasks if there are any pending */
if (schedule_ll_is_pending(sch))
schedule_ll_tasks_execute(sch);

notifier_event(sch, NOTIFIER_ID_LL_POST_RUN,
NOTIFIER_TARGET_CORE_LOCAL, NULL, 0);

perf_cnt_stamp(&sch->pcd, perf_ll_sched_trace, 0 /* ignored */);
perf_cnt_average(&sch->pcd, perf_avg_ll_sched_trace, 0 /* ignored */);

Expand Down
2 changes: 1 addition & 1 deletion src/schedule/zephyr_dp_schedule.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ int scheduler_dp_init(void)
if (ret)
return ret;

notifier_register(NULL, NULL, NOTIFIER_ID_LL_POST_RUN, scheduler_dp_ll_tick, 0);
notifier_register(NULL, NULL, NOTIFIER_ID_LL_PRE_RUN, scheduler_dp_ll_tick, 0);

return 0;
}
Expand Down
7 changes: 3 additions & 4 deletions src/schedule/zephyr_ll.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ static void zephyr_ll_run(void *data)
struct list_item *list, *tmp, task_head = LIST_INIT(task_head);
uint32_t flags;

notifier_event(sch, NOTIFIER_ID_LL_PRE_RUN,
NOTIFIER_TARGET_CORE_LOCAL, NULL, 0);

zephyr_ll_lock(sch, &flags);

/*
Expand All @@ -185,7 +188,6 @@ static void zephyr_ll_run(void *data)
* always consistent and contains the tasks, that we haven't run in this
* cycle yet.
*/

for (list = sch->tasks.next; !list_is_empty(&sch->tasks); list = sch->tasks.next) {
enum task_state state;
struct zephyr_ll_pdata *pdata;
Expand Down Expand Up @@ -247,9 +249,6 @@ static void zephyr_ll_run(void *data)
}

zephyr_ll_unlock(sch, &flags);

notifier_event(sch, NOTIFIER_ID_LL_POST_RUN,
NOTIFIER_TARGET_CORE_LOCAL, NULL, 0);
}

static void schedule_ll_callback(void *data)
Expand Down
Loading