Skip to content

Commit eee93fe

Browse files
committed
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 2e00ee6 commit eee93fe

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src/audio/module_adapter/module_adapter.c

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

12711271
comp_dbg(dev, "start");
12721272

1273+
if (dev->task)
1274+
schedule_task_cancel(dev->task);
1275+
12731276
ret = module_free(mod);
12741277
if (ret)
12751278
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)