Repository navigation
Fix synthio crashing ESP32-S2 and S3 boards when playing through I2S - #11967
Open
mikeysklar wants to merge 1 commit into
Open
mikeysklar wants to merge 1 commit into
mikeysklar wants to merge 1 commit into
Conversation
adafruit#11923 moved Espressif I2S refill to its own task. A Synthesizer refill steps its blocks with mp_iternext(), which starts with mp_cstack_check(). That check measures against the main task stack, so on the fill task it raises RecursionError, and the jump back onto the main task's stack faults. Reading the list directly has no stack check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Synthio no longer crashes when I2S audio refills on its own task.
Why
Since #11923, a synthesizer playing through
I2SOuthard faults right afterplay().mp_iternext()checks the main task's stack, so on the fill task it raises.Testing
Each run is a power-on, then a read of
supervisor.runtime.safe_mode_reason. Five of the ten addsynth.blocks.append(synthio.LFO(rate=2)).Listened on a Metro ESP32-P4 with a MAX98357 amp at 20% volume, 44100 Hz: a clean synthio tone, no fault.
🤖 Generated with Claude Code