blob: 53eeaf37007d15a79ce443d17dc2fc11af6bfeb6 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * Routines for Gravis UltraSound soundcards
3 * Copyright (c) by Jaroslav Kysela <perex@suse.cz>
4 *
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 *
20 */
21
22#include <sound/driver.h>
23#include <linux/init.h>
24#include <linux/interrupt.h>
25#include <linux/delay.h>
26#include <linux/slab.h>
27#include <linux/ioport.h>
28#include <sound/core.h>
29#include <sound/gus.h>
30#include <sound/control.h>
31
32#include <asm/dma.h>
33
34MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
35MODULE_DESCRIPTION("Routines for Gravis UltraSound soundcards");
36MODULE_LICENSE("GPL");
37
Takashi Iwai5e2da202005-11-17 14:36:44 +010038static int snd_gus_init_dma_irq(struct snd_gus_card * gus, int latches);
Linus Torvalds1da177e2005-04-16 15:20:36 -070039
Takashi Iwai5e2da202005-11-17 14:36:44 +010040int snd_gus_use_inc(struct snd_gus_card * gus)
Linus Torvalds1da177e2005-04-16 15:20:36 -070041{
42 if (!try_module_get(gus->card->module))
43 return 0;
44 return 1;
45}
46
Takashi Iwai5e2da202005-11-17 14:36:44 +010047void snd_gus_use_dec(struct snd_gus_card * gus)
Linus Torvalds1da177e2005-04-16 15:20:36 -070048{
49 module_put(gus->card->module);
50}
51
Takashi Iwai5e2da202005-11-17 14:36:44 +010052static int snd_gus_joystick_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
Linus Torvalds1da177e2005-04-16 15:20:36 -070053{
54 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
55 uinfo->count = 1;
56 uinfo->value.integer.min = 0;
57 uinfo->value.integer.max = 31;
58 return 0;
59}
60
Takashi Iwai5e2da202005-11-17 14:36:44 +010061static int snd_gus_joystick_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
Linus Torvalds1da177e2005-04-16 15:20:36 -070062{
Takashi Iwai5e2da202005-11-17 14:36:44 +010063 struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol);
Linus Torvalds1da177e2005-04-16 15:20:36 -070064
65 ucontrol->value.integer.value[0] = gus->joystick_dac & 31;
66 return 0;
67}
68
Takashi Iwai5e2da202005-11-17 14:36:44 +010069static int snd_gus_joystick_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
Linus Torvalds1da177e2005-04-16 15:20:36 -070070{
Takashi Iwai5e2da202005-11-17 14:36:44 +010071 struct snd_gus_card *gus = snd_kcontrol_chip(kcontrol);
Linus Torvalds1da177e2005-04-16 15:20:36 -070072 unsigned long flags;
73 int change;
74 unsigned char nval;
75
76 nval = ucontrol->value.integer.value[0] & 31;
77 spin_lock_irqsave(&gus->reg_lock, flags);
78 change = gus->joystick_dac != nval;
79 gus->joystick_dac = nval;
80 snd_gf1_write8(gus, SNDRV_GF1_GB_JOYSTICK_DAC_LEVEL, gus->joystick_dac);
81 spin_unlock_irqrestore(&gus->reg_lock, flags);
82 return change;
83}
84
Takashi Iwai5e2da202005-11-17 14:36:44 +010085static struct snd_kcontrol_new snd_gus_joystick_control = {
Linus Torvalds1da177e2005-04-16 15:20:36 -070086 .iface = SNDRV_CTL_ELEM_IFACE_CARD,
87 .name = "Joystick Speed",
88 .info = snd_gus_joystick_info,
89 .get = snd_gus_joystick_get,
90 .put = snd_gus_joystick_put
91};
92
Takashi Iwai5e2da202005-11-17 14:36:44 +010093static void snd_gus_init_control(struct snd_gus_card *gus)
Linus Torvalds1da177e2005-04-16 15:20:36 -070094{
95 if (!gus->ace_flag)
96 snd_ctl_add(gus->card, snd_ctl_new1(&snd_gus_joystick_control, gus));
97}
98
99/*
100 *
101 */
102
Takashi Iwai5e2da202005-11-17 14:36:44 +0100103static int snd_gus_free(struct snd_gus_card *gus)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700104{
105 if (gus->gf1.res_port2 == NULL)
106 goto __hw_end;
107#if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
108 if (gus->seq_dev) {
109 snd_device_free(gus->card, gus->seq_dev);
110 gus->seq_dev = NULL;
111 }
112#endif
113 snd_gf1_stop(gus);
114 snd_gus_init_dma_irq(gus, 0);
115 __hw_end:
Takashi Iwaib1d57762005-10-10 11:56:31 +0200116 release_and_free_resource(gus->gf1.res_port1);
117 release_and_free_resource(gus->gf1.res_port2);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700118 if (gus->gf1.irq >= 0)
119 free_irq(gus->gf1.irq, (void *) gus);
120 if (gus->gf1.dma1 >= 0) {
121 disable_dma(gus->gf1.dma1);
122 free_dma(gus->gf1.dma1);
123 }
124 if (!gus->equal_dma && gus->gf1.dma2 >= 0) {
125 disable_dma(gus->gf1.dma2);
126 free_dma(gus->gf1.dma2);
127 }
128 kfree(gus);
129 return 0;
130}
131
Takashi Iwai5e2da202005-11-17 14:36:44 +0100132static int snd_gus_dev_free(struct snd_device *device)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700133{
Takashi Iwai5e2da202005-11-17 14:36:44 +0100134 struct snd_gus_card *gus = device->device_data;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700135 return snd_gus_free(gus);
136}
137
Takashi Iwai5e2da202005-11-17 14:36:44 +0100138int snd_gus_create(struct snd_card *card,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700139 unsigned long port,
140 int irq, int dma1, int dma2,
141 int timer_dev,
142 int voices,
143 int pcm_channels,
144 int effect,
Takashi Iwai5e2da202005-11-17 14:36:44 +0100145 struct snd_gus_card **rgus)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700146{
Takashi Iwai5e2da202005-11-17 14:36:44 +0100147 struct snd_gus_card *gus;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700148 int err;
Takashi Iwai5e2da202005-11-17 14:36:44 +0100149 static struct snd_device_ops ops = {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700150 .dev_free = snd_gus_dev_free,
151 };
152
153 *rgus = NULL;
Takashi Iwai9e76a762005-09-09 14:21:17 +0200154 gus = kzalloc(sizeof(*gus), GFP_KERNEL);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700155 if (gus == NULL)
156 return -ENOMEM;
157 gus->gf1.irq = -1;
158 gus->gf1.dma1 = -1;
159 gus->gf1.dma2 = -1;
160 gus->card = card;
161 gus->gf1.port = port;
162 /* fill register variables for speedup */
163 gus->gf1.reg_page = GUSP(gus, GF1PAGE);
164 gus->gf1.reg_regsel = GUSP(gus, GF1REGSEL);
165 gus->gf1.reg_data8 = GUSP(gus, GF1DATAHIGH);
166 gus->gf1.reg_data16 = GUSP(gus, GF1DATALOW);
167 gus->gf1.reg_irqstat = GUSP(gus, IRQSTAT);
168 gus->gf1.reg_dram = GUSP(gus, DRAM);
169 gus->gf1.reg_timerctrl = GUSP(gus, TIMERCNTRL);
170 gus->gf1.reg_timerdata = GUSP(gus, TIMERDATA);
171 /* allocate resources */
172 if ((gus->gf1.res_port1 = request_region(port, 16, "GUS GF1 (Adlib/SB)")) == NULL) {
173 snd_printk(KERN_ERR "gus: can't grab SB port 0x%lx\n", port);
174 snd_gus_free(gus);
175 return -EBUSY;
176 }
177 if ((gus->gf1.res_port2 = request_region(port + 0x100, 12, "GUS GF1 (Synth)")) == NULL) {
178 snd_printk(KERN_ERR "gus: can't grab synth port 0x%lx\n", port + 0x100);
179 snd_gus_free(gus);
180 return -EBUSY;
181 }
182 if (irq >= 0 && request_irq(irq, snd_gus_interrupt, SA_INTERRUPT, "GUS GF1", (void *) gus)) {
183 snd_printk(KERN_ERR "gus: can't grab irq %d\n", irq);
184 snd_gus_free(gus);
185 return -EBUSY;
186 }
187 gus->gf1.irq = irq;
188 if (request_dma(dma1, "GUS - 1")) {
189 snd_printk(KERN_ERR "gus: can't grab DMA1 %d\n", dma1);
190 snd_gus_free(gus);
191 return -EBUSY;
192 }
193 gus->gf1.dma1 = dma1;
194 if (dma2 >= 0 && dma1 != dma2) {
195 if (request_dma(dma2, "GUS - 2")) {
196 snd_printk(KERN_ERR "gus: can't grab DMA2 %d\n", dma2);
197 snd_gus_free(gus);
198 return -EBUSY;
199 }
200 gus->gf1.dma2 = dma2;
201 } else {
202 gus->gf1.dma2 = gus->gf1.dma1;
203 gus->equal_dma = 1;
204 }
205 gus->timer_dev = timer_dev;
206 if (voices < 14)
207 voices = 14;
208 if (voices > 32)
209 voices = 32;
210 if (pcm_channels < 0)
211 pcm_channels = 0;
212 if (pcm_channels > 8)
213 pcm_channels = 8;
214 pcm_channels++;
215 pcm_channels &= ~1;
216 gus->gf1.effect = effect ? 1 : 0;
217 gus->gf1.active_voices = voices;
218 gus->gf1.pcm_channels = pcm_channels;
219 gus->gf1.volume_ramp = 25;
220 gus->gf1.smooth_pan = 1;
221 spin_lock_init(&gus->reg_lock);
222 spin_lock_init(&gus->voice_alloc);
223 spin_lock_init(&gus->active_voice_lock);
224 spin_lock_init(&gus->event_lock);
225 spin_lock_init(&gus->dma_lock);
226 spin_lock_init(&gus->pcm_volume_level_lock);
227 spin_lock_init(&gus->uart_cmd_lock);
Ingo Molnar8b7547f2006-01-16 16:33:08 +0100228 mutex_init(&gus->dma_mutex);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700229 if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, gus, &ops)) < 0) {
230 snd_gus_free(gus);
231 return err;
232 }
233 *rgus = gus;
234 return 0;
235}
236
237/*
238 * Memory detection routine for plain GF1 soundcards
239 */
240
Takashi Iwai5e2da202005-11-17 14:36:44 +0100241static int snd_gus_detect_memory(struct snd_gus_card * gus)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700242{
243 int l, idx, local;
244 unsigned char d;
245
246 snd_gf1_poke(gus, 0L, 0xaa);
247 snd_gf1_poke(gus, 1L, 0x55);
248 if (snd_gf1_peek(gus, 0L) != 0xaa || snd_gf1_peek(gus, 1L) != 0x55) {
Takashi Iwai99b359b2005-10-20 18:26:44 +0200249 snd_printk(KERN_ERR "plain GF1 card at 0x%lx without onboard DRAM?\n", gus->gf1.port);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700250 return -ENOMEM;
251 }
252 for (idx = 1, d = 0xab; idx < 4; idx++, d++) {
253 local = idx << 18;
254 snd_gf1_poke(gus, local, d);
255 snd_gf1_poke(gus, local + 1, d + 1);
256 if (snd_gf1_peek(gus, local) != d ||
257 snd_gf1_peek(gus, local + 1) != d + 1 ||
258 snd_gf1_peek(gus, 0L) != 0xaa)
259 break;
260 }
261#if 1
262 gus->gf1.memory = idx << 18;
263#else
264 gus->gf1.memory = 256 * 1024;
265#endif
266 for (l = 0, local = gus->gf1.memory; l < 4; l++, local -= 256 * 1024) {
267 gus->gf1.mem_alloc.banks_8[l].address =
268 gus->gf1.mem_alloc.banks_8[l].size = 0;
269 gus->gf1.mem_alloc.banks_16[l].address = l << 18;
270 gus->gf1.mem_alloc.banks_16[l].size = local > 0 ? 256 * 1024 : 0;
271 }
272 gus->gf1.mem_alloc.banks_8[0].size = gus->gf1.memory;
273 return 0; /* some memory were detected */
274}
275
Takashi Iwai5e2da202005-11-17 14:36:44 +0100276static int snd_gus_init_dma_irq(struct snd_gus_card * gus, int latches)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700277{
Takashi Iwai5e2da202005-11-17 14:36:44 +0100278 struct snd_card *card;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700279 unsigned long flags;
280 int irq, dma1, dma2;
281 static unsigned char irqs[16] =
282 {0, 0, 1, 3, 0, 2, 0, 4, 0, 1, 0, 5, 6, 0, 0, 7};
283 static unsigned char dmas[8] =
284 {6, 1, 0, 2, 0, 3, 4, 5};
285
286 snd_assert(gus != NULL, return -EINVAL);
287 card = gus->card;
288 snd_assert(card != NULL, return -EINVAL);
289
290 gus->mix_cntrl_reg &= 0xf8;
291 gus->mix_cntrl_reg |= 0x01; /* disable MIC, LINE IN, enable LINE OUT */
292 if (gus->codec_flag || gus->ess_flag) {
293 gus->mix_cntrl_reg &= ~1; /* enable LINE IN */
294 gus->mix_cntrl_reg |= 4; /* enable MIC */
295 }
296 dma1 = gus->gf1.dma1;
297 dma1 = dma1 < 0 ? -dma1 : dma1;
298 dma1 = dmas[dma1 & 7];
299 dma2 = gus->gf1.dma2;
300 dma2 = dma2 < 0 ? -dma2 : dma2;
301 dma2 = dmas[dma2 & 7];
Linus Torvalds1da177e2005-04-16 15:20:36 -0700302 dma1 |= gus->equal_dma ? 0x40 : (dma2 << 3);
303
304 if ((dma1 & 7) == 0 || (dma2 & 7) == 0) {
Takashi Iwai99b359b2005-10-20 18:26:44 +0200305 snd_printk(KERN_ERR "Error! DMA isn't defined.\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700306 return -EINVAL;
307 }
308 irq = gus->gf1.irq;
309 irq = irq < 0 ? -irq : irq;
310 irq = irqs[irq & 0x0f];
311 if (irq == 0) {
Takashi Iwai99b359b2005-10-20 18:26:44 +0200312 snd_printk(KERN_ERR "Error! IRQ isn't defined.\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700313 return -EINVAL;
314 }
315 irq |= 0x40;
316#if 0
317 card->mixer.mix_ctrl_reg |= 0x10;
318#endif
319
320 spin_lock_irqsave(&gus->reg_lock, flags);
321 outb(5, GUSP(gus, REGCNTRLS));
322 outb(gus->mix_cntrl_reg, GUSP(gus, MIXCNTRLREG));
323 outb(0x00, GUSP(gus, IRQDMACNTRLREG));
324 outb(0, GUSP(gus, REGCNTRLS));
325 spin_unlock_irqrestore(&gus->reg_lock, flags);
326
327 udelay(100);
328
329 spin_lock_irqsave(&gus->reg_lock, flags);
330 outb(0x00 | gus->mix_cntrl_reg, GUSP(gus, MIXCNTRLREG));
331 outb(dma1, GUSP(gus, IRQDMACNTRLREG));
332 if (latches) {
333 outb(0x40 | gus->mix_cntrl_reg, GUSP(gus, MIXCNTRLREG));
334 outb(irq, GUSP(gus, IRQDMACNTRLREG));
335 }
336 spin_unlock_irqrestore(&gus->reg_lock, flags);
337
338 udelay(100);
339
340 spin_lock_irqsave(&gus->reg_lock, flags);
341 outb(0x00 | gus->mix_cntrl_reg, GUSP(gus, MIXCNTRLREG));
342 outb(dma1, GUSP(gus, IRQDMACNTRLREG));
343 if (latches) {
344 outb(0x40 | gus->mix_cntrl_reg, GUSP(gus, MIXCNTRLREG));
345 outb(irq, GUSP(gus, IRQDMACNTRLREG));
346 }
347 spin_unlock_irqrestore(&gus->reg_lock, flags);
348
349 snd_gf1_delay(gus);
350
351 if (latches)
352 gus->mix_cntrl_reg |= 0x08; /* enable latches */
353 else
354 gus->mix_cntrl_reg &= ~0x08; /* disable latches */
355 spin_lock_irqsave(&gus->reg_lock, flags);
356 outb(gus->mix_cntrl_reg, GUSP(gus, MIXCNTRLREG));
357 outb(0, GUSP(gus, GF1PAGE));
358 spin_unlock_irqrestore(&gus->reg_lock, flags);
359
360 return 0;
361}
362
Takashi Iwai5e2da202005-11-17 14:36:44 +0100363static int snd_gus_check_version(struct snd_gus_card * gus)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700364{
365 unsigned long flags;
366 unsigned char val, rev;
Takashi Iwai5e2da202005-11-17 14:36:44 +0100367 struct snd_card *card;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700368
369 card = gus->card;
370 spin_lock_irqsave(&gus->reg_lock, flags);
371 outb(0x20, GUSP(gus, REGCNTRLS));
372 val = inb(GUSP(gus, REGCNTRLS));
373 rev = inb(GUSP(gus, BOARDVERSION));
374 spin_unlock_irqrestore(&gus->reg_lock, flags);
375 snd_printdd("GF1 [0x%lx] init - val = 0x%x, rev = 0x%x\n", gus->gf1.port, val, rev);
376 strcpy(card->driver, "GUS");
377 strcpy(card->longname, "Gravis UltraSound Classic (2.4)");
378 if ((val != 255 && (val & 0x06)) || (rev >= 5 && rev != 255)) {
379 if (rev >= 5 && rev <= 9) {
380 gus->ics_flag = 1;
381 if (rev == 5)
382 gus->ics_flipped = 1;
383 card->longname[27] = '3';
384 card->longname[29] = rev == 5 ? '5' : '7';
385 }
386 if (rev >= 10 && rev != 255) {
387 if (rev >= 10 && rev <= 11) {
388 strcpy(card->driver, "GUS MAX");
389 strcpy(card->longname, "Gravis UltraSound MAX");
390 gus->max_flag = 1;
391 } else if (rev == 0x30) {
392 strcpy(card->driver, "GUS ACE");
393 strcpy(card->longname, "Gravis UltraSound Ace");
394 gus->ace_flag = 1;
395 } else if (rev == 0x50) {
396 strcpy(card->driver, "GUS Extreme");
397 strcpy(card->longname, "Gravis UltraSound Extreme");
398 gus->ess_flag = 1;
399 } else {
Takashi Iwai99b359b2005-10-20 18:26:44 +0200400 snd_printk(KERN_ERR "unknown GF1 revision number at 0x%lx - 0x%x (0x%x)\n", gus->gf1.port, rev, val);
401 snd_printk(KERN_ERR " please - report to <perex@suse.cz>\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700402 }
403 }
404 }
405 strcpy(card->shortname, card->longname);
406 gus->uart_enable = 1; /* standard GUSes doesn't have midi uart trouble */
407 snd_gus_init_control(gus);
408 return 0;
409}
410
Henrik Kretzschmar5b738ba2005-07-08 09:29:18 +0200411#if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
Takashi Iwai5e2da202005-11-17 14:36:44 +0100412static void snd_gus_seq_dev_free(struct snd_seq_device *seq_dev)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700413{
Takashi Iwai5e2da202005-11-17 14:36:44 +0100414 struct snd_gus_card *gus = seq_dev->private_data;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700415 gus->seq_dev = NULL;
416}
Henrik Kretzschmar5b738ba2005-07-08 09:29:18 +0200417#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700418
Takashi Iwai5e2da202005-11-17 14:36:44 +0100419int snd_gus_initialize(struct snd_gus_card *gus)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700420{
421 int err;
422
423 if (!gus->interwave) {
424 if ((err = snd_gus_check_version(gus)) < 0) {
Takashi Iwai99b359b2005-10-20 18:26:44 +0200425 snd_printk(KERN_ERR "version check failed\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700426 return err;
427 }
428 if ((err = snd_gus_detect_memory(gus)) < 0)
429 return err;
430 }
431 if ((err = snd_gus_init_dma_irq(gus, 1)) < 0)
432 return err;
433#if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
434 if (snd_seq_device_new(gus->card, 1, SNDRV_SEQ_DEV_ID_GUS,
Takashi Iwai5e2da202005-11-17 14:36:44 +0100435 sizeof(struct snd_gus_card *), &gus->seq_dev) >= 0) {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700436 strcpy(gus->seq_dev->name, "GUS");
Takashi Iwai5e2da202005-11-17 14:36:44 +0100437 *(struct snd_gus_card **)SNDRV_SEQ_DEVICE_ARGPTR(gus->seq_dev) = gus;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700438 gus->seq_dev->private_data = gus;
439 gus->seq_dev->private_free = snd_gus_seq_dev_free;
440 }
441#endif
442 snd_gf1_start(gus);
443 gus->initialized = 1;
444 return 0;
445}
446
447 /* gus_io.c */
448EXPORT_SYMBOL(snd_gf1_delay);
449EXPORT_SYMBOL(snd_gf1_write8);
450EXPORT_SYMBOL(snd_gf1_look8);
451EXPORT_SYMBOL(snd_gf1_write16);
452EXPORT_SYMBOL(snd_gf1_look16);
453EXPORT_SYMBOL(snd_gf1_i_write8);
454EXPORT_SYMBOL(snd_gf1_i_look8);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700455EXPORT_SYMBOL(snd_gf1_i_look16);
456EXPORT_SYMBOL(snd_gf1_dram_addr);
457EXPORT_SYMBOL(snd_gf1_write_addr);
458EXPORT_SYMBOL(snd_gf1_poke);
459EXPORT_SYMBOL(snd_gf1_peek);
460 /* gus_reset.c */
461EXPORT_SYMBOL(snd_gf1_alloc_voice);
462EXPORT_SYMBOL(snd_gf1_free_voice);
463EXPORT_SYMBOL(snd_gf1_ctrl_stop);
464EXPORT_SYMBOL(snd_gf1_stop_voice);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700465 /* gus_mixer.c */
466EXPORT_SYMBOL(snd_gf1_new_mixer);
467 /* gus_pcm.c */
468EXPORT_SYMBOL(snd_gf1_pcm_new);
469 /* gus.c */
470EXPORT_SYMBOL(snd_gus_use_inc);
471EXPORT_SYMBOL(snd_gus_use_dec);
472EXPORT_SYMBOL(snd_gus_create);
473EXPORT_SYMBOL(snd_gus_initialize);
474 /* gus_irq.c */
475EXPORT_SYMBOL(snd_gus_interrupt);
476 /* gus_uart.c */
477EXPORT_SYMBOL(snd_gf1_rawmidi_new);
478 /* gus_dram.c */
479EXPORT_SYMBOL(snd_gus_dram_write);
480EXPORT_SYMBOL(snd_gus_dram_read);
481 /* gus_volume.c */
482EXPORT_SYMBOL(snd_gf1_lvol_to_gvol_raw);
483EXPORT_SYMBOL(snd_gf1_translate_freq);
484 /* gus_mem.c */
485EXPORT_SYMBOL(snd_gf1_mem_alloc);
486EXPORT_SYMBOL(snd_gf1_mem_xfree);
487EXPORT_SYMBOL(snd_gf1_mem_free);
488EXPORT_SYMBOL(snd_gf1_mem_lock);
489
490/*
491 * INIT part
492 */
493
494static int __init alsa_gus_init(void)
495{
496 return 0;
497}
498
499static void __exit alsa_gus_exit(void)
500{
501}
502
503module_init(alsa_gus_init)
504module_exit(alsa_gus_exit)