Pi 5 kernel crash in dmaengine ALSA path (dw_axi_dma) during I²S playback (PCM512x)

Open
#7,320 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
c, linux

Research direction

Start by reading the DMA and ALSA entry points named in the trace: axi_desc_get, dw_axi_dma_set_hw_desc, dw_axi_dma_chan_prep_cyclic, and snd_dmaengine_pcm_trigger. Reproduce continuous I²S playback on a Raspberry Pi 5 with a PCM512x DAC and compare the descriptor and IRQ behavior with the supplied kernel log. Done means the reproducible DMA error and kernel panic no longer occur under the reported workload.

Written by the indexing model from the issue text.

Description

Describe the bug

I am experiencing reproducible kernel crashes on Raspberry Pi 5 when using I²S DAC HATs with ALSA playback (via squeezelite).

The system is stable when audio playback is removed (loopback only), but crashes consistently after extended playback (hours).

Steps to reproduce the behaviour
  1. Boot Pi 5 with DAC HAT
  2. Start squeezelite using ALSA output to DAC
  3. Play continuous audio stream
  4. Wait several hours
  5. System crashes with DMA error + kernel panic
Device (s)

Raspberry Pi 5

System

rpi5-bug-report - System.txt

Logs

journalctl -k -b -1 -n 200
Apr 17 02:30:46 kitchen-pi kernel: dma dma2chan2: BUG: dma2chan2, IRQ with no descriptors
Apr 17 02:30:47 kitchen-pi kernel: Unable to handle kernel paging request at virtual address deaddeaddeaddead
Apr 17 02:30:47 kitchen-pi kernel: Mem abort info:
Apr 17 02:30:47 kitchen-pi kernel: ESR = 0x0000000096000004
Apr 17 02:30:47 kitchen-pi kernel: EC = 0x25: DABT (current EL), IL = 32 bits
Apr 17 02:30:47 kitchen-pi kernel: SET = 0, FnV = 0
Apr 17 02:30:47 kitchen-pi kernel: EA = 0, S1PTW = 0
Apr 17 02:30:47 kitchen-pi kernel: FSC = 0x04: level 0 translation fault
Apr 17 02:30:47 kitchen-pi kernel: Data abort info:
Apr 17 02:30:47 kitchen-pi kernel: ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000
Apr 17 02:30:47 kitchen-pi kernel: CM = 0, WnR = 0, TnD = 0, TagAccess = 0
Apr 17 02:30:47 kitchen-pi kernel: GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
Apr 17 02:30:47 kitchen-pi kernel: [deaddeaddeaddead] address between user and kernel address ranges
Apr 17 02:30:47 kitchen-pi kernel: Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP
Apr 17 02:30:47 kitchen-pi kernel: Modules linked in: aes_ce_blk snd_soc_pcm512x_i2c aes_ce_cipher ghash_ce gf128mul snd_soc_pcm512x sha2_ce binfmt_misc regmap_i2c spidev brcmfmac_wcc sha256_arm64 sh>
Apr 17 02:30:47 kitchen-pi kernel: CPU: 1 UID: 0 PID: 719 Comm: squeezelite-arm Not tainted 6.12.75+rpt-rpi-2712 #1 Debian 1:6.12.75-1+rpt1
Apr 17 02:30:47 kitchen-pi kernel: Hardware name: Raspberry Pi 5 Model B Rev 1.1 (DT)
Apr 17 02:30:47 kitchen-pi kernel: pstate: 804000c9 (Nzcv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
Apr 17 02:30:47 kitchen-pi kernel: pc : dma_pool_alloc+0x48/0x230
Apr 17 02:30:47 kitchen-pi kernel: lr : dma_pool_alloc+0x38/0x230
Apr 17 02:30:47 kitchen-pi kernel: sp : ffffc00082b139c0
Apr 17 02:30:47 kitchen-pi kernel: x29: ffffc00082b139c0 x28: ffff8000414c6a48 x27: ffff8000414c6a00
Apr 17 02:30:47 kitchen-pi kernel: x26: 0000000000000004 x25: 000000103a502d00 x24: 000000000004d440
Apr 17 02:30:47 kitchen-pi kernel: x23: ffff8000407e5b10 x22: ffffc00082b13a10 x21: 0000000000002900
Apr 17 02:30:47 kitchen-pi kernel: x20: deaddeaddeaddead x19: ffff8000407e5b00 x18: 0000000000000000
Apr 17 02:30:47 kitchen-pi kernel: x17: 0000000000000000 x16: ffffd06fcf1ed788 x15: 0000000000000000
Apr 17 02:30:47 kitchen-pi kernel: x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000
Apr 17 02:30:47 kitchen-pi kernel: x11: 0000000000000000 x10: 0000000000000000 x9 : ffffd06fce77b4b0
Apr 17 02:30:47 kitchen-pi kernel: x8 : 0000000000000002 x7 : 0000000000410000 x6 : ffff800002886698
Apr 17 02:30:47 kitchen-pi kernel: x5 : 00000000000a01c8 x4 : 0000000000000004 x3 : 000000000000c040
Apr 17 02:30:47 kitchen-pi kernel: x2 : 0000000000000001 x1 : 00000000000000c0 x0 : 0000000000000003
Apr 17 02:30:47 kitchen-pi kernel: Call trace:
Apr 17 02:30:47 kitchen-pi kernel: dma_pool_alloc+0x48/0x230
Apr 17 02:30:47 kitchen-pi kernel: axi_desc_get+0x4c/0xf0
Apr 17 02:30:47 kitchen-pi kernel: dw_axi_dma_set_hw_desc+0x118/0x380
Apr 17 02:30:47 kitchen-pi kernel: dw_axi_dma_chan_prep_cyclic+0x14c/0x278
Apr 17 02:30:47 kitchen-pi kernel: snd_dmaengine_pcm_trigger+0xe0/0x36f8 [snd_pcm_dmaengine]
Apr 17 02:30:47 kitchen-pi kernel: dmaengine_pcm_trigger+0x20/0x38 [snd_soc_core]
Apr 17 02:30:47 kitchen-pi kernel: snd_soc_pcm_component_trigger+0x160/0x238 [snd_soc_core]
Apr 17 02:30:47 kitchen-pi kernel: soc_pcm_trigger+0xe4/0x1f8 [snd_soc_core]
Apr 17 02:30:47 kitchen-pi kernel: snd_pcm_do_start+0x4c/0x80 [snd_pcm]
Apr 17 02:30:47 kitchen-pi kernel: snd_pcm_action_group+0x1ac/0x278 [snd_pcm]
Apr 17 02:30:47 kitchen-pi kernel: snd_pcm_action+0x4c/0xb0 [snd_pcm]
Apr 17 02:30:47 kitchen-pi kernel: snd_pcm_action_lock_irq+0x4c/0xb8 [snd_pcm]
Apr 17 02:30:47 kitchen-pi kernel: snd_pcm_common_ioctl+0xcd4/0x16c0 [snd_pcm]
Apr 17 02:30:47 kitchen-pi kernel: snd_pcm_ioctl+0x3c/0x60 [snd_pcm]
Apr 17 02:30:47 kitchen-pi kernel: __arm64_sys_ioctl+0xb4/0x100
Apr 17 02:30:47 kitchen-pi kernel: invoke_syscall+0x50/0x120
Apr 17 02:30:47 kitchen-pi kernel: el0_svc_common.constprop.0+0x48/0xf0
Apr 17 02:30:47 kitchen-pi kernel: do_el0_svc+0x24/0x38
Apr 17 02:30:47 kitchen-pi kernel: el0_svc+0x30/0xf8
Apr 17 02:30:47 kitchen-pi kernel: el0t_64_sync_handler+0x120/0x130
Apr 17 02:30:47 kitchen-pi kernel: el0t_64_sync+0x190/0x198
Apr 17 02:30:47 kitchen-pi kernel: Code: aa0003e1 f9400e74 b40002f4 f9401660 (f9400282)

Additional context

Key Observations

  • Issue occurs with multiple PCM512x-based DAC HATs
  • Does NOT occur when:
  • Output is redirected to ALSA loopback only
  • No local DAC playback is active
  • Pi 3B with same software stack is completely stable
  • Pi 5 runs indefinitely stable when not using I²S playback

Additional Notes

  • Appears to be related to DMA descriptor handling in cyclic audio playback
  • Possibly related to RP1 DMA engine or ALSA dmaengine integration
  • Issue persists across DAC HAT variants, suggesting not board-specific
Dominant language
C
Stars
13.2k
Forks
5.5k
Avg merge
2d 21h
Merged PRs (30d)
21

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raspberrypi/linux

All issues in raspberrypi/linux

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.