Skip to content

Commit ba6c760

Browse files
serhiy-katsyuba-intellgirdwood
authored andcommitted
dp: Allow scheduling of already running DP task
The DP task is started at pipeline start and stopped when the DP module is freed. Since the pipeline can be paused and resumed multiple times, DP task start may be called when the task is already queued/running. This commit allows the DP task to be scheduled even when it was already started. This fixes DP tests with multiple pipeline pause/resume cycles. Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
1 parent 1e727ec commit ba6c760

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/schedule/zephyr_dp_schedule.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,12 @@ static int scheduler_dp_task_shedule(void *data, struct task *task, uint64_t sta
325325

326326
lock_key = scheduler_dp_lock(cpu_get_id());
327327

328+
if (task_is_active(task)) {
329+
scheduler_dp_unlock(lock_key);
330+
tr_dbg(&dp_tr, "DP task already active");
331+
return 0;
332+
}
333+
328334
if (task->state != SOF_TASK_STATE_INIT &&
329335
task->state != SOF_TASK_STATE_CANCEL &&
330336
task->state != SOF_TASK_STATE_COMPLETED) {

0 commit comments

Comments
 (0)