blob: 0aeaa6cf6cf0409eba067fedfe69c0e87127817f [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * Driver for Gravis UltraSound Extreme 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>
Linus Torvalds1da177e2005-04-16 15:20:36 -070023#include <linux/init.h>
Takashi Iwai654aa662005-11-17 17:13:43 +010024#include <linux/err.h>
Rene Hermanb44dfe12007-02-19 13:07:17 +010025#include <linux/isa.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070026#include <linux/delay.h>
27#include <linux/time.h>
28#include <linux/moduleparam.h>
Takashi Iwai654aa662005-11-17 17:13:43 +010029#include <asm/dma.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070030#include <sound/core.h>
31#include <sound/gus.h>
32#include <sound/es1688.h>
33#include <sound/mpu401.h>
34#include <sound/opl3.h>
35#define SNDRV_LEGACY_AUTO_PROBE
36#define SNDRV_LEGACY_FIND_FREE_IRQ
37#define SNDRV_LEGACY_FIND_FREE_DMA
38#include <sound/initval.h>
39
Rene Hermanb44dfe12007-02-19 13:07:17 +010040#define CRD_NAME "Gravis UltraSound Extreme"
41#define DEV_NAME "gusextreme"
42
43MODULE_DESCRIPTION(CRD_NAME);
Linus Torvalds1da177e2005-04-16 15:20:36 -070044MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
Linus Torvalds1da177e2005-04-16 15:20:36 -070045MODULE_LICENSE("GPL");
46MODULE_SUPPORTED_DEVICE("{{Gravis,UltraSound Extreme}}");
47
48static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */
49static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */
50static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE; /* Enable this card */
51static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; /* 0x220,0x240,0x260 */
52static long gf1_port[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS) - 1] = -1}; /* 0x210,0x220,0x230,0x240,0x250,0x260,0x270 */
53static long mpu_port[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS) - 1] = -1}; /* 0x300,0x310,0x320 */
54static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; /* 5,7,9,10 */
55static int mpu_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; /* 5,7,9,10 */
56static int gf1_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; /* 2,3,5,9,11,12,15 */
57static int dma8[SNDRV_CARDS] = SNDRV_DEFAULT_DMA; /* 0,1,3 */
58static int dma1[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;
59static int joystick_dac[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 29};
60 /* 0 to 31, (0.59V-4.52V or 0.389V-2.98V) */
61static int channels[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 24};
62static int pcm_channels[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 2};
63
64module_param_array(index, int, NULL, 0444);
Rene Hermanb44dfe12007-02-19 13:07:17 +010065MODULE_PARM_DESC(index, "Index value for " CRD_NAME " soundcard.");
Linus Torvalds1da177e2005-04-16 15:20:36 -070066module_param_array(id, charp, NULL, 0444);
Rene Hermanb44dfe12007-02-19 13:07:17 +010067MODULE_PARM_DESC(id, "ID string for " CRD_NAME " soundcard.");
Linus Torvalds1da177e2005-04-16 15:20:36 -070068module_param_array(enable, bool, NULL, 0444);
Rene Hermanb44dfe12007-02-19 13:07:17 +010069MODULE_PARM_DESC(enable, "Enable " CRD_NAME " soundcard.");
Linus Torvalds1da177e2005-04-16 15:20:36 -070070module_param_array(port, long, NULL, 0444);
Rene Hermanb44dfe12007-02-19 13:07:17 +010071MODULE_PARM_DESC(port, "Port # for " CRD_NAME " driver.");
Linus Torvalds1da177e2005-04-16 15:20:36 -070072module_param_array(gf1_port, long, NULL, 0444);
Rene Hermanb44dfe12007-02-19 13:07:17 +010073MODULE_PARM_DESC(gf1_port, "GF1 port # for " CRD_NAME " driver (optional).");
Linus Torvalds1da177e2005-04-16 15:20:36 -070074module_param_array(mpu_port, long, NULL, 0444);
Rene Hermanb44dfe12007-02-19 13:07:17 +010075MODULE_PARM_DESC(mpu_port, "MPU-401 port # for " CRD_NAME " driver.");
Linus Torvalds1da177e2005-04-16 15:20:36 -070076module_param_array(irq, int, NULL, 0444);
Rene Hermanb44dfe12007-02-19 13:07:17 +010077MODULE_PARM_DESC(irq, "IRQ # for " CRD_NAME " driver.");
Linus Torvalds1da177e2005-04-16 15:20:36 -070078module_param_array(mpu_irq, int, NULL, 0444);
Rene Hermanb44dfe12007-02-19 13:07:17 +010079MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ # for " CRD_NAME " driver.");
Linus Torvalds1da177e2005-04-16 15:20:36 -070080module_param_array(gf1_irq, int, NULL, 0444);
Rene Hermanb44dfe12007-02-19 13:07:17 +010081MODULE_PARM_DESC(gf1_irq, "GF1 IRQ # for " CRD_NAME " driver.");
Linus Torvalds1da177e2005-04-16 15:20:36 -070082module_param_array(dma8, int, NULL, 0444);
Rene Hermanb44dfe12007-02-19 13:07:17 +010083MODULE_PARM_DESC(dma8, "8-bit DMA # for " CRD_NAME " driver.");
Linus Torvalds1da177e2005-04-16 15:20:36 -070084module_param_array(dma1, int, NULL, 0444);
Rene Hermanb44dfe12007-02-19 13:07:17 +010085MODULE_PARM_DESC(dma1, "GF1 DMA # for " CRD_NAME " driver.");
Linus Torvalds1da177e2005-04-16 15:20:36 -070086module_param_array(joystick_dac, int, NULL, 0444);
Rene Hermanb44dfe12007-02-19 13:07:17 +010087MODULE_PARM_DESC(joystick_dac, "Joystick DAC level 0.59V-4.52V or 0.389V-2.98V for " CRD_NAME " driver.");
Linus Torvalds1da177e2005-04-16 15:20:36 -070088module_param_array(channels, int, NULL, 0444);
Rene Hermanb44dfe12007-02-19 13:07:17 +010089MODULE_PARM_DESC(channels, "GF1 channels for " CRD_NAME " driver.");
Linus Torvalds1da177e2005-04-16 15:20:36 -070090module_param_array(pcm_channels, int, NULL, 0444);
Rene Hermanb44dfe12007-02-19 13:07:17 +010091MODULE_PARM_DESC(pcm_channels, "Reserved PCM channels for " CRD_NAME " driver.");
Linus Torvalds1da177e2005-04-16 15:20:36 -070092
Rene Hermanb44dfe12007-02-19 13:07:17 +010093static int __devinit snd_gusextreme_match(struct device *dev, unsigned int n)
94{
95 return enable[n];
96}
Clemens Ladischf7a92752005-12-07 09:13:42 +010097
Rene Hermanb44dfe12007-02-19 13:07:17 +010098static int __devinit snd_gusextreme_es1688_create(struct snd_card *card,
99 struct device *dev, unsigned int n, struct snd_es1688 **rchip)
100{
101 static long possible_ports[] = {0x220, 0x240, 0x260};
102 static int possible_irqs[] = {5, 9, 10, 7, -1};
103 static int possible_dmas[] = {1, 3, 0, -1};
Linus Torvalds1da177e2005-04-16 15:20:36 -0700104
Rene Hermanb44dfe12007-02-19 13:07:17 +0100105 int i, error;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700106
Rene Hermanb44dfe12007-02-19 13:07:17 +0100107 if (irq[n] == SNDRV_AUTO_IRQ) {
108 irq[n] = snd_legacy_find_free_irq(possible_irqs);
109 if (irq[n] < 0) {
110 snd_printk(KERN_ERR "%s: unable to find a free IRQ "
111 "for ES1688\n", dev->bus_id);
112 return -EBUSY;
113 }
114 }
115 if (dma8[n] == SNDRV_AUTO_DMA) {
116 dma8[n] = snd_legacy_find_free_dma(possible_dmas);
117 if (dma8[n] < 0) {
118 snd_printk(KERN_ERR "%s: unable to find a free DMA "
119 "for ES1688\n", dev->bus_id);
120 return -EBUSY;
121 }
122 }
123
124 if (port[n] != SNDRV_AUTO_PORT)
125 return snd_es1688_create(card, port[n], mpu_port[n], irq[n],
126 mpu_irq[n], dma8[n], ES1688_HW_1688, rchip);
127
128 i = 0;
129 do {
130 port[n] = possible_ports[i];
131 error = snd_es1688_create(card, port[n], mpu_port[n], irq[n],
132 mpu_irq[n], dma8[n], ES1688_HW_1688, rchip);
133 } while (error < 0 && ++i < ARRAY_SIZE(possible_ports));
134
135 return error;
136}
137
138static int __devinit snd_gusextreme_gus_card_create(struct snd_card *card,
139 struct device *dev, unsigned int n, struct snd_gus_card **rgus)
140{
141 static int possible_irqs[] = {11, 12, 15, 9, 5, 7, 3, -1};
142 static int possible_dmas[] = {5, 6, 7, 3, 1, -1};
143
144 if (gf1_irq[n] == SNDRV_AUTO_IRQ) {
145 gf1_irq[n] = snd_legacy_find_free_irq(possible_irqs);
146 if (gf1_irq[n] < 0) {
147 snd_printk(KERN_ERR "%s: unable to find a free IRQ "
148 "for GF1\n", dev->bus_id);
149 return -EBUSY;
150 }
151 }
152 if (dma1[n] == SNDRV_AUTO_DMA) {
153 dma1[n] = snd_legacy_find_free_dma(possible_dmas);
154 if (dma1[n] < 0) {
155 snd_printk(KERN_ERR "%s: unable to find a free DMA "
156 "for GF1\n", dev->bus_id);
157 return -EBUSY;
158 }
159 }
160 return snd_gus_create(card, gf1_port[n], gf1_irq[n], dma1[n], -1,
161 0, channels[n], pcm_channels[n], 0, rgus);
162}
163
164static int __devinit snd_gusextreme_detect(struct snd_gus_card *gus,
165 struct snd_es1688 *es1688)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700166{
167 unsigned long flags;
Takashi Iwai43bcd972005-09-05 17:19:20 +0200168 unsigned char d;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700169
170 /*
171 * This is main stuff - enable access to GF1 chip...
172 * I'm not sure, if this will work for card which have
173 * ES1688 chip in another place than 0x220.
174 *
175 * I used reverse-engineering in DOSEMU. [--jk]
176 *
177 * ULTRINIT.EXE:
178 * 0x230 = 0,2,3
179 * 0x240 = 2,0,1
180 * 0x250 = 2,0,3
181 * 0x260 = 2,2,1
182 */
183
184 spin_lock_irqsave(&es1688->mixer_lock, flags);
185 snd_es1688_mixer_write(es1688, 0x40, 0x0b); /* don't change!!! */
186 spin_unlock_irqrestore(&es1688->mixer_lock, flags);
Rene Hermanb44dfe12007-02-19 13:07:17 +0100187
Linus Torvalds1da177e2005-04-16 15:20:36 -0700188 spin_lock_irqsave(&es1688->reg_lock, flags);
Rene Hermanb44dfe12007-02-19 13:07:17 +0100189 outb(gus->gf1.port & 0x040 ? 2 : 0, ES1688P(es1688, INIT1));
Linus Torvalds1da177e2005-04-16 15:20:36 -0700190 outb(0, 0x201);
Rene Hermanb44dfe12007-02-19 13:07:17 +0100191 outb(gus->gf1.port & 0x020 ? 2 : 0, ES1688P(es1688, INIT1));
Linus Torvalds1da177e2005-04-16 15:20:36 -0700192 outb(0, 0x201);
Rene Hermanb44dfe12007-02-19 13:07:17 +0100193 outb(gus->gf1.port & 0x010 ? 3 : 1, ES1688P(es1688, INIT1));
Linus Torvalds1da177e2005-04-16 15:20:36 -0700194 spin_unlock_irqrestore(&es1688->reg_lock, flags);
195
196 udelay(100);
197
198 snd_gf1_i_write8(gus, SNDRV_GF1_GB_RESET, 0); /* reset GF1 */
Takashi Iwai43bcd972005-09-05 17:19:20 +0200199 if (((d = snd_gf1_i_look8(gus, SNDRV_GF1_GB_RESET)) & 0x07) != 0) {
200 snd_printdd("[0x%lx] check 1 failed - 0x%x\n", gus->gf1.port, d);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700201 return -EIO;
Takashi Iwai43bcd972005-09-05 17:19:20 +0200202 }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700203 udelay(160);
204 snd_gf1_i_write8(gus, SNDRV_GF1_GB_RESET, 1); /* release reset */
205 udelay(160);
Takashi Iwai43bcd972005-09-05 17:19:20 +0200206 if (((d = snd_gf1_i_look8(gus, SNDRV_GF1_GB_RESET)) & 0x07) != 1) {
207 snd_printdd("[0x%lx] check 2 failed - 0x%x\n", gus->gf1.port, d);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700208 return -EIO;
Takashi Iwai43bcd972005-09-05 17:19:20 +0200209 }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700210
Rene Hermanb44dfe12007-02-19 13:07:17 +0100211 return 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700212}
213
Prarit Bhargava788c6042007-02-13 13:11:11 +0100214static int __devinit snd_gusextreme_mixer(struct snd_es1688 *chip)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700215{
Takashi Iwai5e2da202005-11-17 14:36:44 +0100216 struct snd_card *card = chip->card;
217 struct snd_ctl_elem_id id1, id2;
Rene Hermanb44dfe12007-02-19 13:07:17 +0100218 int error;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700219
220 memset(&id1, 0, sizeof(id1));
221 memset(&id2, 0, sizeof(id2));
222 id1.iface = id2.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
Rene Hermanb44dfe12007-02-19 13:07:17 +0100223
Linus Torvalds1da177e2005-04-16 15:20:36 -0700224 /* reassign AUX to SYNTHESIZER */
225 strcpy(id1.name, "Aux Playback Volume");
226 strcpy(id2.name, "Synth Playback Volume");
Rene Hermanb44dfe12007-02-19 13:07:17 +0100227 error = snd_ctl_rename_id(card, &id1, &id2);
228 if (error < 0)
229 return error;
230
Linus Torvalds1da177e2005-04-16 15:20:36 -0700231 /* reassign Master Playback Switch to Synth Playback Switch */
232 strcpy(id1.name, "Master Playback Switch");
233 strcpy(id2.name, "Synth Playback Switch");
Rene Hermanb44dfe12007-02-19 13:07:17 +0100234 error = snd_ctl_rename_id(card, &id1, &id2);
235 if (error < 0)
236 return error;
237
Linus Torvalds1da177e2005-04-16 15:20:36 -0700238 return 0;
239}
240
Rene Hermanb44dfe12007-02-19 13:07:17 +0100241static int __devinit snd_gusextreme_probe(struct device *dev, unsigned int n)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700242{
Takashi Iwai5e2da202005-11-17 14:36:44 +0100243 struct snd_card *card;
Takashi Iwai5e2da202005-11-17 14:36:44 +0100244 struct snd_gus_card *gus;
245 struct snd_es1688 *es1688;
246 struct snd_opl3 *opl3;
Rene Hermanb44dfe12007-02-19 13:07:17 +0100247 int error;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700248
Rene Hermanb44dfe12007-02-19 13:07:17 +0100249 card = snd_card_new(index[n], id[n], THIS_MODULE, 0);
250 if (!card)
251 return -EINVAL;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700252
Rene Hermanb44dfe12007-02-19 13:07:17 +0100253 if (mpu_port[n] == SNDRV_AUTO_PORT)
254 mpu_port[n] = 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700255
Rene Hermanb44dfe12007-02-19 13:07:17 +0100256 if (mpu_irq[n] > 15)
257 mpu_irq[n] = -1;
258
259 error = snd_gusextreme_es1688_create(card, dev, n, &es1688);
260 if (error < 0)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700261 goto out;
Takashi Iwai654aa662005-11-17 17:13:43 +0100262
Rene Hermanb44dfe12007-02-19 13:07:17 +0100263 if (gf1_port[n] < 0)
264 gf1_port[n] = es1688->port + 0x20;
265
266 error = snd_gusextreme_gus_card_create(card, dev, n, &gus);
267 if (error < 0)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700268 goto out;
269
Rene Hermanb44dfe12007-02-19 13:07:17 +0100270 error = snd_gusextreme_detect(gus, es1688);
271 if (error < 0)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700272 goto out;
273
Rene Hermanb44dfe12007-02-19 13:07:17 +0100274 gus->joystick_dac = joystick_dac[n];
275
276 error = snd_gus_initialize(gus);
277 if (error < 0)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700278 goto out;
279
Rene Hermanb44dfe12007-02-19 13:07:17 +0100280 error = -ENODEV;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700281 if (!gus->ess_flag) {
Rene Hermanb44dfe12007-02-19 13:07:17 +0100282 snd_printk(KERN_ERR "%s: GUS Extreme soundcard was not "
283 "detected at 0x%lx\n", dev->bus_id, gus->gf1.port);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700284 goto out;
285 }
Rene Herman442f4f32007-02-19 13:07:50 +0100286 gus->codec_flag = 1;
Rene Hermanb44dfe12007-02-19 13:07:17 +0100287
288 error = snd_es1688_pcm(es1688, 0, NULL);
289 if (error < 0)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700290 goto out;
291
Rene Hermanb44dfe12007-02-19 13:07:17 +0100292 error = snd_es1688_mixer(es1688);
293 if (error < 0)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700294 goto out;
295
296 snd_component_add(card, "ES1688");
Rene Hermanb44dfe12007-02-19 13:07:17 +0100297
298 if (pcm_channels[n] > 0) {
299 error = snd_gf1_pcm_new(gus, 1, 1, NULL);
300 if (error < 0)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700301 goto out;
302 }
Rene Hermanb44dfe12007-02-19 13:07:17 +0100303
304 error = snd_gf1_new_mixer(gus);
305 if (error < 0)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700306 goto out;
307
Rene Hermanb44dfe12007-02-19 13:07:17 +0100308 error = snd_gusextreme_mixer(es1688);
309 if (error < 0)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700310 goto out;
311
312 if (snd_opl3_create(card, es1688->port, es1688->port + 2,
Rene Hermanb44dfe12007-02-19 13:07:17 +0100313 OPL3_HW_OPL3, 0, &opl3) < 0)
314 printk(KERN_ERR "%s: opl3 not detected at 0x%lx\n",
315 dev->bus_id, es1688->port);
316 else {
317 error = snd_opl3_hwdep_new(opl3, 0, 2, NULL);
318 if (error < 0)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700319 goto out;
320 }
321
Rene Hermanb44dfe12007-02-19 13:07:17 +0100322 if (es1688->mpu_port >= 0x300) {
323 error = snd_mpu401_uart_new(card, 0, MPU401_HW_ES1688,
324 es1688->mpu_port, 0,
325 mpu_irq[n], IRQF_DISABLED, NULL);
326 if (error < 0)
327 goto out;
328 }
329
330 sprintf(card->longname, "Gravis UltraSound Extreme at 0x%lx, "
331 "irq %i&%i, dma %i&%i", es1688->port,
332 gus->gf1.irq, es1688->irq, gus->gf1.dma1, es1688->dma8);
333
334 snd_card_set_dev(card, dev);
335
336 error = snd_card_register(card);
337 if (error < 0)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700338 goto out;
339
Rene Hermanb44dfe12007-02-19 13:07:17 +0100340 dev_set_drvdata(dev, card);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700341 return 0;
342
Rene Hermanb44dfe12007-02-19 13:07:17 +0100343out: snd_card_free(card);
344 return error;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700345}
346
Rene Hermanb44dfe12007-02-19 13:07:17 +0100347static int __devexit snd_gusextreme_remove(struct device *dev, unsigned int n)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700348{
Rene Hermanb44dfe12007-02-19 13:07:17 +0100349 snd_card_free(dev_get_drvdata(dev));
350 dev_set_drvdata(dev, NULL);
Takashi Iwai654aa662005-11-17 17:13:43 +0100351 return 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700352}
353
Rene Hermanb44dfe12007-02-19 13:07:17 +0100354static struct isa_driver snd_gusextreme_driver = {
355 .match = snd_gusextreme_match,
Takashi Iwai654aa662005-11-17 17:13:43 +0100356 .probe = snd_gusextreme_probe,
Rene Hermanb44dfe12007-02-19 13:07:17 +0100357 .remove = snd_gusextreme_remove,
358#if 0 /* FIXME */
359 .suspend = snd_gusextreme_suspend,
360 .resume = snd_gusextreme_resume,
361#endif
Takashi Iwai654aa662005-11-17 17:13:43 +0100362 .driver = {
Rene Hermanb44dfe12007-02-19 13:07:17 +0100363 .name = DEV_NAME
364 }
Takashi Iwai654aa662005-11-17 17:13:43 +0100365};
366
Linus Torvalds1da177e2005-04-16 15:20:36 -0700367static int __init alsa_card_gusextreme_init(void)
368{
Rene Hermanb44dfe12007-02-19 13:07:17 +0100369 return isa_register_driver(&snd_gusextreme_driver, SNDRV_CARDS);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700370}
371
372static void __exit alsa_card_gusextreme_exit(void)
373{
Rene Hermanb44dfe12007-02-19 13:07:17 +0100374 isa_unregister_driver(&snd_gusextreme_driver);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700375}
376
Rene Hermanb44dfe12007-02-19 13:07:17 +0100377module_init(alsa_card_gusextreme_init);
378module_exit(alsa_card_gusextreme_exit);