diff options
author | Vinod Koul <vinod.koul@intel.com> | 2014-06-13 08:33:54 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-06-22 07:01:49 -0400 |
commit | aa9b045f70160c664291d5482270baf2ed89cc1b (patch) | |
tree | 050f443add3962ed2dbdb1b5c6a14a55f94fec3d | |
parent | 2a6358250081c24cc1e564cb82ecbfd19d8c7238 (diff) |
ASoC: Intel: add the mrfld fw IPC definations
This will be used to update current driver as well as in support for the mrfld
patches
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | sound/soc/intel/sst-mfld-dsp.h | 414 |
1 files changed, 403 insertions, 11 deletions
diff --git a/sound/soc/intel/sst-mfld-dsp.h b/sound/soc/intel/sst-mfld-dsp.h index 8d482d76475a..2c887855e7d8 100644 --- a/sound/soc/intel/sst-mfld-dsp.h +++ b/sound/soc/intel/sst-mfld-dsp.h | |||
@@ -3,7 +3,7 @@ | |||
3 | /* | 3 | /* |
4 | * sst_mfld_dsp.h - Intel SST Driver for audio engine | 4 | * sst_mfld_dsp.h - Intel SST Driver for audio engine |
5 | * | 5 | * |
6 | * Copyright (C) 2008-12 Intel Corporation | 6 | * Copyright (C) 2008-14 Intel Corporation |
7 | * Authors: Vinod Koul <vinod.koul@linux.intel.com> | 7 | * Authors: Vinod Koul <vinod.koul@linux.intel.com> |
8 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 8 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
9 | * | 9 | * |
@@ -19,6 +19,142 @@ | |||
19 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 19 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #define SST_MAX_BIN_BYTES 1024 | ||
23 | |||
24 | #define MAX_DBG_RW_BYTES 80 | ||
25 | #define MAX_NUM_SCATTER_BUFFERS 8 | ||
26 | #define MAX_LOOP_BACK_DWORDS 8 | ||
27 | /* IPC base address and mailbox, timestamp offsets */ | ||
28 | #define SST_MAILBOX_SIZE 0x0400 | ||
29 | #define SST_MAILBOX_SEND 0x0000 | ||
30 | #define SST_TIME_STAMP 0x1800 | ||
31 | #define SST_TIME_STAMP_MRFLD 0x800 | ||
32 | #define SST_RESERVED_OFFSET 0x1A00 | ||
33 | #define SST_SCU_LPE_MAILBOX 0x1000 | ||
34 | #define SST_LPE_SCU_MAILBOX 0x1400 | ||
35 | #define SST_SCU_LPE_LOG_BUF (SST_SCU_LPE_MAILBOX+16) | ||
36 | #define PROCESS_MSG 0x80 | ||
37 | |||
38 | /* Message ID's for IPC messages */ | ||
39 | /* Bits B7: SST or IA/SC ; B6-B4: Msg Category; B3-B0: Msg Type */ | ||
40 | |||
41 | /* I2L Firmware/Codec Download msgs */ | ||
42 | #define IPC_IA_PREP_LIB_DNLD 0x01 | ||
43 | #define IPC_IA_LIB_DNLD_CMPLT 0x02 | ||
44 | #define IPC_IA_GET_FW_VERSION 0x04 | ||
45 | #define IPC_IA_GET_FW_BUILD_INF 0x05 | ||
46 | #define IPC_IA_GET_FW_INFO 0x06 | ||
47 | #define IPC_IA_GET_FW_CTXT 0x07 | ||
48 | #define IPC_IA_SET_FW_CTXT 0x08 | ||
49 | #define IPC_IA_PREPARE_SHUTDOWN 0x31 | ||
50 | /* I2L Codec Config/control msgs */ | ||
51 | #define IPC_PREP_D3 0x10 | ||
52 | #define IPC_IA_SET_CODEC_PARAMS 0x10 | ||
53 | #define IPC_IA_GET_CODEC_PARAMS 0x11 | ||
54 | #define IPC_IA_SET_PPP_PARAMS 0x12 | ||
55 | #define IPC_IA_GET_PPP_PARAMS 0x13 | ||
56 | #define IPC_SST_PERIOD_ELAPSED_MRFLD 0xA | ||
57 | #define IPC_IA_ALG_PARAMS 0x1A | ||
58 | #define IPC_IA_TUNING_PARAMS 0x1B | ||
59 | #define IPC_IA_SET_RUNTIME_PARAMS 0x1C | ||
60 | #define IPC_IA_SET_PARAMS 0x1 | ||
61 | #define IPC_IA_GET_PARAMS 0x2 | ||
62 | |||
63 | #define IPC_EFFECTS_CREATE 0xE | ||
64 | #define IPC_EFFECTS_DESTROY 0xF | ||
65 | |||
66 | /* I2L Stream config/control msgs */ | ||
67 | #define IPC_IA_ALLOC_STREAM_MRFLD 0x2 | ||
68 | #define IPC_IA_ALLOC_STREAM 0x20 /* Allocate a stream ID */ | ||
69 | #define IPC_IA_FREE_STREAM_MRFLD 0x03 | ||
70 | #define IPC_IA_FREE_STREAM 0x21 /* Free the stream ID */ | ||
71 | #define IPC_IA_SET_STREAM_PARAMS 0x22 | ||
72 | #define IPC_IA_SET_STREAM_PARAMS_MRFLD 0x12 | ||
73 | #define IPC_IA_GET_STREAM_PARAMS 0x23 | ||
74 | #define IPC_IA_PAUSE_STREAM 0x24 | ||
75 | #define IPC_IA_PAUSE_STREAM_MRFLD 0x4 | ||
76 | #define IPC_IA_RESUME_STREAM 0x25 | ||
77 | #define IPC_IA_RESUME_STREAM_MRFLD 0x5 | ||
78 | #define IPC_IA_DROP_STREAM 0x26 | ||
79 | #define IPC_IA_DROP_STREAM_MRFLD 0x07 | ||
80 | #define IPC_IA_DRAIN_STREAM 0x27 /* Short msg with str_id */ | ||
81 | #define IPC_IA_DRAIN_STREAM_MRFLD 0x8 | ||
82 | #define IPC_IA_CONTROL_ROUTING 0x29 | ||
83 | #define IPC_IA_VTSV_UPDATE_MODULES 0x20 | ||
84 | #define IPC_IA_VTSV_DETECTED 0x21 | ||
85 | |||
86 | #define IPC_IA_START_STREAM_MRFLD 0X06 | ||
87 | #define IPC_IA_START_STREAM 0x30 /* Short msg with str_id */ | ||
88 | |||
89 | #define IPC_IA_SET_GAIN_MRFLD 0x21 | ||
90 | /* Debug msgs */ | ||
91 | #define IPC_IA_DBG_MEM_READ 0x40 | ||
92 | #define IPC_IA_DBG_MEM_WRITE 0x41 | ||
93 | #define IPC_IA_DBG_LOOP_BACK 0x42 | ||
94 | #define IPC_IA_DBG_LOG_ENABLE 0x45 | ||
95 | #define IPC_IA_DBG_SET_PROBE_PARAMS 0x47 | ||
96 | |||
97 | /* L2I Firmware/Codec Download msgs */ | ||
98 | #define IPC_IA_FW_INIT_CMPLT 0x81 | ||
99 | #define IPC_IA_FW_INIT_CMPLT_MRFLD 0x01 | ||
100 | #define IPC_IA_FW_ASYNC_ERR_MRFLD 0x11 | ||
101 | |||
102 | /* L2I Codec Config/control msgs */ | ||
103 | #define IPC_SST_FRAGMENT_ELPASED 0x90 /* Request IA more data */ | ||
104 | |||
105 | #define IPC_SST_BUF_UNDER_RUN 0x92 /* PB Under run and stopped */ | ||
106 | #define IPC_SST_BUF_OVER_RUN 0x93 /* CAP Under run and stopped */ | ||
107 | #define IPC_SST_DRAIN_END 0x94 /* PB Drain complete and stopped */ | ||
108 | #define IPC_SST_CHNGE_SSP_PARAMS 0x95 /* PB SSP parameters changed */ | ||
109 | #define IPC_SST_STREAM_PROCESS_FATAL_ERR 0x96/* error in processing a stream */ | ||
110 | #define IPC_SST_PERIOD_ELAPSED 0x97 /* period elapsed */ | ||
111 | |||
112 | #define IPC_SST_ERROR_EVENT 0x99 /* Buffer over run occurred */ | ||
113 | /* L2S messages */ | ||
114 | #define IPC_SC_DDR_LINK_UP 0xC0 | ||
115 | #define IPC_SC_DDR_LINK_DOWN 0xC1 | ||
116 | #define IPC_SC_SET_LPECLK_REQ 0xC2 | ||
117 | #define IPC_SC_SSP_BIT_BANG 0xC3 | ||
118 | |||
119 | /* L2I Error reporting msgs */ | ||
120 | #define IPC_IA_MEM_ALLOC_FAIL 0xE0 | ||
121 | #define IPC_IA_PROC_ERR 0xE1 /* error in processing a | ||
122 | stream can be used by playback and | ||
123 | capture modules */ | ||
124 | |||
125 | /* L2I Debug msgs */ | ||
126 | #define IPC_IA_PRINT_STRING 0xF0 | ||
127 | |||
128 | /* Buffer under-run */ | ||
129 | #define IPC_IA_BUF_UNDER_RUN_MRFLD 0x0B | ||
130 | |||
131 | /* Mrfld specific defines: | ||
132 | * For asynchronous messages(INIT_CMPLT, PERIOD_ELAPSED, ASYNC_ERROR) | ||
133 | * received from FW, the format is: | ||
134 | * - IPC High: pvt_id is set to zero. Always short message. | ||
135 | * - msg_id is in lower 16-bits of IPC low payload. | ||
136 | * - pipe_id is in higher 16-bits of IPC low payload for period_elapsed. | ||
137 | * - error id is in higher 16-bits of IPC low payload for async errors. | ||
138 | */ | ||
139 | #define SST_ASYNC_DRV_ID 0 | ||
140 | |||
141 | /* Command Response or Acknowledge message to any IPC message will have | ||
142 | * same message ID and stream ID information which is sent. | ||
143 | * There is no specific Ack message ID. The data field is used as response | ||
144 | * meaning. | ||
145 | */ | ||
146 | enum ackData { | ||
147 | IPC_ACK_SUCCESS = 0, | ||
148 | IPC_ACK_FAILURE, | ||
149 | }; | ||
150 | |||
151 | enum ipc_ia_msg_id { | ||
152 | IPC_CMD = 1, /*!< Task Control message ID */ | ||
153 | IPC_SET_PARAMS = 2,/*!< Task Set param message ID */ | ||
154 | IPC_GET_PARAMS = 3, /*!< Task Get param message ID */ | ||
155 | IPC_INVALID = 0xFF, /*!<Task Get param message ID */ | ||
156 | }; | ||
157 | |||
22 | enum sst_codec_types { | 158 | enum sst_codec_types { |
23 | /* AUDIO/MUSIC CODEC Type Definitions */ | 159 | /* AUDIO/MUSIC CODEC Type Definitions */ |
24 | SST_CODEC_TYPE_UNKNOWN = 0, | 160 | SST_CODEC_TYPE_UNKNOWN = 0, |
@@ -35,14 +171,142 @@ enum stream_type { | |||
35 | SST_STREAM_TYPE_MUSIC = 1, | 171 | SST_STREAM_TYPE_MUSIC = 1, |
36 | }; | 172 | }; |
37 | 173 | ||
174 | struct ipc_dsp_hdr { | ||
175 | u16 mod_index_id:8; /*!< DSP Command ID specific to tasks */ | ||
176 | u16 pipe_id:8; /*!< instance of the module in the pipeline */ | ||
177 | u16 mod_id; /*!< Pipe_id */ | ||
178 | u16 cmd_id; /*!< Module ID = lpe_algo_types_t */ | ||
179 | u16 length; /*!< Length of the payload only */ | ||
180 | } __packed; | ||
181 | |||
182 | union ipc_header_high { | ||
183 | struct { | ||
184 | u32 msg_id:8; /* Message ID - Max 256 Message Types */ | ||
185 | u32 task_id:4; /* Task ID associated with this comand */ | ||
186 | u32 drv_id:4; /* Identifier for the driver to track*/ | ||
187 | u32 rsvd1:8; /* Reserved */ | ||
188 | u32 result:4; /* Reserved */ | ||
189 | u32 res_rqd:1; /* Response rqd */ | ||
190 | u32 large:1; /* Large Message if large = 1 */ | ||
191 | u32 done:1; /* bit 30 - Done bit */ | ||
192 | u32 busy:1; /* bit 31 - busy bit*/ | ||
193 | } part; | ||
194 | u32 full; | ||
195 | } __packed; | ||
196 | /* IPC header */ | ||
197 | union ipc_header_mrfld { | ||
198 | struct { | ||
199 | u32 header_low_payload; | ||
200 | union ipc_header_high header_high; | ||
201 | } p; | ||
202 | u64 full; | ||
203 | } __packed; | ||
204 | /* CAUTION NOTE: All IPC message body must be multiple of 32 bits.*/ | ||
205 | |||
206 | /* IPC Header */ | ||
207 | union ipc_header { | ||
208 | struct { | ||
209 | u32 msg_id:8; /* Message ID - Max 256 Message Types */ | ||
210 | u32 str_id:5; | ||
211 | u32 large:1; /* Large Message if large = 1 */ | ||
212 | u32 reserved:2; /* Reserved for future use */ | ||
213 | u32 data:14; /* Ack/Info for msg, size of msg in Mailbox */ | ||
214 | u32 done:1; /* bit 30 */ | ||
215 | u32 busy:1; /* bit 31 */ | ||
216 | } part; | ||
217 | u32 full; | ||
218 | } __packed; | ||
219 | |||
220 | /* Firmware build info */ | ||
221 | struct sst_fw_build_info { | ||
222 | unsigned char date[16]; /* Firmware build date */ | ||
223 | unsigned char time[16]; /* Firmware build time */ | ||
224 | } __packed; | ||
225 | |||
226 | /* Firmware Version info */ | ||
227 | struct snd_sst_fw_version { | ||
228 | u8 build; /* build number*/ | ||
229 | u8 minor; /* minor number*/ | ||
230 | u8 major; /* major number*/ | ||
231 | u8 type; /* build type */ | ||
232 | }; | ||
233 | |||
234 | struct ipc_header_fw_init { | ||
235 | struct snd_sst_fw_version fw_version;/* Firmware version details */ | ||
236 | struct sst_fw_build_info build_info; | ||
237 | u16 result; /* Fw init result */ | ||
238 | u8 module_id; /* Module ID in case of error */ | ||
239 | u8 debug_info; /* Debug info from Module ID in case of fail */ | ||
240 | } __packed; | ||
241 | |||
242 | struct snd_sst_tstamp { | ||
243 | u64 ring_buffer_counter; /* PB/CP: Bytes copied from/to DDR. */ | ||
244 | u64 hardware_counter; /* PB/CP: Bytes DMAed to/from SSP. */ | ||
245 | u64 frames_decoded; | ||
246 | u64 bytes_decoded; | ||
247 | u64 bytes_copied; | ||
248 | u32 sampling_frequency; | ||
249 | u32 channel_peak[8]; | ||
250 | } __packed; | ||
251 | |||
252 | /* Stream type params struture for Alloc stream */ | ||
253 | struct snd_sst_str_type { | ||
254 | u8 codec_type; /* Codec type */ | ||
255 | u8 str_type; /* 1 = voice 2 = music */ | ||
256 | u8 operation; /* Playback or Capture */ | ||
257 | u8 protected_str; /* 0=Non DRM, 1=DRM */ | ||
258 | u8 time_slots; | ||
259 | u8 reserved; /* Reserved */ | ||
260 | u16 result; /* Result used for acknowledgment */ | ||
261 | } __packed; | ||
262 | |||
263 | /* Library info structure */ | ||
264 | struct module_info { | ||
265 | u32 lib_version; | ||
266 | u32 lib_type;/*TBD- KLOCKWORK u8 lib_type;*/ | ||
267 | u32 media_type; | ||
268 | u8 lib_name[12]; | ||
269 | u32 lib_caps; | ||
270 | unsigned char b_date[16]; /* Lib build date */ | ||
271 | unsigned char b_time[16]; /* Lib build time */ | ||
272 | } __packed; | ||
273 | |||
274 | /* Library slot info */ | ||
275 | struct lib_slot_info { | ||
276 | u8 slot_num; /* 1 or 2 */ | ||
277 | u8 reserved1; | ||
278 | u16 reserved2; | ||
279 | u32 iram_size; /* slot size in IRAM */ | ||
280 | u32 dram_size; /* slot size in DRAM */ | ||
281 | u32 iram_offset; /* starting offset of slot in IRAM */ | ||
282 | u32 dram_offset; /* starting offset of slot in DRAM */ | ||
283 | } __packed; | ||
284 | |||
285 | struct snd_ppp_mixer_params { | ||
286 | __u32 type; /*Type of the parameter */ | ||
287 | __u32 size; | ||
288 | __u32 input_stream_bitmap; /*Input stream Bit Map*/ | ||
289 | } __packed; | ||
290 | |||
291 | struct snd_sst_lib_download { | ||
292 | struct module_info lib_info; /* library info type, capabilities etc */ | ||
293 | struct lib_slot_info slot_info; /* slot info to be downloaded */ | ||
294 | u32 mod_entry_pt; | ||
295 | }; | ||
296 | |||
297 | struct snd_sst_lib_download_info { | ||
298 | struct snd_sst_lib_download dload_lib; | ||
299 | u16 result; /* Result used for acknowledgment */ | ||
300 | u8 pvt_id; /* Private ID */ | ||
301 | u8 reserved; /* for alignment */ | ||
302 | }; | ||
38 | struct snd_pcm_params { | 303 | struct snd_pcm_params { |
39 | u8 num_chan; /* 1=Mono, 2=Stereo */ | 304 | u8 num_chan; /* 1=Mono, 2=Stereo */ |
40 | u8 pcm_wd_sz; /* 16/24 - bit*/ | 305 | u8 pcm_wd_sz; /* 16/24 - bit*/ |
41 | u32 reserved; /* Bitrate in bits per second */ | 306 | u8 use_offload_path; /* 0-PCM using period elpased & ALSA interfaces |
42 | u32 sfreq; /* Sampling rate in Hz */ | 307 | 1-PCM stream via compressed interface */ |
43 | u8 use_offload_path; | ||
44 | u8 reserved2; | 308 | u8 reserved2; |
45 | u16 reserved3; | 309 | u32 sfreq; /* Sampling rate in Hz */ |
46 | u8 channel_map[8]; | 310 | u8 channel_map[8]; |
47 | } __packed; | 311 | } __packed; |
48 | 312 | ||
@@ -76,6 +340,7 @@ struct snd_aac_params { | |||
76 | struct snd_wma_params { | 340 | struct snd_wma_params { |
77 | u8 num_chan; /* 1=Mono, 2=Stereo */ | 341 | u8 num_chan; /* 1=Mono, 2=Stereo */ |
78 | u8 pcm_wd_sz; /* 16/24 - bit*/ | 342 | u8 pcm_wd_sz; /* 16/24 - bit*/ |
343 | u16 reserved1; | ||
79 | u32 brate; /* Use the hard coded value. */ | 344 | u32 brate; /* Use the hard coded value. */ |
80 | u32 sfreq; /* Sampling freq eg. 8000, 441000, 48000 */ | 345 | u32 sfreq; /* Sampling freq eg. 8000, 441000, 48000 */ |
81 | u32 channel_mask; /* Channel Mask */ | 346 | u32 channel_mask; /* Channel Mask */ |
@@ -101,26 +366,153 @@ struct sst_address_info { | |||
101 | }; | 366 | }; |
102 | 367 | ||
103 | struct snd_sst_alloc_params_ext { | 368 | struct snd_sst_alloc_params_ext { |
104 | struct sst_address_info ring_buf_info[8]; | 369 | __u16 sg_count; |
105 | u8 sg_count; | 370 | __u16 reserved; |
106 | u8 reserved; | 371 | __u32 frag_size; /*Number of samples after which period elapsed |
107 | u16 reserved2; | ||
108 | u32 frag_size; /*Number of samples after which period elapsed | ||
109 | message is sent valid only if path = 0*/ | 372 | message is sent valid only if path = 0*/ |
110 | } __packed; | 373 | struct sst_address_info ring_buf_info[8]; |
374 | }; | ||
111 | 375 | ||
112 | struct snd_sst_stream_params { | 376 | struct snd_sst_stream_params { |
113 | union snd_sst_codec_params uc; | 377 | union snd_sst_codec_params uc; |
114 | } __packed; | 378 | } __packed; |
115 | 379 | ||
116 | struct snd_sst_params { | 380 | struct snd_sst_params { |
381 | u32 result; | ||
117 | u32 stream_id; | 382 | u32 stream_id; |
118 | u8 codec; | 383 | u8 codec; |
119 | u8 ops; | 384 | u8 ops; |
120 | u8 stream_type; | 385 | u8 stream_type; |
121 | u8 device_type; | 386 | u8 device_type; |
387 | u8 task; | ||
122 | struct snd_sst_stream_params sparams; | 388 | struct snd_sst_stream_params sparams; |
123 | struct snd_sst_alloc_params_ext aparams; | 389 | struct snd_sst_alloc_params_ext aparams; |
124 | }; | 390 | }; |
125 | 391 | ||
392 | struct snd_sst_alloc_mrfld { | ||
393 | u16 codec_type; | ||
394 | u8 operation; | ||
395 | u8 sg_count; | ||
396 | struct sst_address_info ring_buf_info[8]; | ||
397 | u32 frag_size; | ||
398 | u32 ts; | ||
399 | struct snd_sst_stream_params codec_params; | ||
400 | } __packed; | ||
401 | |||
402 | /* Alloc stream params structure */ | ||
403 | struct snd_sst_alloc_params { | ||
404 | struct snd_sst_str_type str_type; | ||
405 | struct snd_sst_stream_params stream_params; | ||
406 | struct snd_sst_alloc_params_ext alloc_params; | ||
407 | } __packed; | ||
408 | |||
409 | /* Alloc stream response message */ | ||
410 | struct snd_sst_alloc_response { | ||
411 | struct snd_sst_str_type str_type; /* Stream type for allocation */ | ||
412 | struct snd_sst_lib_download lib_dnld; /* Valid only for codec dnld */ | ||
413 | }; | ||
414 | |||
415 | /* Drop response */ | ||
416 | struct snd_sst_drop_response { | ||
417 | u32 result; | ||
418 | u32 bytes; | ||
419 | }; | ||
420 | |||
421 | struct snd_sst_async_msg { | ||
422 | u32 msg_id; /* Async msg id */ | ||
423 | u32 payload[0]; | ||
424 | }; | ||
425 | |||
426 | struct snd_sst_async_err_msg { | ||
427 | u32 fw_resp; /* Firmware Result */ | ||
428 | u32 lib_resp; /*Library result */ | ||
429 | } __packed; | ||
430 | |||
431 | struct snd_sst_vol { | ||
432 | u32 stream_id; | ||
433 | s32 volume; | ||
434 | u32 ramp_duration; | ||
435 | u32 ramp_type; /* Ramp type, default=0 */ | ||
436 | }; | ||
437 | |||
438 | /* Gain library parameters for mrfld | ||
439 | * based on DSP command spec v0.82 | ||
440 | */ | ||
441 | struct snd_sst_gain_v2 { | ||
442 | u16 gain_cell_num; /* num of gain cells to modify*/ | ||
443 | u8 cell_nbr_idx; /* instance index*/ | ||
444 | u8 cell_path_idx; /* pipe-id */ | ||
445 | u16 module_id; /*module id */ | ||
446 | u16 left_cell_gain; /* left gain value in dB*/ | ||
447 | u16 right_cell_gain; /* right gain value in dB*/ | ||
448 | u16 gain_time_const; /* gain time constant*/ | ||
449 | } __packed; | ||
450 | |||
451 | struct snd_sst_mute { | ||
452 | u32 stream_id; | ||
453 | u32 mute; | ||
454 | }; | ||
455 | |||
456 | struct snd_sst_runtime_params { | ||
457 | u8 type; | ||
458 | u8 str_id; | ||
459 | u8 size; | ||
460 | u8 rsvd; | ||
461 | void *addr; | ||
462 | } __packed; | ||
463 | |||
464 | enum stream_param_type { | ||
465 | SST_SET_TIME_SLOT = 0, | ||
466 | SST_SET_CHANNEL_INFO = 1, | ||
467 | OTHERS = 2, /*reserved for future params*/ | ||
468 | }; | ||
469 | |||
470 | /* CSV Voice call routing structure */ | ||
471 | struct snd_sst_control_routing { | ||
472 | u8 control; /* 0=start, 1=Stop */ | ||
473 | u8 reserved[3]; /* Reserved- for 32 bit alignment */ | ||
474 | }; | ||
475 | |||
476 | struct ipc_post { | ||
477 | struct list_head node; | ||
478 | union ipc_header header; /* driver specific */ | ||
479 | bool is_large; | ||
480 | bool is_process_reply; | ||
481 | union ipc_header_mrfld mrfld_header; | ||
482 | char *mailbox_data; | ||
483 | }; | ||
484 | |||
485 | struct snd_sst_ctxt_params { | ||
486 | u32 address; /* Physical Address in DDR where the context is stored */ | ||
487 | u32 size; /* size of the context */ | ||
488 | }; | ||
489 | |||
490 | struct snd_sst_lpe_log_params { | ||
491 | u8 dbg_type; | ||
492 | u8 module_id; | ||
493 | u8 log_level; | ||
494 | u8 reserved; | ||
495 | } __packed; | ||
496 | |||
497 | enum snd_sst_bytes_type { | ||
498 | SND_SST_BYTES_SET = 0x1, | ||
499 | SND_SST_BYTES_GET = 0x2, | ||
500 | }; | ||
501 | |||
502 | struct snd_sst_bytes_v2 { | ||
503 | u8 type; | ||
504 | u8 ipc_msg; | ||
505 | u8 block; | ||
506 | u8 task_id; | ||
507 | u8 pipe_id; | ||
508 | u8 rsvd; | ||
509 | u16 len; | ||
510 | char bytes[0]; | ||
511 | }; | ||
512 | |||
513 | #define MAX_VTSV_FILES 2 | ||
514 | struct snd_sst_vtsv_info { | ||
515 | struct sst_address_info vfiles[MAX_VTSV_FILES]; | ||
516 | } __packed; | ||
517 | |||
126 | #endif /* __SST_MFLD_DSP_H__ */ | 518 | #endif /* __SST_MFLD_DSP_H__ */ |