Combinations of IO operations can cause "DMA transaction timed out" on Pi 5
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- c, linux, raspberry-pi
- Domain
- audio-video-rtc, embedded-iot, operating-systems
Research direction
Start by reproducing the failure with the listed spi-pipe and speaker-test commands on a Raspberry Pi 5, while monitoring dmesg. Investigate the interaction between SPI and I2S DMA transfers; done means concurrent traffic no longer produces DMA transaction timeouts or SPI transfer failures.
Written by the indexing model from the issue text.
Description
Describe the bug
This Issues is currently a placeholder while the details are being investigated, but some combination of SPI, I2C and I2S traffic can lead to kernel messages from spidev saying "DMA transaction timed out", and "SPI transfer failed: -110". So far it appears that a reboot is necessary to clear the condition.
Steps to reproduce the behaviour
With an I2S-based soundcard attached, and with other audio outputs disabled so that the I2S card is the default, running these commands seems to be sufficient.
$ sudo apt install spi-tools
$ sudo dtparam spi=on # or put "dtparam=spi=on" in config.txt
$ dmesg -W & # So you know when it's failed
$ while true; do cat /boot/firmware/config.txt | spi-pipe -b 500 -d /dev/spidev0.0; done &
$ speaker-test -c 2 > /dev/null
It dies soon after speaker-test is started.
Observations:
- Running spi-pipe with small byte counts (e.g.
-b 10) doesn't trigger the problem - presumably because DMA is not invoked for transfers below the SPI FIFO size (64 bytes). - I2S is another DMA user, so the problem may be due to simultaneous DMA usage.
Device (s)
Raspberry Pi 5
System
It's a Pi5 running a current Bookworm release and a self-built kernel (probably not required).
Logs
No response
Additional context
No response
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from raspberrypi/linux
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
raspberrypi/linux#7415 · 2 comments · 1 reaction ·
-
rp1-cfe doesn't forward V4L2_EVENT_SOURCE_CHANGE event from csi-2 sensor driver to userspace app Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
raspberrypi/linux#7399 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
raspberrypi/linux#7357 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
raspberrypi/linux#7054 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
raspberrypi/linux#7634 · 8 comments · 1 reaction ·
All issues in raspberrypi/linux
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
zephyrproject-rtos/zephyr#119726 ·
-
[Bounty proposal] fix(web): memory insights count an evening memory on the next day ($25 proposed) Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
BasedHardware/omi#15320 ·
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
HarbourMasters/Shipwright#7229 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
riscv-software-src/riscv-isa-sim#2435 · 1 comment ·