{{ message }}
Tools: Topology: SRC: Increase 48 kHz capture source buffer size#10162
Merged
Conversation
This patch fixes the issue in nocodec topologies with 48 kHz to 11.025 kHz capture. The root cause for the glitches is overrun of the capture DAI sink buffer. The currently used fractions in SRC in the particular conversion consume data in blocks of 80 frames. Depending on copy() run the consumption is 80 frames or zero frames. the normal 96 frames (2 * 48) buffer cannot fit all data from DAI when the previous SRC copy has not consumed enough data. The increase of ibs from default value of 384 to 512 results to DAI buffer of 128 frames for S32_LE stereo data at 48 kHz. It seems to be sufficiently large for the input buffer irregularity to produce clean captured audio. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
aa684e4 to
7fa6ad1
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This patch addresses a buffer size issue in 48 kHz to 11.025 kHz capture scenarios for nocodec topologies by adding an input buffer size configuration.
- Adds input buffer size (ibs) parameter to the 48 kHz SRC format configuration
- Sets buffer size to 512 bytes to resolve capture issues at specific sample rate conversions
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
The ibs parameter lacks documentation explaining why 512 bytes was chosen as the buffer size or how this value relates to the sample rate conversion requirements.
Suggested change
| in_valid_bit_depth 32 | |
| in_valid_bit_depth 32 | |
| # ibs (input buffer size) set to 512 bytes. | |
| # 512 bytes is a commonly used buffer size in audio processing, providing a balance between latency and CPU efficiency. | |
| # For 32-bit samples at 48kHz, this allows for efficient block processing and aligns with typical hardware period sizes. |
kv2019i
approved these changes
Aug 13, 2025
Collaborator
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.

This patch fixes the issue in nocodec topologies with 48 kHz to 11.025 kHz capture.