Skip to content

Commit c14848f

Browse files
committed
module_adapter: 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 c14848f

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/audio/module_adapter/module/generic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ int module_process_sink_src(struct processing_module *mod,
300300
/* reset state to idle */
301301
md->state = MODULE_IDLE;
302302
#endif
303-
return ret;
303+
return 0;
304304
}
305305

306306
int module_reset(struct processing_module *mod)

src/audio/module_adapter/module_adapter.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -990,9 +990,12 @@ static int module_adapter_sink_source_copy(struct comp_dev *dev)
990990
ret = module_process_sink_src(mod, mod->sources, mod->num_of_sources,
991991
mod->sinks, mod->num_of_sinks);
992992

993-
if (ret != -ENOSPC && ret != -ENODATA && ret) {
994-
comp_err(dev, "module_adapter_sink_source_copy() process failed with error: %x",
995-
ret);
993+
if (ret) {
994+
if (ret != -ENOSPC && ret != -ENODATA)
995+
comp_err(dev, "module_adapter_sink_source_copy() process failed with error: %d",
996+
ret);
997+
else
998+
ret = 0;
996999
}
9971000

9981001
/* count number of processed data. To be removed in pipeline 2.0 */

0 commit comments

Comments
 (0)