audio_prm.h 16 KB

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