Conversation
This was referenced Sep 21, 2026
Contributor
Author
|
Replaced by #2457 |
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.
The microphone decimator produces approximately 47,952 samples/s while the independent I2S clock consumes approximately 48,000. Copying whole input blocks into whichever output buffer is inactive eventually retransmits an old 512-sample block. Baseline desk captures reproduced this about every 10.53 seconds; changing the nominal divider alone still failed a longer capture.
Fill output buffers on I2S DMA completion and continuously read the input ring at a rate corrected from buffer occupancy. Retain the previously tested cubic interpolation, saturation, and one-block fade when establishing a read position. Original microphone clock, decimation, gain, buffer sizes, and I2S format remain unchanged.
This extracts only the clock-matching implementation from #2454: 79 added / 14 removed lines in one file, with no investigation tools or recordings. Startup output-memory initialization is separate in #2455; openpilot integration is commaai/openpilot#38984. This is a resampler and buffer-control change, not a one-line clock-divider fix.
Validation:
Remaining review: concurrent DMA/interrupt behavior under normal on-road workload, added capture latency, and resampling response. This addresses the reproduced repeated-block defect; it does not claim to eliminate every acoustic transient or the separate unexplained driving discontinuity.