diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/sound/gus.h | 317 |
1 files changed, 158 insertions, 159 deletions
diff --git a/include/sound/gus.h b/include/sound/gus.h index bb12e9fab8a7..63da50fae773 100644 --- a/include/sound/gus.h +++ b/include/sound/gus.h | |||
@@ -183,17 +183,16 @@ | |||
183 | 183 | ||
184 | /* --- */ | 184 | /* --- */ |
185 | 185 | ||
186 | struct _snd_gus_card; | 186 | struct snd_gus_card; |
187 | typedef struct _snd_gus_card snd_gus_card_t; | ||
188 | 187 | ||
189 | /* GF1 specific structure */ | 188 | /* GF1 specific structure */ |
190 | 189 | ||
191 | typedef struct _snd_gf1_bank_info { | 190 | struct snd_gf1_bank_info { |
192 | unsigned int address; | 191 | unsigned int address; |
193 | unsigned int size; | 192 | unsigned int size; |
194 | } snd_gf1_bank_info_t; | 193 | }; |
195 | 194 | ||
196 | typedef struct _snd_gf1_mem_block { | 195 | struct snd_gf1_mem_block { |
197 | unsigned short flags; /* flags - SNDRV_GF1_MEM_BLOCK_XXXX */ | 196 | unsigned short flags; /* flags - SNDRV_GF1_MEM_BLOCK_XXXX */ |
198 | unsigned short owner; /* owner - SNDRV_GF1_MEM_OWNER_XXXX */ | 197 | unsigned short owner; /* owner - SNDRV_GF1_MEM_OWNER_XXXX */ |
199 | unsigned int share; /* share count */ | 198 | unsigned int share; /* share count */ |
@@ -201,68 +200,68 @@ typedef struct _snd_gf1_mem_block { | |||
201 | unsigned int ptr; | 200 | unsigned int ptr; |
202 | unsigned int size; | 201 | unsigned int size; |
203 | char *name; | 202 | char *name; |
204 | struct _snd_gf1_mem_block *next; | 203 | struct snd_gf1_mem_block *next; |
205 | struct _snd_gf1_mem_block *prev; | 204 | struct snd_gf1_mem_block *prev; |
206 | } snd_gf1_mem_block_t; | 205 | }; |
207 | 206 | ||
208 | typedef struct _snd_gf1_mem { | 207 | struct snd_gf1_mem { |
209 | snd_gf1_bank_info_t banks_8[4]; | 208 | struct snd_gf1_bank_info banks_8[4]; |
210 | snd_gf1_bank_info_t banks_16[4]; | 209 | struct snd_gf1_bank_info banks_16[4]; |
211 | snd_gf1_mem_block_t *first; | 210 | struct snd_gf1_mem_block *first; |
212 | snd_gf1_mem_block_t *last; | 211 | struct snd_gf1_mem_block *last; |
213 | struct semaphore memory_mutex; | 212 | struct semaphore memory_mutex; |
214 | } snd_gf1_mem_t; | 213 | }; |
215 | 214 | ||
216 | typedef struct snd_gf1_dma_block { | 215 | struct snd_gf1_dma_block { |
217 | void *buffer; /* buffer in computer's RAM */ | 216 | void *buffer; /* buffer in computer's RAM */ |
218 | unsigned long buf_addr; /* buffer address */ | 217 | unsigned long buf_addr; /* buffer address */ |
219 | unsigned int addr; /* address in onboard memory */ | 218 | unsigned int addr; /* address in onboard memory */ |
220 | unsigned int count; /* count in bytes */ | 219 | unsigned int count; /* count in bytes */ |
221 | unsigned int cmd; /* DMA command (format) */ | 220 | unsigned int cmd; /* DMA command (format) */ |
222 | void (*ack)(snd_gus_card_t * gus, void *private_data); | 221 | void (*ack)(struct snd_gus_card * gus, void *private_data); |
223 | void *private_data; | 222 | void *private_data; |
224 | struct snd_gf1_dma_block *next; | 223 | struct snd_gf1_dma_block *next; |
225 | } snd_gf1_dma_block_t; | 224 | }; |
226 | 225 | ||
227 | typedef struct { | 226 | struct snd_gus_port { |
228 | snd_midi_channel_set_t * chset; | 227 | struct snd_midi_channel_set * chset; |
229 | snd_gus_card_t * gus; | 228 | struct snd_gus_card * gus; |
230 | int mode; /* operation mode */ | 229 | int mode; /* operation mode */ |
231 | int client; /* sequencer client number */ | 230 | int client; /* sequencer client number */ |
232 | int port; /* sequencer port number */ | 231 | int port; /* sequencer port number */ |
233 | unsigned int midi_has_voices: 1; | 232 | unsigned int midi_has_voices: 1; |
234 | } snd_gus_port_t; | 233 | }; |
235 | 234 | ||
236 | typedef struct _snd_gus_voice snd_gus_voice_t; | 235 | struct snd_gus_voice; |
237 | 236 | ||
238 | typedef struct { | 237 | struct snd_gus_sample_ops { |
239 | void (*sample_start)(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_position_t position); | 238 | void (*sample_start)(struct snd_gus_card *gus, struct snd_gus_voice *voice, snd_seq_position_t position); |
240 | void (*sample_stop)(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_stop_mode_t mode); | 239 | void (*sample_stop)(struct snd_gus_card *gus, struct snd_gus_voice *voice, int mode); |
241 | void (*sample_freq)(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_frequency_t freq); | 240 | void (*sample_freq)(struct snd_gus_card *gus, struct snd_gus_voice *voice, snd_seq_frequency_t freq); |
242 | void (*sample_volume)(snd_gus_card_t *gus, snd_gus_voice_t *voice, snd_seq_ev_volume_t *volume); | 241 | void (*sample_volume)(struct snd_gus_card *gus, struct snd_gus_voice *voice, struct snd_seq_ev_volume *volume); |
243 | void (*sample_loop)(snd_gus_card_t *card, snd_gus_voice_t *voice, snd_seq_ev_loop_t *loop); | 242 | void (*sample_loop)(struct snd_gus_card *card, struct snd_gus_voice *voice, struct snd_seq_ev_loop *loop); |
244 | void (*sample_pos)(snd_gus_card_t *card, snd_gus_voice_t *voice, snd_seq_position_t position); | 243 | void (*sample_pos)(struct snd_gus_card *card, struct snd_gus_voice *voice, snd_seq_position_t position); |
245 | void (*sample_private1)(snd_gus_card_t *card, snd_gus_voice_t *voice, unsigned char *data); | 244 | void (*sample_private1)(struct snd_gus_card *card, struct snd_gus_voice *voice, unsigned char *data); |
246 | } snd_gus_sample_ops_t; | 245 | }; |
247 | 246 | ||
248 | #define SNDRV_GF1_VOICE_TYPE_PCM 0 | 247 | #define SNDRV_GF1_VOICE_TYPE_PCM 0 |
249 | #define SNDRV_GF1_VOICE_TYPE_SYNTH 1 | 248 | #define SNDRV_GF1_VOICE_TYPE_SYNTH 1 |
250 | #define SNDRV_GF1_VOICE_TYPE_MIDI 2 | 249 | #define SNDRV_GF1_VOICE_TYPE_MIDI 2 |
251 | 250 | ||
252 | #define SNDRV_GF1_VFLG_RUNNING (1<<0) | 251 | #define SNDRV_GF1_VFLG_RUNNING (1<<0) |
253 | #define SNDRV_GF1_VFLG_EFFECT_TIMER1 (1<<1) | 252 | #define SNDRV_GF1_VFLG_EFFECT_TIMER1 (1<<1) |
254 | #define SNDRV_GF1_VFLG_PAN (1<<2) | 253 | #define SNDRV_GF1_VFLG_PAN (1<<2) |
255 | 254 | ||
256 | typedef enum { | 255 | enum snd_gus_volume_state { |
257 | VENV_BEFORE, | 256 | VENV_BEFORE, |
258 | VENV_ATTACK, | 257 | VENV_ATTACK, |
259 | VENV_SUSTAIN, | 258 | VENV_SUSTAIN, |
260 | VENV_RELEASE, | 259 | VENV_RELEASE, |
261 | VENV_DONE, | 260 | VENV_DONE, |
262 | VENV_VOLUME | 261 | VENV_VOLUME |
263 | } snd_gus_volume_state_t; | 262 | }; |
264 | 263 | ||
265 | struct _snd_gus_voice { | 264 | struct snd_gus_voice { |
266 | int number; | 265 | int number; |
267 | unsigned int use: 1, | 266 | unsigned int use: 1, |
268 | pcm: 1, | 267 | pcm: 1, |
@@ -278,18 +277,18 @@ struct _snd_gus_voice { | |||
278 | unsigned int interrupt_stat_wave; | 277 | unsigned int interrupt_stat_wave; |
279 | unsigned int interrupt_stat_volume; | 278 | unsigned int interrupt_stat_volume; |
280 | #endif | 279 | #endif |
281 | void (*handler_wave) (snd_gus_card_t * gus, snd_gus_voice_t * voice); | 280 | void (*handler_wave) (struct snd_gus_card * gus, struct snd_gus_voice * voice); |
282 | void (*handler_volume) (snd_gus_card_t * gus, snd_gus_voice_t * voice); | 281 | void (*handler_volume) (struct snd_gus_card * gus, struct snd_gus_voice * voice); |
283 | void (*handler_effect) (snd_gus_card_t * gus, snd_gus_voice_t * voice); | 282 | void (*handler_effect) (struct snd_gus_card * gus, struct snd_gus_voice * voice); |
284 | void (*volume_change) (snd_gus_card_t * gus); | 283 | void (*volume_change) (struct snd_gus_card * gus); |
285 | 284 | ||
286 | snd_gus_sample_ops_t *sample_ops; | 285 | struct snd_gus_sample_ops *sample_ops; |
287 | 286 | ||
288 | snd_seq_instr_t instr; | 287 | struct snd_seq_instr instr; |
289 | 288 | ||
290 | /* running status / registers */ | 289 | /* running status / registers */ |
291 | 290 | ||
292 | snd_seq_ev_volume_t sample_volume; | 291 | struct snd_seq_ev_volume sample_volume; |
293 | 292 | ||
294 | unsigned short fc_register; | 293 | unsigned short fc_register; |
295 | unsigned short fc_lfo; | 294 | unsigned short fc_lfo; |
@@ -300,8 +299,8 @@ struct _snd_gus_voice { | |||
300 | unsigned char effect_accumulator; | 299 | unsigned char effect_accumulator; |
301 | unsigned char volume_control; | 300 | unsigned char volume_control; |
302 | unsigned char venv_value_next; | 301 | unsigned char venv_value_next; |
303 | snd_gus_volume_state_t venv_state; | 302 | enum snd_gus_volume_state venv_state; |
304 | snd_gus_volume_state_t venv_state_prev; | 303 | enum snd_gus_volume_state venv_state_prev; |
305 | unsigned short vlo; | 304 | unsigned short vlo; |
306 | unsigned short vro; | 305 | unsigned short vro; |
307 | unsigned short gf1_effect_volume; | 306 | unsigned short gf1_effect_volume; |
@@ -309,10 +308,10 @@ struct _snd_gus_voice { | |||
309 | /* --- */ | 308 | /* --- */ |
310 | 309 | ||
311 | void *private_data; | 310 | void *private_data; |
312 | void (*private_free)(snd_gus_voice_t *voice); | 311 | void (*private_free)(struct snd_gus_voice *voice); |
313 | }; | 312 | }; |
314 | 313 | ||
315 | struct _snd_gf1 { | 314 | struct snd_gf1 { |
316 | 315 | ||
317 | unsigned int enh_mode:1, /* enhanced mode (GFA1) */ | 316 | unsigned int enh_mode:1, /* enhanced mode (GFA1) */ |
318 | hw_lfo:1, /* use hardware LFO */ | 317 | hw_lfo:1, /* use hardware LFO */ |
@@ -330,7 +329,7 @@ struct _snd_gf1 { | |||
330 | unsigned int rom_present; /* bitmask */ | 329 | unsigned int rom_present; /* bitmask */ |
331 | unsigned int rom_banks; /* GUS's ROM banks */ | 330 | unsigned int rom_banks; /* GUS's ROM banks */ |
332 | 331 | ||
333 | snd_gf1_mem_t mem_alloc; | 332 | struct snd_gf1_mem mem_alloc; |
334 | 333 | ||
335 | /* registers */ | 334 | /* registers */ |
336 | unsigned short reg_page; | 335 | unsigned short reg_page; |
@@ -347,7 +346,7 @@ struct _snd_gf1 { | |||
347 | unsigned char active_voices; /* active voices */ | 346 | unsigned char active_voices; /* active voices */ |
348 | unsigned char active_voice; /* selected voice (GF1PAGE register) */ | 347 | unsigned char active_voice; /* selected voice (GF1PAGE register) */ |
349 | 348 | ||
350 | snd_gus_voice_t voices[32]; /* GF1 voices */ | 349 | struct snd_gus_voice voices[32]; /* GF1 voices */ |
351 | 350 | ||
352 | unsigned int default_voice_address; | 351 | unsigned int default_voice_address; |
353 | 352 | ||
@@ -362,12 +361,12 @@ struct _snd_gf1 { | |||
362 | 361 | ||
363 | /* interrupt handlers */ | 362 | /* interrupt handlers */ |
364 | 363 | ||
365 | void (*interrupt_handler_midi_out) (snd_gus_card_t * gus); | 364 | void (*interrupt_handler_midi_out) (struct snd_gus_card * gus); |
366 | void (*interrupt_handler_midi_in) (snd_gus_card_t * gus); | 365 | void (*interrupt_handler_midi_in) (struct snd_gus_card * gus); |
367 | void (*interrupt_handler_timer1) (snd_gus_card_t * gus); | 366 | void (*interrupt_handler_timer1) (struct snd_gus_card * gus); |
368 | void (*interrupt_handler_timer2) (snd_gus_card_t * gus); | 367 | void (*interrupt_handler_timer2) (struct snd_gus_card * gus); |
369 | void (*interrupt_handler_dma_write) (snd_gus_card_t * gus); | 368 | void (*interrupt_handler_dma_write) (struct snd_gus_card * gus); |
370 | void (*interrupt_handler_dma_read) (snd_gus_card_t * gus); | 369 | void (*interrupt_handler_dma_read) (struct snd_gus_card * gus); |
371 | 370 | ||
372 | #ifdef CONFIG_SND_DEBUG | 371 | #ifdef CONFIG_SND_DEBUG |
373 | unsigned int interrupt_stat_midi_out; | 372 | unsigned int interrupt_stat_midi_out; |
@@ -382,17 +381,17 @@ struct _snd_gf1 { | |||
382 | /* synthesizer */ | 381 | /* synthesizer */ |
383 | 382 | ||
384 | int seq_client; | 383 | int seq_client; |
385 | snd_gus_port_t seq_ports[4]; | 384 | struct snd_gus_port seq_ports[4]; |
386 | snd_seq_kinstr_list_t *ilist; | 385 | struct snd_seq_kinstr_list *ilist; |
387 | snd_iwffff_ops_t iwffff_ops; | 386 | struct snd_iwffff_ops iwffff_ops; |
388 | snd_gf1_ops_t gf1_ops; | 387 | struct snd_gf1_ops gf1_ops; |
389 | snd_simple_ops_t simple_ops; | 388 | struct snd_simple_ops simple_ops; |
390 | 389 | ||
391 | /* timer */ | 390 | /* timer */ |
392 | 391 | ||
393 | unsigned short timer_enabled; | 392 | unsigned short timer_enabled; |
394 | snd_timer_t *timer1; | 393 | struct snd_timer *timer1; |
395 | snd_timer_t *timer2; | 394 | struct snd_timer *timer2; |
396 | 395 | ||
397 | /* midi */ | 396 | /* midi */ |
398 | 397 | ||
@@ -404,11 +403,11 @@ struct _snd_gf1 { | |||
404 | 403 | ||
405 | unsigned int dma_flags; | 404 | unsigned int dma_flags; |
406 | unsigned int dma_shared; | 405 | unsigned int dma_shared; |
407 | snd_gf1_dma_block_t *dma_data_pcm; | 406 | struct snd_gf1_dma_block *dma_data_pcm; |
408 | snd_gf1_dma_block_t *dma_data_pcm_last; | 407 | struct snd_gf1_dma_block *dma_data_pcm_last; |
409 | snd_gf1_dma_block_t *dma_data_synth; | 408 | struct snd_gf1_dma_block *dma_data_synth; |
410 | snd_gf1_dma_block_t *dma_data_synth_last; | 409 | struct snd_gf1_dma_block *dma_data_synth_last; |
411 | void (*dma_ack)(snd_gus_card_t * gus, void *private_data); | 410 | void (*dma_ack)(struct snd_gus_card * gus, void *private_data); |
412 | void *dma_private_data; | 411 | void *dma_private_data; |
413 | 412 | ||
414 | /* pcm */ | 413 | /* pcm */ |
@@ -425,8 +424,8 @@ struct _snd_gf1 { | |||
425 | 424 | ||
426 | /* main structure for GUS card */ | 425 | /* main structure for GUS card */ |
427 | 426 | ||
428 | struct _snd_gus_card { | 427 | struct snd_gus_card { |
429 | snd_card_t *card; | 428 | struct snd_card *card; |
430 | 429 | ||
431 | unsigned int | 430 | unsigned int |
432 | initialized: 1, /* resources were initialized */ | 431 | initialized: 1, /* resources were initialized */ |
@@ -448,18 +447,18 @@ struct _snd_gus_card { | |||
448 | unsigned short joystick_dac; /* joystick DAC level */ | 447 | unsigned short joystick_dac; /* joystick DAC level */ |
449 | int timer_dev; /* timer device */ | 448 | int timer_dev; /* timer device */ |
450 | 449 | ||
451 | struct _snd_gf1 gf1; /* gf1 specific variables */ | 450 | struct snd_gf1 gf1; /* gf1 specific variables */ |
452 | snd_pcm_t *pcm; | 451 | struct snd_pcm *pcm; |
453 | snd_pcm_substream_t *pcm_cap_substream; | 452 | struct snd_pcm_substream *pcm_cap_substream; |
454 | unsigned int c_dma_size; | 453 | unsigned int c_dma_size; |
455 | unsigned int c_period_size; | 454 | unsigned int c_period_size; |
456 | unsigned int c_pos; | 455 | unsigned int c_pos; |
457 | 456 | ||
458 | snd_rawmidi_t *midi_uart; | 457 | struct snd_rawmidi *midi_uart; |
459 | snd_rawmidi_substream_t *midi_substream_output; | 458 | struct snd_rawmidi_substream *midi_substream_output; |
460 | snd_rawmidi_substream_t *midi_substream_input; | 459 | struct snd_rawmidi_substream *midi_substream_input; |
461 | 460 | ||
462 | snd_seq_device_t *seq_dev; | 461 | struct snd_seq_device *seq_dev; |
463 | 462 | ||
464 | spinlock_t reg_lock; | 463 | spinlock_t reg_lock; |
465 | spinlock_t voice_alloc; | 464 | spinlock_t voice_alloc; |
@@ -474,7 +473,7 @@ struct _snd_gus_card { | |||
474 | 473 | ||
475 | /* I/O functions for GF1/InterWave chip - gus_io.c */ | 474 | /* I/O functions for GF1/InterWave chip - gus_io.c */ |
476 | 475 | ||
477 | static inline void snd_gf1_select_voice(snd_gus_card_t * gus, int voice) | 476 | static inline void snd_gf1_select_voice(struct snd_gus_card * gus, int voice) |
478 | { | 477 | { |
479 | unsigned long flags; | 478 | unsigned long flags; |
480 | 479 | ||
@@ -486,63 +485,63 @@ static inline void snd_gf1_select_voice(snd_gus_card_t * gus, int voice) | |||
486 | spin_unlock_irqrestore(&gus->active_voice_lock, flags); | 485 | spin_unlock_irqrestore(&gus->active_voice_lock, flags); |
487 | } | 486 | } |
488 | 487 | ||
489 | static inline void snd_gf1_uart_cmd(snd_gus_card_t * gus, unsigned char b) | 488 | static inline void snd_gf1_uart_cmd(struct snd_gus_card * gus, unsigned char b) |
490 | { | 489 | { |
491 | outb(gus->gf1.uart_cmd = b, GUSP(gus, MIDICTRL)); | 490 | outb(gus->gf1.uart_cmd = b, GUSP(gus, MIDICTRL)); |
492 | } | 491 | } |
493 | 492 | ||
494 | static inline unsigned char snd_gf1_uart_stat(snd_gus_card_t * gus) | 493 | static inline unsigned char snd_gf1_uart_stat(struct snd_gus_card * gus) |
495 | { | 494 | { |
496 | return inb(GUSP(gus, MIDISTAT)); | 495 | return inb(GUSP(gus, MIDISTAT)); |
497 | } | 496 | } |
498 | 497 | ||
499 | static inline void snd_gf1_uart_put(snd_gus_card_t * gus, unsigned char b) | 498 | static inline void snd_gf1_uart_put(struct snd_gus_card * gus, unsigned char b) |
500 | { | 499 | { |
501 | outb(b, GUSP(gus, MIDIDATA)); | 500 | outb(b, GUSP(gus, MIDIDATA)); |
502 | } | 501 | } |
503 | 502 | ||
504 | static inline unsigned char snd_gf1_uart_get(snd_gus_card_t * gus) | 503 | static inline unsigned char snd_gf1_uart_get(struct snd_gus_card * gus) |
505 | { | 504 | { |
506 | return inb(GUSP(gus, MIDIDATA)); | 505 | return inb(GUSP(gus, MIDIDATA)); |
507 | } | 506 | } |
508 | 507 | ||
509 | extern void snd_gf1_delay(snd_gus_card_t * gus); | 508 | extern void snd_gf1_delay(struct snd_gus_card * gus); |
510 | 509 | ||
511 | extern void snd_gf1_ctrl_stop(snd_gus_card_t * gus, unsigned char reg); | 510 | extern void snd_gf1_ctrl_stop(struct snd_gus_card * gus, unsigned char reg); |
512 | 511 | ||
513 | extern void snd_gf1_write8(snd_gus_card_t * gus, unsigned char reg, unsigned char data); | 512 | extern void snd_gf1_write8(struct snd_gus_card * gus, unsigned char reg, unsigned char data); |
514 | extern unsigned char snd_gf1_look8(snd_gus_card_t * gus, unsigned char reg); | 513 | extern unsigned char snd_gf1_look8(struct snd_gus_card * gus, unsigned char reg); |
515 | static inline unsigned char snd_gf1_read8(snd_gus_card_t * gus, unsigned char reg) | 514 | static inline unsigned char snd_gf1_read8(struct snd_gus_card * gus, unsigned char reg) |
516 | { | 515 | { |
517 | return snd_gf1_look8(gus, reg | 0x80); | 516 | return snd_gf1_look8(gus, reg | 0x80); |
518 | } | 517 | } |
519 | extern void snd_gf1_write16(snd_gus_card_t * gus, unsigned char reg, unsigned int data); | 518 | extern void snd_gf1_write16(struct snd_gus_card * gus, unsigned char reg, unsigned int data); |
520 | extern unsigned short snd_gf1_look16(snd_gus_card_t * gus, unsigned char reg); | 519 | extern unsigned short snd_gf1_look16(struct snd_gus_card * gus, unsigned char reg); |
521 | static inline unsigned short snd_gf1_read16(snd_gus_card_t * gus, unsigned char reg) | 520 | static inline unsigned short snd_gf1_read16(struct snd_gus_card * gus, unsigned char reg) |
522 | { | 521 | { |
523 | return snd_gf1_look16(gus, reg | 0x80); | 522 | return snd_gf1_look16(gus, reg | 0x80); |
524 | } | 523 | } |
525 | extern void snd_gf1_adlib_write(snd_gus_card_t * gus, unsigned char reg, unsigned char data); | 524 | extern void snd_gf1_adlib_write(struct snd_gus_card * gus, unsigned char reg, unsigned char data); |
526 | extern void snd_gf1_dram_addr(snd_gus_card_t * gus, unsigned int addr); | 525 | extern void snd_gf1_dram_addr(struct snd_gus_card * gus, unsigned int addr); |
527 | extern void snd_gf1_poke(snd_gus_card_t * gus, unsigned int addr, unsigned char data); | 526 | extern void snd_gf1_poke(struct snd_gus_card * gus, unsigned int addr, unsigned char data); |
528 | extern unsigned char snd_gf1_peek(snd_gus_card_t * gus, unsigned int addr); | 527 | extern unsigned char snd_gf1_peek(struct snd_gus_card * gus, unsigned int addr); |
529 | extern void snd_gf1_write_addr(snd_gus_card_t * gus, unsigned char reg, unsigned int addr, short w_16bit); | 528 | extern void snd_gf1_write_addr(struct snd_gus_card * gus, unsigned char reg, unsigned int addr, short w_16bit); |
530 | extern unsigned int snd_gf1_read_addr(snd_gus_card_t * gus, unsigned char reg, short w_16bit); | 529 | extern unsigned int snd_gf1_read_addr(struct snd_gus_card * gus, unsigned char reg, short w_16bit); |
531 | extern void snd_gf1_i_ctrl_stop(snd_gus_card_t * gus, unsigned char reg); | 530 | extern void snd_gf1_i_ctrl_stop(struct snd_gus_card * gus, unsigned char reg); |
532 | extern void snd_gf1_i_write8(snd_gus_card_t * gus, unsigned char reg, unsigned char data); | 531 | extern void snd_gf1_i_write8(struct snd_gus_card * gus, unsigned char reg, unsigned char data); |
533 | extern unsigned char snd_gf1_i_look8(snd_gus_card_t * gus, unsigned char reg); | 532 | extern unsigned char snd_gf1_i_look8(struct snd_gus_card * gus, unsigned char reg); |
534 | extern void snd_gf1_i_write16(snd_gus_card_t * gus, unsigned char reg, unsigned int data); | 533 | extern void snd_gf1_i_write16(struct snd_gus_card * gus, unsigned char reg, unsigned int data); |
535 | static inline unsigned char snd_gf1_i_read8(snd_gus_card_t * gus, unsigned char reg) | 534 | static inline unsigned char snd_gf1_i_read8(struct snd_gus_card * gus, unsigned char reg) |
536 | { | 535 | { |
537 | return snd_gf1_i_look8(gus, reg | 0x80); | 536 | return snd_gf1_i_look8(gus, reg | 0x80); |
538 | } | 537 | } |
539 | extern unsigned short snd_gf1_i_look16(snd_gus_card_t * gus, unsigned char reg); | 538 | extern unsigned short snd_gf1_i_look16(struct snd_gus_card * gus, unsigned char reg); |
540 | static inline unsigned short snd_gf1_i_read16(snd_gus_card_t * gus, unsigned char reg) | 539 | static inline unsigned short snd_gf1_i_read16(struct snd_gus_card * gus, unsigned char reg) |
541 | { | 540 | { |
542 | return snd_gf1_i_look16(gus, reg | 0x80); | 541 | return snd_gf1_i_look16(gus, reg | 0x80); |
543 | } | 542 | } |
544 | 543 | ||
545 | extern void snd_gf1_select_active_voices(snd_gus_card_t * gus); | 544 | extern void snd_gf1_select_active_voices(struct snd_gus_card * gus); |
546 | 545 | ||
547 | /* gus_lfo.c */ | 546 | /* gus_lfo.c */ |
548 | 547 | ||
@@ -555,98 +554,98 @@ struct _SND_IW_LFO_PROGRAM { | |||
555 | }; | 554 | }; |
556 | 555 | ||
557 | #if 0 | 556 | #if 0 |
558 | extern irqreturn_t snd_gf1_lfo_effect_interrupt(snd_gus_card_t * gus, snd_gf1_voice_t * voice); | 557 | extern irqreturn_t snd_gf1_lfo_effect_interrupt(struct snd_gus_card * gus, snd_gf1_voice_t * voice); |
559 | #endif | 558 | #endif |
560 | extern void snd_gf1_lfo_init(snd_gus_card_t * gus); | 559 | extern void snd_gf1_lfo_init(struct snd_gus_card * gus); |
561 | extern void snd_gf1_lfo_done(snd_gus_card_t * gus); | 560 | extern void snd_gf1_lfo_done(struct snd_gus_card * gus); |
562 | extern void snd_gf1_lfo_program(snd_gus_card_t * gus, int voice, int lfo_type, struct _SND_IW_LFO_PROGRAM *program); | 561 | extern void snd_gf1_lfo_program(struct snd_gus_card * gus, int voice, int lfo_type, struct _SND_IW_LFO_PROGRAM *program); |
563 | extern void snd_gf1_lfo_enable(snd_gus_card_t * gus, int voice, int lfo_type); | 562 | extern void snd_gf1_lfo_enable(struct snd_gus_card * gus, int voice, int lfo_type); |
564 | extern void snd_gf1_lfo_disable(snd_gus_card_t * gus, int voice, int lfo_type); | 563 | extern void snd_gf1_lfo_disable(struct snd_gus_card * gus, int voice, int lfo_type); |
565 | extern void snd_gf1_lfo_change_freq(snd_gus_card_t * gus, int voice, int lfo_type, int freq); | 564 | extern void snd_gf1_lfo_change_freq(struct snd_gus_card * gus, int voice, int lfo_type, int freq); |
566 | extern void snd_gf1_lfo_change_depth(snd_gus_card_t * gus, int voice, int lfo_type, int depth); | 565 | extern void snd_gf1_lfo_change_depth(struct snd_gus_card * gus, int voice, int lfo_type, int depth); |
567 | extern void snd_gf1_lfo_setup(snd_gus_card_t * gus, int voice, int lfo_type, int freq, int current_depth, int depth, int sweep, int shape); | 566 | extern void snd_gf1_lfo_setup(struct snd_gus_card * gus, int voice, int lfo_type, int freq, int current_depth, int depth, int sweep, int shape); |
568 | extern void snd_gf1_lfo_shutdown(snd_gus_card_t * gus, int voice, int lfo_type); | 567 | extern void snd_gf1_lfo_shutdown(struct snd_gus_card * gus, int voice, int lfo_type); |
569 | #if 0 | 568 | #if 0 |
570 | extern void snd_gf1_lfo_command(snd_gus_card_t * gus, int voice, unsigned char *command); | 569 | extern void snd_gf1_lfo_command(struct snd_gus_card * gus, int voice, unsigned char *command); |
571 | #endif | 570 | #endif |
572 | 571 | ||
573 | /* gus_mem.c */ | 572 | /* gus_mem.c */ |
574 | 573 | ||
575 | void snd_gf1_mem_lock(snd_gf1_mem_t * alloc, int xup); | 574 | void snd_gf1_mem_lock(struct snd_gf1_mem * alloc, int xup); |
576 | int snd_gf1_mem_xfree(snd_gf1_mem_t * alloc, snd_gf1_mem_block_t * block); | 575 | int snd_gf1_mem_xfree(struct snd_gf1_mem * alloc, struct snd_gf1_mem_block * block); |
577 | snd_gf1_mem_block_t *snd_gf1_mem_alloc(snd_gf1_mem_t * alloc, int owner, | 576 | struct snd_gf1_mem_block *snd_gf1_mem_alloc(struct snd_gf1_mem * alloc, int owner, |
578 | char *name, int size, int w_16, | 577 | char *name, int size, int w_16, |
579 | int align, unsigned int *share_id); | 578 | int align, unsigned int *share_id); |
580 | int snd_gf1_mem_free(snd_gf1_mem_t * alloc, unsigned int address); | 579 | int snd_gf1_mem_free(struct snd_gf1_mem * alloc, unsigned int address); |
581 | int snd_gf1_mem_free_owner(snd_gf1_mem_t * alloc, int owner); | 580 | int snd_gf1_mem_free_owner(struct snd_gf1_mem * alloc, int owner); |
582 | int snd_gf1_mem_init(snd_gus_card_t * gus); | 581 | int snd_gf1_mem_init(struct snd_gus_card * gus); |
583 | int snd_gf1_mem_done(snd_gus_card_t * gus); | 582 | int snd_gf1_mem_done(struct snd_gus_card * gus); |
584 | 583 | ||
585 | /* gus_mem_proc.c */ | 584 | /* gus_mem_proc.c */ |
586 | 585 | ||
587 | int snd_gf1_mem_proc_init(snd_gus_card_t * gus); | 586 | int snd_gf1_mem_proc_init(struct snd_gus_card * gus); |
588 | 587 | ||
589 | /* gus_dma.c */ | 588 | /* gus_dma.c */ |
590 | 589 | ||
591 | int snd_gf1_dma_init(snd_gus_card_t * gus); | 590 | int snd_gf1_dma_init(struct snd_gus_card * gus); |
592 | int snd_gf1_dma_done(snd_gus_card_t * gus); | 591 | int snd_gf1_dma_done(struct snd_gus_card * gus); |
593 | int snd_gf1_dma_transfer_block(snd_gus_card_t * gus, | 592 | int snd_gf1_dma_transfer_block(struct snd_gus_card * gus, |
594 | snd_gf1_dma_block_t * block, | 593 | struct snd_gf1_dma_block * block, |
595 | int atomic, | 594 | int atomic, |
596 | int synth); | 595 | int synth); |
597 | 596 | ||
598 | /* gus_volume.c */ | 597 | /* gus_volume.c */ |
599 | 598 | ||
600 | unsigned short snd_gf1_lvol_to_gvol_raw(unsigned int vol); | 599 | unsigned short snd_gf1_lvol_to_gvol_raw(unsigned int vol); |
601 | unsigned short snd_gf1_translate_freq(snd_gus_card_t * gus, unsigned int freq2); | 600 | unsigned short snd_gf1_translate_freq(struct snd_gus_card * gus, unsigned int freq2); |
602 | 601 | ||
603 | /* gus_reset.c */ | 602 | /* gus_reset.c */ |
604 | 603 | ||
605 | void snd_gf1_set_default_handlers(snd_gus_card_t * gus, unsigned int what); | 604 | void snd_gf1_set_default_handlers(struct snd_gus_card * gus, unsigned int what); |
606 | void snd_gf1_smart_stop_voice(snd_gus_card_t * gus, unsigned short voice); | 605 | void snd_gf1_smart_stop_voice(struct snd_gus_card * gus, unsigned short voice); |
607 | void snd_gf1_stop_voice(snd_gus_card_t * gus, unsigned short voice); | 606 | void snd_gf1_stop_voice(struct snd_gus_card * gus, unsigned short voice); |
608 | void snd_gf1_stop_voices(snd_gus_card_t * gus, unsigned short v_min, unsigned short v_max); | 607 | void snd_gf1_stop_voices(struct snd_gus_card * gus, unsigned short v_min, unsigned short v_max); |
609 | snd_gus_voice_t *snd_gf1_alloc_voice(snd_gus_card_t * gus, int type, int client, int port); | 608 | struct snd_gus_voice *snd_gf1_alloc_voice(struct snd_gus_card * gus, int type, int client, int port); |
610 | void snd_gf1_free_voice(snd_gus_card_t * gus, snd_gus_voice_t *voice); | 609 | void snd_gf1_free_voice(struct snd_gus_card * gus, struct snd_gus_voice *voice); |
611 | int snd_gf1_start(snd_gus_card_t * gus); | 610 | int snd_gf1_start(struct snd_gus_card * gus); |
612 | int snd_gf1_stop(snd_gus_card_t * gus); | 611 | int snd_gf1_stop(struct snd_gus_card * gus); |
613 | 612 | ||
614 | /* gus_mixer.c */ | 613 | /* gus_mixer.c */ |
615 | 614 | ||
616 | int snd_gf1_new_mixer(snd_gus_card_t * gus); | 615 | int snd_gf1_new_mixer(struct snd_gus_card * gus); |
617 | 616 | ||
618 | /* gus_pcm.c */ | 617 | /* gus_pcm.c */ |
619 | 618 | ||
620 | int snd_gf1_pcm_new(snd_gus_card_t * gus, int pcm_dev, int control_index, snd_pcm_t ** rpcm); | 619 | int snd_gf1_pcm_new(struct snd_gus_card * gus, int pcm_dev, int control_index, struct snd_pcm ** rpcm); |
621 | 620 | ||
622 | #ifdef CONFIG_SND_DEBUG | 621 | #ifdef CONFIG_SND_DEBUG |
623 | extern void snd_gf1_print_voice_registers(snd_gus_card_t * gus); | 622 | extern void snd_gf1_print_voice_registers(struct snd_gus_card * gus); |
624 | #endif | 623 | #endif |
625 | 624 | ||
626 | /* gus.c */ | 625 | /* gus.c */ |
627 | 626 | ||
628 | int snd_gus_use_inc(snd_gus_card_t * gus); | 627 | int snd_gus_use_inc(struct snd_gus_card * gus); |
629 | void snd_gus_use_dec(snd_gus_card_t * gus); | 628 | void snd_gus_use_dec(struct snd_gus_card * gus); |
630 | int snd_gus_create(snd_card_t * card, | 629 | int snd_gus_create(struct snd_card *card, |
631 | unsigned long port, | 630 | unsigned long port, |
632 | int irq, int dma1, int dma2, | 631 | int irq, int dma1, int dma2, |
633 | int timer_dev, | 632 | int timer_dev, |
634 | int voices, | 633 | int voices, |
635 | int pcm_channels, | 634 | int pcm_channels, |
636 | int effect, | 635 | int effect, |
637 | snd_gus_card_t ** rgus); | 636 | struct snd_gus_card ** rgus); |
638 | int snd_gus_initialize(snd_gus_card_t * gus); | 637 | int snd_gus_initialize(struct snd_gus_card * gus); |
639 | 638 | ||
640 | /* gus_irq.c */ | 639 | /* gus_irq.c */ |
641 | 640 | ||
642 | irqreturn_t snd_gus_interrupt(int irq, void *dev_id, struct pt_regs *regs); | 641 | irqreturn_t snd_gus_interrupt(int irq, void *dev_id, struct pt_regs *regs); |
643 | #ifdef CONFIG_SND_DEBUG | 642 | #ifdef CONFIG_SND_DEBUG |
644 | void snd_gus_irq_profile_init(snd_gus_card_t *gus); | 643 | void snd_gus_irq_profile_init(struct snd_gus_card *gus); |
645 | #endif | 644 | #endif |
646 | 645 | ||
647 | /* gus_uart.c */ | 646 | /* gus_uart.c */ |
648 | 647 | ||
649 | int snd_gf1_rawmidi_new(snd_gus_card_t * gus, int device, snd_rawmidi_t **rrawmidi); | 648 | int snd_gf1_rawmidi_new(struct snd_gus_card * gus, int device, struct snd_rawmidi **rrawmidi); |
650 | 649 | ||
651 | #if 0 | 650 | #if 0 |
652 | extern void snd_engine_instrument_register(unsigned short mode, | 651 | extern void snd_engine_instrument_register(unsigned short mode, |
@@ -657,37 +656,37 @@ extern int snd_engine_instrument_register_ask(unsigned short mode); | |||
657 | #endif | 656 | #endif |
658 | 657 | ||
659 | /* gus_dram.c */ | 658 | /* gus_dram.c */ |
660 | int snd_gus_dram_write(snd_gus_card_t *gus, char __user *ptr, | 659 | int snd_gus_dram_write(struct snd_gus_card *gus, char __user *ptr, |
661 | unsigned int addr, unsigned int size); | 660 | unsigned int addr, unsigned int size); |
662 | int snd_gus_dram_read(snd_gus_card_t *gus, char __user *ptr, | 661 | int snd_gus_dram_read(struct snd_gus_card *gus, char __user *ptr, |
663 | unsigned int addr, unsigned int size, int rom); | 662 | unsigned int addr, unsigned int size, int rom); |
664 | 663 | ||
665 | #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) | 664 | #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) |
666 | 665 | ||
667 | /* gus_sample.c */ | 666 | /* gus_sample.c */ |
668 | void snd_gus_sample_event(snd_seq_event_t *ev, snd_gus_port_t *p); | 667 | void snd_gus_sample_event(struct snd_seq_event *ev, struct snd_gus_port *p); |
669 | 668 | ||
670 | /* gus_simple.c */ | 669 | /* gus_simple.c */ |
671 | void snd_gf1_simple_init(snd_gus_voice_t *voice); | 670 | void snd_gf1_simple_init(struct snd_gus_voice *voice); |
672 | 671 | ||
673 | /* gus_instr.c */ | 672 | /* gus_instr.c */ |
674 | int snd_gus_iwffff_put_sample(void *private_data, iwffff_wave_t *wave, | 673 | int snd_gus_iwffff_put_sample(void *private_data, struct iwffff_wave *wave, |
675 | char __user *data, long len, int atomic); | 674 | char __user *data, long len, int atomic); |
676 | int snd_gus_iwffff_get_sample(void *private_data, iwffff_wave_t *wave, | 675 | int snd_gus_iwffff_get_sample(void *private_data, struct iwffff_wave *wave, |
677 | char __user *data, long len, int atomic); | 676 | char __user *data, long len, int atomic); |
678 | int snd_gus_iwffff_remove_sample(void *private_data, iwffff_wave_t *wave, | 677 | int snd_gus_iwffff_remove_sample(void *private_data, struct iwffff_wave *wave, |
679 | int atomic); | 678 | int atomic); |
680 | int snd_gus_gf1_put_sample(void *private_data, gf1_wave_t *wave, | 679 | int snd_gus_gf1_put_sample(void *private_data, struct gf1_wave *wave, |
681 | char __user *data, long len, int atomic); | 680 | char __user *data, long len, int atomic); |
682 | int snd_gus_gf1_get_sample(void *private_data, gf1_wave_t *wave, | 681 | int snd_gus_gf1_get_sample(void *private_data, struct gf1_wave *wave, |
683 | char __user *data, long len, int atomic); | 682 | char __user *data, long len, int atomic); |
684 | int snd_gus_gf1_remove_sample(void *private_data, gf1_wave_t *wave, | 683 | int snd_gus_gf1_remove_sample(void *private_data, struct gf1_wave *wave, |
685 | int atomic); | 684 | int atomic); |
686 | int snd_gus_simple_put_sample(void *private_data, simple_instrument_t *instr, | 685 | int snd_gus_simple_put_sample(void *private_data, struct simple_instrument *instr, |
687 | char __user *data, long len, int atomic); | 686 | char __user *data, long len, int atomic); |
688 | int snd_gus_simple_get_sample(void *private_data, simple_instrument_t *instr, | 687 | int snd_gus_simple_get_sample(void *private_data, struct simple_instrument *instr, |
689 | char __user *data, long len, int atomic); | 688 | char __user *data, long len, int atomic); |
690 | int snd_gus_simple_remove_sample(void *private_data, simple_instrument_t *instr, | 689 | int snd_gus_simple_remove_sample(void *private_data, struct simple_instrument *instr, |
691 | int atomic); | 690 | int atomic); |
692 | 691 | ||
693 | #endif /* CONFIG_SND_SEQUENCER */ | 692 | #endif /* CONFIG_SND_SEQUENCER */ |