Skip to content

Commit

Permalink
topology2: Revisit period and buffer size settings
Browse files Browse the repository at this point in the history
There is no reason to limit the buffer_size_max and the minimum limit is
periods_min * period_size_min.

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.
Adjust the buffer_size_min also at the same time.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
  • Loading branch information
ujfalusi committed Mar 8, 2024
1 parent 1f87ffc commit b764575
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
6 changes: 3 additions & 3 deletions tools/topology/topology2/include/common/pcm_caps.conf
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ Class.PCM."pcm_caps" {
periods_max 16
channels_min 2
channels_max 2
period_size_min 192
period_size_min 192 # Stereo, S16_LE, 48KHz, 1ms
period_size_max 16384
buffer_size_min 65536
buffer_size_max 65536
buffer_size_min 384 # period_size_min * 2
buffer_size_max -1
}
14 changes: 8 additions & 6 deletions tools/topology/topology2/platform/intel/deep-buffer.conf
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ Object.PCM.pcm [
Object.PCM.pcm_caps.1 {
name $DEEP_BUFFER_PCM_NAME
formats 'S16_LE,S24_LE,S32_LE'
# align with $DEEPBUFFER_FW_DMA_MS
period_size_max 65535
buffer_size_max 262144
# Stereo, S16_LE, 48KHz, DEEPBUFFER_FW_DMA_MS
period_size_min "$[(192 * $DEEPBUFFER_FW_DMA_MS)]"
period_size_max 65535
buffer_size_min "$[$period_size_min * 2]"
}
}
]
Expand Down Expand Up @@ -83,9 +84,10 @@ IncludeByKey.DEEP_BUF_SPK {
Object.PCM.pcm_caps.1 {
name $DEEP_BUFFER_PCM_NAME_2
formats 'S16_LE,S24_LE,S32_LE'
# align with $DEEPBUFFER_FW_DMA_MS
period_size_max 65535
buffer_size_max 262144
# Stereo, S16_LE, 48KHz, DEEPBUFFER_FW_DMA_MS
period_size_min "$[(192 * $DEEPBUFFER_FW_DMA_MS)]"
period_size_max 65535
buffer_size_min "$[$period_size_min * 2]"
}
}
]
Expand Down

0 comments on commit b764575

Please sign in to comment.