sof
sof copied to clipboard
topology2: Revisit period and buffer size settings
topology2: Revisit period and buffer size settings
To be pragmatic about the period/buffer size values: period_size_min = 192 is for Stereo, S16_le, 48Khz, 1ms period_size_max = 19200 is for Stereo, S16_le, 48Khz, 100ms
The buffer size: buffer_size_min = 384 # period_size_min * periods_min buffer_size_max = 307200 # period_size_max * periods_max
On the deep buffer playback PCMs we should specify better period_size_min since the default 192 will cause DMA overrun on start since the DMA will fill the buffer on start: period_size_min = "$[(192 * $DEEPBUFFER_FW_DMA_MS)]" = 19200 by default period_size_max = period_size_min * 5 = 96000 by default buffer_size_min = period_size_min * periods_min = 384 by default buffer_size_max = period_size_max * periods_max = 1536000
Changes since v1:
- Be more pragmatic on the sizes and document them in commit message and in comments.
@ujfalusi any update here ? The pipeline base class should define teh default buffer sizes that can be overridden by derived classes. @ranj063 fyi.
Changes since v2:
- be more pragmatic and use a fixed period_size_max as 2097152.
- buffer_size_min = period_size_min * 2 (periods_min)
- buffer_size_max = period_size_max * 2 (twice as big)
- Deep Buffer only changes the buffer_size_min to avoid xrun on ALSA buffer (only with S16_LE, Stereo, 48K) as we have static value only