Skip to content

Commit f0677d4

Browse files
committed
dp: switch all threads to userspace unless PROXY is used
If CONFIG_SOF_USERSPACE_PROXY isn't used all DP threads should run in userspace mode. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1 parent 5e7847a commit f0677d4

File tree

1 file changed

+10
-16
lines changed

1 file changed

+10
-16
lines changed

src/audio/pipeline/pipeline-schedule.c

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,6 @@ static enum task_state dp_task_run(void *data)
383383

384384
int pipeline_comp_dp_task_init(struct comp_dev *comp)
385385
{
386-
int ret;
387386
/* DP tasks are guaranteed to have a module_adapter */
388387
struct processing_module *mod = comp_mod(comp);
389388
struct task_ops ops = {
@@ -392,22 +391,17 @@ int pipeline_comp_dp_task_init(struct comp_dev *comp)
392391
.complete = NULL
393392
};
394393

395-
if (!comp->task) {
396-
ret = scheduler_dp_task_init(&comp->task,
397-
SOF_UUID(dp_task_uuid),
398-
&ops,
399-
mod,
400-
comp->ipc_config.core,
401-
TASK_DP_STACK_SIZE,
402-
#if CONFIG_USERSPACE
403-
mod->user_ctx ? K_USER :
404-
#endif /* CONFIG_USERSPACE */
405-
0);
406-
if (ret < 0)
407-
return ret;
408-
}
394+
if (comp->task)
395+
return 0;
409396

410-
return 0;
397+
#if CONFIG_SOF_USERSPACE_PROXY
398+
unsigned int flags = mod->user_ctx ? K_USER : 0;
399+
#else
400+
unsigned int flags = IS_ENABLED(CONFIG_USERSPACE) ? K_USER : 0;
401+
#endif
402+
403+
return scheduler_dp_task_init(&comp->task, SOF_UUID(dp_task_uuid), &ops, mod,
404+
comp->ipc_config.core, TASK_DP_STACK_SIZE, flags);
411405
}
412406
#endif /* CONFIG_ZEPHYR_DP_SCHEDULER */
413407

0 commit comments

Comments
 (0)