sst-haswell-ipc.h 16 KB

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