/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */1/*2* snd_sst_tokens.h - Intel SST tokens definition3*4* Copyright (C) 2016 Intel Corp5* Author: Shreyas NC <[email protected]>6*/7#ifndef __SND_SST_TOKENS_H__8#define __SND_SST_TOKENS_H__910/**11* %SKL_TKN_UUID: Module UUID12*13* %SKL_TKN_U8_BLOCK_TYPE: Type of the private data block.Can be:14* tuples, bytes, short and words15*16* %SKL_TKN_U8_IN_PIN_TYPE: Input pin type,17* homogenous=0, heterogenous=118*19* %SKL_TKN_U8_OUT_PIN_TYPE: Output pin type,20* homogenous=0, heterogenous=121* %SKL_TKN_U8_DYN_IN_PIN: Configure Input pin dynamically22* if true23*24* %SKL_TKN_U8_DYN_OUT_PIN: Configure Output pin dynamically25* if true26*27* %SKL_TKN_U8_IN_QUEUE_COUNT: Store the number of Input pins28*29* %SKL_TKN_U8_OUT_QUEUE_COUNT: Store the number of Output pins30*31* %SKL_TKN_U8_TIME_SLOT: TDM slot number32*33* %SKL_TKN_U8_CORE_ID: Stores module affinity value.Can take34* the values:35* SKL_AFFINITY_CORE_0 = 0,36* SKL_AFFINITY_CORE_1,37* SKL_AFFINITY_CORE_MAX38*39* %SKL_TKN_U8_MOD_TYPE: Module type value.40*41* %SKL_TKN_U8_CONN_TYPE: Module connection type can be a FE,42* BE or NONE as defined :43* SKL_PIPE_CONN_TYPE_NONE = 0,44* SKL_PIPE_CONN_TYPE_FE = 1 (HOST_DMA)45* SKL_PIPE_CONN_TYPE_BE = 2 (LINK_DMA)46*47* %SKL_TKN_U8_DEV_TYPE: Type of device to which the module is48* connected49* Can take the values:50* SKL_DEVICE_BT = 0x0,51* SKL_DEVICE_DMIC = 0x1,52* SKL_DEVICE_I2S = 0x2,53* SKL_DEVICE_SLIMBUS = 0x3,54* SKL_DEVICE_HDALINK = 0x4,55* SKL_DEVICE_HDAHOST = 0x5,56* SKL_DEVICE_NONE57*58* %SKL_TKN_U8_HW_CONN_TYPE: Connection type of the HW to which the59* module is connected60* SKL_CONN_NONE = 0,61* SKL_CONN_SOURCE = 1,62* SKL_CONN_SINK = 263*64* %SKL_TKN_U16_PIN_INST_ID: Stores the pin instance id65*66* %SKL_TKN_U16_MOD_INST_ID: Stores the mdule instance id67*68* %SKL_TKN_U32_MAX_MCPS: Module max mcps value69*70* %SKL_TKN_U32_MEM_PAGES: Module resource pages71*72* %SKL_TKN_U32_OBS: Stores Output Buffer size73*74* %SKL_TKN_U32_IBS: Stores input buffer size75*76* %SKL_TKN_U32_VBUS_ID: Module VBUS_ID. PDM=0, SSP0=0,77* SSP1=1,SSP2=2,78* SSP3=3, SSP4=4,79* SSP5=5, SSP6=6,INVALID80*81* %SKL_TKN_U32_PARAMS_FIXUP: Module Params fixup mask82* %SKL_TKN_U32_CONVERTER: Module params converter mask83* %SKL_TKN_U32_PIPE_ID: Stores the pipe id84*85* %SKL_TKN_U32_PIPE_CONN_TYPE: Type of the token to which the pipe is86* connected to. It can be87* SKL_PIPE_CONN_TYPE_NONE = 0,88* SKL_PIPE_CONN_TYPE_FE = 1 (HOST_DMA),89* SKL_PIPE_CONN_TYPE_BE = 2 (LINK_DMA),90*91* %SKL_TKN_U32_PIPE_PRIORITY: Pipe priority value92* %SKL_TKN_U32_PIPE_MEM_PGS: Pipe resource pages93*94* %SKL_TKN_U32_DIR_PIN_COUNT: Value for the direction to set input/output95* formats and the pin count.96* The first 4 bits have the direction97* value and the next 4 have98* the pin count value.99* SKL_DIR_IN = 0, SKL_DIR_OUT = 1.100* The input and output formats101* share the same set of tokens102* with the distinction between input103* and output made by reading direction104* token.105*106* %SKL_TKN_U32_FMT_CH: Supported channel count107*108* %SKL_TKN_U32_FMT_FREQ: Supported frequency/sample rate109*110* %SKL_TKN_U32_FMT_BIT_DEPTH: Supported container size111*112* %SKL_TKN_U32_FMT_SAMPLE_SIZE:Number of samples in the container113*114* %SKL_TKN_U32_FMT_CH_CONFIG: Supported channel configurations for the115* input/output.116*117* %SKL_TKN_U32_FMT_INTERLEAVE: Interleaving style which can be per118* channel or per sample. The values can be :119* SKL_INTERLEAVING_PER_CHANNEL = 0,120* SKL_INTERLEAVING_PER_SAMPLE = 1,121*122* %SKL_TKN_U32_FMT_SAMPLE_TYPE:123* Specifies the sample type. Can take the124* values: SKL_SAMPLE_TYPE_INT_MSB = 0,125* SKL_SAMPLE_TYPE_INT_LSB = 1,126* SKL_SAMPLE_TYPE_INT_SIGNED = 2,127* SKL_SAMPLE_TYPE_INT_UNSIGNED = 3,128* SKL_SAMPLE_TYPE_FLOAT = 4129*130* %SKL_TKN_U32_CH_MAP: Channel map values131* %SKL_TKN_U32_MOD_SET_PARAMS: It can take these values:132* SKL_PARAM_DEFAULT, SKL_PARAM_INIT,133* SKL_PARAM_SET, SKL_PARAM_BIND134*135* %SKL_TKN_U32_MOD_PARAM_ID: ID of the module params136*137* %SKL_TKN_U32_CAPS_SET_PARAMS:138* Set params value139*140* %SKL_TKN_U32_CAPS_PARAMS_ID: Params ID141*142* %SKL_TKN_U32_CAPS_SIZE: Caps size143*144* %SKL_TKN_U32_PROC_DOMAIN: Specify processing domain145*146* %SKL_TKN_U32_LIB_COUNT: Specifies the number of libraries147*148* %SKL_TKN_STR_LIB_NAME: Specifies the library name149*150* %SKL_TKN_U32_PMODE: Specifies the power mode for pipe151*152* %SKL_TKL_U32_D0I3_CAPS: Specifies the D0i3 capability for module153*154* %SKL_TKN_U32_DMA_BUF_SIZE: DMA buffer size in millisec155*156* %SKL_TKN_U32_PIPE_DIR: Specifies pipe direction. Can be157* playback/capture.158*159* %SKL_TKN_U32_NUM_CONFIGS: Number of pipe configs160*161* %SKL_TKN_U32_PATH_MEM_PGS: Size of memory (in pages) required for pipeline162* and its data163*164* %SKL_TKN_U32_PIPE_CONFIG_ID: Config id for the modules in the pipe165* and PCM params supported by that pipe166* config. This is used as index to fill167* up the pipe config and module config168* structure.169*170* %SKL_TKN_U32_CFG_FREQ:171* %SKL_TKN_U8_CFG_CHAN:172* %SKL_TKN_U8_CFG_BPS: PCM params (freq, channels, bits per sample)173* supported for each of the pipe configs.174*175* %SKL_TKN_CFG_MOD_RES_ID: Module's resource index for each of the176* pipe config177*178* %SKL_TKN_CFG_MOD_FMT_ID: Module's interface index for each of the179* pipe config180*181* %SKL_TKN_U8_NUM_MOD: Number of modules in the manifest182*183* %SKL_TKN_MM_U8_MOD_IDX: Current index of the module in the manifest184*185* %SKL_TKN_MM_U8_NUM_RES: Number of resources for the module186*187* %SKL_TKN_MM_U8_NUM_INTF: Number of interfaces for the module188*189* %SKL_TKN_MM_U32_RES_ID: Resource index for the resource info to190* be filled into.191* A module can support multiple resource192* configuration and is represnted as a193* resource table. This index is used to194* fill information into appropriate index.195*196* %SKL_TKN_MM_U32_CPS: DSP cycles per second197*198* %SKL_TKN_MM_U32_DMA_SIZE: Allocated buffer size for gateway DMA199*200* %SKL_TKN_MM_U32_CPC: DSP cycles allocated per frame201*202* %SKL_TKN_MM_U32_RES_PIN_ID: Resource pin index in the module203*204* %SKL_TKN_MM_U32_INTF_PIN_ID: Interface index in the module205*206* %SKL_TKN_MM_U32_PIN_BUF: Buffer size of the module pin207*208* %SKL_TKN_MM_U32_FMT_ID: Format index for each of the interface/209* format information to be filled into.210*211* %SKL_TKN_MM_U32_NUM_IN_FMT: Number of input formats212* %SKL_TKN_MM_U32_NUM_OUT_FMT: Number of output formats213*214* %SKL_TKN_U32_ASTATE_IDX: Table Index for the A-State entry to be filled215* with kcps and clock source216*217* %SKL_TKN_U32_ASTATE_COUNT: Number of valid entries in A-State table218*219* %SKL_TKN_U32_ASTATE_KCPS: Specifies the core load threshold (in kilo220* cycles per second) below which DSP is clocked221* from source specified by clock source.222*223* %SKL_TKN_U32_ASTATE_CLK_SRC: Clock source for A-State entry224*225* %SKL_TKN_U32_FMT_CFG_IDX: Format config index226*227* module_id and loadable flags dont have tokens as these values will be228* read from the DSP FW manifest229*230* Tokens defined can be used either in the manifest or widget private data.231*232* SKL_TKN_MM is used as a suffix for all tokens that represent233* module data in the manifest.234*/235enum SKL_TKNS {236SKL_TKN_UUID = 1,237SKL_TKN_U8_NUM_BLOCKS,238SKL_TKN_U8_BLOCK_TYPE,239SKL_TKN_U8_IN_PIN_TYPE,240SKL_TKN_U8_OUT_PIN_TYPE,241SKL_TKN_U8_DYN_IN_PIN,242SKL_TKN_U8_DYN_OUT_PIN,243SKL_TKN_U8_IN_QUEUE_COUNT,244SKL_TKN_U8_OUT_QUEUE_COUNT,245SKL_TKN_U8_TIME_SLOT,246SKL_TKN_U8_CORE_ID,247SKL_TKN_U8_MOD_TYPE,248SKL_TKN_U8_CONN_TYPE,249SKL_TKN_U8_DEV_TYPE,250SKL_TKN_U8_HW_CONN_TYPE,251SKL_TKN_U16_MOD_INST_ID,252SKL_TKN_U16_BLOCK_SIZE,253SKL_TKN_U32_MAX_MCPS,254SKL_TKN_U32_MEM_PAGES,255SKL_TKN_U32_OBS,256SKL_TKN_U32_IBS,257SKL_TKN_U32_VBUS_ID,258SKL_TKN_U32_PARAMS_FIXUP,259SKL_TKN_U32_CONVERTER,260SKL_TKN_U32_PIPE_ID,261SKL_TKN_U32_PIPE_CONN_TYPE,262SKL_TKN_U32_PIPE_PRIORITY,263SKL_TKN_U32_PIPE_MEM_PGS,264SKL_TKN_U32_DIR_PIN_COUNT,265SKL_TKN_U32_FMT_CH,266SKL_TKN_U32_FMT_FREQ,267SKL_TKN_U32_FMT_BIT_DEPTH,268SKL_TKN_U32_FMT_SAMPLE_SIZE,269SKL_TKN_U32_FMT_CH_CONFIG,270SKL_TKN_U32_FMT_INTERLEAVE,271SKL_TKN_U32_FMT_SAMPLE_TYPE,272SKL_TKN_U32_FMT_CH_MAP,273SKL_TKN_U32_PIN_MOD_ID,274SKL_TKN_U32_PIN_INST_ID,275SKL_TKN_U32_MOD_SET_PARAMS,276SKL_TKN_U32_MOD_PARAM_ID,277SKL_TKN_U32_CAPS_SET_PARAMS,278SKL_TKN_U32_CAPS_PARAMS_ID,279SKL_TKN_U32_CAPS_SIZE,280SKL_TKN_U32_PROC_DOMAIN,281SKL_TKN_U32_LIB_COUNT,282SKL_TKN_STR_LIB_NAME,283SKL_TKN_U32_PMODE,284SKL_TKL_U32_D0I3_CAPS, /* Typo added at v4.10 */285SKL_TKN_U32_D0I3_CAPS = SKL_TKL_U32_D0I3_CAPS,286SKL_TKN_U32_DMA_BUF_SIZE,287288SKL_TKN_U32_PIPE_DIRECTION,289SKL_TKN_U32_PIPE_CONFIG_ID,290SKL_TKN_U32_NUM_CONFIGS,291SKL_TKN_U32_PATH_MEM_PGS,292293SKL_TKN_U32_CFG_FREQ,294SKL_TKN_U8_CFG_CHAN,295SKL_TKN_U8_CFG_BPS,296SKL_TKN_CFG_MOD_RES_ID,297SKL_TKN_CFG_MOD_FMT_ID,298SKL_TKN_U8_NUM_MOD,299300SKL_TKN_MM_U8_MOD_IDX,301SKL_TKN_MM_U8_NUM_RES,302SKL_TKN_MM_U8_NUM_INTF,303SKL_TKN_MM_U32_RES_ID,304SKL_TKN_MM_U32_CPS,305SKL_TKN_MM_U32_DMA_SIZE,306SKL_TKN_MM_U32_CPC,307SKL_TKN_MM_U32_RES_PIN_ID,308SKL_TKN_MM_U32_INTF_PIN_ID,309SKL_TKN_MM_U32_PIN_BUF,310SKL_TKN_MM_U32_FMT_ID,311SKL_TKN_MM_U32_NUM_IN_FMT,312SKL_TKN_MM_U32_NUM_OUT_FMT,313314SKL_TKN_U32_ASTATE_IDX,315SKL_TKN_U32_ASTATE_COUNT,316SKL_TKN_U32_ASTATE_KCPS,317SKL_TKN_U32_ASTATE_CLK_SRC,318319SKL_TKN_U32_FMT_CFG_IDX = 96,320SKL_TKN_MAX = SKL_TKN_U32_FMT_CFG_IDX,321};322323#endif324325326