aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/sound/gus.h23
-rw-r--r--sound/isa/gus/gus_io.c14
-rw-r--r--sound/isa/gus/gus_main.c3
-rw-r--r--sound/isa/gus/gus_mem.c12
-rw-r--r--sound/isa/gus/gus_reset.c3
-rw-r--r--sound/isa/gus/gus_synth.c3
-rw-r--r--sound/isa/gus/gus_tables.h4
-rw-r--r--sound/isa/gus/gus_volume.c8
8 files changed, 33 insertions, 37 deletions
diff --git a/include/sound/gus.h b/include/sound/gus.h
index 8b6287a6fff5..b4b461ca173d 100644
--- a/include/sound/gus.h
+++ b/include/sound/gus.h
@@ -526,9 +526,6 @@ extern void snd_gf1_adlib_write(snd_gus_card_t * gus, unsigned char reg, unsigne
526extern void snd_gf1_dram_addr(snd_gus_card_t * gus, unsigned int addr); 526extern void snd_gf1_dram_addr(snd_gus_card_t * gus, unsigned int addr);
527extern void snd_gf1_poke(snd_gus_card_t * gus, unsigned int addr, unsigned char data); 527extern void snd_gf1_poke(snd_gus_card_t * gus, unsigned int addr, unsigned char data);
528extern unsigned char snd_gf1_peek(snd_gus_card_t * gus, unsigned int addr); 528extern unsigned char snd_gf1_peek(snd_gus_card_t * gus, unsigned int addr);
529extern void snd_gf1_pokew(snd_gus_card_t * gus, unsigned int addr, unsigned short data);
530extern unsigned short snd_gf1_peekw(snd_gus_card_t * gus, unsigned int addr);
531extern void snd_gf1_dram_setmem(snd_gus_card_t * gus, unsigned int addr, unsigned short value, unsigned int count);
532extern void snd_gf1_write_addr(snd_gus_card_t * gus, unsigned char reg, unsigned int addr, short w_16bit); 529extern void snd_gf1_write_addr(snd_gus_card_t * gus, unsigned char reg, unsigned int addr, short w_16bit);
533extern unsigned int snd_gf1_read_addr(snd_gus_card_t * gus, unsigned char reg, short w_16bit); 530extern unsigned int snd_gf1_read_addr(snd_gus_card_t * gus, unsigned char reg, short w_16bit);
534extern void snd_gf1_i_ctrl_stop(snd_gus_card_t * gus, unsigned char reg); 531extern void snd_gf1_i_ctrl_stop(snd_gus_card_t * gus, unsigned char reg);
@@ -544,9 +541,6 @@ extern inline unsigned short snd_gf1_i_read16(snd_gus_card_t * gus, unsigned cha
544{ 541{
545 return snd_gf1_i_look16(gus, reg | 0x80); 542 return snd_gf1_i_look16(gus, reg | 0x80);
546} 543}
547extern void snd_gf1_i_adlib_write(snd_gus_card_t * gus, unsigned char reg, unsigned char data);
548extern void snd_gf1_i_write_addr(snd_gus_card_t * gus, unsigned char reg, unsigned int addr, short w_16bit);
549extern unsigned int snd_gf1_i_read_addr(snd_gus_card_t * gus, unsigned char reg, short w_16bit);
550 544
551extern void snd_gf1_select_active_voices(snd_gus_card_t * gus); 545extern void snd_gf1_select_active_voices(snd_gus_card_t * gus);
552 546
@@ -580,10 +574,6 @@ extern void snd_gf1_lfo_command(snd_gus_card_t * gus, int voice, unsigned char *
580 574
581void snd_gf1_mem_lock(snd_gf1_mem_t * alloc, int xup); 575void snd_gf1_mem_lock(snd_gf1_mem_t * alloc, int xup);
582int snd_gf1_mem_xfree(snd_gf1_mem_t * alloc, snd_gf1_mem_block_t * block); 576int snd_gf1_mem_xfree(snd_gf1_mem_t * alloc, snd_gf1_mem_block_t * block);
583snd_gf1_mem_block_t *snd_gf1_mem_look(snd_gf1_mem_t * alloc,
584 unsigned int address);
585snd_gf1_mem_block_t *snd_gf1_mem_share(snd_gf1_mem_t * alloc,
586 unsigned int *share_id);
587snd_gf1_mem_block_t *snd_gf1_mem_alloc(snd_gf1_mem_t * alloc, int owner, 577snd_gf1_mem_block_t *snd_gf1_mem_alloc(snd_gf1_mem_t * alloc, int owner,
588 char *name, int size, int w_16, 578 char *name, int size, int w_16,
589 int align, unsigned int *share_id); 579 int align, unsigned int *share_id);
@@ -608,23 +598,13 @@ int snd_gf1_dma_transfer_block(snd_gus_card_t * gus,
608/* gus_volume.c */ 598/* gus_volume.c */
609 599
610unsigned short snd_gf1_lvol_to_gvol_raw(unsigned int vol); 600unsigned short snd_gf1_lvol_to_gvol_raw(unsigned int vol);
611unsigned int snd_gf1_gvol_to_lvol_raw(unsigned short gf1_vol);
612unsigned int snd_gf1_calc_ramp_rate(snd_gus_card_t * gus,
613 unsigned short start,
614 unsigned short end,
615 unsigned int us);
616unsigned short snd_gf1_translate_freq(snd_gus_card_t * gus, unsigned int freq2); 601unsigned short snd_gf1_translate_freq(snd_gus_card_t * gus, unsigned int freq2);
617unsigned short snd_gf1_compute_pitchbend(unsigned short pitchbend, unsigned short sens);
618unsigned short snd_gf1_compute_freq(unsigned int freq,
619 unsigned int rate,
620 unsigned short mix_rate);
621 602
622/* gus_reset.c */ 603/* gus_reset.c */
623 604
624void snd_gf1_set_default_handlers(snd_gus_card_t * gus, unsigned int what); 605void snd_gf1_set_default_handlers(snd_gus_card_t * gus, unsigned int what);
625void snd_gf1_smart_stop_voice(snd_gus_card_t * gus, unsigned short voice); 606void snd_gf1_smart_stop_voice(snd_gus_card_t * gus, unsigned short voice);
626void snd_gf1_stop_voice(snd_gus_card_t * gus, unsigned short voice); 607void snd_gf1_stop_voice(snd_gus_card_t * gus, unsigned short voice);
627void snd_gf1_clear_voices(snd_gus_card_t * gus, unsigned short v_min, unsigned short v_max);
628void snd_gf1_stop_voices(snd_gus_card_t * gus, unsigned short v_min, unsigned short v_max); 608void snd_gf1_stop_voices(snd_gus_card_t * gus, unsigned short v_min, unsigned short v_max);
629snd_gus_voice_t *snd_gf1_alloc_voice(snd_gus_card_t * gus, int type, int client, int port); 609snd_gus_voice_t *snd_gf1_alloc_voice(snd_gus_card_t * gus, int type, int client, int port);
630void snd_gf1_free_voice(snd_gus_card_t * gus, snd_gus_voice_t *voice); 610void snd_gf1_free_voice(snd_gus_card_t * gus, snd_gus_voice_t *voice);
@@ -641,9 +621,6 @@ int snd_gf1_pcm_new(snd_gus_card_t * gus, int pcm_dev, int control_index, snd_pc
641 621
642#ifdef CONFIG_SND_DEBUG 622#ifdef CONFIG_SND_DEBUG
643extern void snd_gf1_print_voice_registers(snd_gus_card_t * gus); 623extern void snd_gf1_print_voice_registers(snd_gus_card_t * gus);
644extern void snd_gf1_print_global_registers(snd_gus_card_t * gus);
645extern void snd_gf1_print_setup_registers(snd_gus_card_t * gus);
646extern void snd_gf1_peek_print_block(snd_gus_card_t * gus, unsigned int addr, int count, int w_16bit);
647#endif 624#endif
648 625
649/* gus.c */ 626/* gus.c */
diff --git a/sound/isa/gus/gus_io.c b/sound/isa/gus/gus_io.c
index f0570f2bf75f..337b0e2a8a36 100644
--- a/sound/isa/gus/gus_io.c
+++ b/sound/isa/gus/gus_io.c
@@ -244,6 +244,8 @@ unsigned short snd_gf1_i_look16(snd_gus_card_t * gus, unsigned char reg)
244 return res; 244 return res;
245} 245}
246 246
247#if 0
248
247void snd_gf1_i_adlib_write(snd_gus_card_t * gus, 249void snd_gf1_i_adlib_write(snd_gus_card_t * gus,
248 unsigned char reg, 250 unsigned char reg,
249 unsigned char data) 251 unsigned char data)
@@ -265,6 +267,8 @@ void snd_gf1_i_write_addr(snd_gus_card_t * gus, unsigned char reg,
265 spin_unlock_irqrestore(&gus->reg_lock, flags); 267 spin_unlock_irqrestore(&gus->reg_lock, flags);
266} 268}
267 269
270#endif /* 0 */
271
268unsigned int snd_gf1_i_read_addr(snd_gus_card_t * gus, 272unsigned int snd_gf1_i_read_addr(snd_gus_card_t * gus,
269 unsigned char reg, short w_16bit) 273 unsigned char reg, short w_16bit)
270{ 274{
@@ -329,6 +333,8 @@ unsigned char snd_gf1_peek(snd_gus_card_t * gus, unsigned int addr)
329 return res; 333 return res;
330} 334}
331 335
336#if 0
337
332void snd_gf1_pokew(snd_gus_card_t * gus, unsigned int addr, unsigned short data) 338void snd_gf1_pokew(snd_gus_card_t * gus, unsigned int addr, unsigned short data)
333{ 339{
334 unsigned long flags; 340 unsigned long flags;
@@ -405,9 +411,7 @@ void snd_gf1_dram_setmem(snd_gus_card_t * gus, unsigned int addr,
405 spin_unlock_irqrestore(&gus->reg_lock, flags); 411 spin_unlock_irqrestore(&gus->reg_lock, flags);
406} 412}
407 413
408/* 414#endif /* 0 */
409
410 */
411 415
412void snd_gf1_select_active_voices(snd_gus_card_t * gus) 416void snd_gf1_select_active_voices(snd_gus_card_t * gus)
413{ 417{
@@ -469,6 +473,8 @@ void snd_gf1_print_voice_registers(snd_gus_card_t * gus)
469 printk(" -%i- GF1 pan = 0x%x\n", voice, snd_gf1_i_read8(gus, 0x0c)); 473 printk(" -%i- GF1 pan = 0x%x\n", voice, snd_gf1_i_read8(gus, 0x0c));
470} 474}
471 475
476#if 0
477
472void snd_gf1_print_global_registers(snd_gus_card_t * gus) 478void snd_gf1_print_global_registers(snd_gus_card_t * gus)
473{ 479{
474 unsigned char global_mode = 0x00; 480 unsigned char global_mode = 0x00;
@@ -528,4 +534,6 @@ void snd_gf1_peek_print_block(snd_gus_card_t * gus, unsigned int addr, int count
528 } 534 }
529} 535}
530 536
537#endif /* 0 */
538
531#endif 539#endif
diff --git a/sound/isa/gus/gus_main.c b/sound/isa/gus/gus_main.c
index 73f81c14f768..94bbd344be5e 100644
--- a/sound/isa/gus/gus_main.c
+++ b/sound/isa/gus/gus_main.c
@@ -459,7 +459,6 @@ EXPORT_SYMBOL(snd_gf1_write16);
459EXPORT_SYMBOL(snd_gf1_look16); 459EXPORT_SYMBOL(snd_gf1_look16);
460EXPORT_SYMBOL(snd_gf1_i_write8); 460EXPORT_SYMBOL(snd_gf1_i_write8);
461EXPORT_SYMBOL(snd_gf1_i_look8); 461EXPORT_SYMBOL(snd_gf1_i_look8);
462EXPORT_SYMBOL(snd_gf1_i_write16);
463EXPORT_SYMBOL(snd_gf1_i_look16); 462EXPORT_SYMBOL(snd_gf1_i_look16);
464EXPORT_SYMBOL(snd_gf1_dram_addr); 463EXPORT_SYMBOL(snd_gf1_dram_addr);
465EXPORT_SYMBOL(snd_gf1_write_addr); 464EXPORT_SYMBOL(snd_gf1_write_addr);
@@ -470,8 +469,6 @@ EXPORT_SYMBOL(snd_gf1_alloc_voice);
470EXPORT_SYMBOL(snd_gf1_free_voice); 469EXPORT_SYMBOL(snd_gf1_free_voice);
471EXPORT_SYMBOL(snd_gf1_ctrl_stop); 470EXPORT_SYMBOL(snd_gf1_ctrl_stop);
472EXPORT_SYMBOL(snd_gf1_stop_voice); 471EXPORT_SYMBOL(snd_gf1_stop_voice);
473EXPORT_SYMBOL(snd_gf1_start);
474EXPORT_SYMBOL(snd_gf1_stop);
475 /* gus_mixer.c */ 472 /* gus_mixer.c */
476EXPORT_SYMBOL(snd_gf1_new_mixer); 473EXPORT_SYMBOL(snd_gf1_new_mixer);
477 /* gus_pcm.c */ 474 /* gus_pcm.c */
diff --git a/sound/isa/gus/gus_mem.c b/sound/isa/gus/gus_mem.c
index bfc2b91001d5..609838e8ef67 100644
--- a/sound/isa/gus/gus_mem.c
+++ b/sound/isa/gus/gus_mem.c
@@ -39,8 +39,8 @@ void snd_gf1_mem_lock(snd_gf1_mem_t * alloc, int xup)
39 } 39 }
40} 40}
41 41
42snd_gf1_mem_block_t *snd_gf1_mem_xalloc(snd_gf1_mem_t * alloc, 42static snd_gf1_mem_block_t *snd_gf1_mem_xalloc(snd_gf1_mem_t * alloc,
43 snd_gf1_mem_block_t * block) 43 snd_gf1_mem_block_t * block)
44{ 44{
45 snd_gf1_mem_block_t *pblock, *nblock; 45 snd_gf1_mem_block_t *pblock, *nblock;
46 46
@@ -105,8 +105,8 @@ int snd_gf1_mem_xfree(snd_gf1_mem_t * alloc, snd_gf1_mem_block_t * block)
105 return 0; 105 return 0;
106} 106}
107 107
108snd_gf1_mem_block_t *snd_gf1_mem_look(snd_gf1_mem_t * alloc, 108static snd_gf1_mem_block_t *snd_gf1_mem_look(snd_gf1_mem_t * alloc,
109 unsigned int address) 109 unsigned int address)
110{ 110{
111 snd_gf1_mem_block_t *block; 111 snd_gf1_mem_block_t *block;
112 112
@@ -118,8 +118,8 @@ snd_gf1_mem_block_t *snd_gf1_mem_look(snd_gf1_mem_t * alloc,
118 return NULL; 118 return NULL;
119} 119}
120 120
121snd_gf1_mem_block_t *snd_gf1_mem_share(snd_gf1_mem_t * alloc, 121static snd_gf1_mem_block_t *snd_gf1_mem_share(snd_gf1_mem_t * alloc,
122 unsigned int *share_id) 122 unsigned int *share_id)
123{ 123{
124 snd_gf1_mem_block_t *block; 124 snd_gf1_mem_block_t *block;
125 125
diff --git a/sound/isa/gus/gus_reset.c b/sound/isa/gus/gus_reset.c
index b4e66f6a10ae..ef687abc7070 100644
--- a/sound/isa/gus/gus_reset.c
+++ b/sound/isa/gus/gus_reset.c
@@ -161,7 +161,8 @@ void snd_gf1_stop_voice(snd_gus_card_t * gus, unsigned short voice)
161#endif 161#endif
162} 162}
163 163
164void snd_gf1_clear_voices(snd_gus_card_t * gus, unsigned short v_min, unsigned short v_max) 164static void snd_gf1_clear_voices(snd_gus_card_t * gus, unsigned short v_min,
165 unsigned short v_max)
165{ 166{
166 unsigned long flags; 167 unsigned long flags;
167 unsigned int daddr; 168 unsigned int daddr;
diff --git a/sound/isa/gus/gus_synth.c b/sound/isa/gus/gus_synth.c
index 66552e6013a4..f51c386ee192 100644
--- a/sound/isa/gus/gus_synth.c
+++ b/sound/isa/gus/gus_synth.c
@@ -99,7 +99,8 @@ static void snd_gus_synth_free_private_instruments(snd_gus_port_t *p, int client
99 snd_seq_instr_list_free_cond(p->gus->gf1.ilist, &ifree, client, 0); 99 snd_seq_instr_list_free_cond(p->gus->gf1.ilist, &ifree, client, 0);
100} 100}
101 101
102int snd_gus_synth_event_input(snd_seq_event_t *ev, int direct, void *private_data, int atomic, int hop) 102static int snd_gus_synth_event_input(snd_seq_event_t *ev, int direct,
103 void *private_data, int atomic, int hop)
103{ 104{
104 snd_gus_port_t * p = (snd_gus_port_t *) private_data; 105 snd_gus_port_t * p = (snd_gus_port_t *) private_data;
105 106
diff --git a/sound/isa/gus/gus_tables.h b/sound/isa/gus/gus_tables.h
index ed8e9d85ad31..4adf098d3269 100644
--- a/sound/isa/gus/gus_tables.h
+++ b/sound/isa/gus/gus_tables.h
@@ -23,6 +23,8 @@
23 23
24#ifdef __GUS_TABLES_ALLOC__ 24#ifdef __GUS_TABLES_ALLOC__
25 25
26#if 0
27
26unsigned int snd_gf1_scale_table[SNDRV_GF1_SCALE_TABLE_SIZE] = 28unsigned int snd_gf1_scale_table[SNDRV_GF1_SCALE_TABLE_SIZE] =
27{ 29{
28 8372, 8870, 9397, 9956, 10548, 11175, 30 8372, 8870, 9397, 9956, 10548, 11175,
@@ -49,6 +51,8 @@ unsigned int snd_gf1_scale_table[SNDRV_GF1_SCALE_TABLE_SIZE] =
49 12123977, 12844906 51 12123977, 12844906
50}; 52};
51 53
54#endif /* 0 */
55
52unsigned short snd_gf1_atten_table[SNDRV_GF1_ATTEN_TABLE_SIZE] = { 56unsigned short snd_gf1_atten_table[SNDRV_GF1_ATTEN_TABLE_SIZE] = {
53 4095 /* 0 */,1789 /* 1 */,1533 /* 2 */,1383 /* 3 */,1277 /* 4 */, 57 4095 /* 0 */,1789 /* 1 */,1533 /* 2 */,1383 /* 3 */,1277 /* 4 */,
54 1195 /* 5 */,1127 /* 6 */,1070 /* 7 */,1021 /* 8 */,978 /* 9 */, 58 1195 /* 5 */,1127 /* 6 */,1070 /* 7 */,1021 /* 8 */,978 /* 9 */,
diff --git a/sound/isa/gus/gus_volume.c b/sound/isa/gus/gus_volume.c
index b72bcfb28617..3d36f6c8ee6a 100644
--- a/sound/isa/gus/gus_volume.c
+++ b/sound/isa/gus/gus_volume.c
@@ -55,6 +55,8 @@ unsigned short snd_gf1_lvol_to_gvol_raw(unsigned int vol)
55 return (e << 8) | m; 55 return (e << 8) | m;
56} 56}
57 57
58#if 0
59
58unsigned int snd_gf1_gvol_to_lvol_raw(unsigned short gf1_vol) 60unsigned int snd_gf1_gvol_to_lvol_raw(unsigned short gf1_vol)
59{ 61{
60 unsigned int rvol; 62 unsigned int rvol;
@@ -108,6 +110,8 @@ unsigned int snd_gf1_calc_ramp_rate(snd_gus_card_t * gus,
108 return (range << 6) | (increment & 0x3f); 110 return (range << 6) | (increment & 0x3f);
109} 111}
110 112
113#endif /* 0 */
114
111unsigned short snd_gf1_translate_freq(snd_gus_card_t * gus, unsigned int freq16) 115unsigned short snd_gf1_translate_freq(snd_gus_card_t * gus, unsigned int freq16)
112{ 116{
113 freq16 >>= 3; 117 freq16 >>= 3;
@@ -120,6 +124,8 @@ unsigned short snd_gf1_translate_freq(snd_gus_card_t * gus, unsigned int freq16)
120 return ((freq16 << 9) + (gus->gf1.playback_freq >> 1)) / gus->gf1.playback_freq; 124 return ((freq16 << 9) + (gus->gf1.playback_freq >> 1)) / gus->gf1.playback_freq;
121} 125}
122 126
127#if 0
128
123short snd_gf1_compute_vibrato(short cents, unsigned short fc_register) 129short snd_gf1_compute_vibrato(short cents, unsigned short fc_register)
124{ 130{
125 static short vibrato_table[] = 131 static short vibrato_table[] =
@@ -208,3 +214,5 @@ unsigned short snd_gf1_compute_freq(unsigned int freq,
208 } 214 }
209 return (unsigned short) fc; 215 return (unsigned short) fc;
210} 216}
217
218#endif /* 0 */