/kernel/linux/linux-5.10/sound/isa/gus/ |
D | gus_reset.c | 12 extern int snd_gf1_synth_init(struct snd_gus_card * gus); 13 extern void snd_gf1_synth_done(struct snd_gus_card * gus); 19 static void snd_gf1_default_interrupt_handler_midi_out(struct snd_gus_card * gus) in snd_gf1_default_interrupt_handler_midi_out() argument 21 snd_gf1_uart_cmd(gus, gus->gf1.uart_cmd &= ~0x20); in snd_gf1_default_interrupt_handler_midi_out() 24 static void snd_gf1_default_interrupt_handler_midi_in(struct snd_gus_card * gus) in snd_gf1_default_interrupt_handler_midi_in() argument 26 snd_gf1_uart_cmd(gus, gus->gf1.uart_cmd &= ~0x80); in snd_gf1_default_interrupt_handler_midi_in() 29 static void snd_gf1_default_interrupt_handler_timer1(struct snd_gus_card * gus) in snd_gf1_default_interrupt_handler_timer1() argument 31 snd_gf1_i_write8(gus, SNDRV_GF1_GB_SOUND_BLASTER_CONTROL, gus->gf1.timer_enabled &= ~4); in snd_gf1_default_interrupt_handler_timer1() 34 static void snd_gf1_default_interrupt_handler_timer2(struct snd_gus_card * gus) in snd_gf1_default_interrupt_handler_timer2() argument 36 snd_gf1_i_write8(gus, SNDRV_GF1_GB_SOUND_BLASTER_CONTROL, gus->gf1.timer_enabled &= ~8); in snd_gf1_default_interrupt_handler_timer2() [all …]
|
D | gus_io.c | 12 void snd_gf1_delay(struct snd_gus_card * gus) in snd_gf1_delay() argument 18 inb(GUSP(gus, DRAM)); in snd_gf1_delay() 31 static inline void __snd_gf1_ctrl_stop(struct snd_gus_card * gus, unsigned char reg) in __snd_gf1_ctrl_stop() argument 35 outb(reg | 0x80, gus->gf1.reg_regsel); in __snd_gf1_ctrl_stop() 37 value = inb(gus->gf1.reg_data8); in __snd_gf1_ctrl_stop() 39 outb(reg, gus->gf1.reg_regsel); in __snd_gf1_ctrl_stop() 41 outb((value | 0x03) & ~(0x80 | 0x20), gus->gf1.reg_data8); in __snd_gf1_ctrl_stop() 45 static inline void __snd_gf1_write8(struct snd_gus_card * gus, in __snd_gf1_write8() argument 49 outb(reg, gus->gf1.reg_regsel); in __snd_gf1_write8() 51 outb(data, gus->gf1.reg_data8); in __snd_gf1_write8() [all …]
|
D | gus_main.c | 23 static int snd_gus_init_dma_irq(struct snd_gus_card * gus, int latches); 25 int snd_gus_use_inc(struct snd_gus_card * gus) in snd_gus_use_inc() argument 27 if (!try_module_get(gus->card->module)) in snd_gus_use_inc() 32 void snd_gus_use_dec(struct snd_gus_card * gus) in snd_gus_use_dec() argument 34 module_put(gus->card->module); in snd_gus_use_dec() 48 struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol); in snd_gus_joystick_get() local 50 ucontrol->value.integer.value[0] = gus->joystick_dac & 31; in snd_gus_joystick_get() 56 struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol); in snd_gus_joystick_put() local 62 spin_lock_irqsave(&gus->reg_lock, flags); in snd_gus_joystick_put() 63 change = gus->joystick_dac != nval; in snd_gus_joystick_put() [all …]
|
D | gus_uart.c | 13 static void snd_gf1_interrupt_midi_in(struct snd_gus_card * gus) in snd_gf1_interrupt_midi_in() argument 22 spin_lock_irqsave(&gus->uart_cmd_lock, flags); in snd_gf1_interrupt_midi_in() 23 stat = snd_gf1_uart_stat(gus); in snd_gf1_interrupt_midi_in() 25 spin_unlock_irqrestore(&gus->uart_cmd_lock, flags); in snd_gf1_interrupt_midi_in() 30 data = snd_gf1_uart_get(gus); in snd_gf1_interrupt_midi_in() 31 if (!(gus->gf1.uart_cmd & 0x80)) { in snd_gf1_interrupt_midi_in() 32 spin_unlock_irqrestore(&gus->uart_cmd_lock, flags); in snd_gf1_interrupt_midi_in() 36 gus->gf1.uart_framing++; in snd_gf1_interrupt_midi_in() 37 spin_unlock_irqrestore(&gus->uart_cmd_lock, flags); in snd_gf1_interrupt_midi_in() 40 byte = snd_gf1_uart_get(gus); in snd_gf1_interrupt_midi_in() [all …]
|
D | gus_dma.c | 12 static void snd_gf1_dma_ack(struct snd_gus_card * gus) in snd_gf1_dma_ack() argument 16 spin_lock_irqsave(&gus->reg_lock, flags); in snd_gf1_dma_ack() 17 snd_gf1_write8(gus, SNDRV_GF1_GB_DRAM_DMA_CONTROL, 0x00); in snd_gf1_dma_ack() 18 snd_gf1_look8(gus, SNDRV_GF1_GB_DRAM_DMA_CONTROL); in snd_gf1_dma_ack() 19 spin_unlock_irqrestore(&gus->reg_lock, flags); in snd_gf1_dma_ack() 22 static void snd_gf1_dma_program(struct snd_gus_card * gus, in snd_gf1_dma_program() argument 36 if (gus->gf1.dma1 > 3) { in snd_gf1_dma_program() 37 if (gus->gf1.enh_mode) { in snd_gf1_dma_program() 58 if (gus->gf1.dma1 > 3) { in snd_gf1_dma_program() 63 snd_gf1_dma_ack(gus); in snd_gf1_dma_program() [all …]
|
D | gus_timer.c | 22 struct snd_gus_card *gus; in snd_gf1_timer1_start() local 24 gus = snd_timer_chip(timer); in snd_gf1_timer1_start() 25 spin_lock_irqsave(&gus->reg_lock, flags); in snd_gf1_timer1_start() 27 tmp = (gus->gf1.timer_enabled |= 4); in snd_gf1_timer1_start() 28 snd_gf1_write8(gus, SNDRV_GF1_GB_ADLIB_TIMER_1, 256 - ticks); /* timer 1 count */ in snd_gf1_timer1_start() 29 snd_gf1_write8(gus, SNDRV_GF1_GB_SOUND_BLASTER_CONTROL, tmp); /* enable timer 1 IRQ */ in snd_gf1_timer1_start() 30 snd_gf1_adlib_write(gus, 0x04, tmp >> 2); /* timer 2 start */ in snd_gf1_timer1_start() 31 spin_unlock_irqrestore(&gus->reg_lock, flags); in snd_gf1_timer1_start() 39 struct snd_gus_card *gus; in snd_gf1_timer1_stop() local 41 gus = snd_timer_chip(timer); in snd_gf1_timer1_stop() [all …]
|
D | gus_irq.c | 19 struct snd_gus_card * gus = dev_id; in snd_gus_interrupt() local 25 status = inb(gus->gf1.reg_irqstat); in snd_gus_interrupt() 31 STAT_ADD(gus->gf1.interrupt_stat_midi_in); in snd_gus_interrupt() 32 if (gus->gf1.interrupt_handler_midi_in) in snd_gus_interrupt() 33 gus->gf1.interrupt_handler_midi_in(gus); in snd_gus_interrupt() 36 STAT_ADD(gus->gf1.interrupt_stat_midi_out); in snd_gus_interrupt() 37 if (gus->gf1.interrupt_handler_midi_out) in snd_gus_interrupt() 38 gus->gf1.interrupt_handler_midi_out(gus); in snd_gus_interrupt() 46 while (((voice_status = snd_gf1_i_read8(gus, SNDRV_GF1_GB_VOICES_IRQ)) & 0xc0) != 0xc0) { in snd_gus_interrupt() 55 voice, voice_status, inb(GUSP(gus, GF1PAGE))); in snd_gus_interrupt() [all …]
|
D | gus_pcm.c | 32 struct snd_gus_card * gus; member 49 static void snd_gf1_pcm_block_change_ack(struct snd_gus_card * gus, void *private_data) in snd_gf1_pcm_block_change_ack() argument 86 if (!snd_gf1_dma_transfer_block(pcmp->gus, &block, 0, 0)) in snd_gf1_pcm_block_change() 95 struct snd_gus_card * gus = pcmp->gus; in snd_gf1_pcm_trigger_up() local 112 rate = snd_gf1_translate_freq(gus, runtime->rate << 4); in snd_gf1_pcm_trigger_up() 132 vol = !voice ? gus->gf1.pcm_volume_level_left : gus->gf1.pcm_volume_level_right; in snd_gf1_pcm_trigger_up() 133 spin_lock_irqsave(&gus->reg_lock, flags); in snd_gf1_pcm_trigger_up() 134 snd_gf1_select_voice(gus, pcmp->pvoices[voice]->number); in snd_gf1_pcm_trigger_up() 135 snd_gf1_write8(gus, SNDRV_GF1_VB_PAN, pan); in snd_gf1_pcm_trigger_up() 136 snd_gf1_write16(gus, SNDRV_GF1_VW_FREQUENCY, rate); in snd_gf1_pcm_trigger_up() [all …]
|
D | gus_mixer.c | 27 struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol); in snd_gf1_get_single() local 31 ucontrol->value.integer.value[0] = (gus->mix_cntrl_reg >> shift) & 1; in snd_gf1_get_single() 39 struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol); in snd_gf1_put_single() local 50 spin_lock_irqsave(&gus->reg_lock, flags); in snd_gf1_put_single() 51 oval = gus->mix_cntrl_reg; in snd_gf1_put_single() 54 outb(gus->mix_cntrl_reg = nval, GUSP(gus, MIXCNTRLREG)); in snd_gf1_put_single() 55 outb(gus->gf1.active_voice = 0, GUSP(gus, GF1PAGE)); in snd_gf1_put_single() 56 spin_unlock_irqrestore(&gus->reg_lock, flags); in snd_gf1_put_single() 77 struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol); in snd_ics_get_double() local 82 spin_lock_irqsave(&gus->reg_lock, flags); in snd_ics_get_double() [all …]
|
D | interwave.c | 104 struct snd_gus_card *gus; member 196 struct snd_gus_card *gus, int dev, in snd_interwave_detect_stb() argument 209 if (gus->gf1.port == 0x250) { in snd_interwave_detect_stb() 238 struct snd_gus_card *gus, in snd_interwave_detect() argument 249 snd_gf1_i_write8(gus, SNDRV_GF1_GB_RESET, 0); /* reset GF1 */ in snd_interwave_detect() 250 if (((d = snd_gf1_i_look8(gus, SNDRV_GF1_GB_RESET)) & 0x07) != 0) { in snd_interwave_detect() 251 snd_printdd("[0x%lx] check 1 failed - 0x%x\n", gus->gf1.port, d); in snd_interwave_detect() 255 snd_gf1_i_write8(gus, SNDRV_GF1_GB_RESET, 1); /* release reset */ in snd_interwave_detect() 257 if (((d = snd_gf1_i_look8(gus, SNDRV_GF1_GB_RESET)) & 0x07) != 1) { in snd_interwave_detect() 258 snd_printdd("[0x%lx] check 2 failed - 0x%x\n", gus->gf1.port, d); in snd_interwave_detect() [all …]
|
D | gus_dram.c | 13 static int snd_gus_dram_poke(struct snd_gus_card *gus, char __user *_buffer, in snd_gus_dram_poke() argument 24 if (gus->interwave) { in snd_gus_dram_poke() 25 spin_lock_irqsave(&gus->reg_lock, flags); in snd_gus_dram_poke() 26 snd_gf1_write8(gus, SNDRV_GF1_GB_MEMORY_CONTROL, 0x01); in snd_gus_dram_poke() 27 snd_gf1_dram_addr(gus, address); in snd_gus_dram_poke() 28 outsb(GUSP(gus, DRAM), buffer, size1); in snd_gus_dram_poke() 29 spin_unlock_irqrestore(&gus->reg_lock, flags); in snd_gus_dram_poke() 35 snd_gf1_poke(gus, address++, *pbuffer++); in snd_gus_dram_poke() 44 int snd_gus_dram_write(struct snd_gus_card *gus, char __user *buffer, in snd_gus_dram_write() argument 47 return snd_gus_dram_poke(gus, buffer, address, size); in snd_gus_dram_write() [all …]
|
D | gusmax.c | 62 struct snd_gus_card *gus; member 70 static int snd_gusmax_detect(struct snd_gus_card *gus) in snd_gusmax_detect() argument 74 snd_gf1_i_write8(gus, SNDRV_GF1_GB_RESET, 0); /* reset GF1 */ in snd_gusmax_detect() 75 if (((d = snd_gf1_i_look8(gus, SNDRV_GF1_GB_RESET)) & 0x07) != 0) { in snd_gusmax_detect() 76 snd_printdd("[0x%lx] check 1 failed - 0x%x\n", gus->gf1.port, d); in snd_gusmax_detect() 80 snd_gf1_i_write8(gus, SNDRV_GF1_GB_RESET, 1); /* release reset */ in snd_gusmax_detect() 82 if (((d = snd_gf1_i_look8(gus, SNDRV_GF1_GB_RESET)) & 0x07) != 1) { in snd_gusmax_detect() 83 snd_printdd("[0x%lx] check 2 failed - 0x%x\n", gus->gf1.port, d); in snd_gusmax_detect() 100 snd_gus_interrupt(irq, maxcard->gus); in snd_gusmax_interrupt() 113 struct snd_gus_card *gus) in snd_gusmax_init() argument [all …]
|
D | gusclassic.c | 112 static int snd_gusclassic_detect(struct snd_gus_card *gus) in snd_gusclassic_detect() argument 116 snd_gf1_i_write8(gus, SNDRV_GF1_GB_RESET, 0); /* reset GF1 */ in snd_gusclassic_detect() 117 if (((d = snd_gf1_i_look8(gus, SNDRV_GF1_GB_RESET)) & 0x07) != 0) { in snd_gusclassic_detect() 118 snd_printdd("[0x%lx] check 1 failed - 0x%x\n", gus->gf1.port, d); in snd_gusclassic_detect() 122 snd_gf1_i_write8(gus, SNDRV_GF1_GB_RESET, 1); /* release reset */ in snd_gusclassic_detect() 124 if (((d = snd_gf1_i_look8(gus, SNDRV_GF1_GB_RESET)) & 0x07) != 1) { in snd_gusclassic_detect() 125 snd_printdd("[0x%lx] check 2 failed - 0x%x\n", gus->gf1.port, d); in snd_gusclassic_detect() 134 struct snd_gus_card *gus; in snd_gusclassic_probe() local 144 error = snd_gusclassic_create(card, dev, n, &gus); in snd_gusclassic_probe() 148 error = snd_gusclassic_detect(gus); in snd_gusclassic_probe() [all …]
|
D | gus_mem_proc.c | 16 struct snd_gus_card * gus; member 25 struct snd_gus_card *gus = priv->gus; in snd_gf1_mem_proc_dump() local 28 err = snd_gus_dram_read(gus, buf, pos, count, priv->rom); in snd_gf1_mem_proc_dump() 44 int snd_gf1_mem_proc_init(struct snd_gus_card * gus) in snd_gf1_mem_proc_init() argument 52 if (gus->gf1.mem_alloc.banks_8[idx].size > 0) { in snd_gf1_mem_proc_init() 56 priv->gus = gus; in snd_gf1_mem_proc_init() 58 if (! snd_card_proc_new(gus->card, name, &entry)) { in snd_gf1_mem_proc_init() 63 priv->address = gus->gf1.mem_alloc.banks_8[idx].address; in snd_gf1_mem_proc_init() 64 priv->size = entry->size = gus->gf1.mem_alloc.banks_8[idx].size; in snd_gf1_mem_proc_init() 69 if (gus->gf1.rom_present & (1 << idx)) { in snd_gf1_mem_proc_init() [all …]
|
D | gusextreme.c | 146 static int snd_gusextreme_detect(struct snd_gus_card *gus, in snd_gusextreme_detect() argument 171 outb(gus->gf1.port & 0x040 ? 2 : 0, ES1688P(es1688, INIT1)); in snd_gusextreme_detect() 173 outb(gus->gf1.port & 0x020 ? 2 : 0, ES1688P(es1688, INIT1)); in snd_gusextreme_detect() 175 outb(gus->gf1.port & 0x010 ? 3 : 1, ES1688P(es1688, INIT1)); in snd_gusextreme_detect() 180 snd_gf1_i_write8(gus, SNDRV_GF1_GB_RESET, 0); /* reset GF1 */ in snd_gusextreme_detect() 181 if (((d = snd_gf1_i_look8(gus, SNDRV_GF1_GB_RESET)) & 0x07) != 0) { in snd_gusextreme_detect() 182 snd_printdd("[0x%lx] check 1 failed - 0x%x\n", gus->gf1.port, d); in snd_gusextreme_detect() 186 snd_gf1_i_write8(gus, SNDRV_GF1_GB_RESET, 1); /* release reset */ in snd_gusextreme_detect() 188 if (((d = snd_gf1_i_look8(gus, SNDRV_GF1_GB_RESET)) & 0x07) != 1) { in snd_gusextreme_detect() 189 snd_printdd("[0x%lx] check 2 failed - 0x%x\n", gus->gf1.port, d); in snd_gusextreme_detect() [all …]
|
D | Makefile | 7 snd-gus-lib-objs := gus_main.o \ 21 obj-$(CONFIG_SND_GUSCLASSIC) += snd-gusclassic.o snd-gus-lib.o 22 obj-$(CONFIG_SND_GUSMAX) += snd-gusmax.o snd-gus-lib.o 23 obj-$(CONFIG_SND_GUSEXTREME) += snd-gusextreme.o snd-gus-lib.o 24 obj-$(CONFIG_SND_INTERWAVE) += snd-interwave.o snd-gus-lib.o 25 obj-$(CONFIG_SND_INTERWAVE_STB) += snd-interwave-stb.o snd-gus-lib.o
|
D | gus_mem.c | 222 int snd_gf1_mem_init(struct snd_gus_card * gus) in snd_gf1_mem_init() argument 227 alloc = &gus->gf1.mem_alloc; in snd_gf1_mem_init() 230 if (!gus->gf1.memory) in snd_gf1_mem_init() 235 if (gus->gf1.enh_mode) { in snd_gf1_mem_init() 242 block.ptr = gus->gf1.default_voice_address; in snd_gf1_mem_init() 248 snd_card_ro_proc_new(gus->card, "gusmem", gus, snd_gf1_mem_info_read); in snd_gf1_mem_init() 253 int snd_gf1_mem_done(struct snd_gus_card * gus) in snd_gf1_mem_done() argument 258 alloc = &gus->gf1.mem_alloc; in snd_gf1_mem_done() 272 struct snd_gus_card *gus; in snd_gf1_mem_info_read() local 278 gus = entry->private_data; in snd_gf1_mem_info_read() [all …]
|
D | gus_volume.c | 60 unsigned int snd_gf1_calc_ramp_rate(struct snd_gus_card * gus, 80 value = gus->gf1.enh_mode ? 82 vol_rates[gus->gf1.active_voices - 14]; 100 unsigned short snd_gf1_translate_freq(struct snd_gus_card * gus, unsigned int freq16) in snd_gf1_translate_freq() argument 109 return ((freq16 << 9) + (gus->gf1.playback_freq >> 1)) / gus->gf1.playback_freq; in snd_gf1_translate_freq()
|
/kernel/linux/linux-5.10/include/sound/ |
D | gus.h | 19 #define GUSP(gus, x) ((gus)->gf1.port + SNDRV_g_u_s_##x) argument 201 void (*ack)(struct snd_gus_card * gus, void *private_data); 208 struct snd_gus_card * gus; member 250 void (*handler_wave) (struct snd_gus_card * gus, struct snd_gus_voice * voice); 251 void (*handler_volume) (struct snd_gus_card * gus, struct snd_gus_voice * voice); 252 void (*handler_effect) (struct snd_gus_card * gus, struct snd_gus_voice * voice); 253 void (*volume_change) (struct snd_gus_card * gus); 330 void (*interrupt_handler_midi_out) (struct snd_gus_card * gus); 331 void (*interrupt_handler_midi_in) (struct snd_gus_card * gus); 332 void (*interrupt_handler_timer1) (struct snd_gus_card * gus); [all …]
|
/kernel/linux/linux-5.10/sound/isa/ |
D | Makefile | 28 obj-$(CONFIG_SND) += ad1816a/ ad1848/ cs423x/ es1688/ galaxy/ gus/ msnd/ opti9xx/ \
|
/kernel/linux/linux-5.10/Documentation/sound/kernel-api/ |
D | writing-an-alsa-driver.rst | 3696 implementations, please check ``isa/gus/gus_pcm.c`` or 3748 for each channel. See, for example, ``isa/gus/gus_pcm.c``.
|