diff --git a/tools/topology/topology2/include/components/smart_amp.conf b/tools/topology/topology2/include/components/smart_amp.conf new file mode 100644 index 000000000..baf0c2ed9 --- /dev/null +++ b/tools/topology/topology2/include/components/smart_amp.conf @@ -0,0 +1,135 @@ +# +# Common widget smart_amp +# +# A generic smart_amp widget. All attributes defined herein are namespaced +# by alsatplg to "Object.Widget.smart_amp.N.attribute_name" +# +# Usage: this component can be used by instantiating it in the parent object. i.e. +# +# Object.Widget.smart_amp."N" { +# index 1 +# type "effect" +# } +# +# Where N is the unique instance number for the smart_amp object within the same alsaconf node. + +# set the default the SMART_AMP_UUID to be that of the test smart amp module. +# The top-level machine topology must override this definition to use a different module +Define { + SMART_AMP_UUID "1e:96:7a:16:e4:8a:ea:11:89:f1:00:0c:29:ce:16:35" +} + +Class.Widget."smart_amp" { + # + # Pipeline ID for the smart_amp widget object + # + DefineAttribute."index" {} + + #include common component definition + + + DefineAttribute."num_audio_formats" { + # Token set reference name and type + token_ref "sof_tkn_comp.word" + } + + # + # smart_amp widget UUID + # + DefineAttribute."uuid" { + type "string" + # Token set reference name and type + token_ref "sof_tkn_comp.uuid" + } + + DefineAttribute."cpc" { + # Token set reference name and type + token_ref "sof_tkn_comp.word" + } + + DefineAttribute."is_pages" { + # Token set reference name and type + token_ref "sof_tkn_comp.word" + } + + Object.Control.bytes."1" { + !access [ + tlv_read + tlv_callback + ] + Object.Base.extops.1 { + name "extctl" + get 258 + put 0 + } + max 4096 + Object.Base.data. 1 { + IncludeByKey.SMART_AMP_UUID { + # smart amp init data for the test smart amp module + "1e:96:7a:16:e4:8a:ea:11:89:f1:00:0c:29:ce:16:35" { + bytes "0x53, 0x4f, 0x46, 0x34, 0x02, 0x00, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff" + } + } + } + } + + # Attribute categories + attributes { + # + # The smart_amp widget name would be constructed using the index and instance attributes. + # For ex: "smart_amp.1.1" or "smart_amp.10.2" etc. + # + !constructor [ + "index" + "instance" + ] + + # + # mandatory attributes that must be provided when the class is instantiated + # + !mandatory [ + "no_pm" + "uuid" + "num_input_audio_formats" + "num_output_audio_formats" + ] + + # + # immutable attributes cannot be modified in the object instance + # + !immutable [ + "type" + ] + + # + # deprecated attributes should not be added in the object instance + # + !deprecated [ + "preload_count" + ] + + # + # smart_amp widget objects instantiated within the same alsaconf node must have unique + # instance attribute + # + unique "instance" + } + + # Default attribute values for smart_amp widget + + # UUID can be overridden in the top-level topology file + uuid $SMART_AMP_UUID + type "effect" + no_pm "true" + core_id 0 + cpc 5000 + is_pages 1 + num_input_pins 2 + num_output_pins 1 +}