Home
last modified time | relevance | path

Searched refs:gus (Results 1 – 22 of 22) sorted by relevance

/linux-2.6.39/sound/isa/gus/
Dgus_reset.c27 extern void snd_gf1_timers_init(struct snd_gus_card * gus);
28 extern void snd_gf1_timers_done(struct snd_gus_card * gus);
29 extern int snd_gf1_synth_init(struct snd_gus_card * gus);
30 extern void snd_gf1_synth_done(struct snd_gus_card * gus);
36 static void snd_gf1_default_interrupt_handler_midi_out(struct snd_gus_card * gus) in snd_gf1_default_interrupt_handler_midi_out() argument
38 snd_gf1_uart_cmd(gus, gus->gf1.uart_cmd &= ~0x20); in snd_gf1_default_interrupt_handler_midi_out()
41 static void snd_gf1_default_interrupt_handler_midi_in(struct snd_gus_card * gus) in snd_gf1_default_interrupt_handler_midi_in() argument
43 snd_gf1_uart_cmd(gus, gus->gf1.uart_cmd &= ~0x80); in snd_gf1_default_interrupt_handler_midi_in()
46 static void snd_gf1_default_interrupt_handler_timer1(struct snd_gus_card * gus) in snd_gf1_default_interrupt_handler_timer1() argument
48 snd_gf1_i_write8(gus, SNDRV_GF1_GB_SOUND_BLASTER_CONTROL, gus->gf1.timer_enabled &= ~4); in snd_gf1_default_interrupt_handler_timer1()
[all …]
Dgus_io.c27 void snd_gf1_delay(struct snd_gus_card * gus) in snd_gf1_delay() argument
33 inb(GUSP(gus, DRAM)); in snd_gf1_delay()
46 static inline void __snd_gf1_ctrl_stop(struct snd_gus_card * gus, unsigned char reg) in __snd_gf1_ctrl_stop() argument
50 outb(reg | 0x80, gus->gf1.reg_regsel); in __snd_gf1_ctrl_stop()
52 value = inb(gus->gf1.reg_data8); in __snd_gf1_ctrl_stop()
54 outb(reg, gus->gf1.reg_regsel); in __snd_gf1_ctrl_stop()
56 outb((value | 0x03) & ~(0x80 | 0x20), gus->gf1.reg_data8); in __snd_gf1_ctrl_stop()
60 static inline void __snd_gf1_write8(struct snd_gus_card * gus, in __snd_gf1_write8() argument
64 outb(reg, gus->gf1.reg_regsel); in __snd_gf1_write8()
66 outb(data, gus->gf1.reg_data8); in __snd_gf1_write8()
[all …]
Dgus_uart.c28 static void snd_gf1_interrupt_midi_in(struct snd_gus_card * gus) in snd_gf1_interrupt_midi_in() argument
36 spin_lock_irqsave(&gus->uart_cmd_lock, flags); in snd_gf1_interrupt_midi_in()
37 stat = snd_gf1_uart_stat(gus); in snd_gf1_interrupt_midi_in()
39 spin_unlock_irqrestore(&gus->uart_cmd_lock, flags); in snd_gf1_interrupt_midi_in()
44 data = snd_gf1_uart_get(gus); in snd_gf1_interrupt_midi_in()
45 if (!(gus->gf1.uart_cmd & 0x80)) { in snd_gf1_interrupt_midi_in()
46 spin_unlock_irqrestore(&gus->uart_cmd_lock, flags); in snd_gf1_interrupt_midi_in()
50 gus->gf1.uart_framing++; in snd_gf1_interrupt_midi_in()
51 spin_unlock_irqrestore(&gus->uart_cmd_lock, flags); in snd_gf1_interrupt_midi_in()
54 byte = snd_gf1_uart_get(gus); in snd_gf1_interrupt_midi_in()
[all …]
Dgus_main.c37 static int snd_gus_init_dma_irq(struct snd_gus_card * gus, int latches);
39 int snd_gus_use_inc(struct snd_gus_card * gus) in snd_gus_use_inc() argument
41 if (!try_module_get(gus->card->module)) in snd_gus_use_inc()
46 void snd_gus_use_dec(struct snd_gus_card * gus) in snd_gus_use_dec() argument
48 module_put(gus->card->module); in snd_gus_use_dec()
62 struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol); in snd_gus_joystick_get() local
64 ucontrol->value.integer.value[0] = gus->joystick_dac & 31; in snd_gus_joystick_get()
70 struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol); in snd_gus_joystick_put() local
76 spin_lock_irqsave(&gus->reg_lock, flags); in snd_gus_joystick_put()
77 change = gus->joystick_dac != nval; in snd_gus_joystick_put()
[all …]
Dgus_dma.c27 static void snd_gf1_dma_ack(struct snd_gus_card * gus) in snd_gf1_dma_ack() argument
31 spin_lock_irqsave(&gus->reg_lock, flags); in snd_gf1_dma_ack()
32 snd_gf1_write8(gus, SNDRV_GF1_GB_DRAM_DMA_CONTROL, 0x00); in snd_gf1_dma_ack()
33 snd_gf1_look8(gus, SNDRV_GF1_GB_DRAM_DMA_CONTROL); in snd_gf1_dma_ack()
34 spin_unlock_irqrestore(&gus->reg_lock, flags); in snd_gf1_dma_ack()
37 static void snd_gf1_dma_program(struct snd_gus_card * gus, in snd_gf1_dma_program() argument
51 if (gus->gf1.dma1 > 3) { in snd_gf1_dma_program()
52 if (gus->gf1.enh_mode) { in snd_gf1_dma_program()
73 if (gus->gf1.dma1 > 3) { in snd_gf1_dma_program()
78 snd_gf1_dma_ack(gus); in snd_gf1_dma_program()
[all …]
Dgus_timer.c37 struct snd_gus_card *gus; in snd_gf1_timer1_start() local
39 gus = snd_timer_chip(timer); in snd_gf1_timer1_start()
40 spin_lock_irqsave(&gus->reg_lock, flags); in snd_gf1_timer1_start()
42 tmp = (gus->gf1.timer_enabled |= 4); in snd_gf1_timer1_start()
43 snd_gf1_write8(gus, SNDRV_GF1_GB_ADLIB_TIMER_1, 256 - ticks); /* timer 1 count */ in snd_gf1_timer1_start()
44 snd_gf1_write8(gus, SNDRV_GF1_GB_SOUND_BLASTER_CONTROL, tmp); /* enable timer 1 IRQ */ in snd_gf1_timer1_start()
45 snd_gf1_adlib_write(gus, 0x04, tmp >> 2); /* timer 2 start */ in snd_gf1_timer1_start()
46 spin_unlock_irqrestore(&gus->reg_lock, flags); in snd_gf1_timer1_start()
54 struct snd_gus_card *gus; in snd_gf1_timer1_stop() local
56 gus = snd_timer_chip(timer); in snd_gf1_timer1_stop()
[all …]
Dgus_irq.c34 struct snd_gus_card * gus = dev_id; in snd_gus_interrupt() local
40 status = inb(gus->gf1.reg_irqstat); in snd_gus_interrupt()
46 STAT_ADD(gus->gf1.interrupt_stat_midi_in); in snd_gus_interrupt()
47 if (gus->gf1.interrupt_handler_midi_in) in snd_gus_interrupt()
48 gus->gf1.interrupt_handler_midi_in(gus); in snd_gus_interrupt()
51 STAT_ADD(gus->gf1.interrupt_stat_midi_out); in snd_gus_interrupt()
52 if (gus->gf1.interrupt_handler_midi_out) in snd_gus_interrupt()
53 gus->gf1.interrupt_handler_midi_out(gus); in snd_gus_interrupt()
61 while (((voice_status = snd_gf1_i_read8(gus, SNDRV_GF1_GB_VOICES_IRQ)) & 0xc0) != 0xc0) { in snd_gus_interrupt()
70 voice, voice_status, inb(GUSP(gus, GF1PAGE))); in snd_gus_interrupt()
[all …]
Dgus_pcm.c45 struct snd_gus_card * gus; member
64 static void snd_gf1_pcm_block_change_ack(struct snd_gus_card * gus, void *private_data) in snd_gf1_pcm_block_change_ack() argument
101 if (!snd_gf1_dma_transfer_block(pcmp->gus, &block, 0, 0)) in snd_gf1_pcm_block_change()
110 struct snd_gus_card * gus = pcmp->gus; in snd_gf1_pcm_trigger_up() local
127 rate = snd_gf1_translate_freq(gus, runtime->rate << 4); in snd_gf1_pcm_trigger_up()
147 vol = !voice ? gus->gf1.pcm_volume_level_left : gus->gf1.pcm_volume_level_right; in snd_gf1_pcm_trigger_up()
148 spin_lock_irqsave(&gus->reg_lock, flags); in snd_gf1_pcm_trigger_up()
149 snd_gf1_select_voice(gus, pcmp->pvoices[voice]->number); in snd_gf1_pcm_trigger_up()
150 snd_gf1_write8(gus, SNDRV_GF1_VB_PAN, pan); in snd_gf1_pcm_trigger_up()
151 snd_gf1_write16(gus, SNDRV_GF1_VW_FREQUENCY, rate); in snd_gf1_pcm_trigger_up()
[all …]
Dgus_mixer.c42 struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol); in snd_gf1_get_single() local
46 ucontrol->value.integer.value[0] = (gus->mix_cntrl_reg >> shift) & 1; in snd_gf1_get_single()
54 struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol); in snd_gf1_put_single() local
65 spin_lock_irqsave(&gus->reg_lock, flags); in snd_gf1_put_single()
66 oval = gus->mix_cntrl_reg; in snd_gf1_put_single()
69 outb(gus->mix_cntrl_reg = nval, GUSP(gus, MIXCNTRLREG)); in snd_gf1_put_single()
70 outb(gus->gf1.active_voice = 0, GUSP(gus, GF1PAGE)); in snd_gf1_put_single()
71 spin_unlock_irqrestore(&gus->reg_lock, flags); in snd_gf1_put_single()
92 struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol); in snd_ics_get_double() local
97 spin_lock_irqsave(&gus->reg_lock, flags); in snd_ics_get_double()
[all …]
Dinterwave.c119 struct snd_gus_card *gus; member
211 struct snd_gus_card * gus, int dev, in snd_interwave_detect_stb() argument
224 if (gus->gf1.port == 0x250) { in snd_interwave_detect_stb()
253 struct snd_gus_card * gus, in snd_interwave_detect() argument
264 snd_gf1_i_write8(gus, SNDRV_GF1_GB_RESET, 0); /* reset GF1 */ in snd_interwave_detect()
265 if (((d = snd_gf1_i_look8(gus, SNDRV_GF1_GB_RESET)) & 0x07) != 0) { in snd_interwave_detect()
266 snd_printdd("[0x%lx] check 1 failed - 0x%x\n", gus->gf1.port, d); in snd_interwave_detect()
270 snd_gf1_i_write8(gus, SNDRV_GF1_GB_RESET, 1); /* release reset */ in snd_interwave_detect()
272 if (((d = snd_gf1_i_look8(gus, SNDRV_GF1_GB_RESET)) & 0x07) != 1) { in snd_interwave_detect()
273 snd_printdd("[0x%lx] check 2 failed - 0x%x\n", gus->gf1.port, d); in snd_interwave_detect()
[all …]
Dgus_instr.c33 struct snd_gus_card *gus = private_data; in snd_gus_iwffff_put_sample() local
41 block = snd_gf1_mem_alloc(&gus->gf1.mem_alloc, in snd_gus_iwffff_put_sample()
48 err = snd_gus_dram_write(gus, data, in snd_gus_iwffff_put_sample()
51 snd_gf1_mem_lock(&gus->gf1.mem_alloc, 0); in snd_gus_iwffff_put_sample()
52 snd_gf1_mem_xfree(&gus->gf1.mem_alloc, block); in snd_gus_iwffff_put_sample()
53 snd_gf1_mem_lock(&gus->gf1.mem_alloc, 1); in snd_gus_iwffff_put_sample()
63 struct snd_gus_card *gus = private_data; in snd_gus_iwffff_get_sample() local
65 return snd_gus_dram_read(gus, data, wave->address.memory, wave->size, in snd_gus_iwffff_get_sample()
72 struct snd_gus_card *gus = private_data; in snd_gus_iwffff_remove_sample() local
76 return snd_gf1_mem_free(&gus->gf1.mem_alloc, wave->address.memory); in snd_gus_iwffff_remove_sample()
[all …]
Dgus_dram.c28 static int snd_gus_dram_poke(struct snd_gus_card *gus, char __user *_buffer, in snd_gus_dram_poke() argument
39 if (gus->interwave) { in snd_gus_dram_poke()
40 spin_lock_irqsave(&gus->reg_lock, flags); in snd_gus_dram_poke()
41 snd_gf1_write8(gus, SNDRV_GF1_GB_MEMORY_CONTROL, 0x01); in snd_gus_dram_poke()
42 snd_gf1_dram_addr(gus, address); in snd_gus_dram_poke()
43 outsb(GUSP(gus, DRAM), buffer, size1); in snd_gus_dram_poke()
44 spin_unlock_irqrestore(&gus->reg_lock, flags); in snd_gus_dram_poke()
50 snd_gf1_poke(gus, address++, *pbuffer++); in snd_gus_dram_poke()
59 int snd_gus_dram_write(struct snd_gus_card *gus, char __user *buffer, in snd_gus_dram_write() argument
62 return snd_gus_dram_poke(gus, buffer, address, size); in snd_gus_dram_write()
[all …]
Dgusmax.c77 struct snd_gus_card *gus; member
85 static int __devinit snd_gusmax_detect(struct snd_gus_card * gus) in snd_gusmax_detect() argument
89 snd_gf1_i_write8(gus, SNDRV_GF1_GB_RESET, 0); /* reset GF1 */ in snd_gusmax_detect()
90 if (((d = snd_gf1_i_look8(gus, SNDRV_GF1_GB_RESET)) & 0x07) != 0) { in snd_gusmax_detect()
91 snd_printdd("[0x%lx] check 1 failed - 0x%x\n", gus->gf1.port, d); in snd_gusmax_detect()
95 snd_gf1_i_write8(gus, SNDRV_GF1_GB_RESET, 1); /* release reset */ in snd_gusmax_detect()
97 if (((d = snd_gf1_i_look8(gus, SNDRV_GF1_GB_RESET)) & 0x07) != 1) { in snd_gusmax_detect()
98 snd_printdd("[0x%lx] check 2 failed - 0x%x\n", gus->gf1.port, d); in snd_gusmax_detect()
115 snd_gus_interrupt(irq, maxcard->gus); in snd_gusmax_interrupt()
128 struct snd_gus_card * gus) in snd_gusmax_init() argument
[all …]
Dgus_mem_proc.c31 struct snd_gus_card * gus; member
40 struct snd_gus_card *gus = priv->gus; in snd_gf1_mem_proc_dump() local
43 err = snd_gus_dram_read(gus, buf, pos, count, priv->rom); in snd_gf1_mem_proc_dump()
59 int snd_gf1_mem_proc_init(struct snd_gus_card * gus) in snd_gf1_mem_proc_init() argument
67 if (gus->gf1.mem_alloc.banks_8[idx].size > 0) { in snd_gf1_mem_proc_init()
71 priv->gus = gus; in snd_gf1_mem_proc_init()
73 if (! snd_card_proc_new(gus->card, name, &entry)) { in snd_gf1_mem_proc_init()
78 priv->address = gus->gf1.mem_alloc.banks_8[idx].address; in snd_gf1_mem_proc_init()
79 priv->size = entry->size = gus->gf1.mem_alloc.banks_8[idx].size; in snd_gf1_mem_proc_init()
84 if (gus->gf1.rom_present & (1 << idx)) { in snd_gf1_mem_proc_init()
[all …]
Dgusclassic.c126 static int __devinit snd_gusclassic_detect(struct snd_gus_card *gus) in snd_gusclassic_detect() argument
130 snd_gf1_i_write8(gus, SNDRV_GF1_GB_RESET, 0); /* reset GF1 */ in snd_gusclassic_detect()
131 if (((d = snd_gf1_i_look8(gus, SNDRV_GF1_GB_RESET)) & 0x07) != 0) { in snd_gusclassic_detect()
132 snd_printdd("[0x%lx] check 1 failed - 0x%x\n", gus->gf1.port, d); in snd_gusclassic_detect()
136 snd_gf1_i_write8(gus, SNDRV_GF1_GB_RESET, 1); /* release reset */ in snd_gusclassic_detect()
138 if (((d = snd_gf1_i_look8(gus, SNDRV_GF1_GB_RESET)) & 0x07) != 1) { in snd_gusclassic_detect()
139 snd_printdd("[0x%lx] check 2 failed - 0x%x\n", gus->gf1.port, d); in snd_gusclassic_detect()
148 struct snd_gus_card *gus; in snd_gusclassic_probe() local
158 error = snd_gusclassic_create(card, dev, n, &gus); in snd_gusclassic_probe()
162 error = snd_gusclassic_detect(gus); in snd_gusclassic_probe()
[all …]
Dgusextreme.c159 static int __devinit snd_gusextreme_detect(struct snd_gus_card *gus, in snd_gusextreme_detect() argument
184 outb(gus->gf1.port & 0x040 ? 2 : 0, ES1688P(es1688, INIT1)); in snd_gusextreme_detect()
186 outb(gus->gf1.port & 0x020 ? 2 : 0, ES1688P(es1688, INIT1)); in snd_gusextreme_detect()
188 outb(gus->gf1.port & 0x010 ? 3 : 1, ES1688P(es1688, INIT1)); in snd_gusextreme_detect()
193 snd_gf1_i_write8(gus, SNDRV_GF1_GB_RESET, 0); /* reset GF1 */ in snd_gusextreme_detect()
194 if (((d = snd_gf1_i_look8(gus, SNDRV_GF1_GB_RESET)) & 0x07) != 0) { in snd_gusextreme_detect()
195 snd_printdd("[0x%lx] check 1 failed - 0x%x\n", gus->gf1.port, d); in snd_gusextreme_detect()
199 snd_gf1_i_write8(gus, SNDRV_GF1_GB_RESET, 1); /* release reset */ in snd_gusextreme_detect()
201 if (((d = snd_gf1_i_look8(gus, SNDRV_GF1_GB_RESET)) & 0x07) != 1) { in snd_gusextreme_detect()
202 snd_printdd("[0x%lx] check 2 failed - 0x%x\n", gus->gf1.port, d); in snd_gusextreme_detect()
[all …]
DMakefile6 snd-gus-lib-objs := gus_main.o \
20 obj-$(CONFIG_SND_GUSCLASSIC) += snd-gusclassic.o snd-gus-lib.o
21 obj-$(CONFIG_SND_GUSMAX) += snd-gusmax.o snd-gus-lib.o
22 obj-$(CONFIG_SND_GUSEXTREME) += snd-gusextreme.o snd-gus-lib.o
23 obj-$(CONFIG_SND_INTERWAVE) += snd-interwave.o snd-gus-lib.o
24 obj-$(CONFIG_SND_INTERWAVE_STB) += snd-interwave-stb.o snd-gus-lib.o
Dgus_volume.c74 unsigned int snd_gf1_calc_ramp_rate(struct snd_gus_card * gus,
94 value = gus->gf1.enh_mode ?
96 vol_rates[gus->gf1.active_voices - 14];
114 unsigned short snd_gf1_translate_freq(struct snd_gus_card * gus, unsigned int freq16) in snd_gf1_translate_freq() argument
123 return ((freq16 << 9) + (gus->gf1.playback_freq >> 1)) / gus->gf1.playback_freq; in snd_gf1_translate_freq()
Dgus_mem.c237 int snd_gf1_mem_init(struct snd_gus_card * gus) in snd_gf1_mem_init() argument
245 alloc = &gus->gf1.mem_alloc; in snd_gf1_mem_init()
248 if (!gus->gf1.memory) in snd_gf1_mem_init()
253 if (gus->gf1.enh_mode) { in snd_gf1_mem_init()
260 block.ptr = gus->gf1.default_voice_address; in snd_gf1_mem_init()
266 if (! snd_card_proc_new(gus->card, "gusmem", &entry)) in snd_gf1_mem_init()
267 snd_info_set_text_ops(entry, gus, snd_gf1_mem_info_read); in snd_gf1_mem_init()
272 int snd_gf1_mem_done(struct snd_gus_card * gus) in snd_gf1_mem_done() argument
277 alloc = &gus->gf1.mem_alloc; in snd_gf1_mem_done()
291 struct snd_gus_card *gus; in snd_gf1_mem_info_read() local
[all …]
/linux-2.6.39/include/sound/
Dgus.h34 #define GUSP(gus, x) ((gus)->gf1.port + SNDRV_g_u_s_##x) argument
216 void (*ack)(struct snd_gus_card * gus, void *private_data);
223 struct snd_gus_card * gus; member
265 void (*handler_wave) (struct snd_gus_card * gus, struct snd_gus_voice * voice);
266 void (*handler_volume) (struct snd_gus_card * gus, struct snd_gus_voice * voice);
267 void (*handler_effect) (struct snd_gus_card * gus, struct snd_gus_voice * voice);
268 void (*volume_change) (struct snd_gus_card * gus);
345 void (*interrupt_handler_midi_out) (struct snd_gus_card * gus);
346 void (*interrupt_handler_midi_in) (struct snd_gus_card * gus);
347 void (*interrupt_handler_timer1) (struct snd_gus_card * gus);
[all …]
/linux-2.6.39/Documentation/sound/oss/
Dultrasound3 insmod gus io=* irq=* dma=* ...
7 The gus module takes the following arguments
/linux-2.6.39/sound/isa/
DMakefile25 obj-$(CONFIG_SND) += ad1816a/ ad1848/ cs423x/ es1688/ galaxy/ gus/ msnd/ opti9xx/ \