Skip to content

Commit 2f1dc49

Browse files
committed
module_adapter: generic: Don't propagate ENOSPC and ENODATA error codes
Do not pass non-critical ENOSPC and ENODATA error codes from a module processing function to the pipeline. The pipeline will stop and enter xrun recovery if a module processing function returns a non-zero value. Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
1 parent 77a2213 commit 2f1dc49

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/audio/module_adapter/module/generic.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,14 @@ int module_process_sink_src(struct processing_module *mod,
288288
assert(ops->process);
289289
ret = ops->process(mod, sources, num_of_sources, sinks, num_of_sinks);
290290

291-
if (ret && ret != -ENOSPC && ret != -ENODATA) {
292-
comp_err(dev, "module_process() error %d: for comp %d",
293-
ret, dev_comp_id(dev));
294-
return ret;
291+
if (ret) {
292+
if (ret != -ENOSPC && ret != -ENODATA) {
293+
comp_err(dev, "module_process() error %d: for comp %d",
294+
ret, dev_comp_id(dev));
295+
return ret;
296+
}
297+
298+
ret = 0;
295299
}
296300

297301
comp_dbg(dev, "module_process sink src() done");

0 commit comments

Comments
 (0)