sst-haswell-ipc.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535
  1. /*
  2. * Intel SST Haswell/Broadwell IPC Support
  3. *
  4. * Copyright (C) 2013, Intel Corporation. All rights reserved.
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License version
  8. * 2 as published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. */
  16. #ifndef __SST_HASWELL_IPC_H
  17. #define __SST_HASWELL_IPC_H
  18. #include <linux/types.h>
  19. #include <linux/kernel.h>
  20. #include <linux/platform_device.h>
  21. #include <sound/asound.h>
  22. #define SST_HSW_NO_CHANNELS 4
  23. #define SST_HSW_MAX_DX_REGIONS 14
  24. #define SST_HSW_DX_CONTEXT_SIZE (640 * 1024)
  25. #define SST_HSW_CHANNELS_ALL 0xffffffff
  26. #define SST_HSW_FW_LOG_CONFIG_DWORDS 12
  27. #define SST_HSW_GLOBAL_LOG 15
  28. /**
  29. * Upfront defined maximum message size that is
  30. * expected by the in/out communication pipes in FW.
  31. */
  32. #define SST_HSW_IPC_MAX_PAYLOAD_SIZE 400
  33. #define SST_HSW_MAX_INFO_SIZE 64
  34. #define SST_HSW_BUILD_HASH_LENGTH 40
  35. #define SST_HSW_IPC_MAX_SHORT_PARAMETER_SIZE 500
  36. #define WAVES_PARAM_COUNT 128
  37. #define WAVES_PARAM_LINES 160
  38. struct sst_hsw;
  39. struct sst_hsw_stream;
  40. struct sst_hsw_log_stream;
  41. struct sst_pdata;
  42. struct sst_module;
  43. struct sst_module_runtime;
  44. extern struct sst_ops haswell_ops;
  45. /* Stream Allocate Path ID */
  46. enum sst_hsw_stream_path_id {
  47. SST_HSW_STREAM_PATH_SSP0_OUT = 0,
  48. SST_HSW_STREAM_PATH_SSP0_IN = 1,
  49. SST_HSW_STREAM_PATH_MAX_PATH_ID = 2,
  50. };
  51. /* Stream Allocate Stream Type */
  52. enum sst_hsw_stream_type {
  53. SST_HSW_STREAM_TYPE_RENDER = 0,
  54. SST_HSW_STREAM_TYPE_SYSTEM = 1,
  55. SST_HSW_STREAM_TYPE_CAPTURE = 2,
  56. SST_HSW_STREAM_TYPE_LOOPBACK = 3,
  57. SST_HSW_STREAM_TYPE_MAX_STREAM_TYPE = 4,
  58. };
  59. /* Stream Allocate Stream Format */
  60. enum sst_hsw_stream_format {
  61. SST_HSW_STREAM_FORMAT_PCM_FORMAT = 0,
  62. SST_HSW_STREAM_FORMAT_MP3_FORMAT = 1,
  63. SST_HSW_STREAM_FORMAT_AAC_FORMAT = 2,
  64. SST_HSW_STREAM_FORMAT_MAX_FORMAT_ID = 3,
  65. };
  66. /* Device ID */
  67. enum sst_hsw_device_id {
  68. SST_HSW_DEVICE_SSP_0 = 0,
  69. SST_HSW_DEVICE_SSP_1 = 1,
  70. };
  71. /* Device Master Clock Frequency */
  72. enum sst_hsw_device_mclk {
  73. SST_HSW_DEVICE_MCLK_OFF = 0,
  74. SST_HSW_DEVICE_MCLK_FREQ_6_MHZ = 1,
  75. SST_HSW_DEVICE_MCLK_FREQ_12_MHZ = 2,
  76. SST_HSW_DEVICE_MCLK_FREQ_24_MHZ = 3,
  77. };
  78. /* Device Clock Master */
  79. enum sst_hsw_device_mode {
  80. SST_HSW_DEVICE_CLOCK_SLAVE = 0,
  81. SST_HSW_DEVICE_CLOCK_MASTER = 1,
  82. SST_HSW_DEVICE_TDM_CLOCK_MASTER = 2,
  83. };
  84. /* DX Power State */
  85. enum sst_hsw_dx_state {
  86. SST_HSW_DX_STATE_D0 = 0,
  87. SST_HSW_DX_STATE_D1 = 1,
  88. SST_HSW_DX_STATE_D3 = 3,
  89. SST_HSW_DX_STATE_MAX = 3,
  90. };
  91. /* Audio stream stage IDs */
  92. enum sst_hsw_fx_stage_id {
  93. SST_HSW_STAGE_ID_WAVES = 0,
  94. SST_HSW_STAGE_ID_DTS = 1,
  95. SST_HSW_STAGE_ID_DOLBY = 2,
  96. SST_HSW_STAGE_ID_BOOST = 3,
  97. SST_HSW_STAGE_ID_MAX_FX_ID
  98. };
  99. /* DX State Type */
  100. enum sst_hsw_dx_type {
  101. SST_HSW_DX_TYPE_FW_IMAGE = 0,
  102. SST_HSW_DX_TYPE_MEMORY_DUMP = 1
  103. };
  104. /* Volume Curve Type*/
  105. enum sst_hsw_volume_curve {
  106. SST_HSW_VOLUME_CURVE_NONE = 0,
  107. SST_HSW_VOLUME_CURVE_FADE = 1
  108. };
  109. /* Sample ordering */
  110. enum sst_hsw_interleaving {
  111. SST_HSW_INTERLEAVING_PER_CHANNEL = 0,
  112. SST_HSW_INTERLEAVING_PER_SAMPLE = 1,
  113. };
  114. /* Channel indices */
  115. enum sst_hsw_channel_index {
  116. SST_HSW_CHANNEL_LEFT = 0,
  117. SST_HSW_CHANNEL_CENTER = 1,
  118. SST_HSW_CHANNEL_RIGHT = 2,
  119. SST_HSW_CHANNEL_LEFT_SURROUND = 3,
  120. SST_HSW_CHANNEL_CENTER_SURROUND = 3,
  121. SST_HSW_CHANNEL_RIGHT_SURROUND = 4,
  122. SST_HSW_CHANNEL_LFE = 7,
  123. SST_HSW_CHANNEL_INVALID = 0xF,
  124. };
  125. /* List of supported channel maps. */
  126. enum sst_hsw_channel_config {
  127. SST_HSW_CHANNEL_CONFIG_MONO = 0, /* mono only. */
  128. SST_HSW_CHANNEL_CONFIG_STEREO = 1, /* L & R. */
  129. SST_HSW_CHANNEL_CONFIG_2_POINT_1 = 2, /* L, R & LFE; PCM only. */
  130. SST_HSW_CHANNEL_CONFIG_3_POINT_0 = 3, /* L, C & R; MP3 & AAC only. */
  131. SST_HSW_CHANNEL_CONFIG_3_POINT_1 = 4, /* L, C, R & LFE; PCM only. */
  132. SST_HSW_CHANNEL_CONFIG_QUATRO = 5, /* L, R, Ls & Rs; PCM only. */
  133. SST_HSW_CHANNEL_CONFIG_4_POINT_0 = 6, /* L, C, R & Cs; MP3 & AAC only. */
  134. SST_HSW_CHANNEL_CONFIG_5_POINT_0 = 7, /* L, C, R, Ls & Rs. */
  135. SST_HSW_CHANNEL_CONFIG_5_POINT_1 = 8, /* L, C, R, Ls, Rs & LFE. */
  136. SST_HSW_CHANNEL_CONFIG_DUAL_MONO = 9, /* One channel replicated in two. */
  137. SST_HSW_CHANNEL_CONFIG_INVALID,
  138. };
  139. /* List of supported bit depths. */
  140. enum sst_hsw_bitdepth {
  141. SST_HSW_DEPTH_8BIT = 8,
  142. SST_HSW_DEPTH_16BIT = 16,
  143. SST_HSW_DEPTH_24BIT = 24, /* Default. */
  144. SST_HSW_DEPTH_32BIT = 32,
  145. SST_HSW_DEPTH_INVALID = 33,
  146. };
  147. enum sst_hsw_module_id {
  148. SST_HSW_MODULE_BASE_FW = 0x0,
  149. SST_HSW_MODULE_MP3 = 0x1,
  150. SST_HSW_MODULE_AAC_5_1 = 0x2,
  151. SST_HSW_MODULE_AAC_2_0 = 0x3,
  152. SST_HSW_MODULE_SRC = 0x4,
  153. SST_HSW_MODULE_WAVES = 0x5,
  154. SST_HSW_MODULE_DOLBY = 0x6,
  155. SST_HSW_MODULE_BOOST = 0x7,
  156. SST_HSW_MODULE_LPAL = 0x8,
  157. SST_HSW_MODULE_DTS = 0x9,
  158. SST_HSW_MODULE_PCM_CAPTURE = 0xA,
  159. SST_HSW_MODULE_PCM_SYSTEM = 0xB,
  160. SST_HSW_MODULE_PCM_REFERENCE = 0xC,
  161. SST_HSW_MODULE_PCM = 0xD,
  162. SST_HSW_MODULE_BLUETOOTH_RENDER_MODULE = 0xE,
  163. SST_HSW_MODULE_BLUETOOTH_CAPTURE_MODULE = 0xF,
  164. SST_HSW_MAX_MODULE_ID,
  165. };
  166. enum sst_hsw_performance_action {
  167. SST_HSW_PERF_START = 0,
  168. SST_HSW_PERF_STOP = 1,
  169. };
  170. struct sst_hsw_transfer_info {
  171. uint32_t destination; /* destination address */
  172. uint32_t reverse:1; /* if 1 data flows from destination */
  173. uint32_t size:31; /* transfer size in bytes.*/
  174. uint16_t first_page_offset; /* offset to data in the first page. */
  175. uint8_t packed_pages; /* page addresses. Each occupies 20 bits */
  176. } __attribute__((packed));
  177. struct sst_hsw_transfer_list {
  178. uint32_t transfers_count;
  179. struct sst_hsw_transfer_info transfers;
  180. } __attribute__((packed));
  181. struct sst_hsw_transfer_parameter {
  182. uint32_t parameter_id;
  183. uint32_t data_size;
  184. union {
  185. uint8_t data[1];
  186. struct sst_hsw_transfer_list transfer_list;
  187. };
  188. } __attribute__((packed));
  189. /* SST firmware module info */
  190. struct sst_hsw_module_info {
  191. u8 name[SST_HSW_MAX_INFO_SIZE];
  192. u8 version[SST_HSW_MAX_INFO_SIZE];
  193. } __attribute__((packed));
  194. /* Module entry point */
  195. struct sst_hsw_module_entry {
  196. enum sst_hsw_module_id module_id;
  197. u32 entry_point;
  198. } __attribute__((packed));
  199. /* Module map - alignement matches DSP */
  200. struct sst_hsw_module_map {
  201. u8 module_entries_count;
  202. struct sst_hsw_module_entry module_entries[1];
  203. } __attribute__((packed));
  204. struct sst_hsw_memory_info {
  205. u32 offset;
  206. u32 size;
  207. } __attribute__((packed));
  208. struct sst_hsw_fx_enable {
  209. struct sst_hsw_module_map module_map;
  210. struct sst_hsw_memory_info persistent_mem;
  211. } __attribute__((packed));
  212. struct sst_hsw_ipc_module_config {
  213. struct sst_hsw_module_map map;
  214. struct sst_hsw_memory_info persistent_mem;
  215. struct sst_hsw_memory_info scratch_mem;
  216. } __attribute__((packed));
  217. struct sst_hsw_get_fx_param {
  218. u32 parameter_id;
  219. u32 param_size;
  220. } __attribute__((packed));
  221. struct sst_hsw_perf_action {
  222. u32 action;
  223. } __attribute__((packed));
  224. struct sst_hsw_perf_data {
  225. u64 timestamp;
  226. u64 cycles;
  227. u64 datatime;
  228. } __attribute__((packed));
  229. /* FW version */
  230. struct sst_hsw_ipc_fw_version {
  231. u8 build;
  232. u8 minor;
  233. u8 major;
  234. u8 type;
  235. u8 fw_build_hash[SST_HSW_BUILD_HASH_LENGTH];
  236. u32 fw_log_providers_hash;
  237. } __attribute__((packed));
  238. /* Stream ring info */
  239. struct sst_hsw_ipc_stream_ring {
  240. u32 ring_pt_address;
  241. u32 num_pages;
  242. u32 ring_size;
  243. u32 ring_offset;
  244. u32 ring_first_pfn;
  245. } __attribute__((packed));
  246. /* Debug Dump Log Enable Request */
  247. struct sst_hsw_ipc_debug_log_enable_req {
  248. struct sst_hsw_ipc_stream_ring ringinfo;
  249. u32 config[SST_HSW_FW_LOG_CONFIG_DWORDS];
  250. } __attribute__((packed));
  251. /* Debug Dump Log Reply */
  252. struct sst_hsw_ipc_debug_log_reply {
  253. u32 log_buffer_begining;
  254. u32 log_buffer_size;
  255. } __attribute__((packed));
  256. /* Stream glitch position */
  257. struct sst_hsw_ipc_stream_glitch_position {
  258. u32 glitch_type;
  259. u32 present_pos;
  260. u32 write_pos;
  261. } __attribute__((packed));
  262. /* Stream get position */
  263. struct sst_hsw_ipc_stream_get_position {
  264. u32 position;
  265. u32 fw_cycle_count;
  266. } __attribute__((packed));
  267. /* Stream set position */
  268. struct sst_hsw_ipc_stream_set_position {
  269. u32 position;
  270. u32 end_of_buffer;
  271. } __attribute__((packed));
  272. /* Stream Free Request */
  273. struct sst_hsw_ipc_stream_free_req {
  274. u8 stream_id;
  275. u8 reserved[3];
  276. } __attribute__((packed));
  277. /* Set Volume Request */
  278. struct sst_hsw_ipc_volume_req {
  279. u32 channel;
  280. u32 target_volume;
  281. u64 curve_duration;
  282. u32 curve_type;
  283. } __attribute__((packed));
  284. /* Device Configuration Request */
  285. struct sst_hsw_ipc_device_config_req {
  286. u32 ssp_interface;
  287. u32 clock_frequency;
  288. u32 mode;
  289. u16 clock_divider;
  290. u8 channels;
  291. u8 reserved;
  292. } __attribute__((packed));
  293. /* Audio Data formats */
  294. struct sst_hsw_audio_data_format_ipc {
  295. u32 frequency;
  296. u32 bitdepth;
  297. u32 map;
  298. u32 config;
  299. u32 style;
  300. u8 ch_num;
  301. u8 valid_bit;
  302. u8 reserved[2];
  303. } __attribute__((packed));
  304. /* Stream Allocate Request */
  305. struct sst_hsw_ipc_stream_alloc_req {
  306. u8 path_id;
  307. u8 stream_type;
  308. u8 format_id;
  309. u8 reserved;
  310. struct sst_hsw_audio_data_format_ipc format;
  311. struct sst_hsw_ipc_stream_ring ringinfo;
  312. struct sst_hsw_module_map map;
  313. struct sst_hsw_memory_info persistent_mem;
  314. struct sst_hsw_memory_info scratch_mem;
  315. u32 number_of_notifications;
  316. } __attribute__((packed));
  317. /* Stream Allocate Reply */
  318. struct sst_hsw_ipc_stream_alloc_reply {
  319. u32 stream_hw_id;
  320. u32 mixer_hw_id; // returns rate ????
  321. u32 read_position_register_address;
  322. u32 presentation_position_register_address;
  323. u32 peak_meter_register_address[SST_HSW_NO_CHANNELS];
  324. u32 volume_register_address[SST_HSW_NO_CHANNELS];
  325. } __attribute__((packed));
  326. /* Get Mixer Stream Info */
  327. struct sst_hsw_ipc_stream_info_reply {
  328. u32 mixer_hw_id;
  329. u32 peak_meter_register_address[SST_HSW_NO_CHANNELS];
  330. u32 volume_register_address[SST_HSW_NO_CHANNELS];
  331. } __attribute__((packed));
  332. /* DX State Request */
  333. struct sst_hsw_ipc_dx_req {
  334. u8 state;
  335. u8 reserved[3];
  336. } __attribute__((packed));
  337. /* DX State Reply Memory Info Item */
  338. struct sst_hsw_ipc_dx_memory_item {
  339. u32 offset;
  340. u32 size;
  341. u32 source;
  342. } __attribute__((packed));
  343. /* DX State Reply */
  344. struct sst_hsw_ipc_dx_reply {
  345. u32 entries_no;
  346. struct sst_hsw_ipc_dx_memory_item mem_info[SST_HSW_MAX_DX_REGIONS];
  347. } __attribute__((packed));
  348. struct sst_hsw_ipc_fw_version;
  349. /* SST Init & Free */
  350. struct sst_hsw *sst_hsw_new(struct device *dev, const u8 *fw, size_t fw_length,
  351. u32 fw_offset);
  352. void sst_hsw_free(struct sst_hsw *hsw);
  353. int sst_hsw_fw_get_version(struct sst_hsw *hsw,
  354. struct sst_hsw_ipc_fw_version *version);
  355. u32 create_channel_map(enum sst_hsw_channel_config config);
  356. /* Stream Mixer Controls - */
  357. int sst_hsw_stream_set_volume(struct sst_hsw *hsw,
  358. struct sst_hsw_stream *stream, u32 stage_id, u32 channel, u32 volume);
  359. int sst_hsw_stream_get_volume(struct sst_hsw *hsw,
  360. struct sst_hsw_stream *stream, u32 stage_id, u32 channel, u32 *volume);
  361. /* Global Mixer Controls - */
  362. int sst_hsw_mixer_set_volume(struct sst_hsw *hsw, u32 stage_id, u32 channel,
  363. u32 volume);
  364. int sst_hsw_mixer_get_volume(struct sst_hsw *hsw, u32 stage_id, u32 channel,
  365. u32 *volume);
  366. /* Stream API */
  367. struct sst_hsw_stream *sst_hsw_stream_new(struct sst_hsw *hsw, int id,
  368. u32 (*get_write_position)(struct sst_hsw_stream *stream, void *data),
  369. void *data);
  370. int sst_hsw_stream_free(struct sst_hsw *hsw, struct sst_hsw_stream *stream);
  371. /* Stream Configuration */
  372. int sst_hsw_stream_format(struct sst_hsw *hsw, struct sst_hsw_stream *stream,
  373. enum sst_hsw_stream_path_id path_id,
  374. enum sst_hsw_stream_type stream_type,
  375. enum sst_hsw_stream_format format_id);
  376. int sst_hsw_stream_buffer(struct sst_hsw *hsw, struct sst_hsw_stream *stream,
  377. u32 ring_pt_address, u32 num_pages,
  378. u32 ring_size, u32 ring_offset, u32 ring_first_pfn);
  379. int sst_hsw_stream_commit(struct sst_hsw *hsw, struct sst_hsw_stream *stream);
  380. int sst_hsw_stream_set_valid(struct sst_hsw *hsw, struct sst_hsw_stream *stream,
  381. u32 bits);
  382. int sst_hsw_stream_set_rate(struct sst_hsw *hsw, struct sst_hsw_stream *stream,
  383. int rate);
  384. int sst_hsw_stream_set_bits(struct sst_hsw *hsw, struct sst_hsw_stream *stream,
  385. enum sst_hsw_bitdepth bits);
  386. int sst_hsw_stream_set_channels(struct sst_hsw *hsw,
  387. struct sst_hsw_stream *stream, int channels);
  388. int sst_hsw_stream_set_map_config(struct sst_hsw *hsw,
  389. struct sst_hsw_stream *stream, u32 map,
  390. enum sst_hsw_channel_config config);
  391. int sst_hsw_stream_set_style(struct sst_hsw *hsw, struct sst_hsw_stream *stream,
  392. enum sst_hsw_interleaving style);
  393. int sst_hsw_stream_set_module_info(struct sst_hsw *hsw,
  394. struct sst_hsw_stream *stream, struct sst_module_runtime *runtime);
  395. int sst_hsw_stream_set_pmemory_info(struct sst_hsw *hsw,
  396. struct sst_hsw_stream *stream, u32 offset, u32 size);
  397. int sst_hsw_stream_set_smemory_info(struct sst_hsw *hsw,
  398. struct sst_hsw_stream *stream, u32 offset, u32 size);
  399. snd_pcm_uframes_t sst_hsw_stream_get_old_position(struct sst_hsw *hsw,
  400. struct sst_hsw_stream *stream);
  401. void sst_hsw_stream_set_old_position(struct sst_hsw *hsw,
  402. struct sst_hsw_stream *stream, snd_pcm_uframes_t val);
  403. bool sst_hsw_stream_get_silence_start(struct sst_hsw *hsw,
  404. struct sst_hsw_stream *stream);
  405. void sst_hsw_stream_set_silence_start(struct sst_hsw *hsw,
  406. struct sst_hsw_stream *stream, bool val);
  407. int sst_hsw_mixer_get_info(struct sst_hsw *hsw);
  408. /* Stream ALSA trigger operations */
  409. int sst_hsw_stream_pause(struct sst_hsw *hsw, struct sst_hsw_stream *stream,
  410. int wait);
  411. int sst_hsw_stream_resume(struct sst_hsw *hsw, struct sst_hsw_stream *stream,
  412. int wait);
  413. int sst_hsw_stream_reset(struct sst_hsw *hsw, struct sst_hsw_stream *stream);
  414. /* Stream pointer positions */
  415. int sst_hsw_stream_get_read_pos(struct sst_hsw *hsw,
  416. struct sst_hsw_stream *stream, u32 *position);
  417. int sst_hsw_stream_get_write_pos(struct sst_hsw *hsw,
  418. struct sst_hsw_stream *stream, u32 *position);
  419. u32 sst_hsw_get_dsp_position(struct sst_hsw *hsw,
  420. struct sst_hsw_stream *stream);
  421. u64 sst_hsw_get_dsp_presentation_position(struct sst_hsw *hsw,
  422. struct sst_hsw_stream *stream);
  423. /* HW port config */
  424. int sst_hsw_device_set_config(struct sst_hsw *hsw,
  425. enum sst_hsw_device_id dev, enum sst_hsw_device_mclk mclk,
  426. enum sst_hsw_device_mode mode, u32 clock_divider);
  427. /* DX Config */
  428. int sst_hsw_dx_set_state(struct sst_hsw *hsw,
  429. enum sst_hsw_dx_state state, struct sst_hsw_ipc_dx_reply *dx);
  430. /* init */
  431. int sst_hsw_dsp_init(struct device *dev, struct sst_pdata *pdata);
  432. void sst_hsw_dsp_free(struct device *dev, struct sst_pdata *pdata);
  433. struct sst_dsp *sst_hsw_get_dsp(struct sst_hsw *hsw);
  434. /* fw module function */
  435. void sst_hsw_init_module_state(struct sst_hsw *hsw);
  436. bool sst_hsw_is_module_loaded(struct sst_hsw *hsw, u32 module_id);
  437. bool sst_hsw_is_module_active(struct sst_hsw *hsw, u32 module_id);
  438. void sst_hsw_set_module_enabled_rtd3(struct sst_hsw *hsw, u32 module_id);
  439. void sst_hsw_set_module_disabled_rtd3(struct sst_hsw *hsw, u32 module_id);
  440. bool sst_hsw_is_module_enabled_rtd3(struct sst_hsw *hsw, u32 module_id);
  441. void sst_hsw_reset_param_buf(struct sst_hsw *hsw);
  442. int sst_hsw_store_param_line(struct sst_hsw *hsw, u8 *buf);
  443. int sst_hsw_load_param_line(struct sst_hsw *hsw, u8 *buf);
  444. int sst_hsw_launch_param_buf(struct sst_hsw *hsw);
  445. int sst_hsw_module_load(struct sst_hsw *hsw,
  446. u32 module_id, u32 instance_id, char *name);
  447. int sst_hsw_module_enable(struct sst_hsw *hsw,
  448. u32 module_id, u32 instance_id);
  449. int sst_hsw_module_disable(struct sst_hsw *hsw,
  450. u32 module_id, u32 instance_id);
  451. int sst_hsw_module_set_param(struct sst_hsw *hsw,
  452. u32 module_id, u32 instance_id, u32 parameter_id,
  453. u32 param_size, char *param);
  454. /* runtime module management */
  455. struct sst_module_runtime *sst_hsw_runtime_module_create(struct sst_hsw *hsw,
  456. int mod_id, int offset);
  457. void sst_hsw_runtime_module_free(struct sst_module_runtime *runtime);
  458. /* PM */
  459. int sst_hsw_dsp_runtime_resume(struct sst_hsw *hsw);
  460. int sst_hsw_dsp_runtime_suspend(struct sst_hsw *hsw);
  461. int sst_hsw_dsp_load(struct sst_hsw *hsw);
  462. int sst_hsw_dsp_runtime_sleep(struct sst_hsw *hsw);
  463. #endif