tokens.h 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
  2. /*
  3. * This file is provided under a dual BSD/GPLv2 license. When using or
  4. * redistributing this file, you may do so under either license.
  5. *
  6. * Copyright(c) 2018 Intel Corporation. All rights reserved.
  7. * Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
  8. * Keyon Jie <yang.jie@linux.intel.com>
  9. */
  10. /*
  11. * Topology IDs and tokens.
  12. *
  13. * ** MUST BE ALIGNED WITH TOPOLOGY CONFIGURATION TOKEN VALUES **
  14. */
  15. #ifndef __INCLUDE_UAPI_SOF_TOPOLOGY_H__
  16. #define __INCLUDE_UAPI_SOF_TOPOLOGY_H__
  17. /*
  18. * Kcontrol IDs
  19. */
  20. #define SOF_TPLG_KCTL_VOL_ID 256
  21. #define SOF_TPLG_KCTL_ENUM_ID 257
  22. #define SOF_TPLG_KCTL_BYTES_ID 258
  23. #define SOF_TPLG_KCTL_SWITCH_ID 259
  24. #define SOF_TPLG_KCTL_BYTES_VOLATILE_RO 260
  25. #define SOF_TPLG_KCTL_BYTES_VOLATILE_RW 261
  26. #define SOF_TPLG_KCTL_BYTES_WO_ID 262
  27. /*
  28. * Tokens - must match values in topology configurations
  29. */
  30. /* buffers */
  31. #define SOF_TKN_BUF_SIZE 100
  32. #define SOF_TKN_BUF_CAPS 101
  33. /* DAI */
  34. /* Token retired with ABI 3.2, do not use for new capabilities
  35. * #define SOF_TKN_DAI_DMAC_CONFIG 153
  36. */
  37. #define SOF_TKN_DAI_TYPE 154
  38. #define SOF_TKN_DAI_INDEX 155
  39. #define SOF_TKN_DAI_DIRECTION 156
  40. /* scheduling */
  41. #define SOF_TKN_SCHED_PERIOD 200
  42. #define SOF_TKN_SCHED_PRIORITY 201
  43. #define SOF_TKN_SCHED_MIPS 202
  44. #define SOF_TKN_SCHED_CORE 203
  45. #define SOF_TKN_SCHED_FRAMES 204
  46. #define SOF_TKN_SCHED_TIME_DOMAIN 205
  47. #define SOF_TKN_SCHED_DYNAMIC_PIPELINE 206
  48. #define SOF_TKN_SCHED_LP_MODE 207
  49. #define SOF_TKN_SCHED_MEM_USAGE 208
  50. #define SOF_TKN_SCHED_USE_CHAIN_DMA 209
  51. /* volume */
  52. #define SOF_TKN_VOLUME_RAMP_STEP_TYPE 250
  53. #define SOF_TKN_VOLUME_RAMP_STEP_MS 251
  54. #define SOF_TKN_GAIN_RAMP_TYPE 260
  55. #define SOF_TKN_GAIN_RAMP_DURATION 261
  56. #define SOF_TKN_GAIN_VAL 262
  57. /* SRC */
  58. #define SOF_TKN_SRC_RATE_IN 300
  59. #define SOF_TKN_SRC_RATE_OUT 301
  60. /* ASRC */
  61. #define SOF_TKN_ASRC_RATE_IN 320
  62. #define SOF_TKN_ASRC_RATE_OUT 321
  63. #define SOF_TKN_ASRC_ASYNCHRONOUS_MODE 322
  64. #define SOF_TKN_ASRC_OPERATION_MODE 323
  65. /* PCM */
  66. #define SOF_TKN_PCM_DMAC_CONFIG 353
  67. /* Generic components */
  68. #define SOF_TKN_COMP_PERIOD_SINK_COUNT 400
  69. #define SOF_TKN_COMP_PERIOD_SOURCE_COUNT 401
  70. #define SOF_TKN_COMP_FORMAT 402
  71. /* Token retired with ABI 3.2, do not use for new capabilities
  72. * #define SOF_TKN_COMP_PRELOAD_COUNT 403
  73. */
  74. #define SOF_TKN_COMP_CORE_ID 404
  75. #define SOF_TKN_COMP_UUID 405
  76. #define SOF_TKN_COMP_CPC 406
  77. #define SOF_TKN_COMP_IS_PAGES 409
  78. #define SOF_TKN_COMP_NUM_AUDIO_FORMATS 410
  79. #define SOF_TKN_COMP_NUM_INPUT_PINS 411
  80. #define SOF_TKN_COMP_NUM_OUTPUT_PINS 412
  81. /*
  82. * The token for input/output pin binding, it specifies the widget
  83. * name that the input/output pin is connected from/to.
  84. */
  85. #define SOF_TKN_COMP_INPUT_PIN_BINDING_WNAME 413
  86. #define SOF_TKN_COMP_OUTPUT_PIN_BINDING_WNAME 414
  87. #define SOF_TKN_COMP_NUM_INPUT_AUDIO_FORMATS 415
  88. #define SOF_TKN_COMP_NUM_OUTPUT_AUDIO_FORMATS 416
  89. /* SSP */
  90. #define SOF_TKN_INTEL_SSP_CLKS_CONTROL 500
  91. #define SOF_TKN_INTEL_SSP_MCLK_ID 501
  92. #define SOF_TKN_INTEL_SSP_SAMPLE_BITS 502
  93. #define SOF_TKN_INTEL_SSP_FRAME_PULSE_WIDTH 503
  94. #define SOF_TKN_INTEL_SSP_QUIRKS 504
  95. #define SOF_TKN_INTEL_SSP_TDM_PADDING_PER_SLOT 505
  96. #define SOF_TKN_INTEL_SSP_BCLK_DELAY 506
  97. /* DMIC */
  98. #define SOF_TKN_INTEL_DMIC_DRIVER_VERSION 600
  99. #define SOF_TKN_INTEL_DMIC_CLK_MIN 601
  100. #define SOF_TKN_INTEL_DMIC_CLK_MAX 602
  101. #define SOF_TKN_INTEL_DMIC_DUTY_MIN 603
  102. #define SOF_TKN_INTEL_DMIC_DUTY_MAX 604
  103. #define SOF_TKN_INTEL_DMIC_NUM_PDM_ACTIVE 605
  104. #define SOF_TKN_INTEL_DMIC_SAMPLE_RATE 608
  105. #define SOF_TKN_INTEL_DMIC_FIFO_WORD_LENGTH 609
  106. #define SOF_TKN_INTEL_DMIC_UNMUTE_RAMP_TIME_MS 610
  107. /* DMIC PDM */
  108. #define SOF_TKN_INTEL_DMIC_PDM_CTRL_ID 700
  109. #define SOF_TKN_INTEL_DMIC_PDM_MIC_A_Enable 701
  110. #define SOF_TKN_INTEL_DMIC_PDM_MIC_B_Enable 702
  111. #define SOF_TKN_INTEL_DMIC_PDM_POLARITY_A 703
  112. #define SOF_TKN_INTEL_DMIC_PDM_POLARITY_B 704
  113. #define SOF_TKN_INTEL_DMIC_PDM_CLK_EDGE 705
  114. #define SOF_TKN_INTEL_DMIC_PDM_SKEW 706
  115. /* Tone */
  116. #define SOF_TKN_TONE_SAMPLE_RATE 800
  117. /* Processing Components */
  118. #define SOF_TKN_PROCESS_TYPE 900
  119. /* for backward compatibility */
  120. #define SOF_TKN_EFFECT_TYPE SOF_TKN_PROCESS_TYPE
  121. /* SAI */
  122. #define SOF_TKN_IMX_SAI_MCLK_ID 1000
  123. /* ESAI */
  124. #define SOF_TKN_IMX_ESAI_MCLK_ID 1100
  125. /* Stream */
  126. #define SOF_TKN_STREAM_PLAYBACK_COMPATIBLE_D0I3 1200
  127. #define SOF_TKN_STREAM_CAPTURE_COMPATIBLE_D0I3 1201
  128. /* Led control for mute switches */
  129. #define SOF_TKN_MUTE_LED_USE 1300
  130. #define SOF_TKN_MUTE_LED_DIRECTION 1301
  131. /* ALH */
  132. #define SOF_TKN_INTEL_ALH_RATE 1400
  133. #define SOF_TKN_INTEL_ALH_CH 1401
  134. /* HDA */
  135. #define SOF_TKN_INTEL_HDA_RATE 1500
  136. #define SOF_TKN_INTEL_HDA_CH 1501
  137. /* AFE */
  138. #define SOF_TKN_MEDIATEK_AFE_RATE 1600
  139. #define SOF_TKN_MEDIATEK_AFE_CH 1601
  140. #define SOF_TKN_MEDIATEK_AFE_FORMAT 1602
  141. /* MIXER */
  142. #define SOF_TKN_MIXER_TYPE 1700
  143. /* ACPDMIC */
  144. #define SOF_TKN_AMD_ACPDMIC_RATE 1800
  145. #define SOF_TKN_AMD_ACPDMIC_CH 1801
  146. /* CAVS AUDIO FORMAT */
  147. #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_RATE 1900
  148. #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_BIT_DEPTH 1901
  149. #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_VALID_BIT_DEPTH 1902
  150. #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_CHANNELS 1903
  151. #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_CH_MAP 1904
  152. #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_CH_CFG 1905
  153. #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_INTERLEAVING_STYLE 1906
  154. #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_FMT_CFG 1907
  155. #define SOF_TKN_CAVS_AUDIO_FORMAT_IN_SAMPLE_TYPE 1908
  156. #define SOF_TKN_CAVS_AUDIO_FORMAT_INPUT_PIN_INDEX 1909
  157. /* intentional token numbering discontinuity, reserved for future use */
  158. #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_RATE 1930
  159. #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_BIT_DEPTH 1931
  160. #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_VALID_BIT_DEPTH 1932
  161. #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_CHANNELS 1933
  162. #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_CH_MAP 1934
  163. #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_CH_CFG 1935
  164. #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_INTERLEAVING_STYLE 1936
  165. #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_FMT_CFG 1937
  166. #define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_SAMPLE_TYPE 1938
  167. #define SOF_TKN_CAVS_AUDIO_FORMAT_OUTPUT_PIN_INDEX 1939
  168. /* intentional token numbering discontinuity, reserved for future use */
  169. #define SOF_TKN_CAVS_AUDIO_FORMAT_IBS 1970
  170. #define SOF_TKN_CAVS_AUDIO_FORMAT_OBS 1971
  171. #define SOF_TKN_CAVS_AUDIO_FORMAT_DMA_BUFFER_SIZE 1972
  172. /* COPIER */
  173. #define SOF_TKN_INTEL_COPIER_NODE_TYPE 1980
  174. #define SOF_TKN_INTEL_COPIER_DEEP_BUFFER_DMA_MS 1981
  175. /* ACP I2S */
  176. #define SOF_TKN_AMD_ACPI2S_RATE 1700
  177. #define SOF_TKN_AMD_ACPI2S_CH 1701
  178. #define SOF_TKN_AMD_ACPI2S_TDM_MODE 1702
  179. #endif