snd_sst_tokens.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  1. /*
  2. * snd_sst_tokens.h - Intel SST tokens definition
  3. *
  4. * Copyright (C) 2016 Intel Corp
  5. * Author: Shreyas NC <shreyas.nc@intel.com>
  6. * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as version 2, as
  10. * published by the Free Software Foundation.
  11. *
  12. * This program is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * General Public License for more details.
  16. */
  17. #ifndef __SND_SST_TOKENS_H__
  18. #define __SND_SST_TOKENS_H__
  19. /**
  20. * %SKL_TKN_UUID: Module UUID
  21. *
  22. * %SKL_TKN_U8_BLOCK_TYPE: Type of the private data block.Can be:
  23. * tuples, bytes, short and words
  24. *
  25. * %SKL_TKN_U8_IN_PIN_TYPE: Input pin type,
  26. * homogenous=0, heterogenous=1
  27. *
  28. * %SKL_TKN_U8_OUT_PIN_TYPE: Output pin type,
  29. * homogenous=0, heterogenous=1
  30. * %SKL_TKN_U8_DYN_IN_PIN: Configure Input pin dynamically
  31. * if true
  32. *
  33. * %SKL_TKN_U8_DYN_OUT_PIN: Configure Output pin dynamically
  34. * if true
  35. *
  36. * %SKL_TKN_U8_IN_QUEUE_COUNT: Store the number of Input pins
  37. *
  38. * %SKL_TKN_U8_OUT_QUEUE_COUNT: Store the number of Output pins
  39. *
  40. * %SKL_TKN_U8_TIME_SLOT: TDM slot number
  41. *
  42. * %SKL_TKN_U8_CORE_ID: Stores module affinity value.Can take
  43. * the values:
  44. * SKL_AFFINITY_CORE_0 = 0,
  45. * SKL_AFFINITY_CORE_1,
  46. * SKL_AFFINITY_CORE_MAX
  47. *
  48. * %SKL_TKN_U8_MOD_TYPE: Module type value.
  49. *
  50. * %SKL_TKN_U8_CONN_TYPE: Module connection type can be a FE,
  51. * BE or NONE as defined :
  52. * SKL_PIPE_CONN_TYPE_NONE = 0,
  53. * SKL_PIPE_CONN_TYPE_FE = 1 (HOST_DMA)
  54. * SKL_PIPE_CONN_TYPE_BE = 2 (LINK_DMA)
  55. *
  56. * %SKL_TKN_U8_DEV_TYPE: Type of device to which the module is
  57. * connected
  58. * Can take the values:
  59. * SKL_DEVICE_BT = 0x0,
  60. * SKL_DEVICE_DMIC = 0x1,
  61. * SKL_DEVICE_I2S = 0x2,
  62. * SKL_DEVICE_SLIMBUS = 0x3,
  63. * SKL_DEVICE_HDALINK = 0x4,
  64. * SKL_DEVICE_HDAHOST = 0x5,
  65. * SKL_DEVICE_NONE
  66. *
  67. * %SKL_TKN_U8_HW_CONN_TYPE: Connection type of the HW to which the
  68. * module is connected
  69. * SKL_CONN_NONE = 0,
  70. * SKL_CONN_SOURCE = 1,
  71. * SKL_CONN_SINK = 2
  72. *
  73. * %SKL_TKN_U16_PIN_INST_ID: Stores the pin instance id
  74. *
  75. * %SKL_TKN_U16_MOD_INST_ID: Stores the mdule instance id
  76. *
  77. * %SKL_TKN_U32_MAX_MCPS: Module max mcps value
  78. *
  79. * %SKL_TKN_U32_MEM_PAGES: Module resource pages
  80. *
  81. * %SKL_TKN_U32_OBS: Stores Output Buffer size
  82. *
  83. * %SKL_TKN_U32_IBS: Stores input buffer size
  84. *
  85. * %SKL_TKN_U32_VBUS_ID: Module VBUS_ID. PDM=0, SSP0=0,
  86. * SSP1=1,SSP2=2,
  87. * SSP3=3, SSP4=4,
  88. * SSP5=5, SSP6=6,INVALID
  89. *
  90. * %SKL_TKN_U32_PARAMS_FIXUP: Module Params fixup mask
  91. * %SKL_TKN_U32_CONVERTER: Module params converter mask
  92. * %SKL_TKN_U32_PIPE_ID: Stores the pipe id
  93. *
  94. * %SKL_TKN_U32_PIPE_CONN_TYPE: Type of the token to which the pipe is
  95. * connected to. It can be
  96. * SKL_PIPE_CONN_TYPE_NONE = 0,
  97. * SKL_PIPE_CONN_TYPE_FE = 1 (HOST_DMA),
  98. * SKL_PIPE_CONN_TYPE_BE = 2 (LINK_DMA),
  99. *
  100. * %SKL_TKN_U32_PIPE_PRIORITY: Pipe priority value
  101. * %SKL_TKN_U32_PIPE_MEM_PGS: Pipe resource pages
  102. *
  103. * %SKL_TKN_U32_DIR_PIN_COUNT: Value for the direction to set input/output
  104. * formats and the pin count.
  105. * The first 4 bits have the direction
  106. * value and the next 4 have
  107. * the pin count value.
  108. * SKL_DIR_IN = 0, SKL_DIR_OUT = 1.
  109. * The input and output formats
  110. * share the same set of tokens
  111. * with the distinction between input
  112. * and output made by reading direction
  113. * token.
  114. *
  115. * %SKL_TKN_U32_FMT_CH: Supported channel count
  116. *
  117. * %SKL_TKN_U32_FMT_FREQ: Supported frequency/sample rate
  118. *
  119. * %SKL_TKN_U32_FMT_BIT_DEPTH: Supported container size
  120. *
  121. * %SKL_TKN_U32_FMT_SAMPLE_SIZE:Number of samples in the container
  122. *
  123. * %SKL_TKN_U32_FMT_CH_CONFIG: Supported channel configurations for the
  124. * input/output.
  125. *
  126. * %SKL_TKN_U32_FMT_INTERLEAVE: Interleaving style which can be per
  127. * channel or per sample. The values can be :
  128. * SKL_INTERLEAVING_PER_CHANNEL = 0,
  129. * SKL_INTERLEAVING_PER_SAMPLE = 1,
  130. *
  131. * %SKL_TKN_U32_FMT_SAMPLE_TYPE:
  132. * Specifies the sample type. Can take the
  133. * values: SKL_SAMPLE_TYPE_INT_MSB = 0,
  134. * SKL_SAMPLE_TYPE_INT_LSB = 1,
  135. * SKL_SAMPLE_TYPE_INT_SIGNED = 2,
  136. * SKL_SAMPLE_TYPE_INT_UNSIGNED = 3,
  137. * SKL_SAMPLE_TYPE_FLOAT = 4
  138. *
  139. * %SKL_TKN_U32_CH_MAP: Channel map values
  140. * %SKL_TKN_U32_MOD_SET_PARAMS: It can take these values:
  141. * SKL_PARAM_DEFAULT, SKL_PARAM_INIT,
  142. * SKL_PARAM_SET, SKL_PARAM_BIND
  143. *
  144. * %SKL_TKN_U32_MOD_PARAM_ID: ID of the module params
  145. *
  146. * %SKL_TKN_U32_CAPS_SET_PARAMS:
  147. * Set params value
  148. *
  149. * %SKL_TKN_U32_CAPS_PARAMS_ID: Params ID
  150. *
  151. * %SKL_TKN_U32_CAPS_SIZE: Caps size
  152. *
  153. * %SKL_TKN_U32_PROC_DOMAIN: Specify processing domain
  154. *
  155. * %SKL_TKN_U32_LIB_COUNT: Specifies the number of libraries
  156. *
  157. * %SKL_TKN_STR_LIB_NAME: Specifies the library name
  158. *
  159. * %SKL_TKN_U32_PMODE: Specifies the power mode for pipe
  160. *
  161. * %SKL_TKL_U32_D0I3_CAPS: Specifies the D0i3 capability for module
  162. *
  163. * %SKL_TKN_U32_DMA_BUF_SIZE: DMA buffer size in millisec
  164. *
  165. * %SKL_TKN_U32_PIPE_DIR: Specifies pipe direction. Can be
  166. * playback/capture.
  167. *
  168. * %SKL_TKN_U32_NUM_CONFIGS: Number of pipe configs
  169. *
  170. * %SKL_TKN_U32_PATH_MEM_PGS: Size of memory (in pages) required for pipeline
  171. * and its data
  172. *
  173. * %SKL_TKN_U32_PIPE_CONFIG_ID: Config id for the modules in the pipe
  174. * and PCM params supported by that pipe
  175. * config. This is used as index to fill
  176. * up the pipe config and module config
  177. * structure.
  178. *
  179. * %SKL_TKN_U32_CFG_FREQ:
  180. * %SKL_TKN_U8_CFG_CHAN:
  181. * %SKL_TKN_U8_CFG_BPS: PCM params (freq, channels, bits per sample)
  182. * supported for each of the pipe configs.
  183. *
  184. * %SKL_TKN_CFG_MOD_RES_ID: Module's resource index for each of the
  185. * pipe config
  186. *
  187. * %SKL_TKN_CFG_MOD_FMT_ID: Module's interface index for each of the
  188. * pipe config
  189. *
  190. * %SKL_TKN_U8_NUM_MOD: Number of modules in the manifest
  191. *
  192. * %SKL_TKN_MM_U8_MOD_IDX: Current index of the module in the manifest
  193. *
  194. * %SKL_TKN_MM_U8_NUM_RES: Number of resources for the module
  195. *
  196. * %SKL_TKN_MM_U8_NUM_INTF: Number of interfaces for the module
  197. *
  198. * %SKL_TKN_MM_U32_RES_ID: Resource index for the resource info to
  199. * be filled into.
  200. * A module can support multiple resource
  201. * configuration and is represnted as a
  202. * resource table. This index is used to
  203. * fill information into appropriate index.
  204. *
  205. * %SKL_TKN_MM_U32_CPS: DSP cycles per second
  206. *
  207. * %SKL_TKN_MM_U32_DMA_SIZE: Allocated buffer size for gateway DMA
  208. *
  209. * %SKL_TKN_MM_U32_CPC: DSP cycles allocated per frame
  210. *
  211. * %SKL_TKN_MM_U32_RES_PIN_ID: Resource pin index in the module
  212. *
  213. * %SKL_TKN_MM_U32_INTF_PIN_ID: Interface index in the module
  214. *
  215. * %SKL_TKN_MM_U32_PIN_BUF: Buffer size of the module pin
  216. *
  217. * %SKL_TKN_MM_U32_FMT_ID: Format index for each of the interface/
  218. * format information to be filled into.
  219. *
  220. * %SKL_TKN_MM_U32_NUM_IN_FMT: Number of input formats
  221. * %SKL_TKN_MM_U32_NUM_OUT_FMT: Number of output formats
  222. *
  223. * module_id and loadable flags dont have tokens as these values will be
  224. * read from the DSP FW manifest
  225. *
  226. * Tokens defined can be used either in the manifest or widget private data.
  227. *
  228. * SKL_TKN_MM is used as a suffix for all tokens that represent
  229. * module data in the manifest.
  230. */
  231. enum SKL_TKNS {
  232. SKL_TKN_UUID = 1,
  233. SKL_TKN_U8_NUM_BLOCKS,
  234. SKL_TKN_U8_BLOCK_TYPE,
  235. SKL_TKN_U8_IN_PIN_TYPE,
  236. SKL_TKN_U8_OUT_PIN_TYPE,
  237. SKL_TKN_U8_DYN_IN_PIN,
  238. SKL_TKN_U8_DYN_OUT_PIN,
  239. SKL_TKN_U8_IN_QUEUE_COUNT,
  240. SKL_TKN_U8_OUT_QUEUE_COUNT,
  241. SKL_TKN_U8_TIME_SLOT,
  242. SKL_TKN_U8_CORE_ID,
  243. SKL_TKN_U8_MOD_TYPE,
  244. SKL_TKN_U8_CONN_TYPE,
  245. SKL_TKN_U8_DEV_TYPE,
  246. SKL_TKN_U8_HW_CONN_TYPE,
  247. SKL_TKN_U16_MOD_INST_ID,
  248. SKL_TKN_U16_BLOCK_SIZE,
  249. SKL_TKN_U32_MAX_MCPS,
  250. SKL_TKN_U32_MEM_PAGES,
  251. SKL_TKN_U32_OBS,
  252. SKL_TKN_U32_IBS,
  253. SKL_TKN_U32_VBUS_ID,
  254. SKL_TKN_U32_PARAMS_FIXUP,
  255. SKL_TKN_U32_CONVERTER,
  256. SKL_TKN_U32_PIPE_ID,
  257. SKL_TKN_U32_PIPE_CONN_TYPE,
  258. SKL_TKN_U32_PIPE_PRIORITY,
  259. SKL_TKN_U32_PIPE_MEM_PGS,
  260. SKL_TKN_U32_DIR_PIN_COUNT,
  261. SKL_TKN_U32_FMT_CH,
  262. SKL_TKN_U32_FMT_FREQ,
  263. SKL_TKN_U32_FMT_BIT_DEPTH,
  264. SKL_TKN_U32_FMT_SAMPLE_SIZE,
  265. SKL_TKN_U32_FMT_CH_CONFIG,
  266. SKL_TKN_U32_FMT_INTERLEAVE,
  267. SKL_TKN_U32_FMT_SAMPLE_TYPE,
  268. SKL_TKN_U32_FMT_CH_MAP,
  269. SKL_TKN_U32_PIN_MOD_ID,
  270. SKL_TKN_U32_PIN_INST_ID,
  271. SKL_TKN_U32_MOD_SET_PARAMS,
  272. SKL_TKN_U32_MOD_PARAM_ID,
  273. SKL_TKN_U32_CAPS_SET_PARAMS,
  274. SKL_TKN_U32_CAPS_PARAMS_ID,
  275. SKL_TKN_U32_CAPS_SIZE,
  276. SKL_TKN_U32_PROC_DOMAIN,
  277. SKL_TKN_U32_LIB_COUNT,
  278. SKL_TKN_STR_LIB_NAME,
  279. SKL_TKN_U32_PMODE,
  280. SKL_TKL_U32_D0I3_CAPS, /* Typo added at v4.10 */
  281. SKL_TKN_U32_D0I3_CAPS = SKL_TKL_U32_D0I3_CAPS,
  282. SKL_TKN_U32_DMA_BUF_SIZE,
  283. SKL_TKN_U32_PIPE_DIRECTION,
  284. SKL_TKN_U32_PIPE_CONFIG_ID,
  285. SKL_TKN_U32_NUM_CONFIGS,
  286. SKL_TKN_U32_PATH_MEM_PGS,
  287. SKL_TKN_U32_CFG_FREQ,
  288. SKL_TKN_U8_CFG_CHAN,
  289. SKL_TKN_U8_CFG_BPS,
  290. SKL_TKN_CFG_MOD_RES_ID,
  291. SKL_TKN_CFG_MOD_FMT_ID,
  292. SKL_TKN_U8_NUM_MOD,
  293. SKL_TKN_MM_U8_MOD_IDX,
  294. SKL_TKN_MM_U8_NUM_RES,
  295. SKL_TKN_MM_U8_NUM_INTF,
  296. SKL_TKN_MM_U32_RES_ID,
  297. SKL_TKN_MM_U32_CPS,
  298. SKL_TKN_MM_U32_DMA_SIZE,
  299. SKL_TKN_MM_U32_CPC,
  300. SKL_TKN_MM_U32_RES_PIN_ID,
  301. SKL_TKN_MM_U32_INTF_PIN_ID,
  302. SKL_TKN_MM_U32_PIN_BUF,
  303. SKL_TKN_MM_U32_FMT_ID,
  304. SKL_TKN_MM_U32_NUM_IN_FMT,
  305. SKL_TKN_MM_U32_NUM_OUT_FMT,
  306. SKL_TKN_MAX = SKL_TKN_MM_U32_NUM_OUT_FMT,
  307. };
  308. #endif