xref: /openbmc/linux/include/uapi/sound/sof/tokens.h (revision d1c6c4a9)
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
274483151eSLiam Girdwood 
284483151eSLiam Girdwood /*
294483151eSLiam Girdwood  * Tokens - must match values in topology configurations
304483151eSLiam Girdwood  */
314483151eSLiam Girdwood 
324483151eSLiam Girdwood /* buffers */
334483151eSLiam Girdwood #define SOF_TKN_BUF_SIZE			100
344483151eSLiam Girdwood #define SOF_TKN_BUF_CAPS			101
354483151eSLiam Girdwood 
364483151eSLiam Girdwood /* DAI */
374483151eSLiam Girdwood /* Token retired with ABI 3.2, do not use for new capabilities
384483151eSLiam Girdwood  * #define	SOF_TKN_DAI_DMAC_CONFIG			153
394483151eSLiam Girdwood  */
404483151eSLiam Girdwood #define SOF_TKN_DAI_TYPE			154
414483151eSLiam Girdwood #define SOF_TKN_DAI_INDEX			155
424483151eSLiam Girdwood #define SOF_TKN_DAI_DIRECTION			156
434483151eSLiam Girdwood 
444483151eSLiam Girdwood /* scheduling */
454483151eSLiam Girdwood #define SOF_TKN_SCHED_PERIOD			200
464483151eSLiam Girdwood #define SOF_TKN_SCHED_PRIORITY			201
474483151eSLiam Girdwood #define SOF_TKN_SCHED_MIPS			202
484483151eSLiam Girdwood #define SOF_TKN_SCHED_CORE			203
494483151eSLiam Girdwood #define SOF_TKN_SCHED_FRAMES			204
504483151eSLiam Girdwood #define SOF_TKN_SCHED_TIME_DOMAIN		205
514483151eSLiam Girdwood 
524483151eSLiam Girdwood /* volume */
534483151eSLiam Girdwood #define SOF_TKN_VOLUME_RAMP_STEP_TYPE		250
544483151eSLiam Girdwood #define SOF_TKN_VOLUME_RAMP_STEP_MS		251
554483151eSLiam Girdwood 
564483151eSLiam Girdwood /* SRC */
574483151eSLiam Girdwood #define SOF_TKN_SRC_RATE_IN			300
584483151eSLiam Girdwood #define SOF_TKN_SRC_RATE_OUT			301
594483151eSLiam Girdwood 
60433363e7SSeppo Ingalsuo /* ASRC */
61433363e7SSeppo Ingalsuo #define SOF_TKN_ASRC_RATE_IN			320
62433363e7SSeppo Ingalsuo #define SOF_TKN_ASRC_RATE_OUT			321
63433363e7SSeppo Ingalsuo #define SOF_TKN_ASRC_ASYNCHRONOUS_MODE		322
64433363e7SSeppo Ingalsuo #define SOF_TKN_ASRC_OPERATION_MODE		323
65433363e7SSeppo Ingalsuo 
664483151eSLiam Girdwood /* PCM */
674483151eSLiam Girdwood #define SOF_TKN_PCM_DMAC_CONFIG			353
684483151eSLiam Girdwood 
694483151eSLiam Girdwood /* Generic components */
704483151eSLiam Girdwood #define SOF_TKN_COMP_PERIOD_SINK_COUNT		400
714483151eSLiam Girdwood #define SOF_TKN_COMP_PERIOD_SOURCE_COUNT	401
724483151eSLiam Girdwood #define SOF_TKN_COMP_FORMAT			402
734483151eSLiam Girdwood /* Token retired with ABI 3.2, do not use for new capabilities
744483151eSLiam Girdwood  * #define SOF_TKN_COMP_PRELOAD_COUNT		403
754483151eSLiam Girdwood  */
76d1c6c4a9SGuennadi Liakhovetski #define SOF_TKN_COMP_CORE_ID			404
774483151eSLiam Girdwood 
784483151eSLiam Girdwood /* SSP */
794483151eSLiam Girdwood #define SOF_TKN_INTEL_SSP_CLKS_CONTROL		500
804483151eSLiam Girdwood #define SOF_TKN_INTEL_SSP_MCLK_ID		501
814483151eSLiam Girdwood #define SOF_TKN_INTEL_SSP_SAMPLE_BITS		502
824483151eSLiam Girdwood #define SOF_TKN_INTEL_SSP_FRAME_PULSE_WIDTH	503
834483151eSLiam Girdwood #define SOF_TKN_INTEL_SSP_QUIRKS		504
844483151eSLiam Girdwood #define SOF_TKN_INTEL_SSP_TDM_PADDING_PER_SLOT	505
856298b787SJanusz Jankowski #define SOF_TKN_INTEL_SSP_BCLK_DELAY		506
864483151eSLiam Girdwood 
874483151eSLiam Girdwood /* DMIC */
884483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_DRIVER_VERSION	600
894483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_CLK_MIN		601
904483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_CLK_MAX		602
914483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_DUTY_MIN		603
924483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_DUTY_MAX		604
934483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_NUM_PDM_ACTIVE	605
944483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_SAMPLE_RATE		608
954483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_FIFO_WORD_LENGTH	609
967df43911SSeppo Ingalsuo #define SOF_TKN_INTEL_DMIC_UNMUTE_RAMP_TIME_MS  610
974483151eSLiam Girdwood 
984483151eSLiam Girdwood /* DMIC PDM */
994483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_PDM_CTRL_ID		700
1004483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_PDM_MIC_A_Enable	701
1014483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_PDM_MIC_B_Enable	702
1024483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_PDM_POLARITY_A	703
1034483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_PDM_POLARITY_B	704
1044483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_PDM_CLK_EDGE		705
1054483151eSLiam Girdwood #define SOF_TKN_INTEL_DMIC_PDM_SKEW		706
1064483151eSLiam Girdwood 
1074483151eSLiam Girdwood /* Tone */
1084483151eSLiam Girdwood #define SOF_TKN_TONE_SAMPLE_RATE		800
1094483151eSLiam Girdwood 
1104483151eSLiam Girdwood /* Processing Components */
1114483151eSLiam Girdwood #define SOF_TKN_PROCESS_TYPE                    900
1124483151eSLiam Girdwood 
1134483151eSLiam Girdwood /* for backward compatibility */
1144483151eSLiam Girdwood #define SOF_TKN_EFFECT_TYPE	SOF_TKN_PROCESS_TYPE
1154483151eSLiam Girdwood 
116f59b16efSDaniel Baluta /* SAI */
1179c1d4cf6SGuido Roncarolo #define SOF_TKN_IMX_SAI_MCLK_ID			1000
118f59b16efSDaniel Baluta 
119f59b16efSDaniel Baluta /* ESAI */
120b4be4276SDaniel Baluta #define SOF_TKN_IMX_ESAI_MCLK_ID		1100
121f59b16efSDaniel Baluta 
1224a949409SKeyon Jie /* Stream */
1234a949409SKeyon Jie #define SOF_TKN_STREAM_PLAYBACK_COMPATIBLE_D0I3	1200
1244a949409SKeyon Jie #define SOF_TKN_STREAM_CAPTURE_COMPATIBLE_D0I3	1201
1254a949409SKeyon Jie 
1265d43001aSJaska Uimonen /* Led control for mute switches */
1275d43001aSJaska Uimonen #define SOF_TKN_MUTE_LED_USE			1300
1285d43001aSJaska Uimonen #define SOF_TKN_MUTE_LED_DIRECTION		1301
1295d43001aSJaska Uimonen 
130c7fc96dfSBard Liao /* ALH */
131c7fc96dfSBard Liao #define SOF_TKN_INTEL_ALH_RATE			1400
132c7fc96dfSBard Liao #define SOF_TKN_INTEL_ALH_CH			1401
133c7fc96dfSBard Liao 
13418aaab64SBard Liao /* HDA */
13518aaab64SBard Liao #define SOF_TKN_INTEL_HDA_RATE			1500
13618aaab64SBard Liao #define SOF_TKN_INTEL_HDA_CH			1501
13718aaab64SBard Liao 
1384483151eSLiam Girdwood #endif
139