xref: /openbmc/linux/include/uapi/sound/sof/tokens.h (revision ca5ce0ca)
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
57*ca5ce0caSJyri Sarha #define SOF_TKN_SCHED_USE_CHAIN_DMA		209
584483151eSLiam Girdwood 
594483151eSLiam Girdwood /* volume */
604483151eSLiam Girdwood #define SOF_TKN_VOLUME_RAMP_STEP_TYPE		250
614483151eSLiam Girdwood #define SOF_TKN_VOLUME_RAMP_STEP_MS		251
624483151eSLiam Girdwood 
63bd10cd5eSRanjani Sridharan #define SOF_TKN_GAIN_RAMP_TYPE			260
64bd10cd5eSRanjani Sridharan #define SOF_TKN_GAIN_RAMP_DURATION		261
65bd10cd5eSRanjani Sridharan #define SOF_TKN_GAIN_VAL			262
66bd10cd5eSRanjani Sridharan 
674483151eSLiam Girdwood /* SRC */
684483151eSLiam Girdwood #define SOF_TKN_SRC_RATE_IN			300
694483151eSLiam Girdwood #define SOF_TKN_SRC_RATE_OUT			301
704483151eSLiam Girdwood 
71433363e7SSeppo Ingalsuo /* ASRC */
72433363e7SSeppo Ingalsuo #define SOF_TKN_ASRC_RATE_IN			320
73433363e7SSeppo Ingalsuo #define SOF_TKN_ASRC_RATE_OUT			321
74433363e7SSeppo Ingalsuo #define SOF_TKN_ASRC_ASYNCHRONOUS_MODE		322
75433363e7SSeppo Ingalsuo #define SOF_TKN_ASRC_OPERATION_MODE		323
76433363e7SSeppo Ingalsuo 
774483151eSLiam Girdwood /* PCM */
784483151eSLiam Girdwood #define SOF_TKN_PCM_DMAC_CONFIG			353
794483151eSLiam Girdwood 
804483151eSLiam Girdwood /* Generic components */
814483151eSLiam Girdwood #define SOF_TKN_COMP_PERIOD_SINK_COUNT		400
824483151eSLiam Girdwood #define SOF_TKN_COMP_PERIOD_SOURCE_COUNT	401
834483151eSLiam Girdwood #define SOF_TKN_COMP_FORMAT			402
844483151eSLiam Girdwood /* Token retired with ABI 3.2, do not use for new capabilities
854483151eSLiam Girdwood  * #define SOF_TKN_COMP_PRELOAD_COUNT		403
864483151eSLiam Girdwood  */
87d1c6c4a9SGuennadi Liakhovetski #define SOF_TKN_COMP_CORE_ID			404
8843fbb086SKeyon Jie #define SOF_TKN_COMP_UUID                       405
89bd10cd5eSRanjani Sridharan #define SOF_TKN_COMP_CPC			406
90bd10cd5eSRanjani Sridharan #define SOF_TKN_COMP_IS_PAGES			409
91bd10cd5eSRanjani Sridharan #define SOF_TKN_COMP_NUM_AUDIO_FORMATS		410
92bb79f2a6SRanjani Sridharan #define SOF_TKN_COMP_NUM_INPUT_PINS		411
93bb79f2a6SRanjani Sridharan #define SOF_TKN_COMP_NUM_OUTPUT_PINS		412
943b3acedbSChao Song /*
95bb79f2a6SRanjani Sridharan  * The token for input/output pin binding, it specifies the widget
96bb79f2a6SRanjani Sridharan  * name that the input/output pin is connected from/to.
973b3acedbSChao Song  */
98bb79f2a6SRanjani Sridharan #define SOF_TKN_COMP_INPUT_PIN_BINDING_WNAME	413
99bb79f2a6SRanjani Sridharan #define SOF_TKN_COMP_OUTPUT_PIN_BINDING_WNAME	414
1004fdef47aSRanjani Sridharan #define SOF_TKN_COMP_NUM_INPUT_AUDIO_FORMATS	415
1014fdef47aSRanjani Sridharan #define SOF_TKN_COMP_NUM_OUTPUT_AUDIO_FORMATS	416
1023b3acedbSChao Song 
1034483151eSLiam Girdwood 
1044483151eSLiam Girdwood /* SSP */
1054483151eSLiam Girdwood #define SOF_TKN_INTEL_SSP_CLKS_CONTROL		500
1064483151eSLiam Girdwood #define SOF_TKN_INTEL_SSP_MCLK_ID		501
1074483151eSLiam Girdwood #define SOF_TKN_INTEL_SSP_SAMPLE_BITS		502
1084483151eSLiam Girdwood #define SOF_TKN_INTEL_SSP_FRAME_PULSE_WIDTH	503
1094483151eSLiam Girdwood #define SOF_TKN_INTEL_SSP_QUIRKS		504
1104483151eSLiam Girdwood #define SOF_TKN_INTEL_SSP_TDM_PADDING_PER_SLOT	505
1116298b787SJanusz Jankowski #define SOF_TKN_INTEL_SSP_BCLK_DELAY		506
1124483151eSLiam Girdwood 
1134483151eSLiam Girdwood /* DMIC */
1144483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_DRIVER_VERSION	600
1154483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_CLK_MIN		601
1164483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_CLK_MAX		602
1174483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_DUTY_MIN		603
1184483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_DUTY_MAX		604
1194483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_NUM_PDM_ACTIVE	605
1204483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_SAMPLE_RATE		608
1214483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_FIFO_WORD_LENGTH	609
1227df43911SSeppo Ingalsuo #define SOF_TKN_INTEL_DMIC_UNMUTE_RAMP_TIME_MS  610
1234483151eSLiam Girdwood 
1244483151eSLiam Girdwood /* DMIC PDM */
1254483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_PDM_CTRL_ID		700
1264483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_PDM_MIC_A_Enable	701
1274483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_PDM_MIC_B_Enable	702
1284483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_PDM_POLARITY_A	703
1294483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_PDM_POLARITY_B	704
1304483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_PDM_CLK_EDGE		705
1314483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_PDM_SKEW		706
1324483151eSLiam Girdwood 
1334483151eSLiam Girdwood /* Tone */
1344483151eSLiam Girdwood #define SOF_TKN_TONE_SAMPLE_RATE		800
1354483151eSLiam Girdwood 
1364483151eSLiam Girdwood /* Processing Components */
1374483151eSLiam Girdwood #define SOF_TKN_PROCESS_TYPE                    900
1384483151eSLiam Girdwood 
1394483151eSLiam Girdwood /* for backward compatibility */
1404483151eSLiam Girdwood #define SOF_TKN_EFFECT_TYPE	SOF_TKN_PROCESS_TYPE
1414483151eSLiam Girdwood 
142f59b16efSDaniel Baluta /* SAI */
1439c1d4cf6SGuido Roncarolo #define SOF_TKN_IMX_SAI_MCLK_ID			1000
144f59b16efSDaniel Baluta 
145f59b16efSDaniel Baluta /* ESAI */
146b4be4276SDaniel Baluta #define SOF_TKN_IMX_ESAI_MCLK_ID		1100
147f59b16efSDaniel Baluta 
1484a949409SKeyon Jie /* Stream */
1494a949409SKeyon Jie #define SOF_TKN_STREAM_PLAYBACK_COMPATIBLE_D0I3	1200
1504a949409SKeyon Jie #define SOF_TKN_STREAM_CAPTURE_COMPATIBLE_D0I3	1201
1514a949409SKeyon Jie 
1525d43001aSJaska Uimonen /* Led control for mute switches */
1535d43001aSJaska Uimonen #define SOF_TKN_MUTE_LED_USE			1300
1545d43001aSJaska Uimonen #define SOF_TKN_MUTE_LED_DIRECTION		1301
1555d43001aSJaska Uimonen 
156c7fc96dfSBard Liao /* ALH */
157c7fc96dfSBard Liao #define SOF_TKN_INTEL_ALH_RATE			1400
158c7fc96dfSBard Liao #define SOF_TKN_INTEL_ALH_CH			1401
159c7fc96dfSBard Liao 
16018aaab64SBard Liao /* HDA */
16118aaab64SBard Liao #define SOF_TKN_INTEL_HDA_RATE			1500
16218aaab64SBard Liao #define SOF_TKN_INTEL_HDA_CH			1501
16318aaab64SBard Liao 
164e6feefa5SYC Hung /* AFE */
165e6feefa5SYC Hung #define SOF_TKN_MEDIATEK_AFE_RATE		1600
166e6feefa5SYC Hung #define SOF_TKN_MEDIATEK_AFE_CH			1601
167e6feefa5SYC Hung #define SOF_TKN_MEDIATEK_AFE_FORMAT		1602
168e6feefa5SYC Hung 
169bd10cd5eSRanjani Sridharan /* MIXER */
170bd10cd5eSRanjani Sridharan #define SOF_TKN_MIXER_TYPE			1700
171bd10cd5eSRanjani Sridharan 
172689614ceSAjit Kumar Pandey /* ACPDMIC */
173689614ceSAjit Kumar Pandey #define SOF_TKN_AMD_ACPDMIC_RATE		1800
174689614ceSAjit Kumar Pandey #define SOF_TKN_AMD_ACPDMIC_CH			1801
175689614ceSAjit Kumar Pandey 
176bd10cd5eSRanjani Sridharan /* CAVS AUDIO FORMAT */
177bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_RATE	1900
178bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_BIT_DEPTH	1901
1793f738e4aSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_VALID_BIT_DEPTH	1902
180bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_CHANNELS	1903
181bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_CH_MAP	1904
182bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_CH_CFG	1905
183bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_INTERLEAVING_STYLE	1906
184bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_FMT_CFG	1907
185bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_SAMPLE_TYPE	1908
1867ab6b1e8SRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_PIN_INDEX		1909
187bd10cd5eSRanjani Sridharan /* intentional token numbering discontinuity, reserved for future use */
188bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_RATE	1930
189bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_BIT_DEPTH	1931
1903f738e4aSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_VALID_BIT_DEPTH 1932
191bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_CHANNELS	1933
192bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_CH_MAP	1934
193bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_CH_CFG	1935
194bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_INTERLEAVING_STYLE	1936
195bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_FMT_CFG	1937
196bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_SAMPLE_TYPE	1938
197bd10cd5eSRanjani Sridharan /* intentional token numbering discontinuity, reserved for future use */
198bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_IBS		1970
199bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_OBS		1971
200bd10cd5eSRanjani Sridharan #define SOF_TKN_CAVS_AUDIO_FORMAT_DMA_BUFFER_SIZE	1972
201bd10cd5eSRanjani Sridharan 
202bd10cd5eSRanjani Sridharan /* COPIER */
203bd10cd5eSRanjani Sridharan #define SOF_TKN_INTEL_COPIER_NODE_TYPE		1980
204594c1bb9SRanjani Sridharan #define SOF_TKN_INTEL_COPIER_DEEP_BUFFER_DMA_MS	1981
205bd10cd5eSRanjani Sridharan 
20675af4199SV sujith kumar Reddy /* ACP I2S */
20775af4199SV sujith kumar Reddy #define SOF_TKN_AMD_ACPI2S_RATE			1700
20875af4199SV sujith kumar Reddy #define SOF_TKN_AMD_ACPI2S_CH			1701
20975af4199SV sujith kumar Reddy #define SOF_TKN_AMD_ACPI2S_TDM_MODE		1702
21075af4199SV sujith kumar Reddy 
2114483151eSLiam Girdwood #endif
212