6f5928e4ded85d0df98babe425c9c7b56c7126e8
[dragonfly.git] / sys / dev / sound / isa / gusc.c
1 /*-
2  * Copyright (c) 1999 Seigo Tanimura
3  * Copyright (c) 1999 Ville-Pertti Keinonen
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  * 1. Redistributions of source code must retain the above copyright
10  *    notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  *    notice, this list of conditions and the following disclaimer in the
13  *    documentation and/or other materials provided with the distribution.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25  * SUCH DAMAGE.
26  *
27  * $FreeBSD: src/sys/dev/sound/isa/gusc.c,v 1.16 2005/01/06 01:43:17 imp Exp $
28  */
29
30 #include <sys/param.h>
31 #include <sys/systm.h>
32 #include <sys/kernel.h>
33 #include <sys/bus.h>
34 #include <sys/malloc.h>
35 #include <sys/module.h>
36 #include <sys/rman.h>
37 #include <sys/soundcard.h>
38
39 #include <dev/sound/pcm/sound.h>
40 #include <dev/sound/chip.h>
41 #include "bus_if.h"
42
43 #include <bus/isa/isavar.h>
44 #include <bus/isa/isa_common.h>
45
46 SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/isa/gusc.c,v 1.11 2007/01/04 21:47:02 corecode Exp $");
47
48 #define LOGICALID_NOPNP 0
49 #define LOGICALID_PCM   0x0000561e
50 #define LOGICALID_OPL   0x0300561e
51 #define LOGICALID_MIDI  0x0400561e
52
53 /* PnP IDs */
54 static struct isa_pnp_id gusc_ids[] = {
55         {LOGICALID_PCM,  "GRV0000 Gravis UltraSound PnP PCM"},  /* GRV0000 */
56         {LOGICALID_OPL,  "GRV0003 Gravis UltraSound PnP OPL"},  /* GRV0003 */
57         {LOGICALID_MIDI, "GRV0004 Gravis UltraSound PnP MIDI"}, /* GRV0004 */
58 };
59
60 /* Interrupt handler.  */
61 struct gusc_ihandler {
62         void (*intr)(void *);
63         void *arg;
64 };
65
66 /* Here is the parameter structure per a device. */
67 struct gusc_softc {
68         device_t dev; /* device */
69         int io_rid[3]; /* io port rids */
70         struct resource *io[3]; /* io port resources */
71         int io_alloced[3]; /* io port alloc flag */
72         int irq_rid; /* irq rids */
73         struct resource *irq; /* irq resources */
74         int irq_alloced; /* irq alloc flag */
75         int drq_rid[2]; /* drq rids */
76         struct resource *drq[2]; /* drq resources */
77         int drq_alloced[2]; /* drq alloc flag */
78
79         /* Interrupts are shared (XXX non-PnP only?) */
80         struct gusc_ihandler midi_intr;
81         struct gusc_ihandler pcm_intr;
82 };
83
84 typedef struct gusc_softc *sc_p;
85
86 static int gusc_probe(device_t dev);
87 static int gusc_attach(device_t dev);
88 static int gusisa_probe(device_t dev);
89 static void gusc_intr(void *);
90 static struct resource *gusc_alloc_resource(device_t bus, device_t child, int type, int *rid,
91                                               u_long start, u_long end, u_long count, u_int flags);
92 static int gusc_release_resource(device_t bus, device_t child, int type, int rid,
93                                    struct resource *r);
94
95 static device_t find_masterdev(sc_p scp);
96 static int alloc_resource(sc_p scp);
97 static int release_resource(sc_p scp);
98
99 static devclass_t gusc_devclass;
100
101 static int
102 gusc_probe(device_t dev)
103 {
104         device_t child;
105         u_int32_t logical_id;
106         char *s;
107         struct sndcard_func *func;
108         int ret;
109
110         logical_id = isa_get_logicalid(dev);
111         s = NULL;
112
113         /* Check isapnp ids */
114         if (logical_id != 0 && (ret = ISA_PNP_PROBE(device_get_parent(dev), dev, gusc_ids)) != 0)
115                 return (ret);
116         else {
117                 if (logical_id == 0)
118                         return gusisa_probe(dev);
119         }
120
121         switch (logical_id) {
122         case LOGICALID_PCM:
123                 s = "Gravis UltraSound Plug & Play PCM";
124                 func = kmalloc(sizeof(struct sndcard_func), M_DEVBUF,
125                                 M_WAITOK | M_ZERO);
126                 func->func = SCF_PCM;
127                 child = device_add_child(dev, "pcm", -1);
128                 device_set_ivars(child, func);
129                 break;
130         case LOGICALID_OPL:
131                 s = "Gravis UltraSound Plug & Play OPL";
132                 func = kmalloc(sizeof(struct sndcard_func), M_DEVBUF,
133                                 M_WAITOK | M_ZERO);
134                 func->func = SCF_SYNTH;
135                 child = device_add_child(dev, "midi", -1);
136                 device_set_ivars(child, func);
137                 break;
138         case LOGICALID_MIDI:
139                 s = "Gravis UltraSound Plug & Play MIDI";
140                 func = kmalloc(sizeof(struct sndcard_func), M_DEVBUF,
141                                 M_WAITOK | M_ZERO);
142                 func->func = SCF_MIDI;
143                 child = device_add_child(dev, "midi", -1);
144                 device_set_ivars(child, func);
145                 break;
146         }
147
148         if (s != NULL) {
149                 device_set_desc(dev, s);
150                 return (0);
151         }
152
153         return (ENXIO);
154 }
155
156 static void
157 port_wr(struct resource *r, int i, unsigned char v)
158 {
159         bus_space_write_1(rman_get_bustag(r), rman_get_bushandle(r), i, v);
160 }
161
162 static int
163 port_rd(struct resource *r, int i)
164 {
165         return bus_space_read_1(rman_get_bustag(r), rman_get_bushandle(r), i);
166 }
167
168 /*
169  * Probe for an old (non-PnP) GUS card on the ISA bus.
170  */
171
172 static int
173 gusisa_probe(device_t dev)
174 {
175         device_t child;
176         struct resource *res, *res2;
177         int base, rid, rid2, flags;
178         unsigned char val;
179
180         base = isa_get_port(dev);
181         flags = device_get_flags(dev);
182         rid = 1;
183         res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, base + 0x100,
184                                  base + 0x107, 8, RF_ACTIVE);
185
186         if (res == NULL)
187                 return ENXIO;
188
189         res2 = NULL;
190
191         /*
192          * Check for the presence of some GUS card.  Reset the card,
193          * then see if we can access the memory on it.
194          */
195
196         port_wr(res, 3, 0x4c);
197         port_wr(res, 5, 0);
198         DELAY(30 * 1000);
199
200         port_wr(res, 3, 0x4c);
201         port_wr(res, 5, 1);
202         DELAY(30 * 1000);
203
204         crit_enter();
205
206         /* Write to DRAM.  */
207
208         port_wr(res, 3, 0x43);          /* Register select */
209         port_wr(res, 4, 0);             /* Low addr */
210         port_wr(res, 5, 0);             /* Med addr */
211
212         port_wr(res, 3, 0x44);          /* Register select */
213         port_wr(res, 4, 0);             /* High addr */
214         port_wr(res, 7, 0x55);          /* DRAM */
215
216         /* Read from DRAM.  */
217
218         port_wr(res, 3, 0x43);          /* Register select */
219         port_wr(res, 4, 0);             /* Low addr */
220         port_wr(res, 5, 0);             /* Med addr */
221
222         port_wr(res, 3, 0x44);          /* Register select */
223         port_wr(res, 4, 0);             /* High addr */
224         val = port_rd(res, 7);          /* DRAM */
225
226         crit_exit();
227
228         if (val != 0x55)
229                 goto fail;
230
231         rid2 = 0;
232         res2 = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid2, base, base, 1,
233                                   RF_ACTIVE);
234
235         if (res2 == NULL)
236                 goto fail;
237
238         crit_enter();
239         port_wr(res2, 0x0f, 0x20);
240         val = port_rd(res2, 0x0f);
241         crit_exit();
242
243         if (val == 0xff || (val & 0x06) == 0)
244                 val = 0;
245         else {
246                 val = port_rd(res2, 0x506);     /* XXX Out of range.  */
247                 if (val == 0xff)
248                         val = 0;
249         }
250
251         bus_release_resource(dev, SYS_RES_IOPORT, rid2, res2);
252         bus_release_resource(dev, SYS_RES_IOPORT, rid, res);
253
254         if (val >= 10) {
255                 struct sndcard_func *func;
256
257                 /* Looks like a GUS MAX.  Set the rest of the resources.  */
258
259                 bus_set_resource(dev, SYS_RES_IOPORT, 2, base + 0x10c, 8);
260
261                 if (flags & DV_F_DUAL_DMA)
262                         bus_set_resource(dev, SYS_RES_DRQ, 1,
263                                          flags & DV_F_DRQ_MASK, 1);
264
265                 /* We can support the CS4231 and MIDI devices.  */
266
267                 func = kmalloc(sizeof(struct sndcard_func), M_DEVBUF,
268                                 M_WAITOK | M_ZERO);
269                 func->func = SCF_MIDI;
270                 child = device_add_child(dev, "midi", -1);
271                 device_set_ivars(child, func);
272
273                 func = kmalloc(sizeof(struct sndcard_func), M_DEVBUF,
274                                 M_WAITOK | M_ZERO);
275                 {
276                         func->func = SCF_PCM;
277                         child = device_add_child(dev, "pcm", -1);
278                         device_set_ivars(child, func);
279                 }
280                 device_set_desc(dev, "Gravis UltraSound MAX");
281                 return 0;
282         } else {
283
284                 /*
285                  * TODO: Support even older GUS cards.  MIDI should work on
286                  * all models.
287                  */
288                 return ENXIO;
289         }
290
291 fail:
292         bus_release_resource(dev, SYS_RES_IOPORT, rid, res);
293         return ENXIO;
294 }
295
296 static int
297 gusc_attach(device_t dev)
298 {
299         sc_p scp;
300         int unit;
301         void *ih;
302
303         scp = device_get_softc(dev);
304         unit = device_get_unit(dev);
305
306         bzero(scp, sizeof(*scp));
307
308         scp->dev = dev;
309         if (alloc_resource(scp)) {
310                 release_resource(scp);
311                 return (ENXIO);
312         }
313
314         if (scp->irq != NULL)
315                 bus_setup_intr(dev, scp->irq, INTR_TYPE_AV, gusc_intr, scp, &ih, NULL);
316         bus_generic_attach(dev);
317
318         return (0);
319 }
320
321 /*
322  * Handle interrupts on GUS devices until there aren't any left.
323  */
324 static void
325 gusc_intr(void *arg)
326 {
327         sc_p scp = (sc_p)arg;
328         int did_something;
329
330         do {
331                 did_something = 0;
332                 if (scp->pcm_intr.intr != NULL &&
333                     (port_rd(scp->io[2], 2) & 1)) {
334                         (*scp->pcm_intr.intr)(scp->pcm_intr.arg);
335                         did_something = 1;
336                 }
337                 if (scp->midi_intr.intr != NULL &&
338                     (port_rd(scp->io[1], 0) & 0x80)) {
339                         (*scp->midi_intr.intr)(scp->midi_intr.arg);
340                         did_something = 1;
341                 }
342         } while (did_something != 0);
343 }
344
345 static struct resource *
346 gusc_alloc_resource(device_t bus, device_t child, int type, int *rid,
347                       u_long start, u_long end, u_long count, u_int flags)
348 {
349         sc_p scp;
350         int *alloced, rid_max, alloced_max;
351         struct resource **res;
352
353         scp = device_get_softc(bus);
354         switch (type) {
355         case SYS_RES_IOPORT:
356                 alloced = scp->io_alloced;
357                 res = scp->io;
358                 rid_max = 2;
359                 alloced_max = 2; /* pcm + midi (more to include synth) */
360                 break;
361         case SYS_RES_IRQ:
362                 alloced = &scp->irq_alloced;
363                 res = &scp->irq;
364                 rid_max = 0;
365                 alloced_max = 2; /* pcm and midi share the single irq. */
366                 break;
367         case SYS_RES_DRQ:
368                 alloced = scp->drq_alloced;
369                 res = scp->drq;
370                 rid_max = 1;
371                 alloced_max = 1;
372                 break;
373         default:
374                 return (NULL);
375         }
376
377         if (*rid > rid_max || alloced[*rid] == alloced_max)
378                 return (NULL);
379
380         alloced[*rid]++;
381         return (res[*rid]);
382 }
383
384 static int
385 gusc_release_resource(device_t bus, device_t child, int type, int rid,
386                         struct resource *r)
387 {
388         sc_p scp;
389         int *alloced, rid_max;
390
391         scp = device_get_softc(bus);
392         switch (type) {
393         case SYS_RES_IOPORT:
394                 alloced = scp->io_alloced;
395                 rid_max = 2;
396                 break;
397         case SYS_RES_IRQ:
398                 alloced = &scp->irq_alloced;
399                 rid_max = 0;
400                 break;
401         case SYS_RES_DRQ:
402                 alloced = scp->drq_alloced;
403                 rid_max = 1;
404                 break;
405         default:
406                 return (1);
407         }
408
409         if (rid > rid_max || alloced[rid] == 0)
410                 return (1);
411
412         alloced[rid]--;
413         return (0);
414 }
415
416 static int
417 gusc_setup_intr(device_t dev, device_t child, struct resource *irq,
418                 int flags, driver_intr_t *intr, void *arg, void **cookiep)
419 {
420         sc_p scp = (sc_p)device_get_softc(dev);
421         devclass_t devclass;
422
423         devclass = device_get_devclass(child);
424         if (strcmp(devclass_get_name(devclass), "midi") == 0) {
425                 scp->midi_intr.intr = intr;
426                 scp->midi_intr.arg = arg;
427                 return 0;
428         } else if (strcmp(devclass_get_name(devclass), "pcm") == 0) {
429                 scp->pcm_intr.intr = intr;
430                 scp->pcm_intr.arg = arg;
431                 return 0;
432         }
433         return bus_generic_setup_intr(dev, child, irq, flags, intr,
434                                       arg, cookiep, NULL);
435 }
436
437 static device_t
438 find_masterdev(sc_p scp)
439 {
440         int i, units;
441         devclass_t devclass;
442         device_t dev;
443
444         devclass = device_get_devclass(scp->dev);
445         units = devclass_get_maxunit(devclass);
446         dev = NULL;
447         for (i = 0 ; i < units ; i++) {
448                 dev = devclass_get_device(devclass, i);
449                 if (isa_get_vendorid(dev) == isa_get_vendorid(scp->dev)
450                     && isa_get_logicalid(dev) == LOGICALID_PCM
451                     && isa_get_serial(dev) == isa_get_serial(scp->dev))
452                         break;
453         }
454         if (i == units)
455                 return (NULL);
456
457         return (dev);
458 }
459
460 static int io_range[3]  = {0x10, 0x8  , 0x4  };
461 static int io_offset[3] = {0x0 , 0x100, 0x10c};
462 static int
463 alloc_resource(sc_p scp)
464 {
465         int i, base, lid, flags;
466         device_t dev;
467
468         flags = 0;
469         if (isa_get_vendorid(scp->dev))
470                 lid = isa_get_logicalid(scp->dev);
471         else {
472                 lid = LOGICALID_NOPNP;
473                 flags = device_get_flags(scp->dev);
474         }
475         switch(lid) {
476         case LOGICALID_PCM:
477         case LOGICALID_NOPNP:           /* XXX Non-PnP */
478                 if (lid == LOGICALID_NOPNP)
479                         base = isa_get_port(scp->dev);
480                 else
481                         base = 0;
482                 for (i = 0 ; i < sizeof(scp->io) / sizeof(*scp->io) ; i++) {
483                         if (scp->io[i] == NULL) {
484                                 scp->io_rid[i] = i;
485                                 if (base == 0)
486                                         scp->io[i] = bus_alloc_resource(scp->dev, SYS_RES_IOPORT, &scp->io_rid[i],
487                                                                         0, ~0, io_range[i], RF_ACTIVE);
488                                 else
489                                         scp->io[i] = bus_alloc_resource(scp->dev, SYS_RES_IOPORT, &scp->io_rid[i],
490                                                                         base + io_offset[i],
491                                                                         base + io_offset[i] + io_range[i] - 1
492                                                                         , io_range[i], RF_ACTIVE);
493                                 if (scp->io[i] == NULL)
494                                         return (1);
495                                 scp->io_alloced[i] = 0;
496                         }
497                 }
498                 if (scp->irq == NULL) {
499                         scp->irq_rid = 0;
500                         scp->irq = 
501                                 bus_alloc_resource_any(scp->dev, SYS_RES_IRQ, 
502                                                        &scp->irq_rid,
503                                                        RF_ACTIVE|RF_SHAREABLE);
504                         if (scp->irq == NULL)
505                                 return (1);
506                         scp->irq_alloced = 0;
507                 }
508                 for (i = 0 ; i < sizeof(scp->drq) / sizeof(*scp->drq) ; i++) {
509                         if (scp->drq[i] == NULL) {
510                                 scp->drq_rid[i] = i;
511                                 if (base == 0 || i == 0)
512                                         scp->drq[i] = 
513                                                 bus_alloc_resource_any(
514                                                         scp->dev, SYS_RES_DRQ,
515                                                         &scp->drq_rid[i],
516                                                         RF_ACTIVE);
517                                 else if ((flags & DV_F_DUAL_DMA) != 0)
518                                         /* XXX The secondary drq is specified in the flag. */
519                                         scp->drq[i] = bus_alloc_resource(scp->dev, SYS_RES_DRQ, &scp->drq_rid[i],
520                                                                          flags & DV_F_DRQ_MASK,
521                                                                          flags & DV_F_DRQ_MASK, 1, RF_ACTIVE);
522                                 if (scp->drq[i] == NULL)
523                                         return (1);
524                                 scp->drq_alloced[i] = 0;
525                         }
526                 }
527                 break;
528         case LOGICALID_OPL:
529                 if (scp->io[0] == NULL) {
530                         scp->io_rid[0] = 0;
531                         scp->io[0] = bus_alloc_resource(scp->dev, SYS_RES_IOPORT, &scp->io_rid[0],
532                                                         0, ~0, io_range[0], RF_ACTIVE);
533                         if (scp->io[0] == NULL)
534                                 return (1);
535                         scp->io_alloced[0] = 0;
536                 }
537                 break;
538         case LOGICALID_MIDI:
539                 if (scp->io[0] == NULL) {
540                         scp->io_rid[0] = 0;
541                         scp->io[0] = bus_alloc_resource(scp->dev, SYS_RES_IOPORT, &scp->io_rid[0],
542                                                         0, ~0, io_range[0], RF_ACTIVE);
543                         if (scp->io[0] == NULL)
544                                 return (1);
545                         scp->io_alloced[0] = 0;
546                 }
547                 if (scp->irq == NULL) {
548                         /* The irq is shared with pcm audio. */
549                         dev = find_masterdev(scp);
550                         if (dev == NULL)
551                                 return (1);
552                         scp->irq_rid = 0;
553                         scp->irq = BUS_ALLOC_RESOURCE(dev, NULL, SYS_RES_IRQ, &scp->irq_rid,
554                                                       0, ~0, 1, RF_ACTIVE | RF_SHAREABLE);
555                         if (scp->irq == NULL)
556                                 return (1);
557                         scp->irq_alloced = 0;
558                 }
559                 break;
560         }
561         return (0);
562 }
563
564 static int
565 release_resource(sc_p scp)
566 {
567         int i, lid, flags;
568         device_t dev;
569
570         flags = 0;
571         if (isa_get_vendorid(scp->dev))
572                 lid = isa_get_logicalid(scp->dev);
573         else {
574                 lid = LOGICALID_NOPNP;
575                 flags = device_get_flags(scp->dev);
576         }
577         switch(lid) {
578         case LOGICALID_PCM:
579         case LOGICALID_NOPNP:           /* XXX Non-PnP */
580                 for (i = 0 ; i < sizeof(scp->io) / sizeof(*scp->io) ; i++) {
581                         if (scp->io[i] != NULL) {
582                                 bus_release_resource(scp->dev, SYS_RES_IOPORT, scp->io_rid[i], scp->io[i]);
583                                 scp->io[i] = NULL;
584                         }
585                 }
586                 if (scp->irq != NULL) {
587                         bus_release_resource(scp->dev, SYS_RES_IRQ, scp->irq_rid, scp->irq);
588                         scp->irq = NULL;
589                 }
590                 for (i = 0 ; i < sizeof(scp->drq) / sizeof(*scp->drq) ; i++) {
591                         if (scp->drq[i] != NULL) {
592                                 bus_release_resource(scp->dev, SYS_RES_DRQ, scp->drq_rid[i], scp->drq[i]);
593                                 scp->drq[i] = NULL;
594                         }
595                 }
596                 break;
597         case LOGICALID_OPL:
598                 if (scp->io[0] != NULL) {
599                         bus_release_resource(scp->dev, SYS_RES_IOPORT, scp->io_rid[0], scp->io[0]);
600                         scp->io[0] = NULL;
601                 }
602                 break;
603         case LOGICALID_MIDI:
604                 if (scp->io[0] != NULL) {
605                         bus_release_resource(scp->dev, SYS_RES_IOPORT, scp->io_rid[0], scp->io[0]);
606                         scp->io[0] = NULL;
607                 }
608                 if (scp->irq != NULL) {
609                         /* The irq is shared with pcm audio. */
610                         dev = find_masterdev(scp);
611                         if (dev == NULL)
612                                 return (1);
613                         BUS_RELEASE_RESOURCE(dev, NULL, SYS_RES_IOPORT, scp->irq_rid, scp->irq);
614                         scp->irq = NULL;
615                 }
616                 break;
617         }
618         return (0);
619 }
620
621 static device_method_t gusc_methods[] = {
622         /* Device interface */
623         DEVMETHOD(device_probe,         gusc_probe),
624         DEVMETHOD(device_attach,        gusc_attach),
625         DEVMETHOD(device_detach,        bus_generic_detach),
626         DEVMETHOD(device_shutdown,      bus_generic_shutdown),
627         DEVMETHOD(device_suspend,       bus_generic_suspend),
628         DEVMETHOD(device_resume,        bus_generic_resume),
629
630         /* Bus interface */
631         DEVMETHOD(bus_print_child,      bus_generic_print_child),
632         DEVMETHOD(bus_alloc_resource,   gusc_alloc_resource),
633         DEVMETHOD(bus_release_resource, gusc_release_resource),
634         DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
635         DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
636         DEVMETHOD(bus_setup_intr,       gusc_setup_intr),
637         DEVMETHOD(bus_teardown_intr,    bus_generic_teardown_intr),
638
639         { 0, 0 }
640 };
641
642 static driver_t gusc_driver = {
643         "gusc",
644         gusc_methods,
645         sizeof(struct gusc_softc),
646 };
647
648 /*
649  * gusc can be attached to an isa bus.
650  */
651 DRIVER_MODULE(snd_gusc, isa, gusc_driver, gusc_devclass, NULL, NULL);
652 DRIVER_MODULE(snd_gusc, acpi, gusc_driver, gusc_devclass, NULL, NULL);
653 MODULE_DEPEND(snd_gusc, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER);
654 MODULE_VERSION(snd_gusc, 1);
655
656