1# Common class definitions for bytes
2#
3# All attributes defined herein are namespaced
4# by alsatplg to "Object.Control.bytes.N.attribute_name"
5#
6# Class for byte objects. These are instantiated as:
7#       Object.Contorl.bytes."N" {
8#              name    "eq filter"
9#              index   N
10#               max     128
11#               access  "tlv_read"
12#
13#              Object.Base.data.eqiir {
14#              }
15#       }
16#
17
18<include/controls/common.conf>
19
20Class.Control."bytes" {
21
22	DefineAttribute."name" {
23		type "string"
24	}
25
26	# Pipeline ID
27	DefineAttribute."index" {}
28
29	# unique instance for bytes object in the same alsaconf node
30	DefineAttribute."instance" {}
31
32	DefineArgument."index" {
33		type "integer"
34	}
35
36	DefineAttribute."max" {}
37	DefineAttribute."base" {}
38	DefineAttribute."num_regs" {}
39	DefineAttribute."mask" {}
40
41	DefineAttribute."access" {
42		constraints {
43			!valid_values [
44				"read_write"
45				"tlv_read_write"
46				"read"
47				"write"
48				"volatile"
49				"tlv_read"
50				"tlv_write"
51				"tlv_command"
52				"inactive"
53				"lock"
54				"owner"
55				"tlv_callback"
56			]
57		}
58	}
59
60	attributes {
61		!constructor [
62			"index"
63			"instance"
64		]
65		!mandatory [
66			"index"
67		]
68		unique	"instance"
69	}
70
71	# control uses bespoke driver get/put/info ID
72	Object.Base.ops."ctl" {
73		info 	"bytes"
74	}
75
76	Object.Base.extops."extctl" {
77		#258 binds the control to byte control get/put handlers
78		get 	258
79		put 	258
80	}
81
82	# Default attribute values for bytes control
83	max	1024
84	!access [
85		tlv_write
86		tlv_read
87		tlv_callback
88	]
89}
90