Skip to content

Commit

Permalink
topology2: deep-buffer: Add second instance
Browse files Browse the repository at this point in the history
Add 2nd deepbuff PCM as an option.

Signed-off-by: Yong Zhi <[email protected]>
  • Loading branch information
yongzhi1 committed Nov 2, 2023
1 parent e62e333 commit 0bd0066
Showing 1 changed file with 58 additions and 2 deletions.
60 changes: 58 additions & 2 deletions tools/topology/topology2/platform/intel/deep-buffer.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Define {
DEEP_BUF_2 false
}

Object.Pipeline.deepbuffer-playback [
{
index $DEEP_BUFFER_PIPELINE_ID
Expand All @@ -9,7 +13,7 @@ Object.Pipeline.deepbuffer-playback [

Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Deepbuffer Volume'
name 'Pre Mixer $DEEP_BUFFER_PCM_NAME Volume'
}
}
}
Expand All @@ -23,7 +27,7 @@ Object.PCM.pcm [
playback_compatible_d0i3 $DEEPBUFFER_D0I3_COMPATIBLE

Object.Base.fe_dai.1 {
name "DeepBuffer"
name "$DEEP_BUFFER_PCM_NAME"
}

Object.PCM.pcm_caps.1 {
Expand All @@ -46,3 +50,55 @@ Object.Base.route [
sink gain.$DEEP_BUFFER_PIPELINE_ID.1
}
]

# Spawn another instance
IncludeByKey.DEEP_BUF_2 {
"true" {
Object.Pipeline.deepbuffer-playback [
{
index $DEEP_BUFFER_PIPELINE_ID_2

Object.Widget.host-copier.1 {
stream_name $DEEP_BUFFER_PCM_NAME_2
pcm_id $DEEP_BUFFER_PCM_ID_2
}
Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Pre Mixer $DEEP_BUFFER_PCM_NAME_2 Volume'
}
}
}
]

Object.PCM.pcm [
{
name $DEEP_BUFFER_PCM_NAME_2
id $DEEP_BUFFER_PCM_ID_2
direction playback
playback_compatible_d0i3 $DEEPBUFFER_D0I3_COMPATIBLE

Object.Base.fe_dai.1 {
name "$DEEP_BUFFER_PCM_NAME_2"
}
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
}
}
]

Object.Base.route [
{
source $DEEP_BUFFER_PIPELINE_SRC_2
sink $DEEP_BUFFER_PIPELINE_SINK_2
}
{
source host-copier.$DEEP_BUFFER_PCM_ID_2.playback
sink gain.$DEEP_BUFFER_PIPELINE_ID_2.1
}
]
}
}

0 comments on commit 0bd0066

Please sign in to comment.