You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ASoC: SOF: ipc4-topology: Change DeepBuffer from static to dynamic mode
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 DMA buffer size is calculated based on the
requested ALSA period size 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: 8 -> dma buffer: 4 ms
ALSA period: 10 -> dma buffer: 6 ms
ALSA period: 16 -> dma buffer: 12 ms
ALSA period: 19 -> dma buffer: 15 ms
ALSA period: 20 -> dma buffer: 20 ms
ALSA period: 50 -> dma buffer: 50 ms
ALSA period: 100 -> dma buffer: 100 ms
ALSA period: 150 -> dma buffer: 100 ms
ALSA period: 2000 -> dma buffer: 100 ms
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>
0 commit comments