Skip to content

Pin audiodsp at 4d6b62f and audioif at 7f1cd37: Ogg Vorbis files play, with the decoder in PSRAM on ESP32 (audiodsp#238, audioif#30) - #107

Merged
bdbarnett merged 1 commit into
mainfrom
pin-audiodsp-vorbis
Oct 12, 2026
Merged

bdbarnett merged 1 commit into
mainfrom
pin-audiodsp-vorbis

Conversation

@bdbarnett

Copy link
Copy Markdown
Contributor

Firmware built from these pins has audiovorbis.VorbisDecoder, which plays Ogg Vorbis files wherever audiomp3.MP3Decoder plays an MP3 (PyDevices/audiodsp#238). On ESP32 boards the decoder's state goes to PSRAM through audioif's new memory hooks (PyDevices/audioif#30).

The audiodsp move also brings audiodsp#237 (a Convolver reload keeps the audio in flight). The decoder adds about 90 KB to an ESP32-P4 image.

…, with the decoder in PSRAM on ESP32 (audiodsp#238, audioif#30)
@bdbarnett
bdbarnett merged commit 99a8023 into main Oct 12, 2026
3 checks passed
@bdbarnett
bdbarnett deleted the pin-audiodsp-vorbis branch October 12, 2026 21:42
bdbarnett added a commit that referenced this pull request Oct 19, 2026
…give (#14)

* _audioif.lock_probe(): ask FreeRTOS whether it refuses a non-owner's give

audiodsp#107 fixed two nodes that released the pump lock without ever having
taken it. On Windows that corrupted the CRITICAL_SECTION; glibc refuses a
non-owner's unlock with EPERM, measured. That FreeRTOS refuses it too --
which is why neither ESP32 board ever showed the defect -- was read out of
its source and never run (audiodsp#117).

This runs it. The interpreter takes the real pump mutex, a second FreeRTOS
task tries to give it, and the BaseType_t that comes back is the answer. It
does the same again with nobody holding the mutex, because that is the shape
#107's nodes were actually in -- a release with no take anywhere, rather
than a release of somebody else's take.

It is C rather than a script because the question is about a task that is not
the owner, which Python here cannot arrange: this port's `_thread` lock is a
binary semaphore, which has no owner at all and would answer a different
question very convincingly.

Safe to run. `xQueueGiveMutexRecursive` compares the holder against the
current task and returns pdFAIL when they differ; it does not assert. Nothing
in the audio path calls this.

* lock_probe: a control that must return 1

0 is what the FreeRTOS source predicts for both questions this asks, so a
probe that never ran, or whose give was broken for an unrelated reason,
returns exactly the expected answer and cannot be told from the truth. That
is this workspace's signature failure and it is not worth shipping a number
that has it.

So there is a third leg: a task that TAKES the mutex itself and then gives it
back, which must come back 1. A probe that cannot produce a 1 has not been
shown to be able to answer anything.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant