topology2: add wov-detect pipeline

wov-detect pipeline contains a micsel component, a wov component
and a virtual component. micsel component accepts 2 channels audio data and
output 1 channel audio data to the wov component. wov's keyword is a clap.
The virtual component is only used by the driver, and the FW will not
know that there is a virtual component in the pipeline. The virtual
component is used to connect the pipeline to a host copier pipeline
as per drivers requirement.

Signed-off-by: Libin Yang <libin.yang@intel.com>
This commit is contained in:
Libin Yang 2022-11-15 13:36:16 +08:00 committed by Liam Girdwood
parent 884322bfb9
commit 62075a44e3
1 changed files with 124 additions and 0 deletions

View File

@ -0,0 +1,124 @@
#
# wov detection pipeline
#
# A wov detection pipeline. All attributes defined herein are namespaced
# by alsatplg to "Object.Pipeline.wov-detect.N.attribute_name".
#
# Usage: wov-detect pipeline object can be instantiated as:
#
# Object.Pipeline.wov-detect."N" {
# format "s16le"
# period 1000
# time_domain "timer"
# channels 2
# rate 48000
# }
#
# Where N is the unique pipeline ID within the same alsaconf node.
#
<include/common/audio_format.conf>
<include/components/copier.conf>
<include/components/micsel.conf>
<include/components/wov.conf>
<include/components/pipeline.conf>
<include/controls/bytes.conf>
<common_definitions.conf>
Class.Pipeline."wov-detect" {
DefineAttribute."index" {}
<include/pipelines/pipeline-common.conf>
attributes {
!constructor [
"index"
]
!mandatory [
"format"
]
!immutable [
"direction"
]
#
# wov-detect objects instantiated within the same alsaconf node must have
# unique pipeline_id attribute
#
unique "instance"
}
Object.Widget {
# virtual widget is only used in driver to connect wov widget
# to the host copier. The virtual widget does not exist in
# the firmware.
virtual."virtual.detect_sink" {
type out_drv
}
micsel."1" {
Object.Base.audio_format.1 {
in_rate 16000
out_rate 16000
in_channels 2
out_channels 1
in_ch_map CHANNEL_MAP_STEREO
in_ch_cfg 1
out_ch_map CHANNEL_MAP_MONO
out_ch_cfg 0
out_bit_depth 32
in_bit_depth 32
in_valid_bit_depth 32
out_valid_bit_depth 32
}
}
wov."1" {
Object.Base.audio_format.1 {
in_rate 16000
out_rate 16000
in_channels 1
out_channels 1
in_ch_cfg 0
in_ch_map CHANNEL_MAP_MONO
out_bit_depth 32
in_bit_depth 32
in_valid_bit_depth 32
out_valid_bit_depth 32
ibs 0x80
obs 0x80
}
}
pipeline."1" {
priority 0
lp_mode 0
}
}
Object.Base {
route."1" {
source "micsel..1"
sink "wov..1"
}
route."2" {
source "wov..1"
sink "virtual.detect_sink"
}
}
direction "capture"
dynamic_pipeline 1
time_domain "timer"
channels 2
channels_min 2
channels_max 2
rate 16000
rate_min 16000
rate_max 16000
}