Skip to content

Commit

Permalink
src: dai-zephyr: Print out the src/sink frames along with 'nothing to…
Browse files Browse the repository at this point in the history
… copy'

The 'nothing to copy' without context does not help in debugging, print
out the number of frames on src and sink side to give some context.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
  • Loading branch information
ujfalusi authored and lgirdwood committed Aug 23, 2024
1 parent dedb753 commit a419509
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/audio/dai-zephyr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1464,7 +1464,8 @@ int dai_zephyr_multi_endpoint_copy(struct dai_data **dd, struct comp_dev *dev,
/* return if nothing to copy */
if (!frames) {
#if CONFIG_DAI_VERBOSE_GLITCH_WARNINGS
comp_warn(dev, "nothing to copy");
comp_warn(dev, "nothing to copy, src_frames: %u, sink_frames: %u",
src_frames, sink_frames);
#endif

for (i = 0; i < num_endpoints; i++) {
Expand Down Expand Up @@ -1550,7 +1551,7 @@ int dai_common_copy(struct dai_data *dd, struct comp_dev *dev, pcm_converter_fun
uint32_t free_bytes;
uint32_t copy_bytes;
uint32_t src_frames;
uint32_t sink_frames;
uint32_t sink_frames = 0;
uint32_t frames = UINT32_MAX;
int ret;

Expand Down Expand Up @@ -1678,7 +1679,8 @@ int dai_common_copy(struct dai_data *dd, struct comp_dev *dev, pcm_converter_fun
/* return if nothing to copy */
if (!copy_bytes) {
#if CONFIG_DAI_VERBOSE_GLITCH_WARNINGS
comp_warn(dev, "nothing to copy);
comp_warn(dev, "nothing to copy, src_frames: %u, sink_frames: %u",
src_frames, sink_frames);
#endif
dma_reload(dd->chan->dma->z_dev, dd->chan->index, 0, 0, 0);
return 0;
Expand Down

0 comments on commit a419509

Please sign in to comment.