1#
2# Mixer kcontrol class. All attributes defined herein are namespaced
3# by alsatplg to "Object.Control.mixer.N.attribute_name"
4#
5# Usage: this component can be used by instantiating it in the parent object. i.e.
6#
7# 	Object.Control.mixer."N" {
8#		index	1
9#		name	"1 Master Playback Volume"
10#		mas 32
11#			Object.Base.channel."fl" {
12#				shift	0
13#				reg 0
14#			}
15#			Object.Base.channel."fr" {
16#				shift 1
17#				reg 1
18#			}
19#			Object.Base.ops."ctl" {
20#				info "volsw"
21#				get "258"
22#				put "258"
23#			}
24#	}
25#
26# Where N is the unique instance number for the buffer object within the same alsaconf node.
27# The mixer control object should also include the ops, channels and tlv objects in the object
28# instance
29
30<include/controls/common.conf>
31
32Class.Control."mixer" {
33	#
34	# Pipeline ID for the mixer object
35	#
36	DefineAttribute."index" {}
37
38	#
39	# Instance of mixer object in the same alsaconf node
40	#
41	DefineAttribute."instance" {}
42
43	#
44	# Mixer name. A mixer object is included in the built topology only if it is given a
45	# name
46	#
47	DefineAttribute."name" {
48		type	"string"
49	}
50
51	#
52	# Max volume setting
53	#
54	DefineAttribute."max" {}
55
56	DefineAttribute."invert" {
57		type	"string"
58		constraints {
59			!valid_values [
60				"true"
61				"false"
62			]
63		}
64	}
65
66	# use mute LED
67	DefineAttribute."mute_led_use" {
68		token_ref	"sof_tkn_mute_led.word"
69	}
70
71	# LED direction
72	DefineAttribute."mute_led_direction" {
73		token_ref	"sof_tkn_mute_led.word"
74	}
75
76	#
77	# access control for mixer
78	#
79	DefineAttribute."access" {
80		type	"compound"
81		constraints {
82			!valid_values [
83				"read_write"
84				"tlv_read_write"
85				"read"
86				"write"
87				"volatile"
88				"tlv_read"
89				"tlv_write"
90				"tlv_command"
91				"inactive"
92				"lock"
93				"owner"
94				"tlv_callback"
95			]
96		}
97	}
98
99	attributes {
100		#
101		# The Mixer object name would be constructed using the index and instance arguments.
102		# For ex: "mixer.1.1" or "mixer.10.2" etc.
103		#
104		!constructor [
105			"index"
106			"instance"
107		]
108		!mandatory [
109			"max"
110		]
111		#
112		# mixer control objects instantiated within the same alsaconf node must have unique
113		# index attribute
114		#
115		unique	"instance"
116	}
117
118	# Default attribute values for mixer control
119	invert 		"false"
120	mute_led_use 		0
121	mute_led_direction	0
122}
123