Skip to content

Commit

Permalink
dai-zephyr: Do not skip dma_reload() when sink if full
Browse files Browse the repository at this point in the history
If sink is full and so no bytes were copied, reload DMA anyway as
otherwise xrun may happen if reload is skipped for a long time.

Signed-off-by: Serhiy Katsyuba <[email protected]>
  • Loading branch information
serhiy-katsyuba-intel authored and kv2019i committed Nov 14, 2023
1 parent 529277f commit 56a6d0d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/audio/dai-zephyr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1287,6 +1287,15 @@ int dai_zephyr_multi_endpoint_copy(struct dai_data **dd, struct comp_dev *dev,
/* return if nothing to copy */
if (!frames) {
comp_warn(dev, "dai_zephyr_multi_endpoint_copy(): nothing to copy");

for (i = 0; i < num_endpoints; i++) {
ret = dma_reload(dd[i]->chan->dma->z_dev, dd[i]->chan->index, 0, 0, 0);
if (ret < 0) {
dai_report_xrun(dd[i], dev, 0);
return ret;
}
}

return 0;
}

Expand Down

0 comments on commit 56a6d0d

Please sign in to comment.