topology2: nocodec: add volume and mixer support

Mixer and volume (gain) are used in nocodec topology.

Signed-off-by: Rander Wang <rander.wang@intel.com>
This commit is contained in:
Rander Wang 2022-09-21 15:11:18 +08:00 committed by Ranjani Sridharan
parent b104f70c3d
commit 5594ad3512
1 changed files with 101 additions and 45 deletions

View File

@ -11,9 +11,10 @@
<pdm_config.conf> <pdm_config.conf>
<tokens.conf> <tokens.conf>
<virtual.conf> <virtual.conf>
<passthrough-playback.conf>
<passthrough-capture.conf> <passthrough-capture.conf>
<passthrough-be.conf> <passthrough-be.conf>
<host-copier-gain-mixin-playback.conf>
<mixout-gain-dai-copier-playback.conf>
<data.conf> <data.conf>
<pcm.conf> <pcm.conf>
<pcm_caps.conf> <pcm_caps.conf>
@ -116,13 +117,36 @@ Object.Dai {
# #
# Pipeline definitions # Pipeline definitions
# #
# PCM0 ---> gain ----> Mixin ----> Mixout ----> gain ----> SSP0
# PCM1 ---> gain ----> Mixin ----> Mixout ----> gain ----> SSP1
# PCM2 ---> gain ----> Mixin ----> Mixout ----> gain ----> SSP2
#
# SSP0 ----> PCM0
# SSP1 ----> PCM1
# SSP2 ----> PCM2
# Pipeline ID:1 PCM ID: 0 # Pipeline ID:1 PCM ID: 0
Object.Pipeline { Object.Pipeline {
# playback pipelines # playback pipelines
passthrough-be.1 { host-copier-gain-mixin-playback.1 {
index 2 index 1
direction playback
Object.Widget.pipeline.1 {
stream_name 'NoCodec-0'
}
Object.Widget.copier.1 {
stream_name 'SSP0 Playback'
}
Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Playback Volume 1'
}
}
}
mixout-gain-dai-copier-playback.1 {
index 2
Object.Widget.pipeline.1 { Object.Widget.pipeline.1 {
stream_name 'NoCodec-0' stream_name 'NoCodec-0'
} }
@ -134,21 +158,33 @@ Object.Pipeline {
stream_name "NoCodec-0" stream_name "NoCodec-0"
node_type $I2S_LINK_OUTPUT_CLASS node_type $I2S_LINK_OUTPUT_CLASS
} }
Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Main Playback Volume 2'
}
}
} }
passthrough-playback.1 { host-copier-gain-mixin-playback.2 {
index 1 index 3
Object.Widget.pipeline.1 { Object.Widget.pipeline.1 {
stream_name 'NoCodec-0' stream_name 'NoCodec-1'
} }
Object.Widget.copier.1 { Object.Widget.copier.1 {
stream_name 'SSP0 Playback' stream_name 'SSP1 Playback'
}
Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Playback Volume 3'
}
} }
} }
passthrough-be.2 { mixout-gain-dai-copier-playback.2 {
index 4 index 4
direction playback
Object.Widget.pipeline.1 { Object.Widget.pipeline.1 {
stream_name 'NoCodec-1' stream_name 'NoCodec-1'
} }
@ -160,42 +196,50 @@ Object.Pipeline {
stream_name "NoCodec-1" stream_name "NoCodec-1"
node_type $I2S_LINK_OUTPUT_CLASS node_type $I2S_LINK_OUTPUT_CLASS
} }
}
passthrough-playback.2 { Object.Widget.gain.1 {
index 3 Object.Control.mixer.1 {
Object.Widget.pipeline.1 { name 'Main Playback Volume 4'
stream_name 'NoCodec-1' }
}
Object.Widget.copier.1 {
stream_name 'SSP1 Playback'
} }
} }
passthrough-be.3 { host-copier-gain-mixin-playback.3 {
index 6
direction playback
Object.Widget.pipeline.1 {
stream_name 'NoCodec-2'
}
Object.Widget.copier.1 {
dai_index 2
dai_type "SSP"
copier_type "SSP"
stream_name "NoCodec-2"
node_type $I2S_LINK_OUTPUT_CLASS
}
}
passthrough-playback.3 {
index 5 index 5
Object.Widget.pipeline.1 { Object.Widget.pipeline.1 {
stream_name 'NoCodec-2' stream_name 'NoCodec-2'
} }
Object.Widget.copier.1 { Object.Widget.copier.1 {
stream_name 'SSP2 Playback' stream_name 'SSP2 Playback'
} }
Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Playback Volume 5'
}
}
}
mixout-gain-dai-copier-playback.3 {
index 6
Object.Widget.pipeline.1 {
stream_name 'NoCodec-2'
}
Object.Widget.copier.1 {
dai_index 1
dai_type "SSP"
copier_type "SSP"
stream_name "NoCodec-2"
node_type $I2S_LINK_OUTPUT_CLASS
}
Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Main Playback Volume 6'
}
}
} }
# capture pipelines # capture pipelines
@ -355,33 +399,45 @@ Object.PCM {
Object.Base { Object.Base {
route."1" { route."1" {
source "copier.host.1.1" source "gain.2.1"
sink "copier.SSP.2.1" sink "copier.SSP.2.1"
} }
route."2" { route."2" {
source "copier.host.3.1" source "mixin.1.1"
sink "copier.SSP.4.1" sink "mixout.2.1"
} }
route."3" { route."3" {
source "copier.host.5.1" source "gain.4.1"
sink "copier.SSP.6.1" sink "copier.SSP.4.1"
}
route."4" {
source "mixin.3.1"
sink "mixout.4.1"
} }
route."4" { route."5" {
source "gain.6.1"
sink "copier.SSP.6.1"
}
route."6" {
source "mixin.5.1"
sink "mixout.6.1"
}
route."7" {
source "copier.SSP.8.1" source "copier.SSP.8.1"
sink "copier.host.7.1" sink "copier.host.7.1"
} }
route."5" { route."8" {
source "copier.SSP.10.1" source "copier.SSP.10.1"
sink "copier.host.9.1" sink "copier.host.9.1"
} }
route."6" { route."9" {
source "copier.SSP.12.1" source "copier.SSP.12.1"
sink "copier.host.11.1" sink "copier.host.11.1"
} }
} }