topology2: add wov support

Add the wov module support. The keyword of the wov is the sound
of clap.

Signed-off-by: Libin Yang <libin.yang@intel.com>
This commit is contained in:
Libin Yang 2022-05-24 21:08:54 +08:00 committed by Liam Girdwood
parent a1a458efc5
commit 884322bfb9
2 changed files with 118 additions and 0 deletions

View File

@ -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
<include/components/widget-common.conf>
#
# 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
}

View File

@ -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"}