Skip to content

Commit ed80971

Browse files
committed
fix
1 parent 3dcf46e commit ed80971

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

src/audio/module_adapter/module/generic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ int module_reset(struct processing_module *mod)
622622

623623
/* cancel task if DP task*/
624624
if (mod->dev->ipc_config.proc_domain == COMP_PROCESSING_DOMAIN_DP && mod->dev->task &&
625-
!IS_ENABLED(CONFIG_SOF_USERSPACE_APPLICATION))
625+
!IS_ENABLED(CONFIG_SOF_USERSPACE_MOD_IPC_BY_DP_THREAD))
626626
schedule_task_cancel(mod->dev->task);
627627

628628
if (ops->reset) {

src/audio/module_adapter/module_adapter.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,23 +1432,24 @@ void module_adapter_free(struct comp_dev *dev)
14321432

14331433
comp_dbg(dev, "start");
14341434

1435-
if (dev->task) {
1435+
#if CONFIG_SOF_USERSPACE_APPLICATION
1436+
if (dev->task)
14361437
/*
14371438
* Run DP module's .free() method in its thread context.
14381439
* Unlike with other IPCs we first run module's .free() in
14391440
* thread context, then cancel the thread, and then execute
14401441
* final clean up
14411442
*/
1442-
#if CONFIG_SOF_USERSPACE_APPLICATION
14431443
scheduler_dp_thread_ipc(mod, SOF_IPC4_MOD_DELETE_INSTANCE, NULL);
14441444
#endif
1445-
schedule_task_free(dev->task);
1446-
}
14471445

14481446
ret = module_free(mod);
14491447
if (ret)
14501448
comp_err(dev, "failed with error: %d", ret);
14511449

1450+
if (dev->task)
1451+
schedule_task_free(dev->task);
1452+
14521453
list_for_item_safe(blist, _blist, &mod->raw_data_buffers_list) {
14531454
struct comp_buffer *buffer = container_of(blist, struct comp_buffer,
14541455
buffers_list);

0 commit comments

Comments
 (0)