Skip to content

Commit 89e64f3

Browse files
committed
topology2: cavs-sdw: Add conditional tone gen pipeline
Add a tone generator pipeline to the speaker playback path and enable it conditionally. Signed-off-by: Ranjani Sridharan <[email protected]>
1 parent d2ff232 commit 89e64f3

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

tools/topology/topology2/cavs-sdw.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<tokens.conf>
1313
<virtual.conf>
1414
<host-copier-gain-mixin-playback.conf>
15+
<virtual-siggen-mixin-playback.conf>
1516
<mixout-gain-alh-dai-copier-playback.conf>
1617
<mixout-gain-micsel-eqiir-eqfir-alh-dai-copier-playback.conf>
1718
<mixout-gain-eqiir-eqfir-drc-alh-dai-copier-playback.conf>
@@ -105,6 +106,7 @@ Define {
105106
SDW_AMP_XOVER_SELECTOR_PARAMS default
106107
SDW_AMP_XOVER_EQIIR_PARAMS default
107108
SDW_AMP_XOVER_EQFIR_PARAMS default
109+
SPK_TONE_PLAYBACK false
108110
}
109111

110112
# override defaults with platform-specific config

tools/topology/topology2/platform/intel/sdw-amp-generic.conf

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,21 @@ IncludeByKey.PASSTHROUGH {
5050
}
5151
}
5252
]
53+
IncludeByKey.SPK_TONE_PLAYBACK {
54+
"true" {
55+
virtual-siggen-mixin-playback [
56+
{
57+
index 25
5358

59+
Object.Widget.virtual.1 {
60+
name 'virtual.siggen'
61+
stream_name "Speaker Tone Playback"
62+
type "input"
63+
}
64+
}
65+
]
66+
}
67+
}
5468
IncludeByKey.SDW_SPK_ENHANCED_PLAYBACK {
5569
"true" {
5670
mixout-gain-eqiir-eqfir-drc-alh-dai-copier-playback [
@@ -581,6 +595,31 @@ Object.PCM.pcm [
581595
}
582596
}
583597
]
598+
IncludeByKey.PASSTHROUGH {
599+
"false" {
600+
IncludeByKey.SPK_TONE_PLAYBACK {
601+
"true" {
602+
Object.PCM.pcm [
603+
{
604+
name "TONE_GEN"
605+
id 21
606+
direction "playback"
607+
Object.Base.fe_dai.1 {
608+
name "TONE_GEN"
609+
}
610+
611+
Object.PCM.pcm_caps.1 {
612+
direction "playback"
613+
name "Speaker Tone Playback"
614+
formats 'S32_LE'
615+
rates '48000'
616+
}
617+
}
618+
]
619+
}
620+
}
621+
}
622+
}
584623

585624
IncludeByKey.PASSTHROUGH {
586625
"false" {
@@ -602,6 +641,20 @@ IncludeByKey.PASSTHROUGH {
602641
]
603642
}
604643
}
644+
IncludeByKey.SPK_TONE_PLAYBACK {
645+
"true" {
646+
Object.Base.route [
647+
{
648+
source "virtual.siggen"
649+
sink "siggen.25.1"
650+
}
651+
{
652+
source 'mixin.25.1'
653+
sink 'mixout.21.1'
654+
}
655+
]
656+
}
657+
}
605658
Object.Base.route [
606659
{
607660
source 'mixin.20.1'

0 commit comments

Comments
 (0)