Skip to content

Fix audio DMA buffer allocation on RP2040 - #10278

Merged
tannewt merged 1 commit into
adafruit:mainfrom
relic-se:rp2040_dma_buffer_realloc
Apr 22, 2025
Merged

tannewt merged 1 commit into
adafruit:mainfrom
relic-se:rp2040_dma_buffer_realloc

Conversation

@relic-se

Copy link
Copy Markdown

Recent additions in #10240 throw buffer allocation errors on RP2040 devices. The exact cause is unknown, but is likely "due to the Python VM heap taking up most of the outer heap (allocated via port_malloc using tlsf)." @tannewt

The RP2040 does not support PSRAM, so port_malloc should be unnecessary in this case. All relevant code is reverted to the original implementation if compiling for an RP2040-based device.

Tested on a Waveshare RP2040-Zero and Pimoroni Pico Plus 2 with I2S audio output.

Fixes #10256

@dhalbert
dhalbert requested a review from tannewt April 21, 2025 23:04

@tannewt tannewt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@tannewt
tannewt merged commit 443f829 into adafruit:main Apr 22, 2025
@relic-se
relic-se deleted the rp2040_dma_buffer_realloc branch March 25, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error allocating DMA buffers for I2SOut playback

2 participants