Skip to content

Commit fa3e265

Browse files
committed
[WiP] audio: dp: terminate component tasks late
DP processing threads should have as long as life time as possible to process all the relevant IPCs in the thread context. Move thread termination to be called immediately before freeing module data. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1 parent 57b278a commit fa3e265

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/audio/module_adapter/module_adapter.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1261,6 +1261,9 @@ void module_adapter_free(struct comp_dev *dev)
12611261

12621262
comp_dbg(dev, "start");
12631263

1264+
if (dev->task)
1265+
schedule_task_cancel(dev->task);
1266+
12641267
ret = module_free(mod);
12651268
if (ret)
12661269
comp_err(dev, "failed with error: %d", ret);

src/include/sof/audio/component_ext.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ static inline int comp_trigger_local(struct comp_dev *dev, int cmd)
164164
case COMP_TRIGGER_XRUN:
165165
case COMP_TRIGGER_PAUSE:
166166
case COMP_TRIGGER_STOP:
167-
schedule_task_cancel(dev->task);
168167
break;
169168
}
170169
}

0 commit comments

Comments
 (0)