325 lines · c
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */2/*3 * snd_sst_tokens.h - Intel SST tokens definition4 *5 * Copyright (C) 2016 Intel Corp6 * Author: Shreyas NC <shreyas.nc@intel.com>7 */8#ifndef __SND_SST_TOKENS_H__9#define __SND_SST_TOKENS_H__10 11/**12 * %SKL_TKN_UUID: Module UUID13 *14 * %SKL_TKN_U8_BLOCK_TYPE: Type of the private data block.Can be:15 * tuples, bytes, short and words16 *17 * %SKL_TKN_U8_IN_PIN_TYPE: Input pin type,18 * homogenous=0, heterogenous=119 *20 * %SKL_TKN_U8_OUT_PIN_TYPE: Output pin type,21 * homogenous=0, heterogenous=122 * %SKL_TKN_U8_DYN_IN_PIN: Configure Input pin dynamically23 * if true24 *25 * %SKL_TKN_U8_DYN_OUT_PIN: Configure Output pin dynamically26 * if true27 *28 * %SKL_TKN_U8_IN_QUEUE_COUNT: Store the number of Input pins29 *30 * %SKL_TKN_U8_OUT_QUEUE_COUNT: Store the number of Output pins31 *32 * %SKL_TKN_U8_TIME_SLOT: TDM slot number33 *34 * %SKL_TKN_U8_CORE_ID: Stores module affinity value.Can take35 * the values:36 * SKL_AFFINITY_CORE_0 = 0,37 * SKL_AFFINITY_CORE_1,38 * SKL_AFFINITY_CORE_MAX39 *40 * %SKL_TKN_U8_MOD_TYPE: Module type value.41 *42 * %SKL_TKN_U8_CONN_TYPE: Module connection type can be a FE,43 * BE or NONE as defined :44 * SKL_PIPE_CONN_TYPE_NONE = 0,45 * SKL_PIPE_CONN_TYPE_FE = 1 (HOST_DMA)46 * SKL_PIPE_CONN_TYPE_BE = 2 (LINK_DMA)47 *48 * %SKL_TKN_U8_DEV_TYPE: Type of device to which the module is49 * connected50 * Can take the values:51 * SKL_DEVICE_BT = 0x0,52 * SKL_DEVICE_DMIC = 0x1,53 * SKL_DEVICE_I2S = 0x2,54 * SKL_DEVICE_SLIMBUS = 0x3,55 * SKL_DEVICE_HDALINK = 0x4,56 * SKL_DEVICE_HDAHOST = 0x5,57 * SKL_DEVICE_NONE58 *59 * %SKL_TKN_U8_HW_CONN_TYPE: Connection type of the HW to which the60 * module is connected61 * SKL_CONN_NONE = 0,62 * SKL_CONN_SOURCE = 1,63 * SKL_CONN_SINK = 264 *65 * %SKL_TKN_U16_PIN_INST_ID: Stores the pin instance id66 *67 * %SKL_TKN_U16_MOD_INST_ID: Stores the mdule instance id68 *69 * %SKL_TKN_U32_MAX_MCPS: Module max mcps value70 *71 * %SKL_TKN_U32_MEM_PAGES: Module resource pages72 *73 * %SKL_TKN_U32_OBS: Stores Output Buffer size74 *75 * %SKL_TKN_U32_IBS: Stores input buffer size76 *77 * %SKL_TKN_U32_VBUS_ID: Module VBUS_ID. PDM=0, SSP0=0,78 * SSP1=1,SSP2=2,79 * SSP3=3, SSP4=4,80 * SSP5=5, SSP6=6,INVALID81 *82 * %SKL_TKN_U32_PARAMS_FIXUP: Module Params fixup mask83 * %SKL_TKN_U32_CONVERTER: Module params converter mask84 * %SKL_TKN_U32_PIPE_ID: Stores the pipe id85 *86 * %SKL_TKN_U32_PIPE_CONN_TYPE: Type of the token to which the pipe is87 * connected to. It can be88 * SKL_PIPE_CONN_TYPE_NONE = 0,89 * SKL_PIPE_CONN_TYPE_FE = 1 (HOST_DMA),90 * SKL_PIPE_CONN_TYPE_BE = 2 (LINK_DMA),91 *92 * %SKL_TKN_U32_PIPE_PRIORITY: Pipe priority value93 * %SKL_TKN_U32_PIPE_MEM_PGS: Pipe resource pages94 *95 * %SKL_TKN_U32_DIR_PIN_COUNT: Value for the direction to set input/output96 * formats and the pin count.97 * The first 4 bits have the direction98 * value and the next 4 have99 * the pin count value.100 * SKL_DIR_IN = 0, SKL_DIR_OUT = 1.101 * The input and output formats102 * share the same set of tokens103 * with the distinction between input104 * and output made by reading direction105 * token.106 *107 * %SKL_TKN_U32_FMT_CH: Supported channel count108 *109 * %SKL_TKN_U32_FMT_FREQ: Supported frequency/sample rate110 *111 * %SKL_TKN_U32_FMT_BIT_DEPTH: Supported container size112 *113 * %SKL_TKN_U32_FMT_SAMPLE_SIZE:Number of samples in the container114 *115 * %SKL_TKN_U32_FMT_CH_CONFIG: Supported channel configurations for the116 * input/output.117 *118 * %SKL_TKN_U32_FMT_INTERLEAVE: Interleaving style which can be per119 * channel or per sample. The values can be :120 * SKL_INTERLEAVING_PER_CHANNEL = 0,121 * SKL_INTERLEAVING_PER_SAMPLE = 1,122 *123 * %SKL_TKN_U32_FMT_SAMPLE_TYPE:124 * Specifies the sample type. Can take the125 * values: SKL_SAMPLE_TYPE_INT_MSB = 0,126 * SKL_SAMPLE_TYPE_INT_LSB = 1,127 * SKL_SAMPLE_TYPE_INT_SIGNED = 2,128 * SKL_SAMPLE_TYPE_INT_UNSIGNED = 3,129 * SKL_SAMPLE_TYPE_FLOAT = 4130 *131 * %SKL_TKN_U32_CH_MAP: Channel map values132 * %SKL_TKN_U32_MOD_SET_PARAMS: It can take these values:133 * SKL_PARAM_DEFAULT, SKL_PARAM_INIT,134 * SKL_PARAM_SET, SKL_PARAM_BIND135 *136 * %SKL_TKN_U32_MOD_PARAM_ID: ID of the module params137 *138 * %SKL_TKN_U32_CAPS_SET_PARAMS:139 * Set params value140 *141 * %SKL_TKN_U32_CAPS_PARAMS_ID: Params ID142 *143 * %SKL_TKN_U32_CAPS_SIZE: Caps size144 *145 * %SKL_TKN_U32_PROC_DOMAIN: Specify processing domain146 *147 * %SKL_TKN_U32_LIB_COUNT: Specifies the number of libraries148 *149 * %SKL_TKN_STR_LIB_NAME: Specifies the library name150 *151 * %SKL_TKN_U32_PMODE: Specifies the power mode for pipe152 *153 * %SKL_TKL_U32_D0I3_CAPS: Specifies the D0i3 capability for module154 *155 * %SKL_TKN_U32_DMA_BUF_SIZE: DMA buffer size in millisec156 *157 * %SKL_TKN_U32_PIPE_DIR: Specifies pipe direction. Can be158 * playback/capture.159 *160 * %SKL_TKN_U32_NUM_CONFIGS: Number of pipe configs161 *162 * %SKL_TKN_U32_PATH_MEM_PGS: Size of memory (in pages) required for pipeline163 * and its data164 *165 * %SKL_TKN_U32_PIPE_CONFIG_ID: Config id for the modules in the pipe166 * and PCM params supported by that pipe167 * config. This is used as index to fill168 * up the pipe config and module config169 * structure.170 *171 * %SKL_TKN_U32_CFG_FREQ:172 * %SKL_TKN_U8_CFG_CHAN:173 * %SKL_TKN_U8_CFG_BPS: PCM params (freq, channels, bits per sample)174 * supported for each of the pipe configs.175 *176 * %SKL_TKN_CFG_MOD_RES_ID: Module's resource index for each of the177 * pipe config178 *179 * %SKL_TKN_CFG_MOD_FMT_ID: Module's interface index for each of the180 * pipe config181 *182 * %SKL_TKN_U8_NUM_MOD: Number of modules in the manifest183 *184 * %SKL_TKN_MM_U8_MOD_IDX: Current index of the module in the manifest185 *186 * %SKL_TKN_MM_U8_NUM_RES: Number of resources for the module187 *188 * %SKL_TKN_MM_U8_NUM_INTF: Number of interfaces for the module189 *190 * %SKL_TKN_MM_U32_RES_ID: Resource index for the resource info to191 * be filled into.192 * A module can support multiple resource193 * configuration and is represnted as a194 * resource table. This index is used to195 * fill information into appropriate index.196 *197 * %SKL_TKN_MM_U32_CPS: DSP cycles per second198 *199 * %SKL_TKN_MM_U32_DMA_SIZE: Allocated buffer size for gateway DMA200 *201 * %SKL_TKN_MM_U32_CPC: DSP cycles allocated per frame202 *203 * %SKL_TKN_MM_U32_RES_PIN_ID: Resource pin index in the module204 *205 * %SKL_TKN_MM_U32_INTF_PIN_ID: Interface index in the module206 *207 * %SKL_TKN_MM_U32_PIN_BUF: Buffer size of the module pin208 *209 * %SKL_TKN_MM_U32_FMT_ID: Format index for each of the interface/210 * format information to be filled into.211 *212 * %SKL_TKN_MM_U32_NUM_IN_FMT: Number of input formats213 * %SKL_TKN_MM_U32_NUM_OUT_FMT: Number of output formats214 *215 * %SKL_TKN_U32_ASTATE_IDX: Table Index for the A-State entry to be filled216 * with kcps and clock source217 *218 * %SKL_TKN_U32_ASTATE_COUNT: Number of valid entries in A-State table219 *220 * %SKL_TKN_U32_ASTATE_KCPS: Specifies the core load threshold (in kilo221 * cycles per second) below which DSP is clocked222 * from source specified by clock source.223 *224 * %SKL_TKN_U32_ASTATE_CLK_SRC: Clock source for A-State entry225 *226 * %SKL_TKN_U32_FMT_CFG_IDX: Format config index227 *228 * module_id and loadable flags dont have tokens as these values will be229 * read from the DSP FW manifest230 *231 * Tokens defined can be used either in the manifest or widget private data.232 *233 * SKL_TKN_MM is used as a suffix for all tokens that represent234 * module data in the manifest.235 */236enum SKL_TKNS {237 SKL_TKN_UUID = 1,238 SKL_TKN_U8_NUM_BLOCKS,239 SKL_TKN_U8_BLOCK_TYPE,240 SKL_TKN_U8_IN_PIN_TYPE,241 SKL_TKN_U8_OUT_PIN_TYPE,242 SKL_TKN_U8_DYN_IN_PIN,243 SKL_TKN_U8_DYN_OUT_PIN,244 SKL_TKN_U8_IN_QUEUE_COUNT,245 SKL_TKN_U8_OUT_QUEUE_COUNT,246 SKL_TKN_U8_TIME_SLOT,247 SKL_TKN_U8_CORE_ID,248 SKL_TKN_U8_MOD_TYPE,249 SKL_TKN_U8_CONN_TYPE,250 SKL_TKN_U8_DEV_TYPE,251 SKL_TKN_U8_HW_CONN_TYPE,252 SKL_TKN_U16_MOD_INST_ID,253 SKL_TKN_U16_BLOCK_SIZE,254 SKL_TKN_U32_MAX_MCPS,255 SKL_TKN_U32_MEM_PAGES,256 SKL_TKN_U32_OBS,257 SKL_TKN_U32_IBS,258 SKL_TKN_U32_VBUS_ID,259 SKL_TKN_U32_PARAMS_FIXUP,260 SKL_TKN_U32_CONVERTER,261 SKL_TKN_U32_PIPE_ID,262 SKL_TKN_U32_PIPE_CONN_TYPE,263 SKL_TKN_U32_PIPE_PRIORITY,264 SKL_TKN_U32_PIPE_MEM_PGS,265 SKL_TKN_U32_DIR_PIN_COUNT,266 SKL_TKN_U32_FMT_CH,267 SKL_TKN_U32_FMT_FREQ,268 SKL_TKN_U32_FMT_BIT_DEPTH,269 SKL_TKN_U32_FMT_SAMPLE_SIZE,270 SKL_TKN_U32_FMT_CH_CONFIG,271 SKL_TKN_U32_FMT_INTERLEAVE,272 SKL_TKN_U32_FMT_SAMPLE_TYPE,273 SKL_TKN_U32_FMT_CH_MAP,274 SKL_TKN_U32_PIN_MOD_ID,275 SKL_TKN_U32_PIN_INST_ID,276 SKL_TKN_U32_MOD_SET_PARAMS,277 SKL_TKN_U32_MOD_PARAM_ID,278 SKL_TKN_U32_CAPS_SET_PARAMS,279 SKL_TKN_U32_CAPS_PARAMS_ID,280 SKL_TKN_U32_CAPS_SIZE,281 SKL_TKN_U32_PROC_DOMAIN,282 SKL_TKN_U32_LIB_COUNT,283 SKL_TKN_STR_LIB_NAME,284 SKL_TKN_U32_PMODE,285 SKL_TKL_U32_D0I3_CAPS, /* Typo added at v4.10 */286 SKL_TKN_U32_D0I3_CAPS = SKL_TKL_U32_D0I3_CAPS,287 SKL_TKN_U32_DMA_BUF_SIZE,288 289 SKL_TKN_U32_PIPE_DIRECTION,290 SKL_TKN_U32_PIPE_CONFIG_ID,291 SKL_TKN_U32_NUM_CONFIGS,292 SKL_TKN_U32_PATH_MEM_PGS,293 294 SKL_TKN_U32_CFG_FREQ,295 SKL_TKN_U8_CFG_CHAN,296 SKL_TKN_U8_CFG_BPS,297 SKL_TKN_CFG_MOD_RES_ID,298 SKL_TKN_CFG_MOD_FMT_ID,299 SKL_TKN_U8_NUM_MOD,300 301 SKL_TKN_MM_U8_MOD_IDX,302 SKL_TKN_MM_U8_NUM_RES,303 SKL_TKN_MM_U8_NUM_INTF,304 SKL_TKN_MM_U32_RES_ID,305 SKL_TKN_MM_U32_CPS,306 SKL_TKN_MM_U32_DMA_SIZE,307 SKL_TKN_MM_U32_CPC,308 SKL_TKN_MM_U32_RES_PIN_ID,309 SKL_TKN_MM_U32_INTF_PIN_ID,310 SKL_TKN_MM_U32_PIN_BUF,311 SKL_TKN_MM_U32_FMT_ID,312 SKL_TKN_MM_U32_NUM_IN_FMT,313 SKL_TKN_MM_U32_NUM_OUT_FMT,314 315 SKL_TKN_U32_ASTATE_IDX,316 SKL_TKN_U32_ASTATE_COUNT,317 SKL_TKN_U32_ASTATE_KCPS,318 SKL_TKN_U32_ASTATE_CLK_SRC,319 320 SKL_TKN_U32_FMT_CFG_IDX = 96,321 SKL_TKN_MAX = SKL_TKN_U32_FMT_CFG_IDX,322};323 324#endif325