aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/trident.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 08:53:15 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:18:56 -0500
commitbee1a5be8b6210a0a4e27e38d0f76847b0a014ae (patch)
treec8059b86095309e23b4fa61d576e96c722466ee6 /include/sound/trident.h
parentabfd67bd6fcc07b54d54e00a9105900f478323a6 (diff)
[ALSA] Remove xxx_t typedefs: PCI Trident
Modules: Trident driver Remove xxx_t typedefs from the PCI Trident driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound/trident.h')
-rw-r--r--include/sound/trident.h151
1 files changed, 77 insertions, 74 deletions
diff --git a/include/sound/trident.h b/include/sound/trident.h
index a408d3925050..2c54569fc606 100644
--- a/include/sound/trident.h
+++ b/include/sound/trident.h
@@ -253,43 +253,43 @@ enum serial_intf_ctrl_bits {
253#define T4D_DEFAULT_PCM_RVOL 127 /* 0 - 127 */ 253#define T4D_DEFAULT_PCM_RVOL 127 /* 0 - 127 */
254#define T4D_DEFAULT_PCM_CVOL 127 /* 0 - 127 */ 254#define T4D_DEFAULT_PCM_CVOL 127 /* 0 - 127 */
255 255
256typedef struct _snd_trident trident_t; 256struct snd_trident;
257typedef struct _snd_trident_voice snd_trident_voice_t; 257struct snd_trident_voice;
258typedef struct _snd_trident_pcm_mixer snd_trident_pcm_mixer_t; 258struct snd_trident_pcm_mixer;
259 259
260typedef struct { 260struct snd_trident_sample_ops {
261 void (*sample_start)(trident_t *gus, snd_trident_voice_t *voice, snd_seq_position_t position); 261 void (*sample_start)(struct snd_trident *gus, struct snd_trident_voice *voice, snd_seq_position_t position);
262 void (*sample_stop)(trident_t *gus, snd_trident_voice_t *voice, snd_seq_stop_mode_t mode); 262 void (*sample_stop)(struct snd_trident *gus, struct snd_trident_voice *voice, int mode);
263 void (*sample_freq)(trident_t *gus, snd_trident_voice_t *voice, snd_seq_frequency_t freq); 263 void (*sample_freq)(struct snd_trident *gus, struct snd_trident_voice *voice, snd_seq_frequency_t freq);
264 void (*sample_volume)(trident_t *gus, snd_trident_voice_t *voice, snd_seq_ev_volume_t *volume); 264 void (*sample_volume)(struct snd_trident *gus, struct snd_trident_voice *voice, struct snd_seq_ev_volume *volume);
265 void (*sample_loop)(trident_t *card, snd_trident_voice_t *voice, snd_seq_ev_loop_t *loop); 265 void (*sample_loop)(struct snd_trident *card, struct snd_trident_voice *voice, struct snd_seq_ev_loop *loop);
266 void (*sample_pos)(trident_t *card, snd_trident_voice_t *voice, snd_seq_position_t position); 266 void (*sample_pos)(struct snd_trident *card, struct snd_trident_voice *voice, snd_seq_position_t position);
267 void (*sample_private1)(trident_t *card, snd_trident_voice_t *voice, unsigned char *data); 267 void (*sample_private1)(struct snd_trident *card, struct snd_trident_voice *voice, unsigned char *data);
268} snd_trident_sample_ops_t; 268};
269 269
270typedef struct { 270struct snd_trident_port {
271 snd_midi_channel_set_t * chset; 271 struct snd_midi_channel_set * chset;
272 trident_t * trident; 272 struct snd_trident * trident;
273 int mode; /* operation mode */ 273 int mode; /* operation mode */
274 int client; /* sequencer client number */ 274 int client; /* sequencer client number */
275 int port; /* sequencer port number */ 275 int port; /* sequencer port number */
276 unsigned int midi_has_voices: 1; 276 unsigned int midi_has_voices: 1;
277} snd_trident_port_t; 277};
278 278
279typedef struct snd_trident_memblk_arg { 279struct snd_trident_memblk_arg {
280 short first_page, last_page; 280 short first_page, last_page;
281} snd_trident_memblk_arg_t; 281};
282 282
283typedef struct { 283struct snd_trident_tlb {
284 unsigned int * entries; /* 16k-aligned TLB table */ 284 unsigned int * entries; /* 16k-aligned TLB table */
285 dma_addr_t entries_dmaaddr; /* 16k-aligned PCI address to TLB table */ 285 dma_addr_t entries_dmaaddr; /* 16k-aligned PCI address to TLB table */
286 unsigned long * shadow_entries; /* shadow entries with virtual addresses */ 286 unsigned long * shadow_entries; /* shadow entries with virtual addresses */
287 struct snd_dma_buffer buffer; 287 struct snd_dma_buffer buffer;
288 snd_util_memhdr_t * memhdr; /* page allocation list */ 288 struct snd_util_memhdr * memhdr; /* page allocation list */
289 struct snd_dma_buffer silent_page; 289 struct snd_dma_buffer silent_page;
290} snd_trident_tlb_t; 290};
291 291
292struct _snd_trident_voice { 292struct snd_trident_voice {
293 unsigned int number; 293 unsigned int number;
294 unsigned int use: 1, 294 unsigned int use: 1,
295 pcm: 1, 295 pcm: 1,
@@ -300,8 +300,8 @@ struct _snd_trident_voice {
300 unsigned char port; 300 unsigned char port;
301 unsigned char index; 301 unsigned char index;
302 302
303 snd_seq_instr_t instr; 303 struct snd_seq_instr instr;
304 snd_trident_sample_ops_t *sample_ops; 304 struct snd_trident_sample_ops *sample_ops;
305 305
306 /* channel parameters */ 306 /* channel parameters */
307 unsigned int CSO; /* 24 bits (16 on DX) */ 307 unsigned int CSO; /* 24 bits (16 on DX) */
@@ -323,13 +323,13 @@ struct _snd_trident_voice {
323 323
324 unsigned int negCSO; /* nonzero - use negative CSO */ 324 unsigned int negCSO; /* nonzero - use negative CSO */
325 325
326 snd_util_memblk_t *memblk; /* memory block if TLB enabled */ 326 struct snd_util_memblk *memblk; /* memory block if TLB enabled */
327 327
328 /* PCM data */ 328 /* PCM data */
329 329
330 trident_t *trident; 330 struct snd_trident *trident;
331 snd_pcm_substream_t *substream; 331 struct snd_pcm_substream *substream;
332 snd_trident_voice_t *extra; /* extra PCM voice (acts as interrupt generator) */ 332 struct snd_trident_voice *extra; /* extra PCM voice (acts as interrupt generator) */
333 unsigned int running: 1, 333 unsigned int running: 1,
334 capture: 1, 334 capture: 1,
335 spdif: 1, 335 spdif: 1,
@@ -347,25 +347,25 @@ struct _snd_trident_voice {
347 /* --- */ 347 /* --- */
348 348
349 void *private_data; 349 void *private_data;
350 void (*private_free)(snd_trident_voice_t *voice); 350 void (*private_free)(struct snd_trident_voice *voice);
351}; 351};
352 352
353struct _snd_4dwave { 353struct snd_4dwave {
354 int seq_client; 354 int seq_client;
355 355
356 snd_trident_port_t seq_ports[4]; 356 struct snd_trident_port seq_ports[4];
357 snd_simple_ops_t simple_ops; 357 struct snd_simple_ops simple_ops;
358 snd_seq_kinstr_list_t *ilist; 358 struct snd_seq_kinstr_list *ilist;
359 359
360 snd_trident_voice_t voices[64]; 360 struct snd_trident_voice voices[64];
361 361
362 int ChanSynthCount; /* number of allocated synth channels */ 362 int ChanSynthCount; /* number of allocated synth channels */
363 int max_size; /* maximum synth memory size in bytes */ 363 int max_size; /* maximum synth memory size in bytes */
364 int current_size; /* current allocated synth mem in bytes */ 364 int current_size; /* current allocated synth mem in bytes */
365}; 365};
366 366
367struct _snd_trident_pcm_mixer { 367struct snd_trident_pcm_mixer {
368 snd_trident_voice_t *voice; /* active voice */ 368 struct snd_trident_voice *voice; /* active voice */
369 unsigned short vol; /* front volume */ 369 unsigned short vol; /* front volume */
370 unsigned char pan; /* pan control */ 370 unsigned char pan; /* pan control */
371 unsigned char rvol; /* rear volume */ 371 unsigned char rvol; /* rear volume */
@@ -373,7 +373,7 @@ struct _snd_trident_pcm_mixer {
373 unsigned char pad; 373 unsigned char pad;
374}; 374};
375 375
376struct _snd_trident { 376struct snd_trident {
377 int irq; 377 int irq;
378 378
379 unsigned int device; /* device ID */ 379 unsigned int device; /* device ID */
@@ -386,13 +386,13 @@ struct _snd_trident {
386 unsigned int spurious_irq_count; 386 unsigned int spurious_irq_count;
387 unsigned int spurious_irq_max_delta; 387 unsigned int spurious_irq_max_delta;
388 388
389 snd_trident_tlb_t tlb; /* TLB entries for NX cards */ 389 struct snd_trident_tlb tlb; /* TLB entries for NX cards */
390 390
391 unsigned char spdif_ctrl; 391 unsigned char spdif_ctrl;
392 unsigned char spdif_pcm_ctrl; 392 unsigned char spdif_pcm_ctrl;
393 unsigned int spdif_bits; 393 unsigned int spdif_bits;
394 unsigned int spdif_pcm_bits; 394 unsigned int spdif_pcm_bits;
395 snd_kcontrol_t *spdif_pcm_ctl; /* S/PDIF settings */ 395 struct snd_kcontrol *spdif_pcm_ctl; /* S/PDIF settings */
396 unsigned int ac97_ctrl; 396 unsigned int ac97_ctrl;
397 397
398 unsigned int ChanMap[2]; /* allocation map for hardware channels */ 398 unsigned int ChanMap[2]; /* allocation map for hardware channels */
@@ -403,7 +403,7 @@ struct _snd_trident {
403 unsigned int ac97_detect: 1; /* 1 = AC97 in detection phase */ 403 unsigned int ac97_detect: 1; /* 1 = AC97 in detection phase */
404 unsigned int in_suspend: 1; /* 1 during suspend/resume */ 404 unsigned int in_suspend: 1; /* 1 during suspend/resume */
405 405
406 struct _snd_4dwave synth; /* synth specific variables */ 406 struct snd_4dwave synth; /* synth specific variables */
407 407
408 spinlock_t event_lock; 408 spinlock_t event_lock;
409 spinlock_t voice_alloc; 409 spinlock_t voice_alloc;
@@ -411,52 +411,55 @@ struct _snd_trident {
411 struct snd_dma_device dma_dev; 411 struct snd_dma_device dma_dev;
412 412
413 struct pci_dev *pci; 413 struct pci_dev *pci;
414 snd_card_t *card; 414 struct snd_card *card;
415 snd_pcm_t *pcm; /* ADC/DAC PCM */ 415 struct snd_pcm *pcm; /* ADC/DAC PCM */
416 snd_pcm_t *foldback; /* Foldback PCM */ 416 struct snd_pcm *foldback; /* Foldback PCM */
417 snd_pcm_t *spdif; /* SPDIF PCM */ 417 struct snd_pcm *spdif; /* SPDIF PCM */
418 snd_rawmidi_t *rmidi; 418 struct snd_rawmidi *rmidi;
419 snd_seq_device_t *seq_dev; 419 struct snd_seq_device *seq_dev;
420 420
421 ac97_bus_t *ac97_bus; 421 struct snd_ac97_bus *ac97_bus;
422 ac97_t *ac97; 422 struct snd_ac97 *ac97;
423 ac97_t *ac97_sec; 423 struct snd_ac97 *ac97_sec;
424 424
425 unsigned int musicvol_wavevol; 425 unsigned int musicvol_wavevol;
426 snd_trident_pcm_mixer_t pcm_mixer[32]; 426 struct snd_trident_pcm_mixer pcm_mixer[32];
427 snd_kcontrol_t *ctl_vol; /* front volume */ 427 struct snd_kcontrol *ctl_vol; /* front volume */
428 snd_kcontrol_t *ctl_pan; /* pan */ 428 struct snd_kcontrol *ctl_pan; /* pan */
429 snd_kcontrol_t *ctl_rvol; /* rear volume */ 429 struct snd_kcontrol *ctl_rvol; /* rear volume */
430 snd_kcontrol_t *ctl_cvol; /* center volume */ 430 struct snd_kcontrol *ctl_cvol; /* center volume */
431 431
432 spinlock_t reg_lock; 432 spinlock_t reg_lock;
433 433
434 struct gameport *gameport; 434 struct gameport *gameport;
435}; 435};
436 436
437int snd_trident_create(snd_card_t * card, 437int snd_trident_create(struct snd_card *card,
438 struct pci_dev *pci, 438 struct pci_dev *pci,
439 int pcm_streams, 439 int pcm_streams,
440 int pcm_spdif_device, 440 int pcm_spdif_device,
441 int max_wavetable_size, 441 int max_wavetable_size,
442 trident_t ** rtrident); 442 struct snd_trident ** rtrident);
443int snd_trident_create_gameport(trident_t *trident); 443int snd_trident_create_gameport(struct snd_trident *trident);
444 444
445int snd_trident_pcm(trident_t * trident, int device, snd_pcm_t **rpcm); 445int snd_trident_pcm(struct snd_trident * trident, int device, struct snd_pcm **rpcm);
446int snd_trident_foldback_pcm(trident_t * trident, int device, snd_pcm_t **rpcm); 446int snd_trident_foldback_pcm(struct snd_trident * trident, int device, struct snd_pcm **rpcm);
447int snd_trident_spdif_pcm(trident_t * trident, int device, snd_pcm_t **rpcm); 447int snd_trident_spdif_pcm(struct snd_trident * trident, int device, struct snd_pcm **rpcm);
448int snd_trident_attach_synthesizer(trident_t * trident); 448int snd_trident_attach_synthesizer(struct snd_trident * trident);
449snd_trident_voice_t *snd_trident_alloc_voice(trident_t * trident, int type, int client, int port); 449struct snd_trident_voice *snd_trident_alloc_voice(struct snd_trident * trident, int type,
450void snd_trident_free_voice(trident_t * trident, snd_trident_voice_t *voice); 450 int client, int port);
451void snd_trident_start_voice(trident_t * trident, unsigned int voice); 451void snd_trident_free_voice(struct snd_trident * trident, struct snd_trident_voice *voice);
452void snd_trident_stop_voice(trident_t * trident, unsigned int voice); 452void snd_trident_start_voice(struct snd_trident * trident, unsigned int voice);
453void snd_trident_write_voice_regs(trident_t * trident, snd_trident_voice_t *voice); 453void snd_trident_stop_voice(struct snd_trident * trident, unsigned int voice);
454void snd_trident_write_voice_regs(struct snd_trident * trident, struct snd_trident_voice *voice);
454 455
455/* TLB memory allocation */ 456/* TLB memory allocation */
456snd_util_memblk_t *snd_trident_alloc_pages(trident_t *trident, snd_pcm_substream_t *substream); 457struct snd_util_memblk *snd_trident_alloc_pages(struct snd_trident *trident,
457int snd_trident_free_pages(trident_t *trident, snd_util_memblk_t *blk); 458 struct snd_pcm_substream *substream);
458snd_util_memblk_t *snd_trident_synth_alloc(trident_t *trident, unsigned int size); 459int snd_trident_free_pages(struct snd_trident *trident, struct snd_util_memblk *blk);
459int snd_trident_synth_free(trident_t *trident, snd_util_memblk_t *blk); 460struct snd_util_memblk *snd_trident_synth_alloc(struct snd_trident *trident, unsigned int size);
460int snd_trident_synth_copy_from_user(trident_t *trident, snd_util_memblk_t *blk, int offset, const char __user *data, int size); 461int snd_trident_synth_free(struct snd_trident *trident, struct snd_util_memblk *blk);
462int snd_trident_synth_copy_from_user(struct snd_trident *trident, struct snd_util_memblk *blk,
463 int offset, const char __user *data, int size);
461 464
462#endif /* __SOUND_TRIDENT_H */ 465#endif /* __SOUND_TRIDENT_H */