snd_ar_tokens.h 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. #ifndef __SND_AR_TOKENS_H__
  3. #define __SND_AR_TOKENS_H__
  4. #define APM_SUB_GRAPH_PERF_MODE_LOW_POWER 0x1
  5. #define APM_SUB_GRAPH_PERF_MODE_LOW_LATENCY 0x2
  6. #define APM_SUB_GRAPH_DIRECTION_TX 0x1
  7. #define APM_SUB_GRAPH_DIRECTION_RX 0x2
  8. /** Scenario ID Audio Playback */
  9. #define APM_SUB_GRAPH_SID_AUDIO_PLAYBACK 0x1
  10. /* Scenario ID Audio Record */
  11. #define APM_SUB_GRAPH_SID_AUDIO_RECORD 0x2
  12. /* Scenario ID Voice call. */
  13. #define APM_SUB_GRAPH_SID_VOICE_CALL 0x3
  14. /* container capability ID Pre/Post Processing (PP) */
  15. #define APM_CONTAINER_CAP_ID_PP 0x1
  16. /* container capability ID Compression/Decompression (CD) */
  17. #define APM_CONTAINER_CAP_ID_CD 0x2
  18. /* container capability ID End Point(EP) */
  19. #define APM_CONTAINER_CAP_ID_EP 0x3
  20. /* container capability ID Offload (OLC) */
  21. #define APM_CONTAINER_CAP_ID_OLC 0x4
  22. /* container graph position Stream */
  23. #define APM_CONT_GRAPH_POS_STREAM 0x1
  24. /* container graph position Per Stream Per Device*/
  25. #define APM_CONT_GRAPH_POS_PER_STR_PER_DEV 0x2
  26. /* container graph position Stream-Device */
  27. #define APM_CONT_GRAPH_POS_STR_DEV 0x3
  28. /* container graph position Global Device */
  29. #define APM_CONT_GRAPH_POS_GLOBAL_DEV 0x4
  30. #define APM_PROC_DOMAIN_ID_MDSP 0x1
  31. #define APM_PROC_DOMAIN_ID_ADSP 0x2
  32. #define APM_PROC_DOMAIN_ID_SDSP 0x4
  33. #define APM_PROC_DOMAIN_ID_CDSP 0x5
  34. #define PCM_INTERLEAVED 1
  35. #define PCM_DEINTERLEAVED_PACKED 2
  36. #define PCM_DEINTERLEAVED_UNPACKED 3
  37. #define AR_I2S_WS_SRC_EXTERNAL 0
  38. #define AR_I2S_WS_SRC_INTERNAL 1
  39. enum ar_event_types {
  40. AR_EVENT_NONE = 0,
  41. AR_PGA_DAPM_EVENT
  42. };
  43. /*
  44. * Kcontrol IDs
  45. */
  46. #define SND_SOC_AR_TPLG_FE_BE_GRAPH_CTL_MIX 256
  47. #define SND_SOC_AR_TPLG_VOL_CTL 257
  48. /**
  49. * %AR_TKN_U32_SUB_GRAPH_INSTANCE_ID: Sub Graph Instance Id
  50. *
  51. * %AR_TKN_U32_SUB_GRAPH_PERF_MODE: Performance mode of subgraph
  52. * APM_SUB_GRAPH_PERF_MODE_LOW_POWER = 1,
  53. * APM_SUB_GRAPH_PERF_MODE_LOW_LATENCY = 2
  54. *
  55. * %AR_TKN_U32_SUB_GRAPH_DIRECTION: Direction of subgraph
  56. * APM_SUB_GRAPH_DIRECTION_TX = 1,
  57. * APM_SUB_GRAPH_DIRECTION_RX = 2
  58. *
  59. * %AR_TKN_U32_SUB_GRAPH_SCENARIO_ID: Scenario ID for subgraph
  60. * APM_SUB_GRAPH_SID_AUDIO_PLAYBACK = 1,
  61. * APM_SUB_GRAPH_SID_AUDIO_RECORD = 2,
  62. * APM_SUB_GRAPH_SID_VOICE_CALL = 3
  63. *
  64. * %AR_TKN_U32_CONTAINER_INSTANCE_ID: Container Instance ID
  65. *
  66. * %AR_TKN_U32_CONTAINER_CAPABILITY_ID: Container capability ID
  67. * APM_CONTAINER_CAP_ID_PP = 1,
  68. * APM_CONTAINER_CAP_ID_CD = 2,
  69. * APM_CONTAINER_CAP_ID_EP = 3,
  70. * APM_CONTAINER_CAP_ID_OLC = 4
  71. *
  72. * %AR_TKN_U32_CONTAINER_STACK_SIZE: Stack size in the container.
  73. *
  74. * %AR_TKN_U32_CONTAINER_GRAPH_POS: Graph Position
  75. * APM_CONT_GRAPH_POS_STREAM = 1,
  76. * APM_CONT_GRAPH_POS_PER_STR_PER_DEV = 2,
  77. * APM_CONT_GRAPH_POS_STR_DEV = 3,
  78. * APM_CONT_GRAPH_POS_GLOBAL_DEV = 4
  79. *
  80. * %AR_TKN_U32_CONTAINER_PROC_DOMAIN: Processor domain of container
  81. * APM_PROC_DOMAIN_ID_MDSP = 1,
  82. * APM_PROC_DOMAIN_ID_ADSP = 2,
  83. * APM_PROC_DOMAIN_ID_SDSP = 4,
  84. * APM_PROC_DOMAIN_ID_CDSP = 5
  85. *
  86. * %AR_TKN_U32_MODULE_ID: Module ID
  87. *
  88. * %AR_TKN_U32_MODULE_INSTANCE_ID: Module Instance ID.
  89. *
  90. * %AR_TKN_U32_MODULE_MAX_IP_PORTS: Module maximum input ports
  91. *
  92. * %AR_TKN_U32_MODULE_MAX_OP_PORTS: Module maximum output ports.
  93. *
  94. * %AR_TKN_U32_MODULE_IN_PORTS: Number of in ports
  95. *
  96. * %AR_TKN_U32_MODULE_OUT_PORTS: Number of out ports.
  97. *
  98. * %AR_TKN_U32_MODULE_SRC_OP_PORT_ID: Source module output port ID
  99. *
  100. * %AR_TKN_U32_MODULE_DST_IN_PORT_ID: Destination module input port ID
  101. *
  102. * %AR_TKN_U32_MODULE_HW_IF_IDX: Interface index types for I2S/LPAIF
  103. *
  104. * %AR_TKN_U32_MODULE_HW_IF_TYPE: Interface type
  105. * LPAIF = 0,
  106. * LPAIF_RXTX = 1,
  107. * LPAIF_WSA = 2,
  108. * LPAIF_VA = 3,
  109. * LPAIF_AXI = 4
  110. *
  111. * %AR_TKN_U32_MODULE_FMT_INTERLEAVE: PCM Interleaving
  112. * PCM_INTERLEAVED = 1,
  113. * PCM_DEINTERLEAVED_PACKED = 2,
  114. * PCM_DEINTERLEAVED_UNPACKED = 3
  115. *
  116. * %AR_TKN_U32_MODULE_FMT_DATA: data format
  117. * FIXED POINT = 1,
  118. * IEC60958 PACKETIZED = 3,
  119. * IEC60958 PACKETIZED NON LINEAR = 8,
  120. * COMPR OVER PCM PACKETIZED = 7,
  121. * IEC61937 PACKETIZED = 2,
  122. * GENERIC COMPRESSED = 5
  123. *
  124. * %AR_TKN_U32_MODULE_FMT_SAMPLE_RATE: sample rate
  125. *
  126. * %AR_TKN_U32_MODULE_FMT_BIT_DEPTH: bit depth
  127. *
  128. * %AR_TKN_U32_MODULE_SD_LINE_IDX: I2S serial data line idx
  129. * I2S_SD0 = 1,
  130. * I2S_SD1 = 2,
  131. * I2S_SD2 = 3,
  132. * I2S_SD3 = 4,
  133. * I2S_QUAD01 = 5,
  134. * I2S_QUAD23 = 6,
  135. * I2S_6CHS = 7,
  136. * I2S_8CHS = 8
  137. *
  138. * %AR_TKN_U32_MODULE_WS_SRC: Word Select Source
  139. * AR_I2S_WS_SRC_EXTERNAL = 0,
  140. * AR_I2S_WS_SRC_INTERNAL = 1,
  141. *
  142. * %AR_TKN_U32_MODULE_FRAME_SZ_FACTOR: Frame size factor
  143. *
  144. * %AR_TKN_U32_MODULE_LOG_CODE: Log Module Code
  145. *
  146. * %AR_TKN_U32_MODULE_LOG_TAP_POINT_ID: logging tap point of this module
  147. *
  148. * %AR_TKN_U32_MODULE_LOG_MODE: logging mode
  149. * LOG_WAIT = 0,
  150. * LOG_IMMEDIATELY = 1
  151. *
  152. * %AR_TKN_DAI_INDEX: dai index
  153. *
  154. */
  155. /* DAI Tokens */
  156. #define AR_TKN_DAI_INDEX 1
  157. /* SUB GRAPH Tokens */
  158. #define AR_TKN_U32_SUB_GRAPH_INSTANCE_ID 2
  159. #define AR_TKN_U32_SUB_GRAPH_PERF_MODE 3
  160. #define AR_TKN_U32_SUB_GRAPH_DIRECTION 4
  161. #define AR_TKN_U32_SUB_GRAPH_SCENARIO_ID 5
  162. /* Container Tokens */
  163. #define AR_TKN_U32_CONTAINER_INSTANCE_ID 100
  164. #define AR_TKN_U32_CONTAINER_CAPABILITY_ID 101
  165. #define AR_TKN_U32_CONTAINER_STACK_SIZE 102
  166. #define AR_TKN_U32_CONTAINER_GRAPH_POS 103
  167. #define AR_TKN_U32_CONTAINER_PROC_DOMAIN 104
  168. /* Module Tokens */
  169. #define AR_TKN_U32_MODULE_ID 200
  170. #define AR_TKN_U32_MODULE_INSTANCE_ID 201
  171. #define AR_TKN_U32_MODULE_MAX_IP_PORTS 202
  172. #define AR_TKN_U32_MODULE_MAX_OP_PORTS 203
  173. #define AR_TKN_U32_MODULE_IN_PORTS 204
  174. #define AR_TKN_U32_MODULE_OUT_PORTS 205
  175. #define AR_TKN_U32_MODULE_SRC_OP_PORT_ID 206
  176. #define AR_TKN_U32_MODULE_DST_IN_PORT_ID 207
  177. #define AR_TKN_U32_MODULE_SRC_INSTANCE_ID 208
  178. #define AR_TKN_U32_MODULE_DST_INSTANCE_ID 209
  179. #define AR_TKN_U32_MODULE_SRC_OP_PORT_ID1 210
  180. #define AR_TKN_U32_MODULE_DST_IN_PORT_ID1 211
  181. #define AR_TKN_U32_MODULE_DST_INSTANCE_ID1 212
  182. #define AR_TKN_U32_MODULE_SRC_OP_PORT_ID2 213
  183. #define AR_TKN_U32_MODULE_DST_IN_PORT_ID2 214
  184. #define AR_TKN_U32_MODULE_DST_INSTANCE_ID2 215
  185. #define AR_TKN_U32_MODULE_SRC_OP_PORT_ID3 216
  186. #define AR_TKN_U32_MODULE_DST_IN_PORT_ID3 217
  187. #define AR_TKN_U32_MODULE_DST_INSTANCE_ID3 218
  188. #define AR_TKN_U32_MODULE_SRC_OP_PORT_ID4 219
  189. #define AR_TKN_U32_MODULE_DST_IN_PORT_ID4 220
  190. #define AR_TKN_U32_MODULE_DST_INSTANCE_ID4 221
  191. #define AR_TKN_U32_MODULE_SRC_OP_PORT_ID5 222
  192. #define AR_TKN_U32_MODULE_DST_IN_PORT_ID5 223
  193. #define AR_TKN_U32_MODULE_DST_INSTANCE_ID5 224
  194. #define AR_TKN_U32_MODULE_SRC_OP_PORT_ID6 225
  195. #define AR_TKN_U32_MODULE_DST_IN_PORT_ID6 226
  196. #define AR_TKN_U32_MODULE_DST_INSTANCE_ID6 227
  197. #define AR_TKN_U32_MODULE_SRC_OP_PORT_ID7 228
  198. #define AR_TKN_U32_MODULE_DST_IN_PORT_ID7 229
  199. #define AR_TKN_U32_MODULE_DST_INSTANCE_ID7 230
  200. #define AR_TKN_U32_MODULE_HW_IF_IDX 250
  201. #define AR_TKN_U32_MODULE_HW_IF_TYPE 251
  202. #define AR_TKN_U32_MODULE_FMT_INTERLEAVE 252
  203. #define AR_TKN_U32_MODULE_FMT_DATA 253
  204. #define AR_TKN_U32_MODULE_FMT_SAMPLE_RATE 254
  205. #define AR_TKN_U32_MODULE_FMT_BIT_DEPTH 255
  206. #define AR_TKN_U32_MODULE_SD_LINE_IDX 256
  207. #define AR_TKN_U32_MODULE_WS_SRC 257
  208. #define AR_TKN_U32_MODULE_FRAME_SZ_FACTOR 258
  209. #define AR_TKN_U32_MODULE_LOG_CODE 259
  210. #define AR_TKN_U32_MODULE_LOG_TAP_POINT_ID 260
  211. #define AR_TKN_U32_MODULE_LOG_MODE 261
  212. #endif /* __SND_AR_TOKENS_H__ */