1divert(-1)
2
3dnl Define macro for mixer control
4
5dnl KCONTROL_CHANNEL(name, reg, shift)
6define(`KCONTROL_CHANNEL',
7`channel.STR($1) {'
8`		reg STR($2)'
9`		shift STR($3)'
10`	}')
11
12dnl CONTROLMIXER_MAX(comment, value)
13define(`CONTROLMIXER_MAX',
14`#$1'
15`	max STR($2)')
16
17dnl CONTROLMIXER_TLV(comment, value)
18define(`CONTROLMIXER_TLV',
19`#$1'
20`	tlv STR($2)')
21
22dnl CONTROLMIXER_OPS(info, comment, get, put)
23define(`CONTROLMIXER_OPS',
24`ops."ctl" {'
25`		info STR($1)'
26`		#$2'
27`		get STR($3)'
28`		put STR($4)'
29`	}')
30
31
32define(`N_CONTROLMIXER', `CONTROLMIXER'PIPELINE_ID`.'$1)
33
34dnl C_CONTROLMIXER(name, index, ops, max, invert, tlv, comment, KCONTROL_CHANNELS, useleds, ledsdir)
35define(`C_CONTROLMIXER',
36`ifelse(`$#', `10',
37`SectionVendorTuples."'N_CONTROLMIXER($2)`_tuples_w" {'
38`	tokens "sof_led_tokens"'
39`	tuples."word" {'
40`		SOF_TKN_MUTE_LED_USE'		$9
41`		SOF_TKN_MUTE_LED_DIRECTION'	$10
42`	}'
43`}'
44`SectionData."'N_CONTROLMIXER($2)`_data_w" {'
45`	tuples "'N_CONTROLMIXER($2)`_tuples_w"'
46`}'
47,` ')'
48`SectionControlMixer."ifdef(`CONTROL_NAME', CONTROL_NAME, $2 $1)" {'
49`'
50`	# control belongs to this index group'
51`	index STR($2)'
52`'
53`	#$7'
54`	$8'
55`	# control uses bespoke driver get/put/info ID'
56`	$3'
57`'
58`	$4'
59`	invert STR($5)'
60`	$6'
61`ifelse(`$#', `10',
62`	data ['
63`		"'N_CONTROLMIXER($2)`_data_w"'
64`	]'
65,` ')'
66`}')
67
68divert(0)dnl
69