Lines Matching +full:playback +full:- +full:dma

1 // SPDX-License-Identifier: GPL-2.0-or-later
13 #include <asm/dma.h>
31 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */
35 static long gf1_port[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS) - 1] = -1}; /* 0x210,0x220,0x230,0x240,0x…
36 static long mpu_port[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS) - 1] = -1}; /* 0x300,0x310,0x320 */
42 static int joystick_dac[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 29};
43 /* 0 to 31, (0.59V-4.52V or 0.389V-2.98V) */
44 static int channels[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 24};
45 static int pcm_channels[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 2};
58 MODULE_PARM_DESC(mpu_port, "MPU-401 port # for " CRD_NAME " driver.");
62 MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ # for " CRD_NAME " driver.");
65 module_param_hw_array(dma8, int, dma, NULL, 0444);
66 MODULE_PARM_DESC(dma8, "8-bit DMA # for " CRD_NAME " driver.");
67 module_param_hw_array(dma1, int, dma, NULL, 0444);
68 MODULE_PARM_DESC(dma1, "GF1 DMA # for " CRD_NAME " driver.");
70 MODULE_PARM_DESC(joystick_dac, "Joystick DAC level 0.59V-4.52V or 0.389V-2.98V for " CRD_NAME " dri…
86 static const int possible_irqs[] = {5, 9, 10, 7, -1}; in snd_gusextreme_es1688_create()
87 static const int possible_dmas[] = {1, 3, 0, -1}; in snd_gusextreme_es1688_create()
95 return -EBUSY; in snd_gusextreme_es1688_create()
101 dev_err(dev, "unable to find a free DMA for ES1688\n"); in snd_gusextreme_es1688_create()
102 return -EBUSY; in snd_gusextreme_es1688_create()
124 static const int possible_irqs[] = {11, 12, 15, 9, 5, 7, 3, -1}; in snd_gusextreme_gus_card_create()
125 static const int possible_dmas[] = {5, 6, 7, 3, 1, -1}; in snd_gusextreme_gus_card_create()
131 return -EBUSY; in snd_gusextreme_gus_card_create()
137 dev_err(dev, "unable to find a free DMA for GF1\n"); in snd_gusextreme_gus_card_create()
138 return -EBUSY; in snd_gusextreme_gus_card_create()
141 return snd_gus_create(card, gf1_port[n], gf1_irq[n], dma1[n], -1, in snd_gusextreme_gus_card_create()
152 * This is main stuff - enable access to GF1 chip... in snd_gusextreme_detect()
156 * I used reverse-engineering in DOSEMU. [--jk] in snd_gusextreme_detect()
165 spin_lock_irqsave(&es1688->mixer_lock, flags); in snd_gusextreme_detect()
167 spin_unlock_irqrestore(&es1688->mixer_lock, flags); in snd_gusextreme_detect()
169 spin_lock_irqsave(&es1688->reg_lock, flags); in snd_gusextreme_detect()
170 outb(gus->gf1.port & 0x040 ? 2 : 0, ES1688P(es1688, INIT1)); in snd_gusextreme_detect()
172 outb(gus->gf1.port & 0x020 ? 2 : 0, ES1688P(es1688, INIT1)); in snd_gusextreme_detect()
174 outb(gus->gf1.port & 0x010 ? 3 : 1, ES1688P(es1688, INIT1)); in snd_gusextreme_detect()
175 spin_unlock_irqrestore(&es1688->reg_lock, flags); in snd_gusextreme_detect()
182 dev_dbg(gus->card->dev, "[0x%lx] check 1 failed - 0x%x\n", gus->gf1.port, d); in snd_gusextreme_detect()
183 return -EIO; in snd_gusextreme_detect()
190 dev_dbg(gus->card->dev, "[0x%lx] check 2 failed - 0x%x\n", gus->gf1.port, d); in snd_gusextreme_detect()
191 return -EIO; in snd_gusextreme_detect()
207 strcpy(id1.name, "Aux Playback Volume"); in snd_gusextreme_mixer()
208 strcpy(id2.name, "Synth Playback Volume"); in snd_gusextreme_mixer()
213 /* reassign Master Playback Switch to Synth Playback Switch */ in snd_gusextreme_mixer()
214 strcpy(id1.name, "Master Playback Switch"); in snd_gusextreme_mixer()
215 strcpy(id2.name, "Synth Playback Switch"); in snd_gusextreme_mixer()
236 es1688 = card->private_data; in snd_gusextreme_probe()
242 mpu_irq[n] = -1; in snd_gusextreme_probe()
249 gf1_port[n] = es1688->port + 0x20; in snd_gusextreme_probe()
259 gus->joystick_dac = joystick_dac[n]; in snd_gusextreme_probe()
265 error = -ENODEV; in snd_gusextreme_probe()
266 if (!gus->ess_flag) { in snd_gusextreme_probe()
268 "detected at 0x%lx\n", gus->gf1.port); in snd_gusextreme_probe()
271 gus->codec_flag = 1; in snd_gusextreme_probe()
297 if (snd_opl3_create(card, es1688->port, es1688->port + 2, in snd_gusextreme_probe()
299 dev_warn(dev, "opl3 not detected at 0x%lx\n", es1688->port); in snd_gusextreme_probe()
306 if (es1688->mpu_port >= 0x300) { in snd_gusextreme_probe()
308 es1688->mpu_port, 0, mpu_irq[n], NULL); in snd_gusextreme_probe()
313 sprintf(card->longname, "Gravis UltraSound Extreme at 0x%lx, " in snd_gusextreme_probe()
314 "irq %i&%i, dma %i&%i", es1688->port, in snd_gusextreme_probe()
315 gus->gf1.irq, es1688->irq, gus->gf1.dma1, es1688->dma8); in snd_gusextreme_probe()