audio_prm.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606
  1. /* Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. */
  12. #ifndef __AUDIO_PRM_H__
  13. #define __AUDIO_PRM_H__
  14. #define PRM_MODULE_INSTANCE_ID 0x00000002
  15. /* Request and release response payload of the #PRM_CMD_RSP_REQUEST_HW_RSC
  16. * and PRM_CMD_RSP_ RELEASE_HW_RSC commands respectively.
  17. * This is sent in response to request and release common payload commands.
  18. */
  19. struct prm_rsp_req_rel_hw_rsc {
  20. /* ID of the resource being requested. The supported values
  21. * are HW_RSC_ID_AUDIO_HW_CLK and HW_RSC_ID_LPASS_CORE_CLK.
  22. */
  23. uint32_t param_id;
  24. /* Overall command response status with value 0 for success and non-zero
  25. * value for command failure. In case of partial or complete command
  26. * failure, this field is followed by resource specific response payload.
  27. */
  28. uint32_t status;
  29. };
  30. /* Clock configuration structure for request */
  31. struct clk_cfg {
  32. /* Unique ID of the clock being requested. */
  33. uint32_t clk_id;
  34. /* Clock frequency in Hz. */
  35. uint32_t clk_freq_in_hz;
  36. /* Clock attributes with values
  37. * 0:invalid
  38. * 1:CLOCK_ATTR_NO_COUPLING
  39. * 2:CLOCK_ATTR_COUPLE_DIVIDEND
  40. * 3:CLOCK_ATTR_COUPLE_DIVISOR
  41. * 4:CLOCK_ATTR_INVERT_NO_COUPLING*/
  42. uint32_t clk_attri;
  43. /* Clock root for this clock with 0 as DEFAULT. */
  44. uint32_t clk_root;
  45. };
  46. /* Below payload is used to report failed clock ID's and error code. */
  47. struct hw_rsc_clk_req_rel_rsp {
  48. /* Number of failures while requesting for 1 or more clock IDs. */
  49. uint32_t num_failures;
  50. };
  51. /* Clock status structure for response payload */
  52. struct clock_status {
  53. /* ID of the clock being requested as part of the REQUEST
  54. * command and resulted in failure.
  55. */
  56. uint32_t clock_id;
  57. /* Error code corresponding to failure occurred while
  58. * requesting this clock ID.
  59. */
  60. uint32_t status;
  61. };
  62. typedef struct apm_cmd_header_t
  63. {
  64. uint32_t payload_address_lsw;
  65. /**< Lower 32 bits of the payload address. */
  66. uint32_t payload_address_msw;
  67. /**< Upper 32 bits of the payload address.
  68. The 64-bit number formed by payload_address_lsw and
  69. payload_address_msw must be aligned to a 32-byte boundary and be in
  70. contiguous memory.
  71. @values
  72. - For a 32-bit shared memory address, this field must be set to 0.
  73. - For a 36-bit shared memory address, bits 31 to 4 of this field must
  74. be set to 0. @tablebulletend */
  75. uint32_t mem_map_handle;
  76. /**< Unique identifier for a shared memory address.
  77. @values
  78. - NULL -- The message is in the payload (in-band).
  79. - Non-NULL -- The parameter data payload begins at the address
  80. specified by a pointer to the physical address of the payload in
  81. shared memory (out-of-band).
  82. @contcell
  83. The aDSP returns this memory map handle through
  84. #apm_CMD_SHARED_MEM_MAP_REGIONS.
  85. An optional field is available if parameter data is in-band:
  86. %afe_port_param_data_v2_t param_data[...].
  87. See <b>Parameter data variable payload</b>. */
  88. uint32_t payload_size;
  89. /**< Actual size of the variable payload accompanying the message or in
  90. shared memory. This field is used for parsing both in-band and
  91. out-of-band data.
  92. @values > 0 bytes, in multiples of 4 bytes */
  93. }apm_cmd_header_t;
  94. typedef struct apm_module_param_data_t
  95. {
  96. uint32_t module_instance_id;
  97. /**< Valid instance ID of module
  98. @values */
  99. uint32_t param_id;
  100. /**< Valid ID of the parameter.
  101. @values See Chapter */
  102. uint32_t param_size;
  103. /**< Size of the parameter data based upon the
  104. module_instance_id/param_id combination.
  105. @values > 0 bytes, in multiples of
  106. 4 bytes at least */
  107. uint32_t error_code;
  108. /**< Error code populated by the entity hosting the module.
  109. Applicable only for out-of-band command mode */
  110. }apm_module_param_data_t;
  111. typedef struct audio_hw_clk_cfg_req_param_t
  112. {
  113. uint32_t num_clock_id;
  114. /**< Number of clock ID's being configured */
  115. }audio_hw_clk_cfg_req_param_t;
  116. typedef struct audio_hw_clk_cfg_t
  117. {
  118. uint32_t clock_id;
  119. /**< Unique Clock ID of the clock being requested */
  120. uint32_t clock_freq;
  121. /**< Clock frequency in Hz to set. */
  122. uint32_t clock_attri;
  123. /**< Divider for two clocks that are coupled, if necessary:
  124. divider = A/B, where A is the dividend and B is the divisor.
  125. @values
  126. - #_CLOCK_ATTRIBUTE_COUPLE_NO -- For no divider-related clocks
  127. - #_CLOCK_ATTRIBUTE_COUPLE_DIVIDEND
  128. - #_CLOCK_ATTRIBUTE_COUPLE_DIVISOR
  129. - #_CLOCK_ATTRIBUTE_INVERT_COUPLE_NO */
  130. uint32_t clock_root;
  131. /**< Root clock source.
  132. @values #_CLOCK_ROOT_DEFAULT
  133. Currently, only _CLOCK_ROOT_DEFAULT is valid. */
  134. }audio_hw_clk_cfg_t;
  135. typedef struct audio_hw_clk_rel_cfg_t
  136. {
  137. uint32_t clock_id;
  138. }audio_hw_clk_rel_cfg_t;
  139. #define MAX_AUD_HW_CLK_NUM_REQ 1
  140. typedef struct prm_cmd_request_rsc_t
  141. {
  142. apm_cmd_header_t payload_header;
  143. apm_module_param_data_t module_payload_0;
  144. audio_hw_clk_cfg_req_param_t num_clk_id_t;
  145. audio_hw_clk_cfg_t clock_ids_t[MAX_AUD_HW_CLK_NUM_REQ];
  146. }prm_cmd_request_rsc_t;
  147. typedef struct prm_cmd_release_rsc_t
  148. {
  149. apm_cmd_header_t payload_header;
  150. apm_module_param_data_t module_payload_0;
  151. audio_hw_clk_cfg_req_param_t num_clk_id_t;
  152. audio_hw_clk_rel_cfg_t clock_ids_t[MAX_AUD_HW_CLK_NUM_REQ];
  153. }prm_cmd_release_rsc_t;
  154. typedef struct prm_cmd_request_hw_core_t
  155. {
  156. apm_cmd_header_t payload_header;
  157. apm_module_param_data_t module_payload_0;
  158. uint32_t hw_core_id;
  159. }prm_cmd_request_hw_core_t;
  160. #define PRM_CMD_REQUEST_HW_RSC 0x0100100F
  161. #define PRM_CMD_RELEASE_HW_RSC 0x01001010
  162. #define PRM_CMD_RSP_REQUEST_HW_RSC 0x02001002
  163. #define PRM_CMD_RSP_RELEASE_HW_RSC 0x02001003
  164. /* Param ID for audio hardware clock */
  165. #define PARAM_ID_RSC_AUDIO_HW_CLK 0x0800102C
  166. /* Param ID for lpass core clock */
  167. #define PARAM_ID_RSC_LPASS_CORE 0x0800102B
  168. #define PARAM_ID_RSC_HW_CORE 0x08001032
  169. #define HW_RSC_ID_AUDIO_HW_CLK 0x0800102C
  170. #define MAX_EARPA_REG 2
  171. #define MAX_EARPA_CDC_DUTY_CYC_OPERATION 2
  172. typedef struct audio_hw_codec_op_info_t {
  173. uint32_t hw_codec_op_id;
  174. uint32_t hw_codec_op_value;
  175. } audio_hw_codec_op_info_t;
  176. typedef struct audio_hw_codec_reg_op_info_t {
  177. uint32_t hw_codec_reg_id;
  178. uint32_t hw_codec_reg_addr_msw;
  179. uint32_t hw_codec_reg_addr_lsw;
  180. uint32_t num_ops;
  181. audio_hw_codec_op_info_t hw_codec_op[MAX_EARPA_REG];
  182. } audio_hw_codec_reg_op_info_t;
  183. typedef struct audio_hw_codec_reg_info_t {
  184. uint32_t num_reg_info_t;
  185. audio_hw_codec_reg_op_info_t hw_codec_reg[MAX_EARPA_REG];
  186. } audio_hw_codec_reg_info_t;
  187. typedef struct prm_cmd_request_cdc_duty_cycling_t {
  188. apm_cmd_header_t payload_header;
  189. apm_module_param_data_t module_payload_0;
  190. audio_hw_codec_reg_info_t hw_codec_reg_info_t;
  191. } prm_cmd_request_cdc_duty_cycling_t;
  192. /* earpa_register config */
  193. #define DIG_MUTE_ENABLE 0x34
  194. #define DIG_MUTE_DISABLE 0x24
  195. struct lpass_swr_ear_pa_dep_cfg_t {
  196. uint32_t ear_pa_enable_pkd_reg_addr;
  197. uint32_t ear_pa_disable_pkd_reg_addr;
  198. } __packed;
  199. struct lpass_swr_ear_pa_reg_cfg_t {
  200. uint32_t lpass_cdc_rx0_rx_path_ctl_phy_addr;
  201. uint32_t lpass_wr_fifo_reg_phy_addr;
  202. } __packed;
  203. struct prm_earpa_hw_intf_config {
  204. struct lpass_swr_ear_pa_reg_cfg_t ear_pa_hw_reg_cfg;
  205. struct lpass_swr_ear_pa_dep_cfg_t ear_pa_pkd_cfg;
  206. uint32_t ear_pa_pkd_reg_addr;
  207. const char *backend_used;
  208. } __packed;
  209. #define PARAM_ID_RSC_HW_CODEC_REG_INFO 0x0800131B
  210. #define HW_CODEC_DIG_REG_ID_MUTE_CTRL 0x1
  211. #define HW_CODEC_OP_DIG_MUTE_ENABLE 0x1
  212. #define HW_CODEC_OP_DIG_MUTE_DISABLE 0x2
  213. #define HW_CODEC_ANALOG_REG_ID_CMD_FIFO_WRITE 0x2
  214. #define HW_CODEC_OP_ANA_PGA_ENABLE 0x3
  215. #define HW_CODEC_OP_ANA_PGA_DISABLE 0x4
  216. /* Supported OSR clock values */
  217. #define OSR_CLOCK_12_P288_MHZ 0xBB8000
  218. #define OSR_CLOCK_11_P2896_MHZ 0xAC4400
  219. #define OSR_CLOCK_9_P600_MHZ 0x927C00
  220. #define OSR_CLOCK_8_P192_MHZ 0x7D0000
  221. #define OSR_CLOCK_6_P144_MHZ 0x5DC000
  222. #define OSR_CLOCK_4_P096_MHZ 0x3E8000
  223. #define OSR_CLOCK_3_P072_MHZ 0x2EE000
  224. #define OSR_CLOCK_2_P048_MHZ 0x1F4000
  225. #define OSR_CLOCK_1_P536_MHZ 0x177000
  226. #define OSR_CLOCK_1_P024_MHZ 0xFA000
  227. #define OSR_CLOCK_768_kHZ 0xBB800
  228. #define OSR_CLOCK_512_kHZ 0x7D000
  229. #define OSR_CLOCK_DISABLE 0x0
  230. /* Supported Bit clock values */
  231. #define IBIT_CLOCK_12_P288_MHZ 0xBB8000
  232. #define IBIT_CLOCK_11_P2896_MHZ 0xAC4400
  233. #define IBIT_CLOCK_8_P192_MHZ 0x7D0000
  234. #define IBIT_CLOCK_6_P144_MHZ 0x5DC000
  235. #define IBIT_CLOCK_4_P096_MHZ 0x3E8000
  236. #define IBIT_CLOCK_3_P072_MHZ 0x2EE000
  237. #define IBIT_CLOCK_2_P8224_MHZ 0x2b1100
  238. #define IBIT_CLOCK_2_P048_MHZ 0x1F4000
  239. #define IBIT_CLOCK_1_P536_MHZ 0x177000
  240. #define IBIT_CLOCK_1_P4112_MHZ 0x158880
  241. #define IBIT_CLOCK_1_P024_MHZ 0xFA000
  242. #define IBIT_CLOCK_768_KHZ 0xBB800
  243. #define IBIT_CLOCK_512_KHZ 0x7D000
  244. #define IBIT_CLOCK_256_KHZ 0x3E800
  245. #define IBIT_CLOCK_DISABLE 0x0
  246. /** Clock ID of the primary MI2S internal bit clock (IBIT). */
  247. #define CLOCK_ID_PRI_MI2S_IBIT 0x100
  248. /** Clock ID of the primary MI2S external bit clock (EBIT). */
  249. #define CLOCK_ID_PRI_MI2S_EBIT 0x101
  250. /** Clock ID of the secondary MI2S IBIT. */
  251. #define CLOCK_ID_SEC_MI2S_IBIT 0x102
  252. /** Clock ID of the secondary MI2S EBIT. */
  253. #define CLOCK_ID_SEC_MI2S_EBIT 0x103
  254. /** Clock ID of the tertiary MI2S IBIT. */
  255. #define CLOCK_ID_TER_MI2S_IBIT 0x104
  256. /** Clock ID of the tertiary MI2S EBIT. */
  257. #define CLOCK_ID_TER_MI2S_EBIT 0x105
  258. /** Clock ID of the quaternary MI2S IBIT. */
  259. #define CLOCK_ID_QUAD_MI2S_IBIT 0x106
  260. /** Clock ID of the quaternary MI2S EBIT. */
  261. #define CLOCK_ID_QUAD_MI2S_EBIT 0x107
  262. /** Clock ID of the quinary MI2S IBIT. */
  263. #define CLOCK_ID_QUI_MI2S_IBIT 0x108
  264. /** Clock ID of the quinary MI2S EBIT. */
  265. #define CLOCK_ID_QUI_MI2S_EBIT 0x109
  266. /** Clock ID of the quinary MI2S OSR. */
  267. #define CLOCK_ID_QUI_MI2S_OSR 0x10A
  268. /** Clock ID of the senary MI2S IBIT. */
  269. #define CLOCK_ID_SEN_MI2S_IBIT 0x10B
  270. /** Clock ID of the senary MI2S EBIT. */
  271. #define CLOCK_ID_SEN_MI2S_EBIT 0x10C
  272. /** Clock ID of the septenary MI2S IBIT. */
  273. #define CLOCK_ID_SEP_MI2S_IBIT 0x10D
  274. /** Clock ID of the septenary MI2S EBIT. */
  275. #define CLOCK_ID_SEP_MI2S_EBIT 0x10E
  276. /** ID of I2S IBIT clock 0 that is used with integrated codec. */
  277. #define CLOCK_ID_INT0_I2S_IBIT 0x10D
  278. /** ID of I2S IBIT clock 1 that is used with integrated codec. */
  279. #define CLOCK_ID_INT1_I2S_IBIT 0x10E
  280. /** ID of I2S IBIT clock 2 that is used with integrated codec. */
  281. #define CLOCK_ID_INT2_I2S_IBIT 0x10F
  282. /** ID of I2S IBIT clock 3 that is used with integrated codec. */
  283. #define CLOCK_ID_INT3_I2S_IBIT 0x110
  284. /** ID of I2S IBIT clock 4 that is used with integrated codec. */
  285. #define CLOCK_ID_INT4_I2S_IBIT 0x111
  286. /** ID of I2S IBIT clock 5 that is used with integrated codec. */
  287. #define CLOCK_ID_INT5_I2S_IBIT 0x112
  288. /** ID of I2S IBIT clock 6 that is used with integrated codec. */
  289. #define CLOCK_ID_INT6_I2S_IBIT 0x113
  290. /** Clock ID of the primary PCM IBIT. */
  291. #define CLOCK_ID_PRI_PCM_IBIT 0x200
  292. /** Clock ID of the primary PCM EBIT. */
  293. #define CLOCK_ID_PRI_PCM_EBIT 0x201
  294. /** Clock ID of the secondary PCM IBIT. */
  295. #define CLOCK_ID_SEC_PCM_IBIT 0x202
  296. /** Clock ID of the secondary PCM EBIT. */
  297. #define CLOCK_ID_SEC_PCM_EBIT 0x203
  298. /** Clock ID of the tertiary PCM IBIT. */
  299. #define CLOCK_ID_TER_PCM_IBIT 0x204
  300. /** Clock ID of the tertiary PCM EBIT. */
  301. #define CLOCK_ID_TER_PCM_EBIT 0x205
  302. /** Clock ID of the quaternary PCM IBIT. */
  303. #define CLOCK_ID_QUAD_PCM_IBIT 0x206
  304. /** Clock ID of the quaternary PCM EBIT. */
  305. #define CLOCK_ID_QUAD_PCM_EBIT 0x207
  306. /** Clock ID of the quinary PCM IBIT. */
  307. #define CLOCK_ID_QUI_PCM_IBIT 0x208
  308. /** Clock ID of the quinary PCM EBIT. */
  309. #define CLOCK_ID_QUI_PCM_EBIT 0x209
  310. /** Clock ID of the quinary PCM OSR. */
  311. #define CLOCK_ID_QUI_PCM_OSR 0x20A
  312. /** Clock ID of the senary PCM IBIT. */
  313. #define CLOCK_ID_SEN_PCM_IBIT 0x20B
  314. /** Clock ID of the senary PCM EBIT. */
  315. #define CLOCK_ID_SEN_PCM_EBIT 0x20C
  316. /** Clock ID for the primary TDM IBIT. */
  317. #define CLOCK_ID_PRI_TDM_IBIT 0x200
  318. /** Clock ID for the primary TDM EBIT. */
  319. #define CLOCK_ID_PRI_TDM_EBIT 0x201
  320. /** Clock ID for the secondary TDM IBIT. */
  321. #define CLOCK_ID_SEC_TDM_IBIT 0x202
  322. /** Clock ID for the secondary TDM EBIT. */
  323. #define CLOCK_ID_SEC_TDM_EBIT 0x203
  324. /** Clock ID for the tertiary TDM IBIT. */
  325. #define CLOCK_ID_TER_TDM_IBIT 0x204
  326. /** Clock ID for the tertiary TDM EBIT. */
  327. #define CLOCK_ID_TER_TDM_EBIT 0x205
  328. /** Clock ID for the quaternary TDM IBIT. */
  329. #define CLOCK_ID_QUAD_TDM_IBIT 0x206
  330. /** Clock ID for the quaternary TDM EBIT. */
  331. #define CLOCK_ID_QUAD_TDM_EBIT 0x207
  332. /** Clock ID for the quinary TDM IBIT. */
  333. #define CLOCK_ID_QUI_TDM_IBIT 0x208
  334. /** Clock ID for the quinary TDM EBIT. */
  335. #define CLOCK_ID_QUI_TDM_EBIT 0x209
  336. /** Clock ID for the quinary TDM OSR. */
  337. #define CLOCK_ID_QUI_TDM_OSR 0x20A
  338. /** Clock ID for the senary TDM IBIT. */
  339. #define CLOCK_ID_SEN_TDM_IBIT 0x20B
  340. /** Clock ID for the senary TDM EBIT. */
  341. #define CLOCK_ID_SEN_TDM_EBIT 0x20C
  342. /** Clock ID of the septenary TDM IBIT. */
  343. #define CLOCK_ID_SEP_TDM_IBIT 0x20D
  344. /** Clock ID of the septenary TDM EBIT. */
  345. #define CLOCK_ID_SEP_TDM_EBIT 0x20E
  346. /** Clock ID for MCLK 1. */
  347. #define CLOCK_ID_MCLK_1 0x300
  348. /** Clock ID for MCLK 2. */
  349. #define CLOCK_ID_MCLK_2 0x301
  350. /** Clock ID for MCLK 3. */
  351. #define CLOCK_ID_MCLK_3 0x302
  352. /** Clock ID for MCLK 4. */
  353. #define CLOCK_ID_MCLK_4 0x303
  354. /** Clock ID for MCLK 5. */
  355. #define CLOCK_ID_MCLK_5 0x304
  356. /** Clock ID for MCLK for WSA core */
  357. #define CLOCK_ID_WSA_CORE_MCLK 0x305
  358. /** Clock ID for NPL MCLK for WSA core */
  359. #define CLOCK_ID_WSA_CORE_NPL_MCLK 0x306
  360. /** Clock ID for 2X WSA MCLK (2X MCLK or NPL MCLK, both are same) */
  361. #define CLOCK_ID_WSA_CORE_2X_MCLK CLOCK_ID_WSA_CORE_NPL_MCLK
  362. /** Clock ID for MCLK for VA core */
  363. #define CLOCK_ID_VA_CORE_MCLK 0x307
  364. /** Clock ID for MCLK for TX */
  365. #define CLOCK_ID_TX_CORE_MCLK 0x30C
  366. /** Clock ID for RX Core TX MCLK */
  367. #define CLOCK_ID_RX_CORE_TX_MCLK 0x312
  368. /** Clock ID for WSA core TX MCLK */
  369. #define CLOCK_ID_WSA_CORE_TX_MCLK 0x314
  370. /** Clock ID for WSA2 core TX MCLK */
  371. #define CLOCK_ID_WSA2_CORE_TX_MCLK 0x316
  372. /** Clock ID for the primary SPDIF output core. */
  373. #define CLOCK_ID_PRI_SPDIF_OUTPUT_CORE 0x400
  374. /** Clock ID for the secondary SPDIF output core. */
  375. #define CLOCK_ID_SEC_SPDIF_OUTPUT_CORE 0x401
  376. /** Clock ID for the primary SPDIF input core. */
  377. #define CLOCK_ID_PRI_SPDIF_INPUT_CORE 0x402
  378. /** Clock ID for the secondary SPDIF input core. */
  379. #define CLOCK_ID_SEC_SPDIF_INPUT_CORE 0x403
  380. /** Clock ID for the secondary SPDIF output NPL clk. */
  381. #define CLOCK_ID_PRI_SPDIF_OUTPUT_NPL 0x404
  382. /** Clock ID for the primary SPDIF output NPL clk. */
  383. #define CLOCK_ID_SEC_SPDIF_OUTPUT_NPL 0x405
  384. /** Clock attribute is invalid (reserved for internal use). */
  385. #define CLOCK_ATTRIBUTE_INVALID 0x0
  386. /** Clock attribute for no coupled clocks. */
  387. #define CLOCK_ATTRIBUTE_COUPLE_NO 0x1
  388. /** Clock attribute for the dividend of the coupled clocks. */
  389. #define CLOCK_ATTRIBUTE_COUPLE_DIVIDEND 0x2
  390. /** Clock attribute for the divisor of the coupled clocks. */
  391. #define CLOCK_ATTRIBUTE_COUPLE_DIVISOR 0x3
  392. /** Clock attribute for the invert-and-no-couple case. */
  393. #define CLOCK_ATTRIBUTE_INVERT_COUPLE_NO 0x4
  394. /** Default root clock source. */
  395. #define CLOCK_ROOT_DEFAULT 0x0
  396. /** Hardware core identifier for LPASS. */
  397. #define HW_CORE_ID_LPASS 0x1
  398. /** Hardware core identifier for digital codec. */
  399. #define HW_CORE_ID_DCODEC 0x2
  400. /** Default clock source. */
  401. #define CLOCK_ROOT_SRC_DEFAULT 0x0
  402. /** Xo Clock source. */
  403. #define CLOCK_ROOT_SRC_XO 0x1
  404. /** RCO Clock source. */
  405. #define CLOCK_ROOT_SRC_RCO 0x2
  406. int audio_prm_set_lpass_clk_cfg(struct clk_cfg *cfg, uint8_t enable);
  407. int audio_prm_set_lpass_hw_core_req(struct clk_cfg *cfg, uint32_t hw_core_id, uint8_t enable);
  408. int audio_prm_set_cdc_earpa_duty_cycling_req(struct prm_earpa_hw_intf_config *earpa_config,
  409. uint32_t enable);
  410. void audio_prm_set_lpi_logging_status(int lpi_pcm_logging_enable);
  411. #endif