Skip to content

Commit 5ae117a

Browse files
committed
dp thread fix
1 parent 307d06c commit 5ae117a

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

src/schedule/zephyr_dp_schedule_thread.c

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -132,18 +132,17 @@ void dp_thread_fn(void *p1, void *p2, void *p3)
132132
DP_TASK_EVENT_CANCEL | DP_TASK_EVENT_IPC, false,
133133
K_FOREVER);
134134

135-
state = task->state; /* to avoid undefined variable warning */
136-
if (task->state == SOF_TASK_STATE_RUNNING) {
137-
switch (event) {
138-
case DP_TASK_EVENT_PROCESS:
139-
state = task_run(task);
140-
break;
141-
case DP_TASK_EVENT_IPC:
142-
assert(task_pdata->ipc_work_item);
143-
userspace_proxy_worker_handler(task_pdata->ipc_work_item);
135+
#if IS_ENABLED(CONFIG_SOF_USERSPACE_MOD_IPC_BY_DP_THREAD)
136+
if (event & DP_TASK_EVENT_IPC) {
137+
assert(task_pdata->ipc_work_item);
138+
userspace_proxy_worker_handler(task_pdata->ipc_work_item);
139+
if (!(event ^ DP_TASK_EVENT_IPC))
144140
continue;
145-
}
146141
}
142+
#endif
143+
state = task->state; /* to avoid undefined variable warning */
144+
if (task->state == SOF_TASK_STATE_RUNNING && event & DP_TASK_EVENT_PROCESS)
145+
state = task_run(task);
147146

148147
lock_key = scheduler_dp_lock(task->core);
149148
/*

0 commit comments

Comments
 (0)