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