xref: /linux/include/uapi/sound/sof/tokens.h (revision 33e02dc69afbd8f1b85a51d74d72f139ba4ca623)
1 /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
2 /*
3  * This file is provided under a dual BSD/GPLv2 license.  When using or
4  * redistributing this file, you may do so under either license.
5  *
6  * Copyright(c) 2018 Intel Corporation
7  * Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
8  *         Keyon Jie <yang.jie@linux.intel.com>
9  */
10 
11 /*
12  * Topology IDs and tokens.
13  *
14  * ** MUST BE ALIGNED WITH TOPOLOGY CONFIGURATION TOKEN VALUES **
15  */
16 
17 #ifndef __INCLUDE_UAPI_SOF_TOPOLOGY_H__
18 #define __INCLUDE_UAPI_SOF_TOPOLOGY_H__
19 
20 /*
21  * Kcontrol IDs
22  */
23 #define SOF_TPLG_KCTL_VOL_ID	256
24 #define SOF_TPLG_KCTL_ENUM_ID	257
25 #define SOF_TPLG_KCTL_BYTES_ID	258
26 #define SOF_TPLG_KCTL_SWITCH_ID	259
27 #define SOF_TPLG_KCTL_BYTES_VOLATILE_RO 260
28 #define SOF_TPLG_KCTL_BYTES_VOLATILE_RW 261
29 #define SOF_TPLG_KCTL_BYTES_WO_ID 262
30 
31 /*
32  * Tokens - must match values in topology configurations
33  */
34 
35 /* buffers */
36 #define SOF_TKN_BUF_SIZE			100
37 #define SOF_TKN_BUF_CAPS			101
38 #define SOF_TKN_BUF_FLAGS			102
39 
40 /* DAI */
41 /* Token retired with ABI 3.2, do not use for new capabilities
42  * #define	SOF_TKN_DAI_DMAC_CONFIG			153
43  */
44 #define SOF_TKN_DAI_TYPE			154
45 #define SOF_TKN_DAI_INDEX			155
46 #define SOF_TKN_DAI_DIRECTION			156
47 
48 /* scheduling */
49 #define SOF_TKN_SCHED_PERIOD			200
50 #define SOF_TKN_SCHED_PRIORITY			201
51 #define SOF_TKN_SCHED_MIPS			202
52 #define SOF_TKN_SCHED_CORE			203
53 #define SOF_TKN_SCHED_FRAMES			204
54 #define SOF_TKN_SCHED_TIME_DOMAIN		205
55 #define SOF_TKN_SCHED_DYNAMIC_PIPELINE		206
56 #define SOF_TKN_SCHED_LP_MODE			207
57 #define SOF_TKN_SCHED_MEM_USAGE			208
58 #define SOF_TKN_SCHED_USE_CHAIN_DMA		209
59 
60 /* volume */
61 #define SOF_TKN_VOLUME_RAMP_STEP_TYPE		250
62 #define SOF_TKN_VOLUME_RAMP_STEP_MS		251
63 
64 #define SOF_TKN_GAIN_RAMP_TYPE			260
65 #define SOF_TKN_GAIN_RAMP_DURATION		261
66 #define SOF_TKN_GAIN_VAL			262
67 
68 /* SRC */
69 #define SOF_TKN_SRC_RATE_IN			300
70 #define SOF_TKN_SRC_RATE_OUT			301
71 
72 /* ASRC */
73 #define SOF_TKN_ASRC_RATE_IN			320
74 #define SOF_TKN_ASRC_RATE_OUT			321
75 #define SOF_TKN_ASRC_ASYNCHRONOUS_MODE		322
76 #define SOF_TKN_ASRC_OPERATION_MODE		323
77 
78 /* PCM */
79 #define SOF_TKN_PCM_DMAC_CONFIG			353
80 
81 /* Generic components */
82 #define SOF_TKN_COMP_PERIOD_SINK_COUNT		400
83 #define SOF_TKN_COMP_PERIOD_SOURCE_COUNT	401
84 #define SOF_TKN_COMP_FORMAT			402
85 /* Token retired with ABI 3.2, do not use for new capabilities
86  * #define SOF_TKN_COMP_PRELOAD_COUNT		403
87  */
88 #define SOF_TKN_COMP_CORE_ID			404
89 #define SOF_TKN_COMP_UUID                       405
90 #define SOF_TKN_COMP_CPC			406
91 #define SOF_TKN_COMP_IS_PAGES			409
92 #define SOF_TKN_COMP_NUM_AUDIO_FORMATS		410
93 #define SOF_TKN_COMP_NUM_INPUT_PINS		411
94 #define SOF_TKN_COMP_NUM_OUTPUT_PINS		412
95 /*
96  * The token for input/output pin binding, it specifies the widget
97  * name that the input/output pin is connected from/to.
98  */
99 #define SOF_TKN_COMP_INPUT_PIN_BINDING_WNAME	413
100 #define SOF_TKN_COMP_OUTPUT_PIN_BINDING_WNAME	414
101 #define SOF_TKN_COMP_NUM_INPUT_AUDIO_FORMATS	415
102 #define SOF_TKN_COMP_NUM_OUTPUT_AUDIO_FORMATS	416
103 /*
104  * The token value is copied to the dapm_widget's
105  * no_wname_in_kcontrol_name.
106  */
107 #define SOF_TKN_COMP_NO_WNAME_IN_KCONTROL_NAME	417
108 
109 /* SSP */
110 #define SOF_TKN_INTEL_SSP_CLKS_CONTROL		500
111 #define SOF_TKN_INTEL_SSP_MCLK_ID		501
112 #define SOF_TKN_INTEL_SSP_SAMPLE_BITS		502
113 #define SOF_TKN_INTEL_SSP_FRAME_PULSE_WIDTH	503
114 #define SOF_TKN_INTEL_SSP_QUIRKS		504
115 #define SOF_TKN_INTEL_SSP_TDM_PADDING_PER_SLOT	505
116 #define SOF_TKN_INTEL_SSP_BCLK_DELAY		506
117 
118 /* DMIC */
119 #define SOF_TKN_INTEL_DMIC_DRIVER_VERSION	600
120 #define SOF_TKN_INTEL_DMIC_CLK_MIN		601
121 #define SOF_TKN_INTEL_DMIC_CLK_MAX		602
122 #define SOF_TKN_INTEL_DMIC_DUTY_MIN		603
123 #define SOF_TKN_INTEL_DMIC_DUTY_MAX		604
124 #define SOF_TKN_INTEL_DMIC_NUM_PDM_ACTIVE	605
125 #define SOF_TKN_INTEL_DMIC_SAMPLE_RATE		608
126 #define SOF_TKN_INTEL_DMIC_FIFO_WORD_LENGTH	609
127 #define SOF_TKN_INTEL_DMIC_UNMUTE_RAMP_TIME_MS  610
128 
129 /* DMIC PDM */
130 #define SOF_TKN_INTEL_DMIC_PDM_CTRL_ID		700
131 #define SOF_TKN_INTEL_DMIC_PDM_MIC_A_Enable	701
132 #define SOF_TKN_INTEL_DMIC_PDM_MIC_B_Enable	702
133 #define SOF_TKN_INTEL_DMIC_PDM_POLARITY_A	703
134 #define SOF_TKN_INTEL_DMIC_PDM_POLARITY_B	704
135 #define SOF_TKN_INTEL_DMIC_PDM_CLK_EDGE		705
136 #define SOF_TKN_INTEL_DMIC_PDM_SKEW		706
137 
138 /* Tone */
139 #define SOF_TKN_TONE_SAMPLE_RATE		800
140 
141 /* Processing Components */
142 #define SOF_TKN_PROCESS_TYPE                    900
143 
144 /* for backward compatibility */
145 #define SOF_TKN_EFFECT_TYPE	SOF_TKN_PROCESS_TYPE
146 
147 /* SAI */
148 #define SOF_TKN_IMX_SAI_MCLK_ID			1000
149 
150 /* ESAI */
151 #define SOF_TKN_IMX_ESAI_MCLK_ID		1100
152 
153 /* Stream */
154 #define SOF_TKN_STREAM_PLAYBACK_COMPATIBLE_D0I3	1200
155 #define SOF_TKN_STREAM_CAPTURE_COMPATIBLE_D0I3	1201
156 
157 /* Led control for mute switches */
158 #define SOF_TKN_MUTE_LED_USE			1300
159 #define SOF_TKN_MUTE_LED_DIRECTION		1301
160 
161 /* ALH */
162 #define SOF_TKN_INTEL_ALH_RATE			1400
163 #define SOF_TKN_INTEL_ALH_CH			1401
164 
165 /* HDA */
166 #define SOF_TKN_INTEL_HDA_RATE			1500
167 #define SOF_TKN_INTEL_HDA_CH			1501
168 
169 /* AFE */
170 #define SOF_TKN_MEDIATEK_AFE_RATE		1600
171 #define SOF_TKN_MEDIATEK_AFE_CH			1601
172 #define SOF_TKN_MEDIATEK_AFE_FORMAT		1602
173 
174 /* MIXER */
175 #define SOF_TKN_MIXER_TYPE			1700
176 
177 /* ACPDMIC */
178 #define SOF_TKN_AMD_ACPDMIC_RATE		1800
179 #define SOF_TKN_AMD_ACPDMIC_CH			1801
180 
181 /* CAVS AUDIO FORMAT */
182 #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_RATE	1900
183 #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_BIT_DEPTH	1901
184 #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_VALID_BIT_DEPTH	1902
185 #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_CHANNELS	1903
186 #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_CH_MAP	1904
187 #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_CH_CFG	1905
188 #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_INTERLEAVING_STYLE	1906
189 #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_FMT_CFG	1907
190 #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_SAMPLE_TYPE	1908
191 #define SOF_TKN_CAVS_AUDIO_FORMAT_INPUT_PIN_INDEX	1909
192 /* intentional token numbering discontinuity, reserved for future use */
193 #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_RATE	1930
194 #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_BIT_DEPTH	1931
195 #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_VALID_BIT_DEPTH 1932
196 #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_CHANNELS	1933
197 #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_CH_MAP	1934
198 #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_CH_CFG	1935
199 #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_INTERLEAVING_STYLE	1936
200 #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_FMT_CFG	1937
201 #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_SAMPLE_TYPE	1938
202 #define SOF_TKN_CAVS_AUDIO_FORMAT_OUTPUT_PIN_INDEX	1939
203 /* intentional token numbering discontinuity, reserved for future use */
204 #define SOF_TKN_CAVS_AUDIO_FORMAT_IBS		1970
205 #define SOF_TKN_CAVS_AUDIO_FORMAT_OBS		1971
206 #define SOF_TKN_CAVS_AUDIO_FORMAT_DMA_BUFFER_SIZE	1972
207 
208 /* COPIER */
209 #define SOF_TKN_INTEL_COPIER_NODE_TYPE		1980
210 #define SOF_TKN_INTEL_COPIER_DEEP_BUFFER_DMA_MS	1981
211 
212 /* ACP I2S */
213 #define SOF_TKN_AMD_ACPI2S_RATE			1700
214 #define SOF_TKN_AMD_ACPI2S_CH			1701
215 #define SOF_TKN_AMD_ACPI2S_TDM_MODE		1702
216 
217 /* MICFIL PDM */
218 #define SOF_TKN_IMX_MICFIL_RATE			2000
219 #define SOF_TKN_IMX_MICFIL_CH			2001
220 
221 /* ACP SDW */
222 #define SOF_TKN_AMD_ACP_SDW_RATE		2100
223 #define SOF_TKN_AMD_ACP_SDW_CH			2101
224 
225 #endif
226