aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/trident/trident_synth.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/trident/trident_synth.c')
-rw-r--r--sound/pci/trident/trident_synth.c159
1 files changed, 81 insertions, 78 deletions
diff --git a/sound/pci/trident/trident_synth.c b/sound/pci/trident/trident_synth.c
index 5d5a719b0585..a49682ef3e3e 100644
--- a/sound/pci/trident/trident_synth.c
+++ b/sound/pci/trident/trident_synth.c
@@ -192,15 +192,15 @@ static unsigned short log_from_linear( unsigned short value )
192 * Sample handling operations 192 * Sample handling operations
193 */ 193 */
194 194
195static void sample_start(trident_t * trident, snd_trident_voice_t * voice, snd_seq_position_t position); 195static void sample_start(struct snd_trident * trident, struct snd_trident_voice * voice, snd_seq_position_t position);
196static void sample_stop(trident_t * trident, snd_trident_voice_t * voice, snd_seq_stop_mode_t mode); 196static void sample_stop(struct snd_trident * trident, struct snd_trident_voice * voice, int mode);
197static void sample_freq(trident_t * trident, snd_trident_voice_t * voice, snd_seq_frequency_t freq); 197static void sample_freq(struct snd_trident * trident, struct snd_trident_voice * voice, snd_seq_frequency_t freq);
198static void sample_volume(trident_t * trident, snd_trident_voice_t * voice, snd_seq_ev_volume_t * volume); 198static void sample_volume(struct snd_trident * trident, struct snd_trident_voice * voice, struct snd_seq_ev_volume * volume);
199static void sample_loop(trident_t * trident, snd_trident_voice_t * voice, snd_seq_ev_loop_t * loop); 199static void sample_loop(struct snd_trident * trident, struct snd_trident_voice * voice, struct snd_seq_ev_loop * loop);
200static void sample_pos(trident_t * trident, snd_trident_voice_t * voice, snd_seq_position_t position); 200static void sample_pos(struct snd_trident * trident, struct snd_trident_voice * voice, snd_seq_position_t position);
201static void sample_private1(trident_t * trident, snd_trident_voice_t * voice, unsigned char *data); 201static void sample_private1(struct snd_trident * trident, struct snd_trident_voice * voice, unsigned char *data);
202 202
203static snd_trident_sample_ops_t sample_ops = 203static struct snd_trident_sample_ops sample_ops =
204{ 204{
205 sample_start, 205 sample_start,
206 sample_stop, 206 sample_stop,
@@ -211,7 +211,7 @@ static snd_trident_sample_ops_t sample_ops =
211 sample_private1 211 sample_private1
212}; 212};
213 213
214static void snd_trident_simple_init(snd_trident_voice_t * voice) 214static void snd_trident_simple_init(struct snd_trident_voice * voice)
215{ 215{
216 //voice->handler_wave = interrupt_wave; 216 //voice->handler_wave = interrupt_wave;
217 //voice->handler_volume = interrupt_volume; 217 //voice->handler_volume = interrupt_volume;
@@ -220,10 +220,10 @@ static void snd_trident_simple_init(snd_trident_voice_t * voice)
220 voice->sample_ops = &sample_ops; 220 voice->sample_ops = &sample_ops;
221} 221}
222 222
223static void sample_start(trident_t * trident, snd_trident_voice_t * voice, snd_seq_position_t position) 223static void sample_start(struct snd_trident * trident, struct snd_trident_voice * voice, snd_seq_position_t position)
224{ 224{
225 simple_instrument_t *simple; 225 struct simple_instrument *simple;
226 snd_seq_kinstr_t *instr; 226 struct snd_seq_kinstr *instr;
227 unsigned long flags; 227 unsigned long flags;
228 unsigned int loop_start, loop_end, sample_start, sample_end, start_offset; 228 unsigned int loop_start, loop_end, sample_start, sample_end, start_offset;
229 unsigned int value; 229 unsigned int value;
@@ -305,7 +305,7 @@ static void sample_start(trident_t * trident, snd_trident_voice_t * voice, snd_s
305 snd_seq_instr_free_use(trident->synth.ilist, instr); 305 snd_seq_instr_free_use(trident->synth.ilist, instr);
306} 306}
307 307
308static void sample_stop(trident_t * trident, snd_trident_voice_t * voice, snd_seq_stop_mode_t mode) 308static void sample_stop(struct snd_trident * trident, struct snd_trident_voice * voice, int mode)
309{ 309{
310 unsigned long flags; 310 unsigned long flags;
311 311
@@ -329,7 +329,7 @@ static void sample_stop(trident_t * trident, snd_trident_voice_t * voice, snd_se
329 } 329 }
330} 330}
331 331
332static void sample_freq(trident_t * trident, snd_trident_voice_t * voice, snd_seq_frequency_t freq) 332static void sample_freq(struct snd_trident * trident, struct snd_trident_voice * voice, snd_seq_frequency_t freq)
333{ 333{
334 unsigned long flags; 334 unsigned long flags;
335 freq >>= 4; 335 freq >>= 4;
@@ -355,7 +355,7 @@ static void sample_freq(trident_t * trident, snd_trident_voice_t * voice, snd_se
355 spin_unlock_irqrestore(&trident->reg_lock, flags); 355 spin_unlock_irqrestore(&trident->reg_lock, flags);
356} 356}
357 357
358static void sample_volume(trident_t * trident, snd_trident_voice_t * voice, snd_seq_ev_volume_t * volume) 358static void sample_volume(struct snd_trident * trident, struct snd_trident_voice * voice, struct snd_seq_ev_volume * volume)
359{ 359{
360 unsigned long flags; 360 unsigned long flags;
361 unsigned short value; 361 unsigned short value;
@@ -407,11 +407,11 @@ static void sample_volume(trident_t * trident, snd_trident_voice_t * voice, snd_
407 spin_unlock_irqrestore(&trident->reg_lock, flags); 407 spin_unlock_irqrestore(&trident->reg_lock, flags);
408} 408}
409 409
410static void sample_loop(trident_t * trident, snd_trident_voice_t * voice, snd_seq_ev_loop_t * loop) 410static void sample_loop(struct snd_trident * trident, struct snd_trident_voice * voice, struct snd_seq_ev_loop * loop)
411{ 411{
412 unsigned long flags; 412 unsigned long flags;
413 simple_instrument_t *simple; 413 struct simple_instrument *simple;
414 snd_seq_kinstr_t *instr; 414 struct snd_seq_kinstr *instr;
415 unsigned int loop_start, loop_end; 415 unsigned int loop_start, loop_end;
416 416
417 instr = snd_seq_instr_find(trident->synth.ilist, &voice->instr, 0, 1); 417 instr = snd_seq_instr_find(trident->synth.ilist, &voice->instr, 0, 1);
@@ -446,11 +446,11 @@ static void sample_loop(trident_t * trident, snd_trident_voice_t * voice, snd_se
446 snd_seq_instr_free_use(trident->synth.ilist, instr); 446 snd_seq_instr_free_use(trident->synth.ilist, instr);
447} 447}
448 448
449static void sample_pos(trident_t * trident, snd_trident_voice_t * voice, snd_seq_position_t position) 449static void sample_pos(struct snd_trident * trident, struct snd_trident_voice * voice, snd_seq_position_t position)
450{ 450{
451 unsigned long flags; 451 unsigned long flags;
452 simple_instrument_t *simple; 452 struct simple_instrument *simple;
453 snd_seq_kinstr_t *instr; 453 struct snd_seq_kinstr *instr;
454 unsigned int value; 454 unsigned int value;
455 455
456 instr = snd_seq_instr_find(trident->synth.ilist, &voice->instr, 0, 1); 456 instr = snd_seq_instr_find(trident->synth.ilist, &voice->instr, 0, 1);
@@ -496,7 +496,7 @@ static void sample_pos(trident_t * trident, snd_trident_voice_t * voice, snd_seq
496 snd_seq_instr_free_use(trident->synth.ilist, instr); 496 snd_seq_instr_free_use(trident->synth.ilist, instr);
497} 497}
498 498
499static void sample_private1(trident_t * trident, snd_trident_voice_t * voice, unsigned char *data) 499static void sample_private1(struct snd_trident * trident, struct snd_trident_voice * voice, unsigned char *data)
500{ 500{
501} 501}
502 502
@@ -504,10 +504,11 @@ static void sample_private1(trident_t * trident, snd_trident_voice_t * voice, un
504 * Memory management / sample loading 504 * Memory management / sample loading
505 */ 505 */
506 506
507static int snd_trident_simple_put_sample(void *private_data, simple_instrument_t * instr, 507static int snd_trident_simple_put_sample(void *private_data,
508 struct simple_instrument * instr,
508 char __user *data, long len, int atomic) 509 char __user *data, long len, int atomic)
509{ 510{
510 trident_t *trident = private_data; 511 struct snd_trident *trident = private_data;
511 int size = instr->size; 512 int size = instr->size;
512 int shift = 0; 513 int shift = 0;
513 514
@@ -529,7 +530,7 @@ static int snd_trident_simple_put_sample(void *private_data, simple_instrument_t
529 return -EFAULT; 530 return -EFAULT;
530 531
531 if (trident->tlb.entries) { 532 if (trident->tlb.entries) {
532 snd_util_memblk_t *memblk; 533 struct snd_util_memblk *memblk;
533 memblk = snd_trident_synth_alloc(trident, size); 534 memblk = snd_trident_synth_alloc(trident, size);
534 if (memblk == NULL) 535 if (memblk == NULL)
535 return -ENOMEM; 536 return -ENOMEM;
@@ -557,10 +558,11 @@ static int snd_trident_simple_put_sample(void *private_data, simple_instrument_t
557 return 0; 558 return 0;
558} 559}
559 560
560static int snd_trident_simple_get_sample(void *private_data, simple_instrument_t * instr, 561static int snd_trident_simple_get_sample(void *private_data,
562 struct simple_instrument * instr,
561 char __user *data, long len, int atomic) 563 char __user *data, long len, int atomic)
562{ 564{
563 //trident_t *trident = private_data; 565 //struct snd_trident *trident = private_data;
564 int size = instr->size; 566 int size = instr->size;
565 int shift = 0; 567 int shift = 0;
566 568
@@ -578,10 +580,11 @@ static int snd_trident_simple_get_sample(void *private_data, simple_instrument_t
578 return -EBUSY; 580 return -EBUSY;
579} 581}
580 582
581static int snd_trident_simple_remove_sample(void *private_data, simple_instrument_t * instr, 583static int snd_trident_simple_remove_sample(void *private_data,
584 struct simple_instrument * instr,
582 int atomic) 585 int atomic)
583{ 586{
584 trident_t *trident = private_data; 587 struct snd_trident *trident = private_data;
585 int size = instr->size; 588 int size = instr->size;
586 589
587 if (instr->format & SIMPLE_WAVE_16BIT) 590 if (instr->format & SIMPLE_WAVE_16BIT)
@@ -590,7 +593,7 @@ static int snd_trident_simple_remove_sample(void *private_data, simple_instrumen
590 size <<= 1; 593 size <<= 1;
591 594
592 if (trident->tlb.entries) { 595 if (trident->tlb.entries) {
593 snd_util_memblk_t *memblk = (snd_util_memblk_t*)instr->address.ptr; 596 struct snd_util_memblk *memblk = (struct snd_util_memblk *)instr->address.ptr;
594 if (memblk) 597 if (memblk)
595 snd_trident_synth_free(trident, memblk); 598 snd_trident_synth_free(trident, memblk);
596 else 599 else
@@ -612,9 +615,9 @@ static int snd_trident_simple_remove_sample(void *private_data, simple_instrumen
612 return 0; 615 return 0;
613} 616}
614 617
615static void select_instrument(trident_t * trident, snd_trident_voice_t * v) 618static void select_instrument(struct snd_trident * trident, struct snd_trident_voice * v)
616{ 619{
617 snd_seq_kinstr_t *instr; 620 struct snd_seq_kinstr *instr;
618 instr = snd_seq_instr_find(trident->synth.ilist, &v->instr, 0, 1); 621 instr = snd_seq_instr_find(trident->synth.ilist, &v->instr, 0, 1);
619 if (instr != NULL) { 622 if (instr != NULL) {
620 if (instr->ops) { 623 if (instr->ops) {
@@ -629,7 +632,7 @@ static void select_instrument(trident_t * trident, snd_trident_voice_t * v)
629 632
630 */ 633 */
631 634
632static void event_sample(snd_seq_event_t * ev, snd_trident_port_t * p, snd_trident_voice_t * v) 635static void event_sample(struct snd_seq_event * ev, struct snd_trident_port * p, struct snd_trident_voice * v)
633{ 636{
634 if (v->sample_ops && v->sample_ops->sample_stop) 637 if (v->sample_ops && v->sample_ops->sample_stop)
635 v->sample_ops->sample_stop(p->trident, v, SAMPLE_STOP_IMMEDIATELY); 638 v->sample_ops->sample_stop(p->trident, v, SAMPLE_STOP_IMMEDIATELY);
@@ -643,7 +646,7 @@ static void event_sample(snd_seq_event_t * ev, snd_trident_port_t * p, snd_tride
643 select_instrument(p->trident, v); 646 select_instrument(p->trident, v);
644} 647}
645 648
646static void event_cluster(snd_seq_event_t * ev, snd_trident_port_t * p, snd_trident_voice_t * v) 649static void event_cluster(struct snd_seq_event * ev, struct snd_trident_port * p, struct snd_trident_voice * v)
647{ 650{
648 if (v->sample_ops && v->sample_ops->sample_stop) 651 if (v->sample_ops && v->sample_ops->sample_stop)
649 v->sample_ops->sample_stop(p->trident, v, SAMPLE_STOP_IMMEDIATELY); 652 v->sample_ops->sample_stop(p->trident, v, SAMPLE_STOP_IMMEDIATELY);
@@ -651,49 +654,49 @@ static void event_cluster(snd_seq_event_t * ev, snd_trident_port_t * p, snd_trid
651 select_instrument(p->trident, v); 654 select_instrument(p->trident, v);
652} 655}
653 656
654static void event_start(snd_seq_event_t * ev, snd_trident_port_t * p, snd_trident_voice_t * v) 657static void event_start(struct snd_seq_event * ev, struct snd_trident_port * p, struct snd_trident_voice * v)
655{ 658{
656 if (v->sample_ops && v->sample_ops->sample_start) 659 if (v->sample_ops && v->sample_ops->sample_start)
657 v->sample_ops->sample_start(p->trident, v, ev->data.sample.param.position); 660 v->sample_ops->sample_start(p->trident, v, ev->data.sample.param.position);
658} 661}
659 662
660static void event_stop(snd_seq_event_t * ev, snd_trident_port_t * p, snd_trident_voice_t * v) 663static void event_stop(struct snd_seq_event * ev, struct snd_trident_port * p, struct snd_trident_voice * v)
661{ 664{
662 if (v->sample_ops && v->sample_ops->sample_stop) 665 if (v->sample_ops && v->sample_ops->sample_stop)
663 v->sample_ops->sample_stop(p->trident, v, ev->data.sample.param.stop_mode); 666 v->sample_ops->sample_stop(p->trident, v, ev->data.sample.param.stop_mode);
664} 667}
665 668
666static void event_freq(snd_seq_event_t * ev, snd_trident_port_t * p, snd_trident_voice_t * v) 669static void event_freq(struct snd_seq_event * ev, struct snd_trident_port * p, struct snd_trident_voice * v)
667{ 670{
668 if (v->sample_ops && v->sample_ops->sample_freq) 671 if (v->sample_ops && v->sample_ops->sample_freq)
669 v->sample_ops->sample_freq(p->trident, v, ev->data.sample.param.frequency); 672 v->sample_ops->sample_freq(p->trident, v, ev->data.sample.param.frequency);
670} 673}
671 674
672static void event_volume(snd_seq_event_t * ev, snd_trident_port_t * p, snd_trident_voice_t * v) 675static void event_volume(struct snd_seq_event * ev, struct snd_trident_port * p, struct snd_trident_voice * v)
673{ 676{
674 if (v->sample_ops && v->sample_ops->sample_volume) 677 if (v->sample_ops && v->sample_ops->sample_volume)
675 v->sample_ops->sample_volume(p->trident, v, &ev->data.sample.param.volume); 678 v->sample_ops->sample_volume(p->trident, v, &ev->data.sample.param.volume);
676} 679}
677 680
678static void event_loop(snd_seq_event_t * ev, snd_trident_port_t * p, snd_trident_voice_t * v) 681static void event_loop(struct snd_seq_event * ev, struct snd_trident_port * p, struct snd_trident_voice * v)
679{ 682{
680 if (v->sample_ops && v->sample_ops->sample_loop) 683 if (v->sample_ops && v->sample_ops->sample_loop)
681 v->sample_ops->sample_loop(p->trident, v, &ev->data.sample.param.loop); 684 v->sample_ops->sample_loop(p->trident, v, &ev->data.sample.param.loop);
682} 685}
683 686
684static void event_position(snd_seq_event_t * ev, snd_trident_port_t * p, snd_trident_voice_t * v) 687static void event_position(struct snd_seq_event * ev, struct snd_trident_port * p, struct snd_trident_voice * v)
685{ 688{
686 if (v->sample_ops && v->sample_ops->sample_pos) 689 if (v->sample_ops && v->sample_ops->sample_pos)
687 v->sample_ops->sample_pos(p->trident, v, ev->data.sample.param.position); 690 v->sample_ops->sample_pos(p->trident, v, ev->data.sample.param.position);
688} 691}
689 692
690static void event_private1(snd_seq_event_t * ev, snd_trident_port_t * p, snd_trident_voice_t * v) 693static void event_private1(struct snd_seq_event * ev, struct snd_trident_port * p, struct snd_trident_voice * v)
691{ 694{
692 if (v->sample_ops && v->sample_ops->sample_private1) 695 if (v->sample_ops && v->sample_ops->sample_private1)
693 v->sample_ops->sample_private1(p->trident, v, (unsigned char *) &ev->data.sample.param.raw8); 696 v->sample_ops->sample_private1(p->trident, v, (unsigned char *) &ev->data.sample.param.raw8);
694} 697}
695 698
696typedef void (trident_sample_event_handler_t) (snd_seq_event_t * ev, snd_trident_port_t * p, snd_trident_voice_t * v); 699typedef void (trident_sample_event_handler_t) (struct snd_seq_event * ev, struct snd_trident_port * p, struct snd_trident_voice * v);
697 700
698static trident_sample_event_handler_t *trident_sample_event_handlers[9] = 701static trident_sample_event_handler_t *trident_sample_event_handlers[9] =
699{ 702{
@@ -708,11 +711,11 @@ static trident_sample_event_handler_t *trident_sample_event_handlers[9] =
708 event_private1 711 event_private1
709}; 712};
710 713
711static void snd_trident_sample_event(snd_seq_event_t * ev, snd_trident_port_t * p) 714static void snd_trident_sample_event(struct snd_seq_event * ev, struct snd_trident_port * p)
712{ 715{
713 int idx, voice; 716 int idx, voice;
714 trident_t *trident = p->trident; 717 struct snd_trident *trident = p->trident;
715 snd_trident_voice_t *v; 718 struct snd_trident_voice *v;
716 unsigned long flags; 719 unsigned long flags;
717 720
718 idx = ev->type - SNDRV_SEQ_EVENT_SAMPLE; 721 idx = ev->type - SNDRV_SEQ_EVENT_SAMPLE;
@@ -735,10 +738,10 @@ static void snd_trident_sample_event(snd_seq_event_t * ev, snd_trident_port_t *
735 738
736 */ 739 */
737 740
738static void snd_trident_synth_free_voices(trident_t * trident, int client, int port) 741static void snd_trident_synth_free_voices(struct snd_trident * trident, int client, int port)
739{ 742{
740 int idx; 743 int idx;
741 snd_trident_voice_t *voice; 744 struct snd_trident_voice *voice;
742 745
743 for (idx = 0; idx < 32; idx++) { 746 for (idx = 0; idx < 32; idx++) {
744 voice = &trident->synth.voices[idx]; 747 voice = &trident->synth.voices[idx];
@@ -747,11 +750,11 @@ static void snd_trident_synth_free_voices(trident_t * trident, int client, int p
747 } 750 }
748} 751}
749 752
750static int snd_trident_synth_use(void *private_data, snd_seq_port_subscribe_t * info) 753static int snd_trident_synth_use(void *private_data, struct snd_seq_port_subscribe * info)
751{ 754{
752 snd_trident_port_t *port = (snd_trident_port_t *) private_data; 755 struct snd_trident_port *port = private_data;
753 trident_t *trident = port->trident; 756 struct snd_trident *trident = port->trident;
754 snd_trident_voice_t *voice; 757 struct snd_trident_voice *voice;
755 unsigned int idx; 758 unsigned int idx;
756 unsigned long flags; 759 unsigned long flags;
757 760
@@ -786,10 +789,10 @@ static int snd_trident_synth_use(void *private_data, snd_seq_port_subscribe_t *
786 return 0; 789 return 0;
787} 790}
788 791
789static int snd_trident_synth_unuse(void *private_data, snd_seq_port_subscribe_t * info) 792static int snd_trident_synth_unuse(void *private_data, struct snd_seq_port_subscribe * info)
790{ 793{
791 snd_trident_port_t *port = (snd_trident_port_t *) private_data; 794 struct snd_trident_port *port = private_data;
792 trident_t *trident = port->trident; 795 struct snd_trident *trident = port->trident;
793 unsigned long flags; 796 unsigned long flags;
794 797
795 spin_lock_irqsave(&trident->reg_lock, flags); 798 spin_lock_irqsave(&trident->reg_lock, flags);
@@ -802,18 +805,18 @@ static int snd_trident_synth_unuse(void *private_data, snd_seq_port_subscribe_t
802 805
803 */ 806 */
804 807
805static void snd_trident_synth_free_private_instruments(snd_trident_port_t * p, int client) 808static void snd_trident_synth_free_private_instruments(struct snd_trident_port * p, int client)
806{ 809{
807 snd_seq_instr_header_t ifree; 810 struct snd_seq_instr_header ifree;
808 811
809 memset(&ifree, 0, sizeof(ifree)); 812 memset(&ifree, 0, sizeof(ifree));
810 ifree.cmd = SNDRV_SEQ_INSTR_FREE_CMD_PRIVATE; 813 ifree.cmd = SNDRV_SEQ_INSTR_FREE_CMD_PRIVATE;
811 snd_seq_instr_list_free_cond(p->trident->synth.ilist, &ifree, client, 0); 814 snd_seq_instr_list_free_cond(p->trident->synth.ilist, &ifree, client, 0);
812} 815}
813 816
814static int snd_trident_synth_event_input(snd_seq_event_t * ev, int direct, void *private_data, int atomic, int hop) 817static int snd_trident_synth_event_input(struct snd_seq_event * ev, int direct, void *private_data, int atomic, int hop)
815{ 818{
816 snd_trident_port_t *p = (snd_trident_port_t *) private_data; 819 struct snd_trident_port *p = (struct snd_trident_port *) private_data;
817 820
818 if (p == NULL) 821 if (p == NULL)
819 return -EINVAL; 822 return -EINVAL;
@@ -841,12 +844,12 @@ static int snd_trident_synth_event_input(snd_seq_event_t * ev, int direct, void
841} 844}
842 845
843static void snd_trident_synth_instr_notify(void *private_data, 846static void snd_trident_synth_instr_notify(void *private_data,
844 snd_seq_kinstr_t * instr, 847 struct snd_seq_kinstr * instr,
845 int what) 848 int what)
846{ 849{
847 int idx; 850 int idx;
848 trident_t *trident = private_data; 851 struct snd_trident *trident = private_data;
849 snd_trident_voice_t *pvoice; 852 struct snd_trident_voice *pvoice;
850 unsigned long flags; 853 unsigned long flags;
851 854
852 spin_lock_irqsave(&trident->event_lock, flags); 855 spin_lock_irqsave(&trident->event_lock, flags);
@@ -870,16 +873,16 @@ static void snd_trident_synth_instr_notify(void *private_data,
870 873
871static void snd_trident_synth_free_port(void *private_data) 874static void snd_trident_synth_free_port(void *private_data)
872{ 875{
873 snd_trident_port_t *p = (snd_trident_port_t *) private_data; 876 struct snd_trident_port *p = (struct snd_trident_port *) private_data;
874 877
875 if (p) 878 if (p)
876 snd_midi_channel_free_set(p->chset); 879 snd_midi_channel_free_set(p->chset);
877} 880}
878 881
879static int snd_trident_synth_create_port(trident_t * trident, int idx) 882static int snd_trident_synth_create_port(struct snd_trident * trident, int idx)
880{ 883{
881 snd_trident_port_t *p; 884 struct snd_trident_port *p;
882 snd_seq_port_callback_t callbacks; 885 struct snd_seq_port_callback callbacks;
883 char name[32]; 886 char name[32];
884 char *str; 887 char *str;
885 int result; 888 int result;
@@ -927,17 +930,17 @@ static int snd_trident_synth_create_port(trident_t * trident, int idx)
927 930
928 */ 931 */
929 932
930static int snd_trident_synth_new_device(snd_seq_device_t *dev) 933static int snd_trident_synth_new_device(struct snd_seq_device *dev)
931{ 934{
932 trident_t *trident; 935 struct snd_trident *trident;
933 int client, i; 936 int client, i;
934 snd_seq_client_callback_t callbacks; 937 struct snd_seq_client_callback callbacks;
935 snd_seq_client_info_t cinfo; 938 struct snd_seq_client_info cinfo;
936 snd_seq_port_subscribe_t sub; 939 struct snd_seq_port_subscribe sub;
937 snd_simple_ops_t *simpleops; 940 struct snd_simple_ops *simpleops;
938 char *str; 941 char *str;
939 942
940 trident = *(trident_t **)SNDRV_SEQ_DEVICE_ARGPTR(dev); 943 trident = *(struct snd_trident **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
941 if (trident == NULL) 944 if (trident == NULL)
942 return -EINVAL; 945 return -EINVAL;
943 946
@@ -993,11 +996,11 @@ static int snd_trident_synth_new_device(snd_seq_device_t *dev)
993 return 0; 996 return 0;
994} 997}
995 998
996static int snd_trident_synth_delete_device(snd_seq_device_t *dev) 999static int snd_trident_synth_delete_device(struct snd_seq_device *dev)
997{ 1000{
998 trident_t *trident; 1001 struct snd_trident *trident;
999 1002
1000 trident = *(trident_t **)SNDRV_SEQ_DEVICE_ARGPTR(dev); 1003 trident = *(struct snd_trident **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
1001 if (trident == NULL) 1004 if (trident == NULL)
1002 return -EINVAL; 1005 return -EINVAL;
1003 1006
@@ -1012,14 +1015,14 @@ static int snd_trident_synth_delete_device(snd_seq_device_t *dev)
1012 1015
1013static int __init alsa_trident_synth_init(void) 1016static int __init alsa_trident_synth_init(void)
1014{ 1017{
1015 static snd_seq_dev_ops_t ops = 1018 static struct snd_seq_dev_ops ops =
1016 { 1019 {
1017 snd_trident_synth_new_device, 1020 snd_trident_synth_new_device,
1018 snd_trident_synth_delete_device 1021 snd_trident_synth_delete_device
1019 }; 1022 };
1020 1023
1021 return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_TRIDENT, &ops, 1024 return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_TRIDENT, &ops,
1022 sizeof(trident_t*)); 1025 sizeof(struct snd_trident *));
1023} 1026}
1024 1027
1025static void __exit alsa_trident_synth_exit(void) 1028static void __exit alsa_trident_synth_exit(void)