Skip to content

Fix audio DMA buffer allocation on RP2040 #10278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 22, 2025

Conversation

relic-se
Copy link

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
Copy link
Member

@tannewt tannewt left a comment

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
159 checks passed
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