snd_sst_tokens.h 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  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. * module_id and loadable flags dont have tokens as these values will be
  160. * read from the DSP FW manifest
  161. */
  162. enum SKL_TKNS {
  163. SKL_TKN_UUID = 1,
  164. SKL_TKN_U8_NUM_BLOCKS,
  165. SKL_TKN_U8_BLOCK_TYPE,
  166. SKL_TKN_U8_IN_PIN_TYPE,
  167. SKL_TKN_U8_OUT_PIN_TYPE,
  168. SKL_TKN_U8_DYN_IN_PIN,
  169. SKL_TKN_U8_DYN_OUT_PIN,
  170. SKL_TKN_U8_IN_QUEUE_COUNT,
  171. SKL_TKN_U8_OUT_QUEUE_COUNT,
  172. SKL_TKN_U8_TIME_SLOT,
  173. SKL_TKN_U8_CORE_ID,
  174. SKL_TKN_U8_MOD_TYPE,
  175. SKL_TKN_U8_CONN_TYPE,
  176. SKL_TKN_U8_DEV_TYPE,
  177. SKL_TKN_U8_HW_CONN_TYPE,
  178. SKL_TKN_U16_MOD_INST_ID,
  179. SKL_TKN_U16_BLOCK_SIZE,
  180. SKL_TKN_U32_MAX_MCPS,
  181. SKL_TKN_U32_MEM_PAGES,
  182. SKL_TKN_U32_OBS,
  183. SKL_TKN_U32_IBS,
  184. SKL_TKN_U32_VBUS_ID,
  185. SKL_TKN_U32_PARAMS_FIXUP,
  186. SKL_TKN_U32_CONVERTER,
  187. SKL_TKN_U32_PIPE_ID,
  188. SKL_TKN_U32_PIPE_CONN_TYPE,
  189. SKL_TKN_U32_PIPE_PRIORITY,
  190. SKL_TKN_U32_PIPE_MEM_PGS,
  191. SKL_TKN_U32_DIR_PIN_COUNT,
  192. SKL_TKN_U32_FMT_CH,
  193. SKL_TKN_U32_FMT_FREQ,
  194. SKL_TKN_U32_FMT_BIT_DEPTH,
  195. SKL_TKN_U32_FMT_SAMPLE_SIZE,
  196. SKL_TKN_U32_FMT_CH_CONFIG,
  197. SKL_TKN_U32_FMT_INTERLEAVE,
  198. SKL_TKN_U32_FMT_SAMPLE_TYPE,
  199. SKL_TKN_U32_FMT_CH_MAP,
  200. SKL_TKN_U32_PIN_MOD_ID,
  201. SKL_TKN_U32_PIN_INST_ID,
  202. SKL_TKN_U32_MOD_SET_PARAMS,
  203. SKL_TKN_U32_MOD_PARAM_ID,
  204. SKL_TKN_U32_CAPS_SET_PARAMS,
  205. SKL_TKN_U32_CAPS_PARAMS_ID,
  206. SKL_TKN_U32_CAPS_SIZE,
  207. SKL_TKN_U32_PROC_DOMAIN,
  208. SKL_TKN_U32_LIB_COUNT,
  209. SKL_TKN_STR_LIB_NAME,
  210. SKL_TKN_MAX = SKL_TKN_STR_LIB_NAME,
  211. };
  212. #endif