xref: /openbmc/linux/include/uapi/sound/sof/tokens.h (revision 6327c729)
14483151eSLiam Girdwood /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
24483151eSLiam Girdwood /*
34483151eSLiam Girdwood  * This file is provided under a dual BSD/GPLv2 license.  When using or
44483151eSLiam Girdwood  * redistributing this file, you may do so under either license.
54483151eSLiam Girdwood  *
64483151eSLiam Girdwood  * Copyright(c) 2018 Intel Corporation. All rights reserved.
74483151eSLiam Girdwood  * Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
84483151eSLiam Girdwood  *         Keyon Jie <yang.jie@linux.intel.com>
94483151eSLiam Girdwood  */
104483151eSLiam Girdwood 
114483151eSLiam Girdwood /*
124483151eSLiam Girdwood  * Topology IDs and tokens.
134483151eSLiam Girdwood  *
144483151eSLiam Girdwood  * ** MUST BE ALIGNED WITH TOPOLOGY CONFIGURATION TOKEN VALUES **
154483151eSLiam Girdwood  */
164483151eSLiam Girdwood 
174483151eSLiam Girdwood #ifndef __INCLUDE_UAPI_SOF_TOPOLOGY_H__
184483151eSLiam Girdwood #define __INCLUDE_UAPI_SOF_TOPOLOGY_H__
194483151eSLiam Girdwood 
204483151eSLiam Girdwood /*
214483151eSLiam Girdwood  * Kcontrol IDs
224483151eSLiam Girdwood  */
234483151eSLiam Girdwood #define SOF_TPLG_KCTL_VOL_ID	256
244483151eSLiam Girdwood #define SOF_TPLG_KCTL_ENUM_ID	257
254483151eSLiam Girdwood #define SOF_TPLG_KCTL_BYTES_ID	258
264483151eSLiam Girdwood #define SOF_TPLG_KCTL_SWITCH_ID	259
27783560d0SDharageswari R #define SOF_TPLG_KCTL_BYTES_VOLATILE_RO 260
28783560d0SDharageswari R #define SOF_TPLG_KCTL_BYTES_VOLATILE_RW 261
29783560d0SDharageswari R #define SOF_TPLG_KCTL_BYTES_WO_ID 262
304483151eSLiam Girdwood 
314483151eSLiam Girdwood /*
324483151eSLiam Girdwood  * Tokens - must match values in topology configurations
334483151eSLiam Girdwood  */
344483151eSLiam Girdwood 
354483151eSLiam Girdwood /* buffers */
364483151eSLiam Girdwood #define SOF_TKN_BUF_SIZE			100
374483151eSLiam Girdwood #define SOF_TKN_BUF_CAPS			101
384483151eSLiam Girdwood 
394483151eSLiam Girdwood /* DAI */
404483151eSLiam Girdwood /* Token retired with ABI 3.2, do not use for new capabilities
414483151eSLiam Girdwood  * #define	SOF_TKN_DAI_DMAC_CONFIG			153
424483151eSLiam Girdwood  */
434483151eSLiam Girdwood #define SOF_TKN_DAI_TYPE			154
444483151eSLiam Girdwood #define SOF_TKN_DAI_INDEX			155
454483151eSLiam Girdwood #define SOF_TKN_DAI_DIRECTION			156
464483151eSLiam Girdwood 
474483151eSLiam Girdwood /* scheduling */
484483151eSLiam Girdwood #define SOF_TKN_SCHED_PERIOD			200
494483151eSLiam Girdwood #define SOF_TKN_SCHED_PRIORITY			201
504483151eSLiam Girdwood #define SOF_TKN_SCHED_MIPS			202
514483151eSLiam Girdwood #define SOF_TKN_SCHED_CORE			203
524483151eSLiam Girdwood #define SOF_TKN_SCHED_FRAMES			204
534483151eSLiam Girdwood #define SOF_TKN_SCHED_TIME_DOMAIN		205
542c28ecadSRanjani Sridharan #define SOF_TKN_SCHED_DYNAMIC_PIPELINE		206
55bd10cd5eSRanjani Sridharan #define SOF_TKN_SCHED_LP_MODE			207
56bd10cd5eSRanjani Sridharan #define SOF_TKN_SCHED_MEM_USAGE			208
574483151eSLiam Girdwood 
584483151eSLiam Girdwood /* volume */
594483151eSLiam Girdwood #define SOF_TKN_VOLUME_RAMP_STEP_TYPE		250
604483151eSLiam Girdwood #define SOF_TKN_VOLUME_RAMP_STEP_MS		251
614483151eSLiam Girdwood 
62bd10cd5eSRanjani Sridharan #define SOF_TKN_GAIN_RAMP_TYPE			260
63bd10cd5eSRanjani Sridharan #define SOF_TKN_GAIN_RAMP_DURATION		261
64bd10cd5eSRanjani Sridharan #define SOF_TKN_GAIN_VAL			262
65bd10cd5eSRanjani Sridharan 
664483151eSLiam Girdwood /* SRC */
674483151eSLiam Girdwood #define SOF_TKN_SRC_RATE_IN			300
684483151eSLiam Girdwood #define SOF_TKN_SRC_RATE_OUT			301
694483151eSLiam Girdwood 
70433363e7SSeppo Ingalsuo /* ASRC */
71433363e7SSeppo Ingalsuo #define SOF_TKN_ASRC_RATE_IN			320
72433363e7SSeppo Ingalsuo #define SOF_TKN_ASRC_RATE_OUT			321
73433363e7SSeppo Ingalsuo #define SOF_TKN_ASRC_ASYNCHRONOUS_MODE		322
74433363e7SSeppo Ingalsuo #define SOF_TKN_ASRC_OPERATION_MODE		323
75433363e7SSeppo Ingalsuo 
764483151eSLiam Girdwood /* PCM */
774483151eSLiam Girdwood #define SOF_TKN_PCM_DMAC_CONFIG			353
784483151eSLiam Girdwood 
794483151eSLiam Girdwood /* Generic components */
804483151eSLiam Girdwood #define SOF_TKN_COMP_PERIOD_SINK_COUNT		400
814483151eSLiam Girdwood #define SOF_TKN_COMP_PERIOD_SOURCE_COUNT	401
824483151eSLiam Girdwood #define SOF_TKN_COMP_FORMAT			402
834483151eSLiam Girdwood /* Token retired with ABI 3.2, do not use for new capabilities
844483151eSLiam Girdwood  * #define SOF_TKN_COMP_PRELOAD_COUNT		403
854483151eSLiam Girdwood  */
86d1c6c4a9SGuennadi Liakhovetski #define SOF_TKN_COMP_CORE_ID			404
8743fbb086SKeyon Jie #define SOF_TKN_COMP_UUID                       405
88bd10cd5eSRanjani Sridharan #define SOF_TKN_COMP_CPC			406
89bd10cd5eSRanjani Sridharan #define SOF_TKN_COMP_IS_PAGES			409
90bd10cd5eSRanjani Sridharan #define SOF_TKN_COMP_NUM_AUDIO_FORMATS		410
91*6327c729SChao Song #define SOF_TKN_COMP_NUM_SINK_PINS		411
92*6327c729SChao Song #define SOF_TKN_COMP_NUM_SOURCE_PINS		412
934483151eSLiam Girdwood 
944483151eSLiam Girdwood /* SSP */
954483151eSLiam Girdwood #define SOF_TKN_INTEL_SSP_CLKS_CONTROL		500
964483151eSLiam Girdwood #define SOF_TKN_INTEL_SSP_MCLK_ID		501
974483151eSLiam Girdwood #define SOF_TKN_INTEL_SSP_SAMPLE_BITS		502
984483151eSLiam Girdwood #define SOF_TKN_INTEL_SSP_FRAME_PULSE_WIDTH	503
994483151eSLiam Girdwood #define SOF_TKN_INTEL_SSP_QUIRKS		504
1004483151eSLiam Girdwood #define SOF_TKN_INTEL_SSP_TDM_PADDING_PER_SLOT	505
1016298b787SJanusz Jankowski #define SOF_TKN_INTEL_SSP_BCLK_DELAY		506
1024483151eSLiam Girdwood 
1034483151eSLiam Girdwood /* DMIC */
1044483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_DRIVER_VERSION	600
1054483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_CLK_MIN		601
1064483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_CLK_MAX		602
1074483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_DUTY_MIN		603
1084483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_DUTY_MAX		604
1094483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_NUM_PDM_ACTIVE	605
1104483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_SAMPLE_RATE		608
1114483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_FIFO_WORD_LENGTH	609
1127df43911SSeppo Ingalsuo #define SOF_TKN_INTEL_DMIC_UNMUTE_RAMP_TIME_MS  610
1134483151eSLiam Girdwood 
1144483151eSLiam Girdwood /* DMIC PDM */
1154483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_PDM_CTRL_ID		700
1164483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_PDM_MIC_A_Enable	701
1174483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_PDM_MIC_B_Enable	702
1184483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_PDM_POLARITY_A	703
1194483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_PDM_POLARITY_B	704
1204483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_PDM_CLK_EDGE		705
1214483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_PDM_SKEW		706
1224483151eSLiam Girdwood 
1234483151eSLiam Girdwood /* Tone */
1244483151eSLiam Girdwood #define SOF_TKN_TONE_SAMPLE_RATE		800
1254483151eSLiam Girdwood 
1264483151eSLiam Girdwood /* Processing Components */
1274483151eSLiam Girdwood #define SOF_TKN_PROCESS_TYPE                    900
1284483151eSLiam Girdwood 
1294483151eSLiam Girdwood /* for backward compatibility */
1304483151eSLiam Girdwood #define SOF_TKN_EFFECT_TYPE	SOF_TKN_PROCESS_TYPE
1314483151eSLiam Girdwood 
132f59b16efSDaniel Baluta /* SAI */
1339c1d4cf6SGuido Roncarolo #define SOF_TKN_IMX_SAI_MCLK_ID			1000
134f59b16efSDaniel Baluta 
135f59b16efSDaniel Baluta /* ESAI */
136b4be4276SDaniel Baluta #define SOF_TKN_IMX_ESAI_MCLK_ID		1100
137f59b16efSDaniel Baluta 
1384a949409SKeyon Jie /* Stream */
1394a949409SKeyon Jie #define SOF_TKN_STREAM_PLAYBACK_COMPATIBLE_D0I3	1200
1404a949409SKeyon Jie #define SOF_TKN_STREAM_CAPTURE_COMPATIBLE_D0I3	1201
1414a949409SKeyon Jie 
1425d43001aSJaska Uimonen /* Led control for mute switches */
1435d43001aSJaska Uimonen #define SOF_TKN_MUTE_LED_USE			1300
1445d43001aSJaska Uimonen #define SOF_TKN_MUTE_LED_DIRECTION		1301
1455d43001aSJaska Uimonen 
146c7fc96dfSBard Liao /* ALH */
147c7fc96dfSBard Liao #define SOF_TKN_INTEL_ALH_RATE			1400
148c7fc96dfSBard Liao #define SOF_TKN_INTEL_ALH_CH			1401
149c7fc96dfSBard Liao 
15018aaab64SBard Liao /* HDA */
15118aaab64SBard Liao #define SOF_TKN_INTEL_HDA_RATE			1500
15218aaab64SBard Liao #define SOF_TKN_INTEL_HDA_CH			1501
15318aaab64SBard Liao 
154e6feefa5SYC Hung /* AFE */
155e6feefa5SYC Hung #define SOF_TKN_MEDIATEK_AFE_RATE		1600
156e6feefa5SYC Hung #define SOF_TKN_MEDIATEK_AFE_CH			1601
157e6feefa5SYC Hung #define SOF_TKN_MEDIATEK_AFE_FORMAT		1602
158e6feefa5SYC Hung 
159bd10cd5eSRanjani Sridharan /* MIXER */
160bd10cd5eSRanjani Sridharan #define SOF_TKN_MIXER_TYPE			1700
161bd10cd5eSRanjani Sridharan 
162689614ceSAjit Kumar Pandey /* ACPDMIC */
163689614ceSAjit Kumar Pandey #define SOF_TKN_AMD_ACPDMIC_RATE		1800
164689614ceSAjit Kumar Pandey #define SOF_TKN_AMD_ACPDMIC_CH			1801
165689614ceSAjit Kumar Pandey 
166bd10cd5eSRanjani Sridharan /* CAVS AUDIO FORMAT */
167bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_RATE	1900
168bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_BIT_DEPTH	1901
169bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_VALID_BIT	1902
170bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_CHANNELS	1903
171bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_CH_MAP	1904
172bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_CH_CFG	1905
173bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_INTERLEAVING_STYLE	1906
174bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_FMT_CFG	1907
175bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_SAMPLE_TYPE	1908
176bd10cd5eSRanjani Sridharan /* intentional token numbering discontinuity, reserved for future use */
177bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_RATE	1930
178bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_BIT_DEPTH	1931
179bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_VALID_BIT	1932
180bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_CHANNELS	1933
181bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_CH_MAP	1934
182bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_CH_CFG	1935
183bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_INTERLEAVING_STYLE	1936
184bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_FMT_CFG	1937
185bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_SAMPLE_TYPE	1938
186bd10cd5eSRanjani Sridharan /* intentional token numbering discontinuity, reserved for future use */
187bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_IBS		1970
188bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_OBS		1971
189bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_DMA_BUFFER_SIZE	1972
190bd10cd5eSRanjani Sridharan 
191bd10cd5eSRanjani Sridharan /* COPIER */
192bd10cd5eSRanjani Sridharan #define SOF_TKN_INTEL_COPIER_NODE_TYPE		1980
193bd10cd5eSRanjani Sridharan 
1944483151eSLiam Girdwood #endif
195