Skip to content

Commit 4e5ab1f

Browse files
bardliaolgirdwood
authored andcommitted
topology2: split echo reference part from sdw topologies
Currently, we implement the echo reference pipeline, widgets, routes in the SoundWire config files. It is hard to create a stand alone echo reference topology for the function topology usages. This commit moves the echo reference part from the original config file and include the new echo reference in the original file. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
1 parent c56cc5f commit 4e5ab1f

4 files changed

Lines changed: 162 additions & 150 deletions

File tree

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
Define {
2+
SDW_SPK_ECHO_REF_PCM_ID 12
3+
SDW_SPK_ECHO_REF_PIPELINE_ID 120
4+
}
5+
6+
IncludeByKey.SDW_SPK_ECHO_REF {
7+
"true" {
8+
Object.Pipeline {
9+
siggen-host-copier-capture [
10+
{
11+
direction "capture"
12+
index $SDW_SPK_ECHO_REF_PIPELINE_ID
13+
Object.Widget.host-copier."1" {
14+
stream_name "Speaker Echo Reference"
15+
pcm_id $SDW_SPK_ECHO_REF_PCM_ID
16+
}
17+
Object.Widget.siggen."1" {}
18+
}
19+
]
20+
}
21+
22+
Object.PCM.pcm [
23+
{
24+
name "Speaker Echo Reference"
25+
id $SDW_SPK_ECHO_REF_PCM_ID
26+
direction "capture"
27+
Object.Base.fe_dai.1 {
28+
name "Speaker Echo Reference"
29+
}
30+
Object.PCM.pcm_caps.1 {
31+
name "Speaker Echo Reference"
32+
formats 'S16_LE,S24_LE,S32_LE'
33+
}
34+
}
35+
]
36+
37+
Object.Base.route [
38+
{
39+
source "alh-copier.Loopback_Virtual.25"
40+
sink "siggen.$SDW_SPK_ECHO_REF_PIPELINE_ID.1"
41+
}
42+
{
43+
source "module-copier.21.22"
44+
sink "siggen.$SDW_SPK_ECHO_REF_PIPELINE_ID.1"
45+
}
46+
{
47+
source "siggen.$SDW_SPK_ECHO_REF_PIPELINE_ID.1"
48+
sink "host-copier.$SDW_SPK_ECHO_REF_PCM_ID.capture"
49+
}
50+
]
51+
} # SDW_SPK_ECHO_REF true
52+
}

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

Lines changed: 1 addition & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ Define {
1313
AMP_FEEDBACK_CH_PER_LINK 2
1414
SDW_AMP_FEEDBACK true
1515
AMP_PLAYBACK_NAME 'Speaker Playback'
16-
SDW_SPK_ECHO_REF_PCM_ID 12
17-
SDW_SPK_ECHO_REF_PIPELINE_ID 120
1816
}
1917

2018
# include deep buffer config if buffer size is in 1 - 1000 ms.
@@ -1032,49 +1030,5 @@ IncludeByKey.SDW_AMP_FEEDBACK {
10321030
}
10331031

10341032
IncludeByKey.SDW_SPK_ECHO_REF {
1035-
"true" {
1036-
Object.Pipeline {
1037-
siggen-host-copier-capture [
1038-
{
1039-
direction "capture"
1040-
index $SDW_SPK_ECHO_REF_PIPELINE_ID
1041-
Object.Widget.host-copier."1" {
1042-
stream_name "Speaker Echo Reference"
1043-
pcm_id $SDW_SPK_ECHO_REF_PCM_ID
1044-
}
1045-
Object.Widget.siggen."1" {}
1046-
}
1047-
]
1048-
}
1049-
1050-
Object.PCM.pcm [
1051-
{
1052-
name "Speaker Echo Reference"
1053-
id $SDW_SPK_ECHO_REF_PCM_ID
1054-
direction "capture"
1055-
Object.Base.fe_dai.1 {
1056-
name "Speaker Echo Reference"
1057-
}
1058-
Object.PCM.pcm_caps.1 {
1059-
name "Speaker Echo Reference"
1060-
formats 'S16_LE,S24_LE,S32_LE'
1061-
}
1062-
}
1063-
]
1064-
1065-
Object.Base.route [
1066-
{
1067-
source "alh-copier.Loopback_Virtual.25"
1068-
sink "siggen.$SDW_SPK_ECHO_REF_PCM_ID.1"
1069-
}
1070-
{
1071-
source "module-copier.21.22"
1072-
sink "siggen.$SDW_SPK_ECHO_REF_PCM_ID.1"
1073-
}
1074-
{
1075-
source "siggen.$SDW_SPK_ECHO_REF_PCM_ID.1"
1076-
sink "host-copier.$SDW_SPK_ECHO_REF_PCM_ID.capture"
1077-
}
1078-
]
1079-
} # SDW_SPK_ECHO_REF true
1033+
"true" "platform/intel/sdw-amp-echo-ref.conf"
10801034
}
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
Define {
2+
SDW_JACK_ECHO_REF_PCM_ID 11
3+
SDW_JACK_ECHO_REF_PIPELINE_ID 12
4+
}
5+
6+
IncludeByKey.SDW_JACK_ECHO_REF {
7+
"true" {
8+
Object.Pipeline {
9+
siggen-host-copier-capture [
10+
{
11+
direction "capture"
12+
index $SDW_JACK_ECHO_REF_PIPELINE_ID
13+
Object.Widget.host-copier."1" {
14+
stream_name "Jack Echo Reference"
15+
pcm_id $SDW_JACK_ECHO_REF_PCM_ID
16+
num_input_audio_formats 1
17+
Object.Base.input_audio_format [
18+
{
19+
in_rate $JACK_RATE
20+
in_bit_depth 32
21+
in_valid_bit_depth 32
22+
}
23+
]
24+
num_output_audio_formats 3
25+
Object.Base.output_audio_format [
26+
{
27+
out_rate $JACK_RATE
28+
out_bit_depth 16
29+
out_valid_bit_depth 16
30+
}
31+
{
32+
out_rate $JACK_RATE
33+
out_bit_depth 32
34+
out_valid_bit_depth 24
35+
}
36+
{
37+
out_rate $JACK_RATE
38+
out_bit_depth 32
39+
out_valid_bit_depth 32
40+
}
41+
]
42+
}
43+
Object.Widget.siggen."1" {
44+
num_input_pins 1
45+
num_output_pins 1
46+
num_input_audio_formats 1
47+
num_output_audio_formats 1
48+
Object.Base.input_audio_format [
49+
{
50+
in_rate $JACK_RATE
51+
in_bit_depth 32
52+
in_valid_bit_depth 32
53+
}
54+
]
55+
Object.Base.output_audio_format [
56+
{
57+
out_rate $JACK_RATE
58+
out_bit_depth 32
59+
out_valid_bit_depth 32
60+
}
61+
]
62+
}
63+
}
64+
]
65+
}
66+
67+
Object.PCM.pcm [
68+
{
69+
name "Jack Echo Reference"
70+
id $SDW_JACK_ECHO_REF_PCM_ID
71+
direction "capture"
72+
Object.Base.fe_dai.1 {
73+
name "Jack Echo Reference"
74+
}
75+
Object.PCM.pcm_caps.1 {
76+
name "Jack Echo Reference"
77+
formats 'S16_LE,S24_LE,S32_LE'
78+
}
79+
IncludeByKey.JACK_RATE {
80+
"48000" {
81+
rates '48000'
82+
}
83+
"96000" {
84+
rates '96000'
85+
}
86+
"192000" {
87+
rates '192000'
88+
}
89+
}
90+
}
91+
]
92+
93+
Object.Base.route [
94+
{
95+
source "alh-copier.Loopback_Virtual.25"
96+
sink "siggen.$SDW_JACK_ECHO_REF_PIPELINE_ID.1"
97+
}
98+
{
99+
source "module-copier.1.12"
100+
sink "siggen.$SDW_JACK_ECHO_REF_PIPELINE_ID.1"
101+
}
102+
{
103+
source "siggen.$SDW_JACK_ECHO_REF_PIPELINE_ID.1"
104+
sink "host-copier.$SDW_JACK_ECHO_REF_PCM_ID.capture"
105+
}
106+
]
107+
} # SDW_JACK_ECHO_REF true
108+
}

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

Lines changed: 1 addition & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ Define {
1111
JACK_PLAYBACK_PCM_NAME "Jack Out"
1212
JACK_CAPTURE_PCM_NAME "Jack In"
1313
JACK_RATE 48000
14-
SDW_JACK_ECHO_REF_PCM_ID 11
15-
SDW_JACK_ECHO_REF_PIPELINE_ID 12
1614
}
1715

1816
#
@@ -739,105 +737,5 @@ IncludeByKey.PASSTHROUGH {
739737
}
740738

741739
IncludeByKey.SDW_JACK_ECHO_REF {
742-
"true" {
743-
Object.Pipeline {
744-
siggen-host-copier-capture [
745-
{
746-
direction "capture"
747-
index $SDW_JACK_ECHO_REF_PIPELINE_ID
748-
Object.Widget.host-copier."1" {
749-
stream_name "Jack Echo Reference"
750-
pcm_id $SDW_JACK_ECHO_REF_PCM_ID
751-
num_input_audio_formats 1
752-
Object.Base.input_audio_format [
753-
{
754-
in_rate $JACK_RATE
755-
in_bit_depth 32
756-
in_valid_bit_depth 32
757-
}
758-
]
759-
num_output_audio_formats 3
760-
Object.Base.output_audio_format [
761-
{
762-
out_rate $JACK_RATE
763-
out_bit_depth 16
764-
out_valid_bit_depth 16
765-
}
766-
{
767-
out_rate $JACK_RATE
768-
out_bit_depth 32
769-
out_valid_bit_depth 24
770-
}
771-
{
772-
out_rate $JACK_RATE
773-
out_bit_depth 32
774-
out_valid_bit_depth 32
775-
}
776-
]
777-
}
778-
Object.Widget.siggen."1" {
779-
num_input_pins 1
780-
num_output_pins 1
781-
num_input_audio_formats 1
782-
num_output_audio_formats 1
783-
Object.Base.input_audio_format [
784-
{
785-
in_rate $JACK_RATE
786-
in_bit_depth 32
787-
in_valid_bit_depth 32
788-
}
789-
]
790-
Object.Base.output_audio_format [
791-
{
792-
out_rate $JACK_RATE
793-
out_bit_depth 32
794-
out_valid_bit_depth 32
795-
}
796-
]
797-
}
798-
}
799-
]
800-
}
801-
802-
Object.PCM.pcm [
803-
{
804-
name "Jack Echo Reference"
805-
id $SDW_JACK_ECHO_REF_PCM_ID
806-
direction "capture"
807-
Object.Base.fe_dai.1 {
808-
name "Jack Echo Reference"
809-
}
810-
Object.PCM.pcm_caps.1 {
811-
name "Jack Echo Reference"
812-
formats 'S16_LE,S24_LE,S32_LE'
813-
}
814-
IncludeByKey.JACK_RATE {
815-
"48000" {
816-
rates '48000'
817-
}
818-
"96000" {
819-
rates '96000'
820-
}
821-
"192000" {
822-
rates '192000'
823-
}
824-
}
825-
}
826-
]
827-
828-
Object.Base.route [
829-
{
830-
source "alh-copier.Loopback_Virtual.25"
831-
sink "siggen.$SDW_JACK_ECHO_REF_PIPELINE_ID.1"
832-
}
833-
{
834-
source "module-copier.1.12"
835-
sink "siggen.$SDW_JACK_ECHO_REF_PIPELINE_ID.1"
836-
}
837-
{
838-
source "siggen.$SDW_JACK_ECHO_REF_PIPELINE_ID.1"
839-
sink "host-copier.$SDW_JACK_ECHO_REF_PCM_ID.capture"
840-
}
841-
]
842-
} # SDW_JACK_ECHO_REF true
740+
"true" "platform/intel/sdw-jack-echo-ref.conf"
843741
}

0 commit comments

Comments
 (0)