Skip to content

Use lower-prio IRQ on Pico to decompress AAC/MP3#85

Merged
earlephilhower merged 1 commit into
masterfrom
irqu
Oct 27, 2025
Merged

Use lower-prio IRQ on Pico to decompress AAC/MP3#85
earlephilhower merged 1 commit into
masterfrom
irqu

Conversation

@earlephilhower
Copy link
Copy Markdown
Owner

Fixes #84

On the Pico, when decoding AAC or MP3, it can spend a long time in an IRQ state, blocking other IRQs from processing. While we need to run asynchronously, we don't need to block other IRQs.

When a DMA IRQ fires and calls us to generate the next frame, fire another low priority IRQ and return immediately. In the worst case we still run ahead of the app with just a little overhead. In the best case we don't block GPIO or USB interrupts.

@earlephilhower
Copy link
Copy Markdown
Owner Author

earlephilhower commented Oct 26, 2025

TODO - if @mglazzari-qinmotion reports this works, I'll apply it to AAC as well.

Fixes #84

On the Pico, when decoding AAC or MP3, it can spend a long time in
an IRQ state, blocking other IRQs from processing.  While we need
to run asynchronously, we don't need to block other IRQs.

When a DMA IRQ fires and calls us to generate the next frame,
fire another low priority IRQ and return immediately.  In the worst
case we still run ahead of the app with just a little overhead.
In the best case we don't block GPIO or USB interrupts.
@earlephilhower earlephilhower merged commit 713b6d6 into master Oct 27, 2025
9 checks passed
@earlephilhower earlephilhower deleted the irqu branch October 27, 2025 14:45
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.

Other interrupts delayed while playing

1 participant