From 08dee140d58b6b303913d6791c9eef8e7b0037ad Mon Sep 17 00:00:00 2001 From: Libin Yang Date: Wed, 21 Dec 2022 11:43:34 +0800 Subject: [PATCH 1/8] topology2: move payload_with_output_fmt into process token set The token payload_with_output_fmt is process module specific, so set it as a process module token. Signed-off-by: Chao Song Signed-off-by: Libin Yang --- tools/topology/topology2/include/common/tokens.conf | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/topology/topology2/include/common/tokens.conf b/tools/topology/topology2/include/common/tokens.conf index 3d23a2647e64..670102a4faed 100644 --- a/tools/topology/topology2/include/common/tokens.conf +++ b/tools/topology/topology2/include/common/tokens.conf @@ -21,10 +21,6 @@ Object.Base.VendorToken { # the widget name that the queue is connected from/to. sink_pin_binding_wname 413 src_pin_binding_wname 414 - # Token payload_with_output_fmt specifies whether there is - # output audio format in the init instance ipc4 message - # payload. - payload_with_output_fmt 415 } "sof_tkn_dai" { @@ -111,6 +107,12 @@ Object.Base.VendorToken { } + "sof_tkn_process" { + # Token payload_with_output_fmt specifies whether there is + # output audio format in the init instance ipc4 message payload. + payload_with_output_fmt 901 + } + "sof_tkn_stream" { playback_compatible_d0i3 "1200" capture_compatible_d0i3 "1201" From 38d4a9d1d49fee9bb1cc0e3ea858ac82bdccb79e Mon Sep 17 00:00:00 2001 From: Libin Yang Date: Fri, 13 May 2022 09:01:30 +0800 Subject: [PATCH 2/8] topology2: add micsel support Add the audio channel selection component support. In case 1 output channel is selected, the component provides the selected channel on output. In case 2 or 4 channels are selected on output, the component works in a passthrough mode. Signed-off-by: Libin Yang --- .../topology2/include/components/micsel.conf | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 tools/topology/topology2/include/components/micsel.conf diff --git a/tools/topology/topology2/include/components/micsel.conf b/tools/topology/topology2/include/components/micsel.conf new file mode 100644 index 000000000000..32b42966579e --- /dev/null +++ b/tools/topology/topology2/include/components/micsel.conf @@ -0,0 +1,95 @@ +# +# Common widget micsel +# +# A generic micsel widget. All attributes defined herein are namespaced +# by alsatplg to "Object.Widget.micsel.N.attribute_name" +# +# Usage: this component can be used by instantiating it in the parent object. i.e. +# +# Object.Widget.micsel."N" { +# +# } +# +# Where N is the unique instance number for the micsel object within the same alsaconf node. + +Class.Widget."micsel" { + # + # Pipeline ID for the micsel object + # + DefineAttribute."index" {} + + # + # Micsel object instance + # + DefineAttribute."instance" {} + + DefineAttribute."cpc" { + # Token set reference name and type + token_ref "sof_tkn_comp.word" + } + + DefineAttribute."num_audio_formats" { + # Token set reference name and type + token_ref "sof_tkn_comp.word" + } + + #include common component definition + + + # + # micsel component UUID + # + DefineAttribute."uuid" { + type "string" + # Token set reference name and type + token_ref "sof_tkn_comp.uuid" + } + + DefineAttribute."payload_with_output_fmt" { + # Token set reference name and type + token_ref "sof_tkn_process.bool" + } + + attributes { + # + # The micsel widget name would be constructed using the index and + # instance attributes. For example: "micsel.0.1". + # + !constructor [ + "index" + "instance" + ] + + # + # mandatory attributes that must be provided when the class is instantiated + # + !mandatory [ + "no_pm" + "uuid" + ] + + # + # immutable attributes cannot be modified in the object instance + # + !immutable [ + "uuid" + ] + + unique "instance" + } + + # + # Default attributes for micsel + # + type "effect" + payload_with_output_fmt 1 + + num_audio_formats 1 + #UUID: 32FE92C1-1E17-4FC2-9758-C7F3542E980A + uuid "c1:92:fe:32:17:1e:c2:4f:97:58:c7:f3:54:2e:98:0a" + no_pm "true" + core_id 0 + cpc 29000 + num_sink_pins 1 + num_source_pins 1 +} From d774ae99104521d1ed6f7eda948c37e8ab24786f Mon Sep 17 00:00:00 2001 From: Libin Yang Date: Wed, 18 May 2022 19:35:43 +0800 Subject: [PATCH 3/8] topology2: add kpb support Add the kpb component support. kpb component is used to transfer the data to the proper pipeline based on the WOV component events. Signed-off-by: Libin Yang --- .../topology2/include/components/kpb.conf | 89 +++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 tools/topology/topology2/include/components/kpb.conf diff --git a/tools/topology/topology2/include/components/kpb.conf b/tools/topology/topology2/include/components/kpb.conf new file mode 100644 index 000000000000..6a9bc76e78fa --- /dev/null +++ b/tools/topology/topology2/include/components/kpb.conf @@ -0,0 +1,89 @@ +# +# Widget kpb +# +# A kpb widget. All attributes defined herein are namespaced +# by alsatplg to "Object.Widget.kpb.N.attribute_name" +# +# Usage: this component can be used by instantiating it in the parent object. i.e. +# +# Object.Widget.kpb."N" { +# +# } +# +# Where N is the unique instance number for the kpb object within the same alsaconf node. + +Class.Widget."kpb" { + # + # Pipeline ID for the kpb object + # + DefineAttribute."index" {} + + # + # Kpb object instance + # + DefineAttribute."instance" {} + + DefineAttribute."cpc" { + # Token set reference name and type + token_ref "sof_tkn_comp.word" + } + + DefineAttribute."num_audio_formats" { + # Token set reference name and type + token_ref "sof_tkn_comp.word" + } + + #include common component definition + + + # + # kpb component UUID + # + DefineAttribute."uuid" { + type "string" + # Token set reference name and type + token_ref "sof_tkn_comp.uuid" + } + + attributes { + # + # The kpb widget name would be constructed using the index and + # instance attributes. For example: "kpb.0.1". + # + !constructor [ + "index" + "instance" + ] + + # + # mandatory attributes that must be provided when the class is instantiated + # + !mandatory [ + "no_pm" + "uuid" + ] + + # + # immutable attributes cannot be modified in the object instance + # + !immutable [ + "uuid" + ] + + unique "instance" + } + + # + # Default attributes for kpb + # + type "effect" + + num_audio_formats 1 + #UUID: D8218443-5FF3-4A4C-B388-6CFE07B9562E + uuid "43:84:21:d8:f3:5f:4c:4a:b3:88:6c:fe:07:b9:56:2e" + no_pm "true" + core_id 0 + cpc 720000 + num_sink_pins 1 + num_source_pins 2 +} From 32dc55a87ee385771b4b5f9007412bdad307ca45 Mon Sep 17 00:00:00 2001 From: Libin Yang Date: Tue, 24 May 2022 21:08:54 +0800 Subject: [PATCH 4/8] topology2: add wov support Add the wov module support. The keyword of the wov is the sound of clap. Signed-off-by: Libin Yang --- .../topology2/include/components/wov.conf | 108 ++++++++++++++++++ .../platform/intel/test-wov-init-payload.conf | 10 ++ 2 files changed, 118 insertions(+) create mode 100644 tools/topology/topology2/include/components/wov.conf create mode 100644 tools/topology/topology2/platform/intel/test-wov-init-payload.conf diff --git a/tools/topology/topology2/include/components/wov.conf b/tools/topology/topology2/include/components/wov.conf new file mode 100644 index 000000000000..093fa2756e40 --- /dev/null +++ b/tools/topology/topology2/include/components/wov.conf @@ -0,0 +1,108 @@ +# +# wov widget +# +# A wov widget. This is a generic class, which will be used for multiple types of wov +# widget, and the wov widgets can be distinguished from one another with different UUID's. +# All attributes defined herein are namespaced +# by alsatplg to "Object.Widget.wov.N.attribute_name" +# +# Usage: this component can be used by instantiating it in the parent object. i.e. +# +# Object.Widget.wov."N" { +# uuid $WOV_UUID +# } +# +# Where N is the unique instance number for the wov object within the same alsaconf node. + +Class.Widget."wov" { + # + # Pipeline ID for the wov object + # + DefineAttribute."index" {} + + # + # wov object instance + # + DefineAttribute."instance" {} + + DefineAttribute."cpc" { + # Token set reference name and type + token_ref "sof_tkn_comp.word" + } + + DefineAttribute."num_audio_formats" { + # Token set reference name and type + token_ref "sof_tkn_comp.word" + } + + #include common component definition + + + # + # wov component UUID + # + DefineAttribute."uuid" { + type "string" + # Token set reference name and type + token_ref "sof_tkn_comp.uuid" + } + + DefineAttribute."is_pages" { + # Token set reference name and type + token_ref "sof_tkn_comp.word" + } + + attributes { + # + # The wov widget name would be constructed using the index and + # instance attributes. For example: "wov.0.1". + # + !constructor [ + "index" + "instance" + ] + + # + # mandatory attributes that must be provided when the class is instantiated + # + !mandatory [ + "no_pm" + "uuid" + ] + + # + # immutable attributes cannot be modified in the object instance + # + !immutable [ + "type" + ] + + unique "instance" + } + + Object.Control.bytes."1" { + name wov_init + access [ + tlv_read + tlv_callback + ] + Object.Base.extops."extctl" { + get 258 + put 0 + } + max 4096 + IncludeByKey.WOV_UUID { + '1f:d5:a8:eb:27:78:b5:47:82:ee:de:6e:77:43:af:67' "platform/intel/test-wov-init-payload.conf" + } + } + + # + # Default attributes for wov + # + type "effect" + num_audio_formats 1 + no_pm "true" + core_id 0 + num_sink_pins 1 + num_source_pins 0 +} diff --git a/tools/topology/topology2/platform/intel/test-wov-init-payload.conf b/tools/topology/topology2/platform/intel/test-wov-init-payload.conf new file mode 100644 index 000000000000..48dece18d158 --- /dev/null +++ b/tools/topology/topology2/platform/intel/test-wov-init-payload.conf @@ -0,0 +1,10 @@ +# The first 32 bytes is: +# struct sof_ipc4_abi_hdr { +# __u32 size; +# __u32 abi; +# __u32 blob_type; +# __u32 param_id; +# __u32 reserved[3]; +# __u32 data[]; +# } __packed; +Object.Base.data."testwov_InitPayload" {bytes "0x53, 0x4f, 0x46, 0x34, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x1f, 0x00, 0x00, 0x34, 0x08, 0x00, 0x00"} From 19b0108266d7bc0c2c5b8d8dbfd67dcb4151c8b5 Mon Sep 17 00:00:00 2001 From: Libin Yang Date: Tue, 15 Nov 2022 13:36:16 +0800 Subject: [PATCH 5/8] 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 --- .../include/pipelines/cavs/wov-detect.conf | 124 ++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 tools/topology/topology2/include/pipelines/cavs/wov-detect.conf diff --git a/tools/topology/topology2/include/pipelines/cavs/wov-detect.conf b/tools/topology/topology2/include/pipelines/cavs/wov-detect.conf new file mode 100644 index 000000000000..52f651f3f92c --- /dev/null +++ b/tools/topology/topology2/include/pipelines/cavs/wov-detect.conf @@ -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. +# + + + + + + + + + +Class.Pipeline."wov-detect" { + + DefineAttribute."index" {} + + + + 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 +} From 020a5fe4629b6633be9d4be42e10d9d8d362c71d Mon Sep 17 00:00:00 2001 From: Libin Yang Date: Thu, 22 Dec 2022 09:53:21 +0800 Subject: [PATCH 6/8] topology2: add dai-kpb-be pipeline dai-kpb-be pipeline contains a copier DAI component and a kpb component. Signed-off-by: Libin Yang --- .../include/pipelines/cavs/dai-kpb-be.conf | 135 ++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 tools/topology/topology2/include/pipelines/cavs/dai-kpb-be.conf diff --git a/tools/topology/topology2/include/pipelines/cavs/dai-kpb-be.conf b/tools/topology/topology2/include/pipelines/cavs/dai-kpb-be.conf new file mode 100644 index 000000000000..ad4d90081aa7 --- /dev/null +++ b/tools/topology/topology2/include/pipelines/cavs/dai-kpb-be.conf @@ -0,0 +1,135 @@ +# +# BE dai-kpb pipeline +# +# All attributes defined herein are namespaced by alsatplg to +# "Object.Pipeline.dai-kpb-be.N.attribute_name" +# +# Usage: dai-kpb-be pipeline object can be instantiated as: +# +# Object.Pipeline.dai-kpb-be."N" { +# direction "playback" +# period 1000 +# time_domain "timer" +# channels 2 +# rate 48000 +# } +# +# Where N is the unique pipeline ID within the same alsaconf node. +# + + + + + + +Class.Pipeline."dai-kpb-be" { + + DefineAttribute."index" {} + + + + attributes { + !constructor [ + "index" + ] + + # + # dai-kpb-be objects instantiated within the same alsaconf node must have + # unique pipeline_id attribute + # + unique "instance" + } + + Object.Widget { + copier."1" { + type dai_in + node_type $HDA_LINK_OUTPUT_CLASS + num_audio_formats 3 + # 32-bit 48KHz 2ch + Object.Base.audio_format.3 { + in_bit_depth 32 + in_valid_bit_depth 24 + out_bit_depth 32 + out_valid_bit_depth 24 + dma_buffer_size "$[$obs * 2]" + } + + Object.Base.audio_format.1 { + in_bit_depth 32 + in_valid_bit_depth 32 + out_bit_depth 32 + out_valid_bit_depth 32 + dma_buffer_size "$[$obs * 2]" + } + # 32-bit 48KHz 4ch + Object.Base.audio_format.2 { + in_channels 4 + in_bit_depth 32 + in_valid_bit_depth 32 + out_channels 4 + out_bit_depth 32 + out_valid_bit_depth 32 + dma_buffer_size "$[$obs * 2]" + in_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + in_ch_map $CHANNEL_MAP_3_POINT_1 + out_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + out_ch_map $CHANNEL_MAP_3_POINT_1 + } + } + + kpb."1" { + num_audio_formats 2 + Object.Base.audio_format.1 { + in_rate 16000 + out_rate 16000 + obs 128 + in_ch_cfg $CHANNEL_CONFIG_STEREO + in_ch_map $CHANNEL_MAP_STEREO + out_ch_cfg $CHANNEL_CONFIG_STEREO + out_ch_map $CHANNEL_MAP_STEREO + in_channels 2 + out_channels 2 + out_bit_depth 32 + in_bit_depth 32 + in_valid_bit_depth 32 + out_valid_bit_depth 32 + } + Object.Base.audio_format.2 { + in_rate 16000 + out_rate 16000 + obs 128 + in_ch_cfg $CHANNEL_CONFIG_4_POINT_0 + in_ch_map $CHANNEL_MAP_3_POINT_1 + out_ch_cfg $CHANNEL_CONFIG_4_POINT_0 + out_ch_map $CHANNEL_MAP_3_POINT_1 + in_channels 4 + out_channels 4 + out_bit_depth 32 + in_bit_depth 32 + in_valid_bit_depth 32 + out_valid_bit_depth 32 + } + } + + pipeline."1" { + priority 0 + lp_mode 0 + } + } + + Object.Base { + route."1" { + source "copier.DMIC..1" + sink "kpb..1" + } + } + + time_domain "timer" + dynamic_pipeline 1 + channels 2 + channels_min 2 + channels_max 2 + rate 48000 + rate_min 48000 + rate_max 48000 +} From f30a883fca4d9c5f070ce7557304585ce64e99aa Mon Sep 17 00:00:00 2001 From: Libin Yang Date: Sun, 11 Dec 2022 19:51:39 +0800 Subject: [PATCH 7/8] topology2: add dmic-wov.conf The dmic-wov.conf file implements the WOV feature. The connection is DMIC ------> KPB ------------------------------> host_copier | ^ | | |----> micsel ----> wov ------> virtual_widget The DMIC and KPB is on DAI ppl. The host_copier is on Host ppl. The micsel, wov and virtual is on wov ppl. The connection between host_copier and virtual_widget is a virtual connection. The virtual_widget doesn't exist in the FW. Signed-off-by: Libin Yang --- .../platform/intel/dmic-default.conf | 14 ++ .../platform/intel/dmic-generic.conf | 4 + .../topology2/platform/intel/dmic-wov.conf | 137 ++++++++++++++++++ 3 files changed, 155 insertions(+) create mode 100644 tools/topology/topology2/platform/intel/dmic-wov.conf diff --git a/tools/topology/topology2/platform/intel/dmic-default.conf b/tools/topology/topology2/platform/intel/dmic-default.conf index 9ea2c5187e8f..543ae9e1b84d 100644 --- a/tools/topology/topology2/platform/intel/dmic-default.conf +++ b/tools/topology/topology2/platform/intel/dmic-default.conf @@ -19,4 +19,18 @@ Define { DMIC1_NAME dmic16k DMIC0_PCM_CAPS "Passthrough Capture 11" DMIC0_PIPELINE_STREAM_NAME "copier.DMIC.12.1" + DMIC1_HOST_PIPELINE_ID 18 + DMIC1_DAI_PIPELINE_ID 19 + WOV_PIPELINE_ID 20 + DMIC1_HOST_PIPELINE_SINK 'copier.host.18.1' + DMIC_WOV_DAI_PIPELINE_SRC 'copier.DMIC.19.1' + DMIC_WOV_DAI_PIPELINE_KPB 'kpb.19.1' + WOV_PIPELINE_SINK 'micsel.20.1' + WOV_PIPELINE_VIRTUAL 'virtual.detect_sink' + INCLUDE_WOV 'false' + # The UUID corresponds to the test detect component + WOV_UUID '1f:d5:a8:eb:27:78:b5:47:82:ee:de:6e:77:43:af:67' + WOV_CPC '360000' + DMIC1_PCM_CAPS 'Passthrough Capture 18' + DMIC1_PIPELINE_STREAM_NAME 'copier.DMIC.19.1' } diff --git a/tools/topology/topology2/platform/intel/dmic-generic.conf b/tools/topology/topology2/platform/intel/dmic-generic.conf index 77abca16a0ed..748dc2b19b03 100644 --- a/tools/topology/topology2/platform/intel/dmic-generic.conf +++ b/tools/topology/topology2/platform/intel/dmic-generic.conf @@ -62,6 +62,10 @@ Object.Dai { } } +IncludeByKey.INCLUDE_WOV { + "true" "platform/intel/dmic-wov.conf" +} + Object.Pipeline { passthrough-capture.100 { format $FORMAT diff --git a/tools/topology/topology2/platform/intel/dmic-wov.conf b/tools/topology/topology2/platform/intel/dmic-wov.conf new file mode 100644 index 000000000000..80cc1023716c --- /dev/null +++ b/tools/topology/topology2/platform/intel/dmic-wov.conf @@ -0,0 +1,137 @@ +Object.Pipeline { + passthrough-capture.1 { + format $FORMAT + rate 16000 + rate_min 16000 + rate_max 16000 + index $DMIC1_HOST_PIPELINE_ID + Object.Widget.pipeline.1 { + stream_name $DMIC1_PIPELINE_STREAM_NAME + } + Object.Widget.copier.1 { + stream_name $DMIC1_PCM_CAPS + Object.Base.audio_format.1 { + in_rate 16000 + in_bit_depth 32 + in_valid_bit_depth 32 + out_rate 16000 + out_bit_depth 32 + out_valid_bit_depth 32 + dma_buffer_size "$[$ibs * 2]" + } + Object.Base.audio_format.2 { + in_rate 16000 + in_channels 4 + in_bit_depth 32 + in_valid_bit_depth 32 + out_rate 16000 + out_channels 4 + out_bit_depth 32 + out_valid_bit_depth 32 + dma_buffer_size "$[$ibs * 2]" + in_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + in_ch_map $CHANNEL_MAP_3_POINT_1 + out_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + out_ch_map $CHANNEL_MAP_3_POINT_1 + } + } + } + + dai-kpb-be.12 { + direction "capture" + format $FORMAT + rate 16000 + rate_min 16000 + rate_max 16000 + index $DMIC1_DAI_PIPELINE_ID + + Object.Widget.copier.1 { + dai_index 1 + type "dai_out" + dai_type "DMIC" + copier_type "DMIC" + type dai_out + stream_name $DMIC1_NAME + node_type $DMIC_LINK_INPUT_CLASS + Object.Base.audio_format.1 { + in_rate 16000 + in_bit_depth 32 + in_valid_bit_depth 32 + out_rate 16000 + out_bit_depth 32 + out_valid_bit_depth 32 + dma_buffer_size "$[$ibs * 2]" + } + Object.Base.audio_format.2 { + in_rate 16000 + in_channels 4 + in_bit_depth 32 + in_valid_bit_depth 32 + out_rate 16000 + out_channels 4 + out_bit_depth 32 + out_valid_bit_depth 32 + dma_buffer_size "$[$ibs * 2]" + in_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + in_ch_map $CHANNEL_MAP_3_POINT_1 + out_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + out_ch_map $CHANNEL_MAP_3_POINT_1 + } + } + + Object.Widget.kpb.1 { + Object.Base.src_pin_binding.1 { + src_pin_binding_wname $WOV_PIPELINE_SINK + } + Object.Base.src_pin_binding.2 { + src_pin_binding_wname $DMIC1_HOST_PIPELINE_SINK + } + Object.Base.src_pin_binding.3 { + src_pin_binding_wname "NotConnected" + } + } + } + wov-detect.1 { + index $WOV_PIPELINE_ID + format s32le + channels 2 + Object.Widget.wov.1 { + uuid $WOV_UUID + cpc $WOV_CPC + } + } +} + +Object.Base { + route.102 { + source $DMIC_WOV_DAI_PIPELINE_KPB + sink $DMIC1_HOST_PIPELINE_SINK + } + route.103 { + source $DMIC_WOV_DAI_PIPELINE_KPB + sink $WOV_PIPELINE_SINK + } + route.104 { + source $WOV_PIPELINE_VIRTUAL + sink $DMIC1_HOST_PIPELINE_SINK + } +} + +Object.PCM { + pcm.11 { + name "DMIC16k" + id 11 + direction "capture" + Object.Base.fe_dai."DMIC16k" {} + + Object.PCM.pcm_caps."capture" { + name $DMIC1_PCM_CAPS + # only 32-bit capture supported now + formats 'S32_LE' + channels_min $NUM_DMICS + channels_max $NUM_DMICS + rate_min 16000 + rate_max 16000 + } + } +} From a25f4f65efda1e34d1c49ad24d6a7851d38326df Mon Sep 17 00:00:00 2001 From: Libin Yang Date: Sun, 11 Dec 2022 20:08:06 +0800 Subject: [PATCH 8/8] topology2: cavs-nocodec add wov support Add the definitions of wov in cavs-nocodec.conf. Signed-off-by: Libin Yang --- tools/topology/topology2/cavs-nocodec.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/topology/topology2/cavs-nocodec.conf b/tools/topology/topology2/cavs-nocodec.conf index 57e9b7731bb5..74eca3d0b10a 100644 --- a/tools/topology/topology2/cavs-nocodec.conf +++ b/tools/topology/topology2/cavs-nocodec.conf @@ -12,6 +12,8 @@ + + @@ -31,6 +33,8 @@ + + Define { @@ -45,6 +49,7 @@ Define { DMIC1_NAME 'NoCodec-7' DMIC0_PCM_CAPS 'Passthrough Capture 13' DMIC0_PIPELINE_STREAM_NAME 'copier.DMIC.14.1' + DMIC1_PCM_CAPS 'DMIC1 WOV Capture' PLATFORM "none" DEEP_BUFFER_PIPELINE_ID 15 DEEP_BUFFER_PCM_ID 31