skl-tplg-interface.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. /*
  2. * skl-tplg-interface.h - Intel DSP FW private data interface
  3. *
  4. * Copyright (C) 2015 Intel Corp
  5. * Author: Jeeja KP <jeeja.kp@intel.com>
  6. * Nilofer, Samreen <samreen.nilofer@intel.com>
  7. * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as version 2, as
  11. * published by the Free Software Foundation.
  12. *
  13. * This program is distributed in the hope that it will be useful, but
  14. * WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. * General Public License for more details.
  17. */
  18. #ifndef __HDA_TPLG_INTERFACE_H__
  19. #define __HDA_TPLG_INTERFACE_H__
  20. /*
  21. * Default types range from 0~12. type can range from 0 to 0xff
  22. * SST types start at higher to avoid any overlapping in future
  23. */
  24. #define SKL_CONTROL_TYPE_BYTE_TLV 0x100
  25. #define HDA_SST_CFG_MAX 900 /* size of copier cfg*/
  26. #define MAX_IN_QUEUE 8
  27. #define MAX_OUT_QUEUE 8
  28. #define SKL_UUID_STR_SZ 40
  29. /* Event types goes here */
  30. /* Reserve event type 0 for no event handlers */
  31. enum skl_event_types {
  32. SKL_EVENT_NONE = 0,
  33. SKL_MIXER_EVENT,
  34. SKL_MUX_EVENT,
  35. SKL_VMIXER_EVENT,
  36. SKL_PGA_EVENT
  37. };
  38. /**
  39. * enum skl_ch_cfg - channel configuration
  40. *
  41. * @SKL_CH_CFG_MONO: One channel only
  42. * @SKL_CH_CFG_STEREO: L & R
  43. * @SKL_CH_CFG_2_1: L, R & LFE
  44. * @SKL_CH_CFG_3_0: L, C & R
  45. * @SKL_CH_CFG_3_1: L, C, R & LFE
  46. * @SKL_CH_CFG_QUATRO: L, R, Ls & Rs
  47. * @SKL_CH_CFG_4_0: L, C, R & Cs
  48. * @SKL_CH_CFG_5_0: L, C, R, Ls & Rs
  49. * @SKL_CH_CFG_5_1: L, C, R, Ls, Rs & LFE
  50. * @SKL_CH_CFG_DUAL_MONO: One channel replicated in two
  51. * @SKL_CH_CFG_I2S_DUAL_STEREO_0: Stereo(L,R) in 4 slots, 1st stream:[ L, R, -, - ]
  52. * @SKL_CH_CFG_I2S_DUAL_STEREO_1: Stereo(L,R) in 4 slots, 2nd stream:[ -, -, L, R ]
  53. * @SKL_CH_CFG_INVALID: Invalid
  54. */
  55. enum skl_ch_cfg {
  56. SKL_CH_CFG_MONO = 0,
  57. SKL_CH_CFG_STEREO = 1,
  58. SKL_CH_CFG_2_1 = 2,
  59. SKL_CH_CFG_3_0 = 3,
  60. SKL_CH_CFG_3_1 = 4,
  61. SKL_CH_CFG_QUATRO = 5,
  62. SKL_CH_CFG_4_0 = 6,
  63. SKL_CH_CFG_5_0 = 7,
  64. SKL_CH_CFG_5_1 = 8,
  65. SKL_CH_CFG_DUAL_MONO = 9,
  66. SKL_CH_CFG_I2S_DUAL_STEREO_0 = 10,
  67. SKL_CH_CFG_I2S_DUAL_STEREO_1 = 11,
  68. SKL_CH_CFG_4_CHANNEL = 12,
  69. SKL_CH_CFG_INVALID
  70. };
  71. enum skl_module_type {
  72. SKL_MODULE_TYPE_MIXER = 0,
  73. SKL_MODULE_TYPE_COPIER,
  74. SKL_MODULE_TYPE_UPDWMIX,
  75. SKL_MODULE_TYPE_SRCINT,
  76. SKL_MODULE_TYPE_ALGO,
  77. SKL_MODULE_TYPE_BASE_OUTFMT,
  78. SKL_MODULE_TYPE_KPB,
  79. };
  80. enum skl_core_affinity {
  81. SKL_AFFINITY_CORE_0 = 0,
  82. SKL_AFFINITY_CORE_1,
  83. SKL_AFFINITY_CORE_MAX
  84. };
  85. enum skl_pipe_conn_type {
  86. SKL_PIPE_CONN_TYPE_NONE = 0,
  87. SKL_PIPE_CONN_TYPE_FE,
  88. SKL_PIPE_CONN_TYPE_BE
  89. };
  90. enum skl_hw_conn_type {
  91. SKL_CONN_NONE = 0,
  92. SKL_CONN_SOURCE = 1,
  93. SKL_CONN_SINK = 2
  94. };
  95. enum skl_dev_type {
  96. SKL_DEVICE_BT = 0x0,
  97. SKL_DEVICE_DMIC = 0x1,
  98. SKL_DEVICE_I2S = 0x2,
  99. SKL_DEVICE_SLIMBUS = 0x3,
  100. SKL_DEVICE_HDALINK = 0x4,
  101. SKL_DEVICE_HDAHOST = 0x5,
  102. SKL_DEVICE_NONE
  103. };
  104. /**
  105. * enum skl_interleaving - interleaving style
  106. *
  107. * @SKL_INTERLEAVING_PER_CHANNEL: [s1_ch1...s1_chN,...,sM_ch1...sM_chN]
  108. * @SKL_INTERLEAVING_PER_SAMPLE: [s1_ch1...sM_ch1,...,s1_chN...sM_chN]
  109. */
  110. enum skl_interleaving {
  111. SKL_INTERLEAVING_PER_CHANNEL = 0,
  112. SKL_INTERLEAVING_PER_SAMPLE = 1,
  113. };
  114. enum skl_sample_type {
  115. SKL_SAMPLE_TYPE_INT_MSB = 0,
  116. SKL_SAMPLE_TYPE_INT_LSB = 1,
  117. SKL_SAMPLE_TYPE_INT_SIGNED = 2,
  118. SKL_SAMPLE_TYPE_INT_UNSIGNED = 3,
  119. SKL_SAMPLE_TYPE_FLOAT = 4
  120. };
  121. enum module_pin_type {
  122. /* All pins of the module takes same PCM inputs or outputs
  123. * e.g. mixout
  124. */
  125. SKL_PIN_TYPE_HOMOGENEOUS,
  126. /* All pins of the module takes different PCM inputs or outputs
  127. * e.g mux
  128. */
  129. SKL_PIN_TYPE_HETEROGENEOUS,
  130. };
  131. enum skl_module_param_type {
  132. SKL_PARAM_DEFAULT = 0,
  133. SKL_PARAM_INIT,
  134. SKL_PARAM_SET,
  135. SKL_PARAM_BIND
  136. };
  137. struct skl_dfw_algo_data {
  138. u32 set_params:2;
  139. u32 rsvd:30;
  140. u32 param_id;
  141. u32 max;
  142. char params[0];
  143. } __packed;
  144. #define LIB_NAME_LENGTH 128
  145. #define HDA_MAX_LIB 16
  146. struct lib_info {
  147. char name[LIB_NAME_LENGTH];
  148. } __packed;
  149. struct skl_dfw_manifest {
  150. u32 lib_count;
  151. struct lib_info lib[HDA_MAX_LIB];
  152. } __packed;
  153. enum skl_tkn_dir {
  154. SKL_DIR_IN,
  155. SKL_DIR_OUT
  156. };
  157. enum skl_tuple_type {
  158. SKL_TYPE_TUPLE,
  159. SKL_TYPE_DATA
  160. };
  161. #endif