Skip to content

Commit

Permalink
tools: topology2: sof-plugin: Add an option for mixin-mixout pipeline…
Browse files Browse the repository at this point in the history
…s for playback

This will be useful to test volume controls with the plugin.

Signed-off-by: Ranjani Sridharan <[email protected]>
  • Loading branch information
ranj063 authored and kv2019i committed Sep 13, 2024
1 parent 08754de commit 89e417a
Show file tree
Hide file tree
Showing 2 changed files with 201 additions and 50 deletions.
249 changes: 200 additions & 49 deletions tools/topology/topology2/development/sof-plugin.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
<tokens.conf>
<host-gateway-capture.conf>
<host-gateway-playback.conf>
<mixout-gain-dai-copier-playback.conf>
<host-copier-gain-mixin-playback.conf>
<io-gateway-capture.conf>
<io-gateway.conf>
<data.conf>
Expand All @@ -22,6 +24,7 @@
<common_definitions.conf>
<dai-copier.conf>
<module-copier.conf>
<gain.conf>
<pipeline.conf>
<input_audio_format.conf>
<output_audio_format.conf>
Expand Down Expand Up @@ -87,57 +90,185 @@ Object.Pipeline.host-gateway-capture [
}
]

Object.Pipeline.io-gateway [
{
index 4
direction playback
IncludeByKey.PLAYBACK_PROCESS {
"passthrough" {
Object.Pipeline.io-gateway [
{
index 4
direction playback

Object.Widget.dai-copier.1 {
dai_index 1
dai_type "SSP"
copier_type "SSP"
stream_name "NoCodec-1"
node_type $I2S_LINK_OUTPUT_CLASS
num_input_audio_formats 1
Object.Base.input_audio_format [
{
in_bit_depth 16
in_valid_bit_depth 16
Object.Widget.dai-copier.1 {
dai_index 1
dai_type "SSP"
copier_type "SSP"
stream_name "NoCodec-1"
node_type $I2S_LINK_OUTPUT_CLASS
num_input_audio_formats 1
Object.Base.input_audio_format [
{
in_bit_depth 16
in_valid_bit_depth 16
}
]
num_output_audio_formats 1
Object.Base.output_audio_format [
{
out_bit_depth 16
out_valid_bit_depth 16
}
]
}
]
num_output_audio_formats 1
Object.Base.output_audio_format [
{
out_bit_depth 16
out_valid_bit_depth 16
}
]
Object.Pipeline.host-gateway-playback [
{
index 3
Object.Widget.host-copier.1 {
stream_name 'SSP1 Playback'
pcm_id 1
num_input_audio_formats 1
Object.Base.input_audio_format [
{
in_bit_depth 16
in_valid_bit_depth 16
}
]
num_output_audio_formats 1
Object.Base.output_audio_format [
{
out_bit_depth 16
out_valid_bit_depth 16
}
]
}
]
}
}
]
}
]
Object.Pipeline.host-gateway-playback [
{
index 3
Object.Widget.host-copier.1 {
stream_name 'SSP1 Playback'
pcm_id 1
num_input_audio_formats 1
Object.Base.input_audio_format [
{
in_bit_depth 16
in_valid_bit_depth 16
"mix" {
Object.Pipeline.mixout-gain-dai-copier-playback [
{
index 4

Object.Widget.dai-copier.1 {
dai_index 1
dai_type "SSP"
copier_type "SSP"
stream_name "NoCodec-1"
node_type $I2S_LINK_OUTPUT_CLASS
num_input_audio_formats 1
Object.Base.input_audio_format [
{
in_bit_depth 16
in_valid_bit_depth 16
}
]
num_output_audio_formats 1
Object.Base.output_audio_format [
{
out_bit_depth 16
out_valid_bit_depth 16
}
]
}
]
num_output_audio_formats 1
Object.Base.output_audio_format [
{
out_bit_depth 16
out_valid_bit_depth 16
Object.Widget.gain.1 {
curve_type "windows_fade"
Object.Control.mixer.1 {
name 'Post Mixer PlugPCM Playback Volume'
}
num_input_audio_formats 1
Object.Base.input_audio_format [
{
in_bit_depth 16
in_valid_bit_depth 16
}
]
num_output_audio_formats 1
Object.Base.output_audio_format [
{
out_bit_depth 16
out_valid_bit_depth 16
}
]
}
]
}
Object.Widget.mixout.1 {
num_input_audio_formats 1
Object.Base.input_audio_format [
{
in_bit_depth 16
in_valid_bit_depth 16
}
]
num_output_audio_formats 1
Object.Base.output_audio_format [
{
out_bit_depth 16
out_valid_bit_depth 16
}
]
}
}
]
Object.Pipeline.host-copier-gain-mixin-playback [
{
index 3
Object.Widget.host-copier.1 {
stream_name 'SSP1 Playback'
pcm_id 1
num_input_audio_formats 1
Object.Base.input_audio_format [
{
in_bit_depth 16
in_valid_bit_depth 16
}
]
num_output_audio_formats 1
Object.Base.output_audio_format [
{
out_bit_depth 16
out_valid_bit_depth 16
}
]
}
Object.Widget.gain.1 {
curve_type "windows_fade"
Object.Control.mixer.1 {
name 'Pre Mixer PlugPCM Playback Volume'
}
num_input_audio_formats 1
Object.Base.input_audio_format [
{
in_bit_depth 16
in_valid_bit_depth 16
}
]
num_output_audio_formats 1
Object.Base.output_audio_format [
{
out_bit_depth 16
out_valid_bit_depth 16
}
]
}
Object.Widget.mixin.1 {
num_input_audio_formats 1
Object.Base.input_audio_format [
{
in_bit_depth 16
in_valid_bit_depth 16
}
]
num_output_audio_formats 1
Object.Base.output_audio_format [
{
out_bit_depth 16
out_valid_bit_depth 16
}
]
}
}
]
}
]
}

Object.PCM.pcm [
{
Expand Down Expand Up @@ -188,9 +319,29 @@ IncludeByKey.NOISE_SUPPRESSION {
}
}

Object.Base.route [
{
source "host-copier.1.playback"
sink "dai-copier.SSP.NoCodec-1.playback"
IncludeByKey.PLAYBACK_PROCESS {
"passthrough" {
Object.Base.route [
{
source "host-copier.1.playback"
sink "dai-copier.SSP.NoCodec-1.playback"
}
]
}
]
"mix" {
Object.Base.route [
{
source "host-copier.1.playback"
sink "gain.3.1"
}
{
source "mixin.3.1"
sink "mixout.4.1"
}
{
source "gain.4.1"
sink "dai-copier.SSP.NoCodec-1.playback"
}
]
}
}
2 changes: 1 addition & 1 deletion tools/topology/topology2/development/tplg-targets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,DMIC1_RATE=16000,\
DMIC1_ENABLE=MFCC,DMIC1_MFCC_PARAMS=default"

# Topology for SOF plugin
"development/sof-plugin\;sof-plugin\;NOISE_SUPPRESSION=false"
"development/sof-plugin\;sof-plugin\;NOISE_SUPPRESSION=false,PLAYBACK_PROCESS=passthrough"

# mtl-rt5650 with AEC but not DTS
"cavs-rt5682\;sof-mtl-rt5650-google-aec\;PLATFORM=mtl,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,\
Expand Down

0 comments on commit 89e417a

Please sign in to comment.