Skip to content

Commit 7ac7b2c

Browse files
committed
topology2: cavs: fix WoV pipeline routing
The SoundWire topology cannot instantiate the existing WoV pipeline. It does not import the KPB or detector classes, and its DAI route names a widget that cannot exist because copier names use their stream name. Import the required classes and move the DAI-to-KPB route to dmic-wov. Fix the KPB output pin target, describe the host copier input formats, and set the 16 kHz PCM constraints so hw_params can select the mono detector path. Parameterize the KPB UUID, keeping the IPC3 default while allowing IPC4 targets to select kpb4. Signed-off-by: Gaggery Tsai <gaggery.tsai@intel.com>
1 parent 331b378 commit 7ac7b2c

5 files changed

Lines changed: 62 additions & 26 deletions

File tree

tools/topology/topology2/cavs-sdw.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
<src.conf>
3636
<io-gateway.conf>
3737
<io-gateway-capture.conf>
38+
<input_pin_binding.conf>
39+
<output_pin_binding.conf>
40+
<dai-kpb-be.conf>
41+
<wov-detect.conf>
3842
<highpass-capture-be.conf>
3943
<data.conf>
4044
<pcm.conf>

tools/topology/topology2/include/components/kpb.conf

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212
#
1313
# Where N is the unique instance number for the kpb object within the same alsaconf node.
1414

15+
# Keep the IPC3 UUID as the default. IPC4 topologies must select kpb4 by
16+
# overriding KPB_UUID in the top-level topology.
17+
Define {
18+
KPB_UUID "43:84:21:d8:f3:5f:4c:4a:b3:88:6c:fe:07:b9:56:2e"
19+
}
20+
1521
Class.Widget."kpb" {
1622
#
1723
# Pipeline ID for the kpb object
@@ -67,8 +73,7 @@ Class.Widget."kpb" {
6773
num_input_audio_formats 1
6874
num_output_audio_formats 1
6975

70-
#UUID: D8218443-5FF3-4A4C-B388-6CFE07B9562E
71-
uuid "43:84:21:d8:f3:5f:4c:4a:b3:88:6c:fe:07:b9:56:2e"
76+
uuid $KPB_UUID
7277
no_pm "true"
7378
cpc 720000
7479
num_input_pins 1

tools/topology/topology2/include/pipelines/cavs/dai-kpb-be.conf

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,8 @@ Class.Pipeline."dai-kpb-be" {
125125
}
126126
}
127127

128-
Object.Base {
129-
route."1" {
130-
source "dai-copier.DMIC.$index.1"
131-
sink "kpb.$index.1"
132-
}
133-
}
128+
# DAI copier names contain the stream name instead of the pipeline
129+
# index. The instantiating topology must provide the route to KPB.
134130

135131
time_domain "timer"
136132
dynamic_pipeline 1

tools/topology/topology2/platform/intel/dmic-default.conf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ Define {
2525
DMIC1_HOST_PIPELINE_ID 18
2626
DMIC1_DAI_PIPELINE_ID 19
2727
WOV_PIPELINE_ID 20
28-
DMIC1_HOST_PIPELINE_SINK 'copier.host.18.1'
29-
DMIC_WOV_DAI_PIPELINE_SRC 'dai-copier.DMIC.dmic16k.capture'
30-
DMIC_WOV_DAI_PIPELINE_KPB 'kpb.19.1'
31-
WOV_PIPELINE_SINK 'micsel.20.1'
32-
WOV_PIPELINE_VIRTUAL 'virtual.detect_sink'
3328
INCLUDE_WOV 'false'
3429
# The UUID corresponds to the test detect component
3530
WOV_UUID '1f:d5:a8:eb:27:78:b5:47:82:ee:de:6e:77:43:af:67'

tools/topology/topology2/platform/intel/dmic-wov.conf

Lines changed: 49 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,41 @@ Object.Pipeline {
99

1010
Object.Widget.host-copier.1 {
1111
stream_name $DMIC1_PCM_CAPS
12-
pcm_id 11
13-
num_output_audio_formats 2
12+
pcm_id $DMIC1_PCM_ID
13+
num_input_audio_formats 3
14+
num_output_audio_formats 3
15+
Object.Base.input_audio_format [
16+
{
17+
in_rate 16000
18+
in_channels 1
19+
in_ch_cfg $CHANNEL_CONFIG_MONO
20+
in_ch_map $CHANNEL_MAP_MONO
21+
in_bit_depth 32
22+
in_valid_bit_depth 32
23+
}
24+
{
25+
in_rate 16000
26+
in_bit_depth 32
27+
in_valid_bit_depth 32
28+
}
29+
{
30+
in_rate 16000
31+
in_channels 4
32+
in_bit_depth 32
33+
in_valid_bit_depth 32
34+
in_ch_cfg $CHANNEL_CONFIG_3_POINT_1
35+
in_ch_map $CHANNEL_MAP_3_POINT_1
36+
}
37+
]
1438
Object.Base.output_audio_format [
39+
{
40+
out_rate 16000
41+
out_channels 1
42+
out_ch_cfg $CHANNEL_CONFIG_MONO
43+
out_ch_map $CHANNEL_MAP_MONO
44+
out_bit_depth 32
45+
out_valid_bit_depth 32
46+
}
1547
{
1648
out_rate 16000
1749
out_bit_depth 32
@@ -84,10 +116,10 @@ Object.Pipeline {
84116

85117
Object.Widget.kpb.1 {
86118
Object.Base.output_pin_binding.1 {
87-
output_pin_binding_name $WOV_PIPELINE_SINK
119+
output_pin_binding_name "micsel.$WOV_PIPELINE_ID.1"
88120
}
89121
Object.Base.output_pin_binding.2 {
90-
output_pin_binding_name $DMIC1_HOST_PIPELINE_SINK
122+
output_pin_binding_name "host-copier.$DMIC1_PCM_ID.capture"
91123
}
92124
Object.Base.output_pin_binding.3 {
93125
output_pin_binding_name "NotConnected"
@@ -111,23 +143,27 @@ Object.Pipeline {
111143

112144
Object.Base.route [
113145
{
114-
source $DMIC_WOV_DAI_PIPELINE_KPB
115-
sink "host-copier.11.capture"
146+
source "dai-copier.DMIC.$DMIC1_NAME.capture"
147+
sink "kpb.$DMIC1_DAI_PIPELINE_ID.1"
148+
}
149+
{
150+
source "kpb.$DMIC1_DAI_PIPELINE_ID.1"
151+
sink "host-copier.$DMIC1_PCM_ID.capture"
116152
}
117153
{
118-
source $DMIC_WOV_DAI_PIPELINE_KPB
119-
sink $WOV_PIPELINE_SINK
154+
source "kpb.$DMIC1_DAI_PIPELINE_ID.1"
155+
sink "micsel.$WOV_PIPELINE_ID.1"
120156
}
121157
{
122-
source $WOV_PIPELINE_VIRTUAL
123-
sink "host-copier.11.capture"
158+
source "virtual.detect_sink"
159+
sink "host-copier.$DMIC1_PCM_ID.capture"
124160
}
125161
]
126162

127163
Object.PCM.pcm [
128164
{
129165
name "DMIC16k"
130-
id 11
166+
id $DMIC1_PCM_ID
131167
direction "capture"
132168
capture_compatible_d0i3 true
133169
Object.Base.fe_dai.1 {
@@ -136,10 +172,10 @@ Object.PCM.pcm [
136172

137173
Object.PCM.pcm_caps.1 {
138174
name $DMIC1_PCM_CAPS
139-
# only 32-bit capture supported now
140175
formats 'S32_LE'
141-
channels_min $NUM_DMICS
176+
channels_min 1
142177
channels_max $NUM_DMICS
178+
rates '16000'
143179
rate_min 16000
144180
rate_max 16000
145181
}

0 commit comments

Comments
 (0)