Blame view

sound/pci/mixart/mixart_core.h 13.3 KB
1a59d1b8e   Thomas Gleixner   treewide: Replace...
1
  /* SPDX-License-Identifier: GPL-2.0-or-later */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
2
3
4
5
6
7
  /*
   * Driver for Digigram miXart soundcards
   *
   * low level interface with interrupt handling and mail box implementation
   *
   * Copyright (c) 2003 by Digigram <alsa@digigram.com>
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
   */
  
  #ifndef __SOUND_MIXART_CORE_H
  #define __SOUND_MIXART_CORE_H
  
  
  enum mixart_message_id {
  	MSG_CONNECTOR_GET_AUDIO_INFO         = 0x050008,
  	MSG_CONNECTOR_GET_OUT_AUDIO_LEVEL    = 0x050009,
  	MSG_CONNECTOR_SET_OUT_AUDIO_LEVEL    = 0x05000A,
  
  	MSG_CONSOLE_MANAGER                  = 0x070000,
  	MSG_CONSOLE_GET_CLOCK_UID            = 0x070003,
  
  	MSG_PHYSICALIO_SET_LEVEL             = 0x0F0008,
  
  	MSG_STREAM_ADD_INPUT_GROUP           = 0x130000,
  	MSG_STREAM_ADD_OUTPUT_GROUP          = 0x130001,
  	MSG_STREAM_DELETE_GROUP              = 0x130004,
  	MSG_STREAM_START_STREAM_GRP_PACKET   = 0x130006,
  	MSG_STREAM_START_INPUT_STAGE_PACKET  = 0x130007,
  	MSG_STREAM_START_OUTPUT_STAGE_PACKET = 0x130008,
  	MSG_STREAM_STOP_STREAM_GRP_PACKET    = 0x130009,
  	MSG_STREAM_STOP_INPUT_STAGE_PACKET   = 0x13000A,
  	MSG_STREAM_STOP_OUTPUT_STAGE_PACKET  = 0x13000B,
  	MSG_STREAM_SET_INPUT_STAGE_PARAM     = 0x13000F,
  	MSG_STREAM_SET_OUTPUT_STAGE_PARAM    = 0x130010,
  	MSG_STREAM_SET_IN_AUDIO_LEVEL        = 0x130015,
  	MSG_STREAM_SET_OUT_STREAM_LEVEL      = 0x130017,
  
  	MSG_SYSTEM_FIRST_ID                  = 0x160000,
  	MSG_SYSTEM_ENUM_PHYSICAL_IO          = 0x16000E,
  	MSG_SYSTEM_ENUM_PLAY_CONNECTOR       = 0x160017,
  	MSG_SYSTEM_ENUM_RECORD_CONNECTOR     = 0x160018,
  	MSG_SYSTEM_WAIT_SYNCHRO_CMD          = 0x16002C,
  	MSG_SYSTEM_SEND_SYNCHRO_CMD          = 0x16002D,
  
  	MSG_SERVICES_TIMER_NOTIFY            = 0x1D0404,
  	MSG_SERVICES_REPORT_TRACES           = 0x1D0700,
  
  	MSG_CLOCK_CHECK_PROPERTIES           = 0x200001,
  	MSG_CLOCK_SET_PROPERTIES             = 0x200002,
  };
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
51
52
53
  struct mixart_msg
  {
  	u32          message_id;
67b48b880   Takashi Iwai   [ALSA] Remove xxx...
54
  	struct mixart_uid uid;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
55
56
57
58
59
  	void*        data;
  	size_t       size;
  };
  
  /* structs used to communicate with miXart */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
60
61
62
63
64
65
  struct mixart_enum_connector_resp
  {
  	u32  error_code;
  	u32  first_uid_offset;
  	u32  uid_count;
  	u32  current_uid_index;
67b48b880   Takashi Iwai   [ALSA] Remove xxx...
66
  	struct mixart_uid uid[MIXART_MAX_PHYS_CONNECTORS];
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
67
68
69
70
71
72
73
  } __attribute__((packed));
  
  
  /* used for following struct */
  #define MIXART_FLOAT_P_22_0_TO_HEX      0x41b00000  /* 22.0f */
  #define MIXART_FLOAT_M_20_0_TO_HEX      0xc1a00000  /* -20.0f */
  #define MIXART_FLOAT____0_0_TO_HEX      0x00000000  /* 0.0f */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
74
75
76
77
78
79
  struct mixart_audio_info_req
  {
  	u32 line_max_level;    /* float */
  	u32 micro_max_level;   /* float */
  	u32 cd_max_level;      /* float */
  } __attribute__((packed));
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
80
81
82
83
84
85
86
87
88
89
90
  struct mixart_analog_hw_info
  {
  	u32 is_present;
  	u32 hw_connection_type;
  	u32 max_level;         /* float */
  	u32 min_var_level;     /* float */
  	u32 max_var_level;     /* float */
  	u32 step_var_level;    /* float */
  	u32 fix_gain;          /* float */
  	u32 zero_var;          /* float */
  } __attribute__((packed));
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
91
92
93
94
95
96
97
  struct mixart_digital_hw_info
  {
  	u32   hw_connection_type;
  	u32   presence;
  	u32   clock;
  	u32   reserved;
  } __attribute__((packed));
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
98
99
100
  struct mixart_analog_info
  {
  	u32                     type_mask;
67b48b880   Takashi Iwai   [ALSA] Remove xxx...
101
102
103
  	struct mixart_analog_hw_info micro_info;
  	struct mixart_analog_hw_info line_info;
  	struct mixart_analog_hw_info cd_info;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
104
105
  	u32                     analog_level_present;
  } __attribute__((packed));
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
106
107
108
  struct mixart_digital_info
  {
  	u32 type_mask;
67b48b880   Takashi Iwai   [ALSA] Remove xxx...
109
110
  	struct mixart_digital_hw_info aes_info;
  	struct mixart_digital_hw_info adat_info;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
111
  } __attribute__((packed));
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
112
113
114
  struct mixart_audio_info
  {
  	u32                   clock_type_mask;
67b48b880   Takashi Iwai   [ALSA] Remove xxx...
115
116
  	struct mixart_analog_info  analog_info;
  	struct mixart_digital_info digital_info;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
117
  } __attribute__((packed));
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
118
119
120
  struct mixart_audio_info_resp
  {
  	u32                 txx_status;
67b48b880   Takashi Iwai   [ALSA] Remove xxx...
121
  	struct mixart_audio_info info;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
122
123
124
125
126
127
  } __attribute__((packed));
  
  
  /* used for nb_bytes_max_per_sample */
  #define MIXART_FLOAT_P__4_0_TO_HEX      0x40800000  /* +4.0f */
  #define MIXART_FLOAT_P__8_0_TO_HEX      0x41000000  /* +8.0f */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
128
129
130
131
132
133
134
135
136
  struct mixart_stream_info
  {
  	u32 size_max_byte_frame;
  	u32 size_max_sample_frame;
  	u32 nb_bytes_max_per_sample;  /* float */
  } __attribute__((packed));
  
  /*  MSG_STREAM_ADD_INPUT_GROUP */
  /*  MSG_STREAM_ADD_OUTPUT_GROUP */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
137
138
139
140
141
142
143
  struct mixart_streaming_group_req
  {
  	u32 stream_count;
  	u32 channel_count;
  	u32 user_grp_number;
  	u32 first_phys_audio;
  	u32 latency;
67b48b880   Takashi Iwai   [ALSA] Remove xxx...
144
145
  	struct mixart_stream_info stream_info[32];
  	struct mixart_uid connector;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
146
147
  	u32 flow_entry[32];
  } __attribute__((packed));
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
148
149
  struct mixart_stream_desc
  {
67b48b880   Takashi Iwai   [ALSA] Remove xxx...
150
  	struct mixart_uid stream_uid;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
151
152
  	u32          stream_desc;
  } __attribute__((packed));
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
153
154
155
  struct mixart_streaming_group
  {
  	u32                  status;
67b48b880   Takashi Iwai   [ALSA] Remove xxx...
156
  	struct mixart_uid    group;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
157
158
  	u32                  pipe_desc;
  	u32                  stream_count;
67b48b880   Takashi Iwai   [ALSA] Remove xxx...
159
  	struct mixart_stream_desc stream[32];
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
160
161
162
163
164
  } __attribute__((packed));
  
  /* MSG_STREAM_DELETE_GROUP */
  
  /* request : mixart_uid_t group */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
165
166
167
168
169
170
171
172
173
174
175
176
  struct mixart_delete_group_resp
  {
  	u32  status;
  	u32  unused[2];
  } __attribute__((packed));
  
  
  /* 	MSG_STREAM_START_INPUT_STAGE_PACKET  = 0x130000 + 7,
  	MSG_STREAM_START_OUTPUT_STAGE_PACKET = 0x130000 + 8,
  	MSG_STREAM_STOP_INPUT_STAGE_PACKET   = 0x130000 + 10,
  	MSG_STREAM_STOP_OUTPUT_STAGE_PACKET  = 0x130000 + 11,
   */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
177
178
  struct mixart_fx_couple_uid
  {
67b48b880   Takashi Iwai   [ALSA] Remove xxx...
179
180
  	struct mixart_uid uid_fx_code;
  	struct mixart_uid uid_fx_data;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
181
  } __attribute__((packed));
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
182
183
  struct mixart_txx_stream_desc
  {
67b48b880   Takashi Iwai   [ALSA] Remove xxx...
184
  	struct mixart_uid       uid_pipe;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
185
186
  	u32                     stream_idx;
  	u32                     fx_number;
67b48b880   Takashi Iwai   [ALSA] Remove xxx...
187
  	struct mixart_fx_couple_uid  uid_fx[4];
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
188
  } __attribute__((packed));
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
189
190
  struct mixart_flow_info
  {
67b48b880   Takashi Iwai   [ALSA] Remove xxx...
191
  	struct mixart_txx_stream_desc  stream_desc;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
192
193
194
  	u32                       flow_entry;
  	u32                       flow_phy_addr;
  } __attribute__((packed));
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
195
196
197
198
199
200
  struct mixart_stream_state_req
  {
  	u32                 delayed;
  	u64                 scheduler;
  	u32                 reserved4np[3];
  	u32                 stream_count;  /* set to 1 for instance */
67b48b880   Takashi Iwai   [ALSA] Remove xxx...
201
  	struct mixart_flow_info  stream_info;   /* could be an array[stream_count] */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
202
203
204
205
206
  } __attribute__((packed));
  
  /* 	MSG_STREAM_START_STREAM_GRP_PACKET   = 0x130000 + 6
  	MSG_STREAM_STOP_STREAM_GRP_PACKET    = 0x130000 + 9
   */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
207
208
209
210
211
212
  struct mixart_group_state_req
  {
  	u32           delayed;
  	u64           scheduler;
  	u32           reserved4np[2];
  	u32           pipe_count;    /* set to 1 for instance */
67b48b880   Takashi Iwai   [ALSA] Remove xxx...
213
  	struct mixart_uid  pipe_uid[1];   /* could be an array[pipe_count] */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
214
  } __attribute__((packed));
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
215
216
217
218
219
220
221
222
223
  struct mixart_group_state_resp
  {
  	u32           txx_status;
  	u64           scheduler;
  } __attribute__((packed));
  
  
  
  /* Structures used by the MSG_SERVICES_TIMER_NOTIFY command */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
224
225
226
227
228
229
230
  struct mixart_sample_pos
  {
  	u32   buffer_id;
  	u32   validity;
  	u32   sample_pos_high_part;
  	u32   sample_pos_low_part;
  } __attribute__((packed));
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
231
232
233
  struct mixart_timer_notify
  {
  	u32                  stream_count;
67b48b880   Takashi Iwai   [ALSA] Remove xxx...
234
  	struct mixart_sample_pos  streams[MIXART_MAX_STREAM_PER_CARD * MIXART_MAX_CARDS];
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
235
236
237
238
239
240
241
  } __attribute__((packed));
  
  
  /*	MSG_CONSOLE_GET_CLOCK_UID            = 0x070003,
   */
  
  /* request is a uid with desc = MSG_CONSOLE_MANAGER | cardindex */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
242
243
244
  struct mixart_return_uid
  {
  	u32 error_code;
67b48b880   Takashi Iwai   [ALSA] Remove xxx...
245
  	struct mixart_uid uid;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
  } __attribute__((packed));
  
  /*	MSG_CLOCK_CHECK_PROPERTIES           = 0x200001,
  	MSG_CLOCK_SET_PROPERTIES             = 0x200002,
  */
  
  enum mixart_clock_generic_type {
  	CGT_NO_CLOCK,
  	CGT_INTERNAL_CLOCK,
  	CGT_PROGRAMMABLE_CLOCK,
  	CGT_INTERNAL_ENSLAVED_CLOCK,
  	CGT_EXTERNAL_CLOCK,
  	CGT_CURRENT_CLOCK
  };
  
  enum mixart_clock_mode {
  	CM_UNDEFINED,
  	CM_MASTER,
  	CM_SLAVE,
  	CM_STANDALONE,
  	CM_NOT_CONCERNED
  };
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
268
269
270
271
272
273
274
275
  struct mixart_clock_properties
  {
  	u32 error_code;
  	u32 validation_mask;
  	u32 frequency;
  	u32 reference_frequency;
  	u32 clock_generic_type;
  	u32 clock_mode;
67b48b880   Takashi Iwai   [ALSA] Remove xxx...
276
277
  	struct mixart_uid uid_clock_source;
  	struct mixart_uid uid_event_source;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
278
279
280
281
282
  	u32 event_mode;
  	u32 synchro_signal_presence;
  	u32 format;
  	u32 board_mask;
  	u32 nb_callers; /* set to 1 (see below) */
67b48b880   Takashi Iwai   [ALSA] Remove xxx...
283
  	struct mixart_uid uid_caller[1];
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
284
  } __attribute__((packed));
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
  struct mixart_clock_properties_resp
  {
  	u32 status;
  	u32 clock_mode;
  } __attribute__((packed));
  
  
  /*	MSG_STREAM_SET_INPUT_STAGE_PARAM     = 0x13000F */
  /*	MSG_STREAM_SET_OUTPUT_STAGE_PARAM    = 0x130010 */
  
  enum mixart_coding_type {
  	CT_NOT_DEFINED,
  	CT_LINEAR,
  	CT_MPEG_L1,
  	CT_MPEG_L2,
  	CT_MPEG_L3,
  	CT_MPEG_L3_LSF,
  	CT_GSM
  };
  enum mixart_sample_type {
  	ST_NOT_DEFINED,
  	ST_FLOATING_POINT_32BE,
  	ST_FLOATING_POINT_32LE,
  	ST_FLOATING_POINT_64BE,
  	ST_FLOATING_POINT_64LE,
  	ST_FIXED_POINT_8,
  	ST_FIXED_POINT_16BE,
  	ST_FIXED_POINT_16LE,
  	ST_FIXED_POINT_24BE,
  	ST_FIXED_POINT_24LE,
  	ST_FIXED_POINT_32BE,
  	ST_FIXED_POINT_32LE,
  	ST_INTEGER_8,
  	ST_INTEGER_16BE,
  	ST_INTEGER_16LE,
  	ST_INTEGER_24BE,
  	ST_INTEGER_24LE,
  	ST_INTEGER_32BE,
  	ST_INTEGER_32LE
  };
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
  struct mixart_stream_param_desc
  {
  	u32 coding_type;  /* use enum mixart_coding_type */
  	u32 sample_type;  /* use enum mixart_sample_type */
  
  	union {
  		struct {
  			u32 linear_endian_ness;
  			u32 linear_bits;
  			u32 is_signed;
  			u32 is_float;
  		} linear_format_info;
  
  		struct {
  			u32 mpeg_layer;
  			u32 mpeg_mode;
  			u32 mpeg_mode_extension;
  			u32 mpeg_pre_emphasis;
  			u32 mpeg_has_padding_bit;
  			u32 mpeg_has_crc;
  			u32 mpeg_has_extension;
  			u32 mpeg_is_original;
  			u32 mpeg_has_copyright;
  		} mpeg_format_info;
  	} format_info;
  
  	u32 delayed;
  	u64 scheduler;
  	u32 sample_size;
  	u32 has_header;
  	u32 has_suffix;
  	u32 has_bitrate;
  	u32 samples_per_frame;
  	u32 bytes_per_frame;
  	u32 bytes_per_sample;
  	u32 sampling_freq;
  	u32 number_of_channel;
  	u32 stream_number;
  	u32 buffer_size;
  	u32 differed_time;
  	u32 reserved4np[3];
  	u32 pipe_count;                           /* set to 1 (array size !) */
  	u32 stream_count;                         /* set to 1 (array size !) */
67b48b880   Takashi Iwai   [ALSA] Remove xxx...
368
  	struct mixart_txx_stream_desc stream_desc[1];  /* only one stream per command, but this could be an array */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
369
370
371
372
373
374
  
  } __attribute__((packed));
  
  
  /*	MSG_CONNECTOR_GET_OUT_AUDIO_LEVEL    = 0x050009,
   */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
  struct mixart_get_out_audio_level
  {
  	u32 txx_status;
  	u32 digital_level;   /* float */
  	u32 analog_level;    /* float */
  	u32 monitor_level;   /* float */
  	u32 mute;
  	u32 monitor_mute1;
  	u32 monitor_mute2;
  } __attribute__((packed));
  
  
  /*	MSG_CONNECTOR_SET_OUT_AUDIO_LEVEL    = 0x05000A,
   */
  
  /* used for valid_mask below */
  #define MIXART_AUDIO_LEVEL_ANALOG_MASK	0x01
  #define MIXART_AUDIO_LEVEL_DIGITAL_MASK	0x02
  #define MIXART_AUDIO_LEVEL_MONITOR_MASK	0x04
  #define MIXART_AUDIO_LEVEL_MUTE_MASK	0x08
  #define MIXART_AUDIO_LEVEL_MUTE_M1_MASK	0x10
  #define MIXART_AUDIO_LEVEL_MUTE_M2_MASK	0x20
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
  struct mixart_set_out_audio_level
  {
  	u32 delayed;
  	u64 scheduler;
  	u32 valid_mask1;
  	u32 valid_mask2;
  	u32 digital_level;   /* float */
  	u32 analog_level;    /* float */
  	u32 monitor_level;   /* float */
  	u32 mute;
  	u32 monitor_mute1;
  	u32 monitor_mute2;
  	u32 reserved4np;
  } __attribute__((packed));
  
  
  /*	MSG_SYSTEM_ENUM_PHYSICAL_IO          = 0x16000E,
   */
  
  #define MIXART_MAX_PHYS_IO  (MIXART_MAX_CARDS * 2 * 2) /* 4 * (analog+digital) * (playback+capture) */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
417
418
419
420
421
422
  struct mixart_uid_enumeration
  {
  	u32 error_code;
  	u32 first_uid_offset;
  	u32 nb_uid;
  	u32 current_uid_index;
67b48b880   Takashi Iwai   [ALSA] Remove xxx...
423
  	struct mixart_uid uid[MIXART_MAX_PHYS_IO];
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
424
425
426
427
428
429
  } __attribute__((packed));
  
  
  /*	MSG_PHYSICALIO_SET_LEVEL             = 0x0F0008,
  	MSG_PHYSICALIO_GET_LEVEL             = 0x0F000C,
  */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
430
431
432
433
434
  struct mixart_io_channel_level
  {
  	u32 analog_level;   /* float */
  	u32 unused[2];
  } __attribute__((packed));
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
435
436
437
  struct mixart_io_level
  {
  	s32 channel; /* 0=left, 1=right, -1=both, -2=both same */
67b48b880   Takashi Iwai   [ALSA] Remove xxx...
438
  	struct mixart_io_channel_level level[2];
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
439
440
441
442
443
  } __attribute__((packed));
  
  
  /*	MSG_STREAM_SET_IN_AUDIO_LEVEL        = 0x130015,
   */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
444
445
  struct mixart_in_audio_level_info
  {
67b48b880   Takashi Iwai   [ALSA] Remove xxx...
446
  	struct mixart_uid connector;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
447
448
449
450
451
  	u32 valid_mask1;
  	u32 valid_mask2;
  	u32 digital_level;
  	u32 analog_level;
  } __attribute__((packed));
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
452
453
454
455
456
457
  struct mixart_set_in_audio_level_req
  {
  	u32 delayed;
  	u64 scheduler;
  	u32 audio_count;  /* set to <= 2 */
  	u32 reserved4np;
67b48b880   Takashi Iwai   [ALSA] Remove xxx...
458
  	struct mixart_in_audio_level_info level[2];
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
  } __attribute__((packed));
  
  /* response is a 32 bit status */
  
  
  /*	MSG_STREAM_SET_OUT_STREAM_LEVEL      = 0x130017,
   */
  
  /* defines used for valid_mask1 */
  #define MIXART_OUT_STREAM_SET_LEVEL_LEFT_AUDIO1		0x01
  #define MIXART_OUT_STREAM_SET_LEVEL_LEFT_AUDIO2		0x02
  #define MIXART_OUT_STREAM_SET_LEVEL_RIGHT_AUDIO1	0x04
  #define MIXART_OUT_STREAM_SET_LEVEL_RIGHT_AUDIO2	0x08
  #define MIXART_OUT_STREAM_SET_LEVEL_STREAM_1		0x10
  #define MIXART_OUT_STREAM_SET_LEVEL_STREAM_2		0x20
  #define MIXART_OUT_STREAM_SET_LEVEL_MUTE_1		0x40
  #define MIXART_OUT_STREAM_SET_LEVEL_MUTE_2		0x80
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
476
477
478
479
480
481
482
483
484
485
486
487
488
  struct mixart_out_stream_level_info
  {
  	u32 valid_mask1;
  	u32 valid_mask2;
  	u32 left_to_out1_level;
  	u32 left_to_out2_level;
  	u32 right_to_out1_level;
  	u32 right_to_out2_level;
  	u32 digital_level1;
  	u32 digital_level2;
  	u32 mute1;
  	u32 mute2;
  } __attribute__((packed));
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
489
490
  struct mixart_set_out_stream_level
  {
67b48b880   Takashi Iwai   [ALSA] Remove xxx...
491
492
  	struct mixart_txx_stream_desc desc;
  	struct mixart_out_stream_level_info out_level;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
493
  } __attribute__((packed));
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
494
495
496
497
498
499
  struct mixart_set_out_stream_level_req
  {
  	u32 delayed;
  	u64 scheduler;
  	u32 reserved4np[2];
  	u32 nb_of_stream;  /* set to 1 */
67b48b880   Takashi Iwai   [ALSA] Remove xxx...
500
  	struct mixart_set_out_stream_level stream_level; /* could be an array */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
501
502
503
504
505
506
  } __attribute__((packed));
  
  /* response to this request is a u32 status value */
  
  
  /* exported */
67b48b880   Takashi Iwai   [ALSA] Remove xxx...
507
508
  void snd_mixart_init_mailbox(struct mixart_mgr *mgr);
  void snd_mixart_exit_mailbox(struct mixart_mgr *mgr);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
509

67b48b880   Takashi Iwai   [ALSA] Remove xxx...
510
511
512
  int  snd_mixart_send_msg(struct mixart_mgr *mgr, struct mixart_msg *request, int max_resp_size, void *resp_data);
  int  snd_mixart_send_msg_wait_notif(struct mixart_mgr *mgr, struct mixart_msg *request, u32 notif_event);
  int  snd_mixart_send_msg_nonblock(struct mixart_mgr *mgr, struct mixart_msg *request);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
513

7d12e780e   David Howells   IRQ: Maintain reg...
514
  irqreturn_t snd_mixart_interrupt(int irq, void *dev_id);
8d3a8b5cb   Takashi Iwai   ALSA: mixart: Use...
515
  irqreturn_t snd_mixart_threaded_irq(int irq, void *dev_id);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
516

67b48b880   Takashi Iwai   [ALSA] Remove xxx...
517
  void snd_mixart_reset_board(struct mixart_mgr *mgr);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
518
519
  
  #endif /* __SOUND_MIXART_CORE_H */