tokens.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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. /*
  25. * Tokens - must match values in topology configurations
  26. */
  27. /* buffers */
  28. #define SOF_TKN_BUF_SIZE 100
  29. #define SOF_TKN_BUF_CAPS 101
  30. /* DAI */
  31. /* Token retired with ABI 3.2, do not use for new capabilities
  32. * #define SOF_TKN_DAI_DMAC_CONFIG 153
  33. */
  34. #define SOF_TKN_DAI_TYPE 154
  35. #define SOF_TKN_DAI_INDEX 155
  36. #define SOF_TKN_DAI_DIRECTION 156
  37. /* scheduling */
  38. #define SOF_TKN_SCHED_PERIOD 200
  39. #define SOF_TKN_SCHED_PRIORITY 201
  40. #define SOF_TKN_SCHED_MIPS 202
  41. #define SOF_TKN_SCHED_CORE 203
  42. #define SOF_TKN_SCHED_FRAMES 204
  43. #define SOF_TKN_SCHED_TIME_DOMAIN 205
  44. /* volume */
  45. #define SOF_TKN_VOLUME_RAMP_STEP_TYPE 250
  46. #define SOF_TKN_VOLUME_RAMP_STEP_MS 251
  47. /* SRC */
  48. #define SOF_TKN_SRC_RATE_IN 300
  49. #define SOF_TKN_SRC_RATE_OUT 301
  50. /* PCM */
  51. #define SOF_TKN_PCM_DMAC_CONFIG 353
  52. /* Generic components */
  53. #define SOF_TKN_COMP_PERIOD_SINK_COUNT 400
  54. #define SOF_TKN_COMP_PERIOD_SOURCE_COUNT 401
  55. #define SOF_TKN_COMP_FORMAT 402
  56. /* Token retired with ABI 3.2, do not use for new capabilities
  57. * #define SOF_TKN_COMP_PRELOAD_COUNT 403
  58. */
  59. /* SSP */
  60. #define SOF_TKN_INTEL_SSP_CLKS_CONTROL 500
  61. #define SOF_TKN_INTEL_SSP_MCLK_ID 501
  62. #define SOF_TKN_INTEL_SSP_SAMPLE_BITS 502
  63. #define SOF_TKN_INTEL_SSP_FRAME_PULSE_WIDTH 503
  64. #define SOF_TKN_INTEL_SSP_QUIRKS 504
  65. #define SOF_TKN_INTEL_SSP_TDM_PADDING_PER_SLOT 505
  66. #define SOF_TKN_INTEL_SSP_BCLK_DELAY 506
  67. /* DMIC */
  68. #define SOF_TKN_INTEL_DMIC_DRIVER_VERSION 600
  69. #define SOF_TKN_INTEL_DMIC_CLK_MIN 601
  70. #define SOF_TKN_INTEL_DMIC_CLK_MAX 602
  71. #define SOF_TKN_INTEL_DMIC_DUTY_MIN 603
  72. #define SOF_TKN_INTEL_DMIC_DUTY_MAX 604
  73. #define SOF_TKN_INTEL_DMIC_NUM_PDM_ACTIVE 605
  74. #define SOF_TKN_INTEL_DMIC_SAMPLE_RATE 608
  75. #define SOF_TKN_INTEL_DMIC_FIFO_WORD_LENGTH 609
  76. #define SOF_TKN_INTEL_DMIC_UNMUTE_RAMP_TIME_MS 610
  77. /* DMIC PDM */
  78. #define SOF_TKN_INTEL_DMIC_PDM_CTRL_ID 700
  79. #define SOF_TKN_INTEL_DMIC_PDM_MIC_A_Enable 701
  80. #define SOF_TKN_INTEL_DMIC_PDM_MIC_B_Enable 702
  81. #define SOF_TKN_INTEL_DMIC_PDM_POLARITY_A 703
  82. #define SOF_TKN_INTEL_DMIC_PDM_POLARITY_B 704
  83. #define SOF_TKN_INTEL_DMIC_PDM_CLK_EDGE 705
  84. #define SOF_TKN_INTEL_DMIC_PDM_SKEW 706
  85. /* Tone */
  86. #define SOF_TKN_TONE_SAMPLE_RATE 800
  87. /* Processing Components */
  88. #define SOF_TKN_PROCESS_TYPE 900
  89. /* for backward compatibility */
  90. #define SOF_TKN_EFFECT_TYPE SOF_TKN_PROCESS_TYPE
  91. /* SAI */
  92. #define SOF_TKN_IMX_SAI_FIRST_TOKEN 1000
  93. /* TODO: Add SAI tokens */
  94. /* ESAI */
  95. #define SOF_TKN_IMX_ESAI_FIRST_TOKEN 1100
  96. /* TODO: Add ESAI tokens */
  97. /* Led control for mute switches */
  98. #define SOF_TKN_MUTE_LED_USE 1300
  99. #define SOF_TKN_MUTE_LED_DIRECTION 1301
  100. #endif