Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda/core: Log stream DMA errors on interrupt
@ 2026-08-03 22:07 Arun Raghavan
  2026-08-04 11:21 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Arun Raghavan @ 2026-08-03 22:07 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai
  Cc: linux-sound, linux-kernel, Arun Raghavan, Arun Raghavan

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 <arunr@valvesoftware.com>
Cc: Arun Raghavan <arun@arunraghavan.net>
---
 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 *bus, unsigned int status,
 			sd_status = snd_hdac_stream_readb(azx_dev, SD_STS);
 			snd_hdac_stream_writeb(azx_dev, SD_STS, SD_INT_MASK);
 			handled |= 1 << azx_dev->index;
+			if (sd_status & (SD_INT_FIFO_ERR | SD_INT_DESC_ERR)) {
+				dev_warn_ratelimited(bus->dev,
+						"stream %u dma error: 0x%02x\n",
+						azx_dev->index, sd_status);
+			}
 			if ((!azx_dev->substream && !azx_dev->cstream) ||
 			    !azx_dev->running || !(sd_status & SD_INT_COMPLETE))
 				continue;

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

Best regards,
-- 
Arun Raghavan <arunr@valvesoftware.com>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-08-04 11:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-03 22:07 [PATCH] ALSA: hda/core: Log stream DMA errors on interrupt Arun Raghavan
2026-08-04 11:21 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox