forked from thesofproject/sof
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgain.conf
More file actions
175 lines (157 loc) · 3.24 KB
/
Copy pathgain.conf
File metadata and controls
175 lines (157 loc) · 3.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
#
# Common pipeline gain (volume)
#
# A generic gain (volume) widget. All attributes defined herein are namespaced
# by alsatplg to "Object.Widget.gain.N.attribute_name"
#
# Usage: this component can be used by declaring int a parent object. i.e.
#
# Object.Widget.gain."N" {
# index 1
# format s24le
# no_pm "true"
# }
#
# Where N is the unique instance number for gain widget in the same alsaconf node.
<include/controls/mixer.conf>
Class.Widget."gain" {
#
# Pipeline ID for the gain widget object
#
DefineAttribute."index" {}
#
# gain object instance
#
DefineAttribute."instance" {}
#include common component definition
<include/components/widget-common.conf>
#
# gain widget UUID
#
DefineAttribute."uuid" {
type "string"
# Token set reference name and type
token_ref "sof_tkn_comp.uuid"
}
#
# Bespoke attributes for PGA
#
#
# Gain curve 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."curve_type" {
type "string"
# Token set reference name
token_ref "sof_tkn_gain.word"
constraints {
!valid_values [
"no_fade"
"fade"
]
!tuple_values [
0
1
]
}
}
#
# Gain curve in milliseconds
#
DefineAttribute."curve_duration" {
# Token set reference name
token_ref "sof_tkn_gain.word"
}
DefineAttribute."init_value" {
# Token set reference name
token_ref "sof_tkn_gain.word"
}
DefineAttribute."num_audio_formats" {
# Token set reference name and type
token_ref "sof_tkn_comp.word"
}
# Attribute categories
attributes {
#
# The PGA widget name would be constructed using the index and instance attributes.
# For ex: "gain.1.1" or "gain.10.2" etc.
#
!constructor [
"index"
"instance"
]
#
# mandatory attributes that must be provided when the gain class is instantiated
#
!mandatory [
"num_input_pins"
"num_output_pins"
"num_input_audio_formats"
"num_output_audio_formats"
]
#
# 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"
]
#
# gain widget objects instantiated within the same alsaconf node must have unique
# instance attribute
#
unique "instance"
}
#
# gain widget mixer controls
#
Object.Control {
# gain mixer control
mixer."1" {
#Channel register and shift for Front Left/Right
Object.Base.channel.1 {
name "fl"
shift 0
}
Object.Base.channel.2 {
name "fr"
}
Object.Base.ops.1 {
name "ctl"
info "volsw"
#256 binds the mixer control to volume get/put handlers
get 256
put 256
}
max 45
Object.Base.tlv.1 {
name "vtlv_m90s2"
Object.Base.scale.1 {
name m90s2
min -9000
step 200
mute 1
}
}
}
}
# Default attribute values for gain widget
type "pga"
uuid "A8:A9:BC:61:D0:18:18:4A:8E:7B:26:39:21:98:04:B7"
no_pm "true"
cpc 10183
period_sink_count 2
period_source_count 2
curve_type "fade"
curve_duration 10
init_value 0x7fffffff
num_input_pins 1
num_output_pins 1
}