Repository navigation
Conversation
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.
Problem
On STM32F746G-DISCO, the DMA queue holds 256 audio frames (about 5.3 ms at 48 kHz).
wait_queue()usedDmod_ThreadSleep(1). With the firmware's 100 Hz FreeRTOS tick, that sleeps for up to 10 ms, so a writer waiting for room repeatedly misses the next DMA half-buffer and inserts silence.Change
Use one bounded semaphore per DMA direction. Half/full transfer interrupts wake TX writers and RX readers as soon as a completed half changes queue capacity. Error and stop paths also wake pending operations. The semaphores are allocated per stream and cleaned up with the DMA context. The port links
dmosifor this API.Verification
cmake --build build-review-f7 --target dmsai_port -j4passed for STM32F7.The test program is in choco-technologies/dmwm8994#2.