Skip to content

Commit

Permalink
dp: add an error message in DP/LL copying
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
marcinszkudlinski committed Feb 9, 2024
1 parent 45dc968 commit c410485
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/audio/module_adapter/module_adapter.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit c410485

Please sign in to comment.