dma: dw: Align error code for xrun reporting

The hda driver uses -EPIPE to signal xrun, as proposed in the alsa lib
https://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html. This commit
changes the xrun error code in dw dma driver from -ENODATA to -EPIPE to
make it consistent across drivers.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
This commit is contained in:
Adrian Warecki 2023-01-19 13:29:01 +01:00 committed by Fabio Baltieri
commit 5d902ea621

View file

@ -786,7 +786,7 @@ int dw_dma_get_status(const struct device *dev, uint32_t channel,
#if CONFIG_DMA_DW_HW_LLI
if (!(dw_read(dev_cfg->base, DW_DMA_CHAN_EN) & DW_CHAN(channel))) {
LOG_ERR("xrun detected");
return -ENODATA;
return -EPIPE;
}
#endif
return 0;