ASoC: SOF: ipc4-topology: Change DeepBuffer from static to dynamic mode#5673
Open
ujfalusi wants to merge 2 commits intothesofproject:topic/sof-devfrom
Open
ASoC: SOF: ipc4-topology: Change DeepBuffer from static to dynamic mode#5673ujfalusi wants to merge 2 commits intothesofproject:topic/sof-devfrom
ujfalusi wants to merge 2 commits intothesofproject:topic/sof-devfrom
Conversation
Collaborator
ujfalusi
commented
Feb 19, 2026
Currently the DeepBuffer results static host DMA buffer and thus static minimum ALSA period size which can be a limiting factor for user space. DeepBuffer of static 100ms host DMA buffer can only be opened with at least 110ms ALSA period size, if for the same endpoint there is a need for smaller (or larger) buffer then a new PCM device must be created with different DeepBuffer configuration. This does not scale in real life. With Dynamic DeepBuffer the host DAM buffer size is calculated based on the requested ALSA period size (with a headroom between the two) using the DEEP_BUFFER token as a maximum limit for the host DMA buffer. This way applications can use the same DeepBuffer enabled PCM for different use cases and still benefit of the power saving of a bigger host DMA buffer. As an example, the DEEP_BUFFER in topology is set to 100ms (interpreted as maximum size with this patch): ALSA period time of 20ms will result 10ms host DMA Buffer - before the patch if 10ms host DMA buffer was desired, the minimum ALSA period size was 20ms ALSA period size of 50ms will result 40ms host DMA buffer - before the patch if 40ms host DMA buffer was desired, the minimum ALSA period size was 50ms ALSA period size of 110ms will result 100ms host DMA buffer - before the patch if 100ms host DMA buffer was desired, the minimum ALSA period size was 110ms ALSA period size of 500ms will result 100ms host DMA buffer - Like before this patch: 500ms ALSA period would use 100ms host DMA buffer The Dynamic DeepBuffer will give applications the means to choose between lower latency (small host DMA buffer) or higher power save (big host DMA buffer) with higher latency on the same device with topology providing a meaningful upper limit of the buffer size. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
…st_size_in_ms The meaning of the variable has changed with he Dynamic DeepBuffer and it reflects the smallest burst that the host DMA does. This can be used to set the minimum period time constraint to avoid overshooting by the DMA burst. Change the name and update the related code in Intel hda_dsp_pcm_open() to reflect the revised meaning. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Member
|
Collaborator
Author
The position and delay reporting is not affected by the change, everything works as it used to work. |
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.