mirror of https://github.com/thesofproject/sof.git
topology2: Add pga class
Add the class definition for PGA widget. It can be instantiated as follows: Object.Widget.pga."N" { format s24le index 0 period_sink_count 2 period_source_count 2 } Where N is the unique instance number for pga widget in the same alsaconf node. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This commit is contained in:
parent
d720725840
commit
a68b1af80d
|
@ -25,4 +25,9 @@ Object.Base.VendorToken {
|
|||
size 100
|
||||
caps 101
|
||||
}
|
||||
|
||||
"sof_tkn_volume" {
|
||||
ramp_step_type 250
|
||||
ramp_step_ms 251
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,118 @@
|
|||
#
|
||||
# Common pipeline volume
|
||||
#
|
||||
# A generic volume widget. All attributes defined herein are namespaced
|
||||
# by alsatplg to "Object.Widget.pga.N.attribute_name"
|
||||
#
|
||||
# Usage: this component can be used by declaring int a parent object. i.e.
|
||||
#
|
||||
# Object.Widget.pga."N" {
|
||||
# index 1
|
||||
# format s24le
|
||||
# no_pm "true"
|
||||
# }
|
||||
#
|
||||
# Where N is the unique instance number for pga widget in the same alsaconf node.
|
||||
|
||||
Class.Widget."pga" {
|
||||
#
|
||||
# Pipeline ID for the pga widget object
|
||||
#
|
||||
DefineAttribute."index" {}
|
||||
|
||||
#
|
||||
# pga object instance
|
||||
#
|
||||
DefineAttribute."instance" {}
|
||||
|
||||
#include common component definition
|
||||
<include/components/widget-common.conf>
|
||||
|
||||
#
|
||||
# pga widget UUID
|
||||
#
|
||||
DefineAttribute."uuid" {
|
||||
type "string"
|
||||
# Token set reference name and type
|
||||
token_ref "sof_tkn_comp.uuid"
|
||||
}
|
||||
|
||||
#
|
||||
# Bespoke attributes for PGA
|
||||
#
|
||||
|
||||
#
|
||||
# Volume ramp step type. The values provided will be translated to integer values
|
||||
# as specified in the tuple_values array.
|
||||
# For example: "linear" is translated to 0, "log" to 1 etc.
|
||||
#
|
||||
DefineAttribute."ramp_step_type" {
|
||||
type "string"
|
||||
# Token set reference name
|
||||
token_ref "sof_tkn_volume.word"
|
||||
constraints {
|
||||
!valid_values [
|
||||
"linear"
|
||||
"log"
|
||||
"linear_zc"
|
||||
"log_zc"
|
||||
]
|
||||
!tuple_values [
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Volume ramp step in milliseconds
|
||||
#
|
||||
DefineAttribute."ramp_step_ms" {
|
||||
# Token set reference name
|
||||
token_ref "sof_tkn_volume.word"
|
||||
}
|
||||
|
||||
# Attribute categories
|
||||
attributes {
|
||||
#
|
||||
# The PGA widget name would be constructed using the index and instance attributes.
|
||||
# For ex: "pga.1.1" or "pga.10.2" etc.
|
||||
#
|
||||
!constructor [
|
||||
"index"
|
||||
"instance"
|
||||
]
|
||||
|
||||
#
|
||||
# immutable attributes cannot be modified in the object instance
|
||||
#
|
||||
!immutable [
|
||||
"uuid"
|
||||
"type"
|
||||
]
|
||||
|
||||
#
|
||||
# deprecated attributes should not be added in the object instance
|
||||
#
|
||||
!deprecated [
|
||||
"preload_count"
|
||||
]
|
||||
|
||||
#
|
||||
# pga widget objects instantiated within the same alsaconf node must have unique
|
||||
# instance attribute
|
||||
#
|
||||
unique "instance"
|
||||
}
|
||||
|
||||
# Default attribute values for pga widget
|
||||
type "pga"
|
||||
uuid "7e:67:7e:b7:f4:5f:88:41:af:14:fb:a8:bd:bf:86:82"
|
||||
no_pm "true"
|
||||
period_sink_count 2
|
||||
period_source_count 2
|
||||
ramp_step_type "linear"
|
||||
ramp_step_ms 400
|
||||
}
|
Loading…
Reference in New Issue