Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

topology2: Revisit period and buffer size settings #8925

Merged
merged 3 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions tools/topology/topology2/include/common/pcm_caps.conf
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ Class.PCM."pcm_caps" {
formats "S32_LE,S24_LE,S16_LE"
rates "48000"
periods_min 2
periods_max 16
periods_max 1024
channels_min 2
channels_max 2
period_size_min 192
period_size_max 16384
buffer_size_min 65536
buffer_size_max 65536
period_size_min 192 # "$[((2 * $channels_min) * 48000) / 1000]" (48K, S16_LE, 1ms)
period_size_max 2097152 # Large enough to cover user's needs
buffer_size_min 384 # "$[$period_size_min * $periods_min]"
buffer_size_max 4194304 # "$[2 * $period_size_max]"
}
22 changes: 16 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,14 @@ 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
# To avoid DMA spinning on a buffer we need bigger
# buffer than the host buffer size, let's say twice as
# big
# (S16_LE, Stereo, 48KHz, DEEPBUFFER_FW_DMA_MS) * 2
#
# Note: The lower limit for the buffer size is rate
# dependent
buffer_size_min "$[(((2 * $channels_min) * 48) * $DEEPBUFFER_FW_DMA_MS) * 2]"
}
}
]
Expand Down Expand Up @@ -83,9 +88,14 @@ 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
# To avoid DMA spinning on a buffer we need bigger
# buffer than the host buffer size, let's say twice as
# big
# (S16_LE, Stereo, 48KHz, DEEPBUFFER_FW_DMA_MS) * 2
#
# Note: The lower limit for the buffer size is rate
# dependent
buffer_size_min "$[(((2 * $channels_min) * 48) * $DEEPBUFFER_FW_DMA_MS) * 2]"
}
}
]
Expand Down