[PATCH] ALSA: hda/core: Log stream DMA errors on interrupt

Arun Raghavan <[email protected]> Mon, 3 Aug 2026 15:07:52 -0700
Newsgroups gmane.linux.sound,gmane.linux.kernel
Message-ID <[email protected]>
The stream descriptor status register reports FIFO and descriptor
errors, but these are currently cleared silently along with the rest
of the interrupt status. Log them, rate-limited, so DMA problems are
visible instead of only manifesting as audible glitches.

Observed on some AMD GPU HDMI audio controllers under specific low power
circumstances.

Signed-off-by: Arun Raghavan <[email protected]>
Cc: Arun Raghavan <[email protected]>
---
 sound/hda/core/controller.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sound/hda/core/controller.c b/sound/hda/core/controller.c
index 69e11d62bbfa..5f1d2c132cec 100644
--- a/sound/hda/core/controller.c
+++ b/sound/hda/core/controller.c
@@ -682,6 +682,11 @@ int snd_hdac_bus_handle_stream_irq(struct hdac_bus *bu=
s, unsigned int status,
 =09=09=09sd_status =3D snd_hdac_stream_readb(azx_dev, SD_STS);
 =09=09=09snd_hdac_stream_writeb(azx_dev, SD_STS, SD_INT_MASK);
 =09=09=09handled |=3D 1 << azx_dev->index;
+=09=09=09if (sd_status & (SD_INT_FIFO_ERR | SD_INT_DESC_ERR)) {
+=09=09=09=09dev_warn_ratelimited(bus->dev,
+=09=09=09=09=09=09"stream %u dma error: 0x%02x\n",
+=09=09=09=09=09=09azx_dev->index, sd_status);
+=09=09=09}
 =09=09=09if ((!azx_dev->substream && !azx_dev->cstream) ||
 =09=09=09    !azx_dev->running || !(sd_status & SD_INT_COMPLETE))
 =09=09=09=09continue;

---
base-commit: 848acc8ffe1b7cd5f1bf427b93069becfebc2c9d
change-id: 20260803-master-48a36c6e70e0

Best regards,
--=20
Arun Raghavan <[email protected]>