From c4104851c00cf4c5d28d9a854749ae00da436c46 Mon Sep 17 00:00:00 2001 From: Marcin Szkudlinski Date: Wed, 7 Feb 2024 13:44:02 +0100 Subject: [PATCH] dp: add an error message in DP/LL copying In case of theoretically impossible event of LL-DP copy failure, an error message should be issued Message is better than assert - as stated this should never happen, but if it happens its better to have a glitch + message than a crash Signed-off-by: Marcin Szkudlinski --- src/audio/module_adapter/module_adapter.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/audio/module_adapter/module_adapter.c b/src/audio/module_adapter/module_adapter.c index 61d098c2e12f..7faf515603bf 100644 --- a/src/audio/module_adapter/module_adapter.c +++ b/src/audio/module_adapter/module_adapter.c @@ -1046,8 +1046,10 @@ static int module_adapter_copy_dp_queues(struct comp_dev *dev) source_get_data_available(data_src)); err = source_to_sink_copy(data_src, data_sink, true, to_copy); - if (err) + if (err) { + comp_err(dev, "LL to DP copy error status: %d", err); return err; + } dp_queue = dp_queue_get_next_item(dp_queue); } @@ -1080,8 +1082,10 @@ static int module_adapter_copy_dp_queues(struct comp_dev *dev) source_get_data_available(data_src)); err = source_to_sink_copy(data_src, data_sink, true, to_copy); - if (err) + if (err) { + comp_err(dev, "DP to LL copy error status: %d", err); return err; + } dp_queue = dp_queue_get_next_item(dp_queue); }