diff options
Diffstat (limited to 'sound/pci/mixart/mixart_core.h')
-rw-r--r-- | sound/pci/mixart/mixart_core.h | 120 |
1 files changed, 42 insertions, 78 deletions
diff --git a/sound/pci/mixart/mixart_core.h b/sound/pci/mixart/mixart_core.h index 99450eba15c0..1fe2bcfcc57c 100644 --- a/sound/pci/mixart/mixart_core.h +++ b/sound/pci/mixart/mixart_core.h | |||
@@ -63,25 +63,23 @@ enum mixart_message_id { | |||
63 | }; | 63 | }; |
64 | 64 | ||
65 | 65 | ||
66 | typedef struct mixart_msg mixart_msg_t; | ||
67 | struct mixart_msg | 66 | struct mixart_msg |
68 | { | 67 | { |
69 | u32 message_id; | 68 | u32 message_id; |
70 | mixart_uid_t uid; | 69 | struct mixart_uid uid; |
71 | void* data; | 70 | void* data; |
72 | size_t size; | 71 | size_t size; |
73 | }; | 72 | }; |
74 | 73 | ||
75 | /* structs used to communicate with miXart */ | 74 | /* structs used to communicate with miXart */ |
76 | 75 | ||
77 | typedef struct mixart_enum_connector_resp mixart_enum_connector_resp_t; | ||
78 | struct mixart_enum_connector_resp | 76 | struct mixart_enum_connector_resp |
79 | { | 77 | { |
80 | u32 error_code; | 78 | u32 error_code; |
81 | u32 first_uid_offset; | 79 | u32 first_uid_offset; |
82 | u32 uid_count; | 80 | u32 uid_count; |
83 | u32 current_uid_index; | 81 | u32 current_uid_index; |
84 | mixart_uid_t uid[MIXART_MAX_PHYS_CONNECTORS]; | 82 | struct mixart_uid uid[MIXART_MAX_PHYS_CONNECTORS]; |
85 | } __attribute__((packed)); | 83 | } __attribute__((packed)); |
86 | 84 | ||
87 | 85 | ||
@@ -90,7 +88,6 @@ struct mixart_enum_connector_resp | |||
90 | #define MIXART_FLOAT_M_20_0_TO_HEX 0xc1a00000 /* -20.0f */ | 88 | #define MIXART_FLOAT_M_20_0_TO_HEX 0xc1a00000 /* -20.0f */ |
91 | #define MIXART_FLOAT____0_0_TO_HEX 0x00000000 /* 0.0f */ | 89 | #define MIXART_FLOAT____0_0_TO_HEX 0x00000000 /* 0.0f */ |
92 | 90 | ||
93 | typedef struct mixart_audio_info_req mixart_audio_info_req_t; | ||
94 | struct mixart_audio_info_req | 91 | struct mixart_audio_info_req |
95 | { | 92 | { |
96 | u32 line_max_level; /* float */ | 93 | u32 line_max_level; /* float */ |
@@ -98,7 +95,6 @@ struct mixart_audio_info_req | |||
98 | u32 cd_max_level; /* float */ | 95 | u32 cd_max_level; /* float */ |
99 | } __attribute__((packed)); | 96 | } __attribute__((packed)); |
100 | 97 | ||
101 | typedef struct mixart_analog_hw_info mixart_analog_hw_info_t; | ||
102 | struct mixart_analog_hw_info | 98 | struct mixart_analog_hw_info |
103 | { | 99 | { |
104 | u32 is_present; | 100 | u32 is_present; |
@@ -111,7 +107,6 @@ struct mixart_analog_hw_info | |||
111 | u32 zero_var; /* float */ | 107 | u32 zero_var; /* float */ |
112 | } __attribute__((packed)); | 108 | } __attribute__((packed)); |
113 | 109 | ||
114 | typedef struct mixart_digital_hw_info mixart_digital_hw_info_t; | ||
115 | struct mixart_digital_hw_info | 110 | struct mixart_digital_hw_info |
116 | { | 111 | { |
117 | u32 hw_connection_type; | 112 | u32 hw_connection_type; |
@@ -120,37 +115,33 @@ struct mixart_digital_hw_info | |||
120 | u32 reserved; | 115 | u32 reserved; |
121 | } __attribute__((packed)); | 116 | } __attribute__((packed)); |
122 | 117 | ||
123 | typedef struct mixart_analog_info mixart_analog_info_t; | ||
124 | struct mixart_analog_info | 118 | struct mixart_analog_info |
125 | { | 119 | { |
126 | u32 type_mask; | 120 | u32 type_mask; |
127 | mixart_analog_hw_info_t micro_info; | 121 | struct mixart_analog_hw_info micro_info; |
128 | mixart_analog_hw_info_t line_info; | 122 | struct mixart_analog_hw_info line_info; |
129 | mixart_analog_hw_info_t cd_info; | 123 | struct mixart_analog_hw_info cd_info; |
130 | u32 analog_level_present; | 124 | u32 analog_level_present; |
131 | } __attribute__((packed)); | 125 | } __attribute__((packed)); |
132 | 126 | ||
133 | typedef struct mixart_digital_info mixart_digital_info_t; | ||
134 | struct mixart_digital_info | 127 | struct mixart_digital_info |
135 | { | 128 | { |
136 | u32 type_mask; | 129 | u32 type_mask; |
137 | mixart_digital_hw_info_t aes_info; | 130 | struct mixart_digital_hw_info aes_info; |
138 | mixart_digital_hw_info_t adat_info; | 131 | struct mixart_digital_hw_info adat_info; |
139 | } __attribute__((packed)); | 132 | } __attribute__((packed)); |
140 | 133 | ||
141 | typedef struct mixart_audio_info mixart_audio_info_t; | ||
142 | struct mixart_audio_info | 134 | struct mixart_audio_info |
143 | { | 135 | { |
144 | u32 clock_type_mask; | 136 | u32 clock_type_mask; |
145 | mixart_analog_info_t analog_info; | 137 | struct mixart_analog_info analog_info; |
146 | mixart_digital_info_t digital_info; | 138 | struct mixart_digital_info digital_info; |
147 | } __attribute__((packed)); | 139 | } __attribute__((packed)); |
148 | 140 | ||
149 | typedef struct mixart_audio_info_resp mixart_audio_info_resp_t; | ||
150 | struct mixart_audio_info_resp | 141 | struct mixart_audio_info_resp |
151 | { | 142 | { |
152 | u32 txx_status; | 143 | u32 txx_status; |
153 | mixart_audio_info_t info; | 144 | struct mixart_audio_info info; |
154 | } __attribute__((packed)); | 145 | } __attribute__((packed)); |
155 | 146 | ||
156 | 147 | ||
@@ -158,7 +149,6 @@ struct mixart_audio_info_resp | |||
158 | #define MIXART_FLOAT_P__4_0_TO_HEX 0x40800000 /* +4.0f */ | 149 | #define MIXART_FLOAT_P__4_0_TO_HEX 0x40800000 /* +4.0f */ |
159 | #define MIXART_FLOAT_P__8_0_TO_HEX 0x41000000 /* +8.0f */ | 150 | #define MIXART_FLOAT_P__8_0_TO_HEX 0x41000000 /* +8.0f */ |
160 | 151 | ||
161 | typedef struct mixart_stream_info mixart_stream_info_t; | ||
162 | struct mixart_stream_info | 152 | struct mixart_stream_info |
163 | { | 153 | { |
164 | u32 size_max_byte_frame; | 154 | u32 size_max_byte_frame; |
@@ -169,7 +159,6 @@ struct mixart_stream_info | |||
169 | /* MSG_STREAM_ADD_INPUT_GROUP */ | 159 | /* MSG_STREAM_ADD_INPUT_GROUP */ |
170 | /* MSG_STREAM_ADD_OUTPUT_GROUP */ | 160 | /* MSG_STREAM_ADD_OUTPUT_GROUP */ |
171 | 161 | ||
172 | typedef struct mixart_streaming_group_req mixart_streaming_group_req_t; | ||
173 | struct mixart_streaming_group_req | 162 | struct mixart_streaming_group_req |
174 | { | 163 | { |
175 | u32 stream_count; | 164 | u32 stream_count; |
@@ -177,33 +166,30 @@ struct mixart_streaming_group_req | |||
177 | u32 user_grp_number; | 166 | u32 user_grp_number; |
178 | u32 first_phys_audio; | 167 | u32 first_phys_audio; |
179 | u32 latency; | 168 | u32 latency; |
180 | mixart_stream_info_t stream_info[32]; | 169 | struct mixart_stream_info stream_info[32]; |
181 | mixart_uid_t connector; | 170 | struct mixart_uid connector; |
182 | u32 flow_entry[32]; | 171 | u32 flow_entry[32]; |
183 | } __attribute__((packed)); | 172 | } __attribute__((packed)); |
184 | 173 | ||
185 | typedef struct mixart_stream_desc mixart_stream_desc_t; | ||
186 | struct mixart_stream_desc | 174 | struct mixart_stream_desc |
187 | { | 175 | { |
188 | mixart_uid_t stream_uid; | 176 | struct mixart_uid stream_uid; |
189 | u32 stream_desc; | 177 | u32 stream_desc; |
190 | } __attribute__((packed)); | 178 | } __attribute__((packed)); |
191 | 179 | ||
192 | typedef struct mixart_streaming_group mixart_streaming_group_t; | ||
193 | struct mixart_streaming_group | 180 | struct mixart_streaming_group |
194 | { | 181 | { |
195 | u32 status; | 182 | u32 status; |
196 | mixart_uid_t group; | 183 | struct mixart_uid group; |
197 | u32 pipe_desc; | 184 | u32 pipe_desc; |
198 | u32 stream_count; | 185 | u32 stream_count; |
199 | mixart_stream_desc_t stream[32]; | 186 | struct mixart_stream_desc stream[32]; |
200 | } __attribute__((packed)); | 187 | } __attribute__((packed)); |
201 | 188 | ||
202 | /* MSG_STREAM_DELETE_GROUP */ | 189 | /* MSG_STREAM_DELETE_GROUP */ |
203 | 190 | ||
204 | /* request : mixart_uid_t group */ | 191 | /* request : mixart_uid_t group */ |
205 | 192 | ||
206 | typedef struct mixart_delete_group_resp mixart_delete_group_resp_t; | ||
207 | struct mixart_delete_group_resp | 193 | struct mixart_delete_group_resp |
208 | { | 194 | { |
209 | u32 status; | 195 | u32 status; |
@@ -217,55 +203,49 @@ struct mixart_delete_group_resp | |||
217 | MSG_STREAM_STOP_OUTPUT_STAGE_PACKET = 0x130000 + 11, | 203 | MSG_STREAM_STOP_OUTPUT_STAGE_PACKET = 0x130000 + 11, |
218 | */ | 204 | */ |
219 | 205 | ||
220 | typedef struct mixart_fx_couple_uid mixart_fx_couple_uid_t; | ||
221 | struct mixart_fx_couple_uid | 206 | struct mixart_fx_couple_uid |
222 | { | 207 | { |
223 | mixart_uid_t uid_fx_code; | 208 | struct mixart_uid uid_fx_code; |
224 | mixart_uid_t uid_fx_data; | 209 | struct mixart_uid uid_fx_data; |
225 | } __attribute__((packed)); | 210 | } __attribute__((packed)); |
226 | 211 | ||
227 | typedef struct mixart_txx_stream_desc mixart_txx_stream_desc_t; | ||
228 | struct mixart_txx_stream_desc | 212 | struct mixart_txx_stream_desc |
229 | { | 213 | { |
230 | mixart_uid_t uid_pipe; | 214 | struct mixart_uid uid_pipe; |
231 | u32 stream_idx; | 215 | u32 stream_idx; |
232 | u32 fx_number; | 216 | u32 fx_number; |
233 | mixart_fx_couple_uid_t uid_fx[4]; | 217 | struct mixart_fx_couple_uid uid_fx[4]; |
234 | } __attribute__((packed)); | 218 | } __attribute__((packed)); |
235 | 219 | ||
236 | typedef struct mixart_flow_info mixart_flow_info_t; | ||
237 | struct mixart_flow_info | 220 | struct mixart_flow_info |
238 | { | 221 | { |
239 | mixart_txx_stream_desc_t stream_desc; | 222 | struct mixart_txx_stream_desc stream_desc; |
240 | u32 flow_entry; | 223 | u32 flow_entry; |
241 | u32 flow_phy_addr; | 224 | u32 flow_phy_addr; |
242 | } __attribute__((packed)); | 225 | } __attribute__((packed)); |
243 | 226 | ||
244 | typedef struct mixart_stream_state_req mixart_stream_state_req_t; | ||
245 | struct mixart_stream_state_req | 227 | struct mixart_stream_state_req |
246 | { | 228 | { |
247 | u32 delayed; | 229 | u32 delayed; |
248 | u64 scheduler; | 230 | u64 scheduler; |
249 | u32 reserved4np[3]; | 231 | u32 reserved4np[3]; |
250 | u32 stream_count; /* set to 1 for instance */ | 232 | u32 stream_count; /* set to 1 for instance */ |
251 | mixart_flow_info_t stream_info; /* could be an array[stream_count] */ | 233 | struct mixart_flow_info stream_info; /* could be an array[stream_count] */ |
252 | } __attribute__((packed)); | 234 | } __attribute__((packed)); |
253 | 235 | ||
254 | /* MSG_STREAM_START_STREAM_GRP_PACKET = 0x130000 + 6 | 236 | /* MSG_STREAM_START_STREAM_GRP_PACKET = 0x130000 + 6 |
255 | MSG_STREAM_STOP_STREAM_GRP_PACKET = 0x130000 + 9 | 237 | MSG_STREAM_STOP_STREAM_GRP_PACKET = 0x130000 + 9 |
256 | */ | 238 | */ |
257 | 239 | ||
258 | typedef struct mixart_group_state_req mixart_group_state_req_t; | ||
259 | struct mixart_group_state_req | 240 | struct mixart_group_state_req |
260 | { | 241 | { |
261 | u32 delayed; | 242 | u32 delayed; |
262 | u64 scheduler; | 243 | u64 scheduler; |
263 | u32 reserved4np[2]; | 244 | u32 reserved4np[2]; |
264 | u32 pipe_count; /* set to 1 for instance */ | 245 | u32 pipe_count; /* set to 1 for instance */ |
265 | mixart_uid_t pipe_uid[1]; /* could be an array[pipe_count] */ | 246 | struct mixart_uid pipe_uid[1]; /* could be an array[pipe_count] */ |
266 | } __attribute__((packed)); | 247 | } __attribute__((packed)); |
267 | 248 | ||
268 | typedef struct mixart_group_state_resp mixart_group_state_resp_t; | ||
269 | struct mixart_group_state_resp | 249 | struct mixart_group_state_resp |
270 | { | 250 | { |
271 | u32 txx_status; | 251 | u32 txx_status; |
@@ -276,7 +256,6 @@ struct mixart_group_state_resp | |||
276 | 256 | ||
277 | /* Structures used by the MSG_SERVICES_TIMER_NOTIFY command */ | 257 | /* Structures used by the MSG_SERVICES_TIMER_NOTIFY command */ |
278 | 258 | ||
279 | typedef struct mixart_sample_pos mixart_sample_pos_t; | ||
280 | struct mixart_sample_pos | 259 | struct mixart_sample_pos |
281 | { | 260 | { |
282 | u32 buffer_id; | 261 | u32 buffer_id; |
@@ -285,11 +264,10 @@ struct mixart_sample_pos | |||
285 | u32 sample_pos_low_part; | 264 | u32 sample_pos_low_part; |
286 | } __attribute__((packed)); | 265 | } __attribute__((packed)); |
287 | 266 | ||
288 | typedef struct mixart_timer_notify mixart_timer_notify_t; | ||
289 | struct mixart_timer_notify | 267 | struct mixart_timer_notify |
290 | { | 268 | { |
291 | u32 stream_count; | 269 | u32 stream_count; |
292 | mixart_sample_pos_t streams[MIXART_MAX_STREAM_PER_CARD * MIXART_MAX_CARDS]; | 270 | struct mixart_sample_pos streams[MIXART_MAX_STREAM_PER_CARD * MIXART_MAX_CARDS]; |
293 | } __attribute__((packed)); | 271 | } __attribute__((packed)); |
294 | 272 | ||
295 | 273 | ||
@@ -298,11 +276,10 @@ struct mixart_timer_notify | |||
298 | 276 | ||
299 | /* request is a uid with desc = MSG_CONSOLE_MANAGER | cardindex */ | 277 | /* request is a uid with desc = MSG_CONSOLE_MANAGER | cardindex */ |
300 | 278 | ||
301 | typedef struct mixart_return_uid mixart_return_uid_t; | ||
302 | struct mixart_return_uid | 279 | struct mixart_return_uid |
303 | { | 280 | { |
304 | u32 error_code; | 281 | u32 error_code; |
305 | mixart_uid_t uid; | 282 | struct mixart_uid uid; |
306 | } __attribute__((packed)); | 283 | } __attribute__((packed)); |
307 | 284 | ||
308 | /* MSG_CLOCK_CHECK_PROPERTIES = 0x200001, | 285 | /* MSG_CLOCK_CHECK_PROPERTIES = 0x200001, |
@@ -327,7 +304,6 @@ enum mixart_clock_mode { | |||
327 | }; | 304 | }; |
328 | 305 | ||
329 | 306 | ||
330 | typedef struct mixart_clock_properties mixart_clock_properties_t; | ||
331 | struct mixart_clock_properties | 307 | struct mixart_clock_properties |
332 | { | 308 | { |
333 | u32 error_code; | 309 | u32 error_code; |
@@ -336,17 +312,16 @@ struct mixart_clock_properties | |||
336 | u32 reference_frequency; | 312 | u32 reference_frequency; |
337 | u32 clock_generic_type; | 313 | u32 clock_generic_type; |
338 | u32 clock_mode; | 314 | u32 clock_mode; |
339 | mixart_uid_t uid_clock_source; | 315 | struct mixart_uid uid_clock_source; |
340 | mixart_uid_t uid_event_source; | 316 | struct mixart_uid uid_event_source; |
341 | u32 event_mode; | 317 | u32 event_mode; |
342 | u32 synchro_signal_presence; | 318 | u32 synchro_signal_presence; |
343 | u32 format; | 319 | u32 format; |
344 | u32 board_mask; | 320 | u32 board_mask; |
345 | u32 nb_callers; /* set to 1 (see below) */ | 321 | u32 nb_callers; /* set to 1 (see below) */ |
346 | mixart_uid_t uid_caller[1]; | 322 | struct mixart_uid uid_caller[1]; |
347 | } __attribute__((packed)); | 323 | } __attribute__((packed)); |
348 | 324 | ||
349 | typedef struct mixart_clock_properties_resp mixart_clock_properties_resp_t; | ||
350 | struct mixart_clock_properties_resp | 325 | struct mixart_clock_properties_resp |
351 | { | 326 | { |
352 | u32 status; | 327 | u32 status; |
@@ -388,7 +363,6 @@ enum mixart_sample_type { | |||
388 | ST_INTEGER_32LE | 363 | ST_INTEGER_32LE |
389 | }; | 364 | }; |
390 | 365 | ||
391 | typedef struct mixart_stream_param_desc mixart_stream_param_desc_t; | ||
392 | struct mixart_stream_param_desc | 366 | struct mixart_stream_param_desc |
393 | { | 367 | { |
394 | u32 coding_type; /* use enum mixart_coding_type */ | 368 | u32 coding_type; /* use enum mixart_coding_type */ |
@@ -432,7 +406,7 @@ struct mixart_stream_param_desc | |||
432 | u32 reserved4np[3]; | 406 | u32 reserved4np[3]; |
433 | u32 pipe_count; /* set to 1 (array size !) */ | 407 | u32 pipe_count; /* set to 1 (array size !) */ |
434 | u32 stream_count; /* set to 1 (array size !) */ | 408 | u32 stream_count; /* set to 1 (array size !) */ |
435 | mixart_txx_stream_desc_t stream_desc[1]; /* only one stream per command, but this could be an array */ | 409 | struct mixart_txx_stream_desc stream_desc[1]; /* only one stream per command, but this could be an array */ |
436 | 410 | ||
437 | } __attribute__((packed)); | 411 | } __attribute__((packed)); |
438 | 412 | ||
@@ -441,7 +415,6 @@ struct mixart_stream_param_desc | |||
441 | */ | 415 | */ |
442 | 416 | ||
443 | 417 | ||
444 | typedef struct mixart_get_out_audio_level mixart_get_out_audio_level_t; | ||
445 | struct mixart_get_out_audio_level | 418 | struct mixart_get_out_audio_level |
446 | { | 419 | { |
447 | u32 txx_status; | 420 | u32 txx_status; |
@@ -465,7 +438,6 @@ struct mixart_get_out_audio_level | |||
465 | #define MIXART_AUDIO_LEVEL_MUTE_M1_MASK 0x10 | 438 | #define MIXART_AUDIO_LEVEL_MUTE_M1_MASK 0x10 |
466 | #define MIXART_AUDIO_LEVEL_MUTE_M2_MASK 0x20 | 439 | #define MIXART_AUDIO_LEVEL_MUTE_M2_MASK 0x20 |
467 | 440 | ||
468 | typedef struct mixart_set_out_audio_level mixart_set_out_audio_level_t; | ||
469 | struct mixart_set_out_audio_level | 441 | struct mixart_set_out_audio_level |
470 | { | 442 | { |
471 | u32 delayed; | 443 | u32 delayed; |
@@ -487,14 +459,13 @@ struct mixart_set_out_audio_level | |||
487 | 459 | ||
488 | #define MIXART_MAX_PHYS_IO (MIXART_MAX_CARDS * 2 * 2) /* 4 * (analog+digital) * (playback+capture) */ | 460 | #define MIXART_MAX_PHYS_IO (MIXART_MAX_CARDS * 2 * 2) /* 4 * (analog+digital) * (playback+capture) */ |
489 | 461 | ||
490 | typedef struct mixart_uid_enumeration mixart_uid_enumeration_t; | ||
491 | struct mixart_uid_enumeration | 462 | struct mixart_uid_enumeration |
492 | { | 463 | { |
493 | u32 error_code; | 464 | u32 error_code; |
494 | u32 first_uid_offset; | 465 | u32 first_uid_offset; |
495 | u32 nb_uid; | 466 | u32 nb_uid; |
496 | u32 current_uid_index; | 467 | u32 current_uid_index; |
497 | mixart_uid_t uid[MIXART_MAX_PHYS_IO]; | 468 | struct mixart_uid uid[MIXART_MAX_PHYS_IO]; |
498 | } __attribute__((packed)); | 469 | } __attribute__((packed)); |
499 | 470 | ||
500 | 471 | ||
@@ -502,42 +473,38 @@ struct mixart_uid_enumeration | |||
502 | MSG_PHYSICALIO_GET_LEVEL = 0x0F000C, | 473 | MSG_PHYSICALIO_GET_LEVEL = 0x0F000C, |
503 | */ | 474 | */ |
504 | 475 | ||
505 | typedef struct mixart_io_channel_level mixart_io_channel_level_t; | ||
506 | struct mixart_io_channel_level | 476 | struct mixart_io_channel_level |
507 | { | 477 | { |
508 | u32 analog_level; /* float */ | 478 | u32 analog_level; /* float */ |
509 | u32 unused[2]; | 479 | u32 unused[2]; |
510 | } __attribute__((packed)); | 480 | } __attribute__((packed)); |
511 | 481 | ||
512 | typedef struct mixart_io_level mixart_io_level_t; | ||
513 | struct mixart_io_level | 482 | struct mixart_io_level |
514 | { | 483 | { |
515 | s32 channel; /* 0=left, 1=right, -1=both, -2=both same */ | 484 | s32 channel; /* 0=left, 1=right, -1=both, -2=both same */ |
516 | mixart_io_channel_level_t level[2]; | 485 | struct mixart_io_channel_level level[2]; |
517 | } __attribute__((packed)); | 486 | } __attribute__((packed)); |
518 | 487 | ||
519 | 488 | ||
520 | /* MSG_STREAM_SET_IN_AUDIO_LEVEL = 0x130015, | 489 | /* MSG_STREAM_SET_IN_AUDIO_LEVEL = 0x130015, |
521 | */ | 490 | */ |
522 | 491 | ||
523 | typedef struct mixart_in_audio_level_info mixart_in_audio_level_info_t; | ||
524 | struct mixart_in_audio_level_info | 492 | struct mixart_in_audio_level_info |
525 | { | 493 | { |
526 | mixart_uid_t connector; | 494 | struct mixart_uid connector; |
527 | u32 valid_mask1; | 495 | u32 valid_mask1; |
528 | u32 valid_mask2; | 496 | u32 valid_mask2; |
529 | u32 digital_level; | 497 | u32 digital_level; |
530 | u32 analog_level; | 498 | u32 analog_level; |
531 | } __attribute__((packed)); | 499 | } __attribute__((packed)); |
532 | 500 | ||
533 | typedef struct mixart_set_in_audio_level_req mixart_set_in_audio_level_req_t; | ||
534 | struct mixart_set_in_audio_level_req | 501 | struct mixart_set_in_audio_level_req |
535 | { | 502 | { |
536 | u32 delayed; | 503 | u32 delayed; |
537 | u64 scheduler; | 504 | u64 scheduler; |
538 | u32 audio_count; /* set to <= 2 */ | 505 | u32 audio_count; /* set to <= 2 */ |
539 | u32 reserved4np; | 506 | u32 reserved4np; |
540 | mixart_in_audio_level_info_t level[2]; | 507 | struct mixart_in_audio_level_info level[2]; |
541 | } __attribute__((packed)); | 508 | } __attribute__((packed)); |
542 | 509 | ||
543 | /* response is a 32 bit status */ | 510 | /* response is a 32 bit status */ |
@@ -556,7 +523,6 @@ struct mixart_set_in_audio_level_req | |||
556 | #define MIXART_OUT_STREAM_SET_LEVEL_MUTE_1 0x40 | 523 | #define MIXART_OUT_STREAM_SET_LEVEL_MUTE_1 0x40 |
557 | #define MIXART_OUT_STREAM_SET_LEVEL_MUTE_2 0x80 | 524 | #define MIXART_OUT_STREAM_SET_LEVEL_MUTE_2 0x80 |
558 | 525 | ||
559 | typedef struct mixart_out_stream_level_info mixart_out_stream_level_info_t; | ||
560 | struct mixart_out_stream_level_info | 526 | struct mixart_out_stream_level_info |
561 | { | 527 | { |
562 | u32 valid_mask1; | 528 | u32 valid_mask1; |
@@ -571,37 +537,35 @@ struct mixart_out_stream_level_info | |||
571 | u32 mute2; | 537 | u32 mute2; |
572 | } __attribute__((packed)); | 538 | } __attribute__((packed)); |
573 | 539 | ||
574 | typedef struct mixart_set_out_stream_level mixart_set_out_stream_level_t; | ||
575 | struct mixart_set_out_stream_level | 540 | struct mixart_set_out_stream_level |
576 | { | 541 | { |
577 | mixart_txx_stream_desc_t desc; | 542 | struct mixart_txx_stream_desc desc; |
578 | mixart_out_stream_level_info_t out_level; | 543 | struct mixart_out_stream_level_info out_level; |
579 | } __attribute__((packed)); | 544 | } __attribute__((packed)); |
580 | 545 | ||
581 | typedef struct mixart_set_out_stream_level_req mixart_set_out_stream_level_req_t; | ||
582 | struct mixart_set_out_stream_level_req | 546 | struct mixart_set_out_stream_level_req |
583 | { | 547 | { |
584 | u32 delayed; | 548 | u32 delayed; |
585 | u64 scheduler; | 549 | u64 scheduler; |
586 | u32 reserved4np[2]; | 550 | u32 reserved4np[2]; |
587 | u32 nb_of_stream; /* set to 1 */ | 551 | u32 nb_of_stream; /* set to 1 */ |
588 | mixart_set_out_stream_level_t stream_level; /* could be an array */ | 552 | struct mixart_set_out_stream_level stream_level; /* could be an array */ |
589 | } __attribute__((packed)); | 553 | } __attribute__((packed)); |
590 | 554 | ||
591 | /* response to this request is a u32 status value */ | 555 | /* response to this request is a u32 status value */ |
592 | 556 | ||
593 | 557 | ||
594 | /* exported */ | 558 | /* exported */ |
595 | void snd_mixart_init_mailbox(mixart_mgr_t *mgr); | 559 | void snd_mixart_init_mailbox(struct mixart_mgr *mgr); |
596 | void snd_mixart_exit_mailbox(mixart_mgr_t *mgr); | 560 | void snd_mixart_exit_mailbox(struct mixart_mgr *mgr); |
597 | 561 | ||
598 | int snd_mixart_send_msg(mixart_mgr_t *mgr, mixart_msg_t *request, int max_resp_size, void *resp_data); | 562 | int snd_mixart_send_msg(struct mixart_mgr *mgr, struct mixart_msg *request, int max_resp_size, void *resp_data); |
599 | int snd_mixart_send_msg_wait_notif(mixart_mgr_t *mgr, mixart_msg_t *request, u32 notif_event); | 563 | int snd_mixart_send_msg_wait_notif(struct mixart_mgr *mgr, struct mixart_msg *request, u32 notif_event); |
600 | int snd_mixart_send_msg_nonblock(mixart_mgr_t *mgr, mixart_msg_t *request); | 564 | int snd_mixart_send_msg_nonblock(struct mixart_mgr *mgr, struct mixart_msg *request); |
601 | 565 | ||
602 | irqreturn_t snd_mixart_interrupt(int irq, void *dev_id, struct pt_regs *regs); | 566 | irqreturn_t snd_mixart_interrupt(int irq, void *dev_id, struct pt_regs *regs); |
603 | void snd_mixart_msg_tasklet( unsigned long arg); | 567 | void snd_mixart_msg_tasklet(unsigned long arg); |
604 | 568 | ||
605 | void snd_mixart_reset_board(mixart_mgr_t *mgr); | 569 | void snd_mixart_reset_board(struct mixart_mgr *mgr); |
606 | 570 | ||
607 | #endif /* __SOUND_MIXART_CORE_H */ | 571 | #endif /* __SOUND_MIXART_CORE_H */ |