2 * Copyright (c) 2000 Dmitry Dicky diwil@dataart.com
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS `AS IS'' AND
15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 #ifdef HAVE_KERNEL_OPTION_HEADERS
31 #include <dev/sound/pcm/sound.h>
32 #include <dev/sound/pcm/ac97.h>
33 #include <dev/pci/pcireg.h>
34 #include <dev/pci/pcivar.h>
36 SND_DECLARE_FILE("$FreeBSD$");
38 #define PCI_VENDOR_FORTEMEDIA 0x1319
39 #define PCI_DEVICE_FORTEMEDIA1 0x08011319 /* Audio controller */
40 #define PCI_DEVICE_FORTEMEDIA2 0x08021319 /* Joystick controller */
42 #define FM_PCM_VOLUME 0x00
43 #define FM_FM_VOLUME 0x02
44 #define FM_I2S_VOLUME 0x04
45 #define FM_RECORD_SOURCE 0x06
47 #define FM_PLAY_CTL 0x08
48 #define FM_PLAY_RATE_MASK 0x0f00
49 #define FM_PLAY_BUF1_LAST 0x0001
50 #define FM_PLAY_BUF2_LAST 0x0002
51 #define FM_PLAY_START 0x0020
52 #define FM_PLAY_PAUSE 0x0040
53 #define FM_PLAY_STOPNOW 0x0080
54 #define FM_PLAY_16BIT 0x4000
55 #define FM_PLAY_STEREO 0x8000
57 #define FM_PLAY_DMALEN 0x0a
58 #define FM_PLAY_DMABUF1 0x0c
59 #define FM_PLAY_DMABUF2 0x10
62 #define FM_REC_CTL 0x14
63 #define FM_REC_RATE_MASK 0x0f00
64 #define FM_REC_BUF1_LAST 0x0001
65 #define FM_REC_BUF2_LAST 0x0002
66 #define FM_REC_START 0x0020
67 #define FM_REC_PAUSE 0x0040
68 #define FM_REC_STOPNOW 0x0080
69 #define FM_REC_16BIT 0x4000
70 #define FM_REC_STEREO 0x8000
73 #define FM_REC_DMALEN 0x16
74 #define FM_REC_DMABUF1 0x18
75 #define FM_REC_DMABUF2 0x1c
77 #define FM_CODEC_CTL 0x22
78 #define FM_VOLUME 0x26
79 #define FM_VOLUME_MUTE 0x8000
81 #define FM_CODEC_CMD 0x2a
82 #define FM_CODEC_CMD_READ 0x0080
83 #define FM_CODEC_CMD_VALID 0x0100
84 #define FM_CODEC_CMD_BUSY 0x0200
86 #define FM_CODEC_DATA 0x2c
88 #define FM_IO_CTL 0x52
89 #define FM_CARD_CTL 0x54
91 #define FM_INTMASK 0x56
92 #define FM_INTMASK_PLAY 0x0001
93 #define FM_INTMASK_REC 0x0002
94 #define FM_INTMASK_VOL 0x0040
95 #define FM_INTMASK_MPU 0x0080
97 #define FM_INTSTATUS 0x5a
98 #define FM_INTSTATUS_PLAY 0x0100
99 #define FM_INTSTATUS_REC 0x0200
100 #define FM_INTSTATUS_VOL 0x4000
101 #define FM_INTSTATUS_MPU 0x8000
103 #define FM801_DEFAULT_BUFSZ 4096 /* Other values do not work!!! */
106 #define DPRINT if(0) printf
109 static int fm801ch_setup(struct pcm_channel *c);
112 static u_int32_t fmts[] = {
113 SND_FORMAT(AFMT_U8, 1, 0),
114 SND_FORMAT(AFMT_U8, 2, 0),
115 SND_FORMAT(AFMT_S16_LE, 1, 0),
116 SND_FORMAT(AFMT_S16_LE, 2, 0),
120 static struct pcmchan_caps fm801ch_caps = {
127 struct fm801_chinfo {
128 struct fm801_info *parent;
129 struct pcm_channel *channel;
130 struct snd_dbuf *buffer;
131 u_int32_t spd, dir, fmt; /* speed, direction, format */
138 bus_space_handle_t sh;
139 bus_dma_tag_t parent_dmat;
145 struct resource *reg, *irq;
146 int regtype, regid, irqid;
167 struct fm801_chinfo pch, rch;
172 /* Bus Read / Write routines */
174 fm801_rd(struct fm801_info *fm801, int regno, int size)
178 return (bus_space_read_1(fm801->st, fm801->sh, regno));
180 return (bus_space_read_2(fm801->st, fm801->sh, regno));
182 return (bus_space_read_4(fm801->st, fm801->sh, regno));
189 fm801_wr(struct fm801_info *fm801, int regno, u_int32_t data, int size)
194 bus_space_write_1(fm801->st, fm801->sh, regno, data);
197 bus_space_write_2(fm801->st, fm801->sh, regno, data);
200 bus_space_write_4(fm801->st, fm801->sh, regno, data);
205 /* -------------------------------------------------------------------- */
207 * ac97 codec routines
211 fm801_rdcd(kobj_t obj, void *devinfo, int regno)
213 struct fm801_info *fm801 = (struct fm801_info *)devinfo;
216 for (i = 0; i < TIMO && fm801_rd(fm801,FM_CODEC_CMD,2) & FM_CODEC_CMD_BUSY; i++) {
218 DPRINT("fm801 rdcd: 1 - DELAY\n");
221 printf("fm801 rdcd: codec busy\n");
225 fm801_wr(fm801,FM_CODEC_CMD, regno|FM_CODEC_CMD_READ,2);
227 for (i = 0; i < TIMO && !(fm801_rd(fm801,FM_CODEC_CMD,2) & FM_CODEC_CMD_VALID); i++)
230 DPRINT("fm801 rdcd: 2 - DELAY\n");
233 printf("fm801 rdcd: write codec invalid\n");
237 return fm801_rd(fm801,FM_CODEC_DATA,2);
241 fm801_wrcd(kobj_t obj, void *devinfo, int regno, u_int32_t data)
243 struct fm801_info *fm801 = (struct fm801_info *)devinfo;
246 DPRINT("fm801_wrcd reg 0x%x val 0x%x\n",regno, data);
248 if(regno == AC97_REG_RECSEL) return;
250 /* Poll until codec is ready */
251 for (i = 0; i < TIMO && fm801_rd(fm801,FM_CODEC_CMD,2) & FM_CODEC_CMD_BUSY; i++) {
253 DPRINT("fm801 rdcd: 1 - DELAY\n");
256 printf("fm801 wrcd: read codec busy\n");
260 fm801_wr(fm801,FM_CODEC_DATA,data, 2);
261 fm801_wr(fm801,FM_CODEC_CMD, regno,2);
263 /* wait until codec is ready */
264 for (i = 0; i < TIMO && fm801_rd(fm801,FM_CODEC_CMD,2) & FM_CODEC_CMD_BUSY; i++) {
266 DPRINT("fm801 wrcd: 2 - DELAY\n");
269 printf("fm801 wrcd: read codec busy\n");
272 DPRINT("fm801 wrcd release reg 0x%x val 0x%x\n",regno, data);
276 static kobj_method_t fm801_ac97_methods[] = {
277 KOBJMETHOD(ac97_read, fm801_rdcd),
278 KOBJMETHOD(ac97_write, fm801_wrcd),
281 AC97_DECLARE(fm801_ac97);
283 /* -------------------------------------------------------------------- */
286 * The interrupt handler
291 struct fm801_info *fm801 = (struct fm801_info *)p;
292 u_int32_t intsrc = fm801_rd(fm801, FM_INTSTATUS, 2);
294 DPRINT("\nfm801_intr intsrc 0x%x ", intsrc);
296 if(intsrc & FM_INTSTATUS_PLAY) {
298 if(fm801->play_flip & 1) {
299 fm801_wr(fm801, FM_PLAY_DMABUF1, fm801->play_start,4);
301 fm801_wr(fm801, FM_PLAY_DMABUF2, fm801->play_nextblk,4);
302 chn_intr(fm801->pch.channel);
305 if(intsrc & FM_INTSTATUS_REC) {
307 if(fm801->rec_flip & 1) {
308 fm801_wr(fm801, FM_REC_DMABUF1, fm801->rec_start,4);
310 fm801_wr(fm801, FM_REC_DMABUF2, fm801->rec_nextblk,4);
311 chn_intr(fm801->rch.channel);
314 if ( intsrc & FM_INTSTATUS_MPU ) {
315 /* This is a TODOish thing... */
316 fm801_wr(fm801, FM_INTSTATUS, intsrc & FM_INTSTATUS_MPU,2);
319 if ( intsrc & FM_INTSTATUS_VOL ) {
320 /* This is a TODOish thing... */
321 fm801_wr(fm801, FM_INTSTATUS, intsrc & FM_INTSTATUS_VOL,2);
324 DPRINT("fm801_intr clear\n\n");
325 fm801_wr(fm801, FM_INTSTATUS, intsrc & (FM_INTSTATUS_PLAY | FM_INTSTATUS_REC), 2);
328 /* -------------------------------------------------------------------- */
329 /* channel interface */
331 fm801ch_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c, int dir)
333 struct fm801_info *fm801 = (struct fm801_info *)devinfo;
334 struct fm801_chinfo *ch = (dir == PCMDIR_PLAY)? &fm801->pch : &fm801->rch;
336 DPRINT("fm801ch_init, direction = %d\n", dir);
341 if (sndbuf_alloc(ch->buffer, fm801->parent_dmat, 0, fm801->bufsz) != 0)
347 fm801ch_setformat(kobj_t obj, void *data, u_int32_t format)
349 struct fm801_chinfo *ch = data;
350 struct fm801_info *fm801 = ch->parent;
352 DPRINT("fm801ch_setformat 0x%x : %s, %s, %s, %s\n", format,
353 (AFMT_CHANNEL(format) > 1)?"stereo":"mono",
354 (format & AFMT_16BIT) ? "16bit":"8bit",
355 (format & AFMT_SIGNED)? "signed":"unsigned",
356 (format & AFMT_BIGENDIAN)?"bigendiah":"littleendian" );
358 if(ch->dir == PCMDIR_PLAY) {
360 (AFMT_CHANNEL(format) > 1)? FM_PLAY_STEREO : 0;
361 fm801->play_fmt |= (format & AFMT_16BIT) ? FM_PLAY_16BIT : 0;
365 if(ch->dir == PCMDIR_REC ) {
366 fm801->rec_fmt = (AFMT_CHANNEL(format) > 1)? FM_REC_STEREO:0;
367 fm801->rec_fmt |= (format & AFMT_16BIT) ? FM_PLAY_16BIT : 0;
377 } fm801_rates[11] = {
389 /* anything above -> 48000 */
393 fm801ch_setspeed(kobj_t obj, void *data, u_int32_t speed)
395 struct fm801_chinfo *ch = data;
396 struct fm801_info *fm801 = ch->parent;
400 for (i = 0; i < 10 && fm801_rates[i].limit <= speed; i++) ;
402 if(ch->dir == PCMDIR_PLAY) {
403 fm801->pch.spd = fm801_rates[i].rate;
404 fm801->play_shift = (i<<8);
405 fm801->play_shift &= FM_PLAY_RATE_MASK;
408 if(ch->dir == PCMDIR_REC ) {
409 fm801->rch.spd = fm801_rates[i].rate;
410 fm801->rec_shift = (i<<8);
411 fm801->rec_shift &= FM_REC_RATE_MASK;
414 ch->spd = fm801_rates[i].rate;
416 return fm801_rates[i].rate;
420 fm801ch_setblocksize(kobj_t obj, void *data, u_int32_t blocksize)
422 struct fm801_chinfo *ch = data;
423 struct fm801_info *fm801 = ch->parent;
426 * Don't mind for play_flip, set the blocksize to the
427 * desired values in any case - otherwise sound playback
430 if(ch->dir == PCMDIR_PLAY)
431 fm801->play_blksize = blocksize;
433 if(ch->dir == PCMDIR_REC)
434 fm801->rec_blksize = blocksize;
436 DPRINT("fm801ch_setblocksize %d (dir %d)\n",blocksize, ch->dir);
442 fm801ch_trigger(kobj_t obj, void *data, int go)
444 struct fm801_chinfo *ch = data;
445 struct fm801_info *fm801 = ch->parent;
446 u_int32_t baseaddr = sndbuf_getbufaddr(ch->buffer);
449 DPRINT("fm801ch_trigger go %d , ", go);
451 if (!PCMTRIG_COMMON(go))
454 if (ch->dir == PCMDIR_PLAY) {
455 if (go == PCMTRIG_START) {
457 fm801->play_start = baseaddr;
458 fm801->play_nextblk = fm801->play_start + fm801->play_blksize;
459 fm801->play_flip = 0;
460 fm801_wr(fm801, FM_PLAY_DMALEN, fm801->play_blksize - 1, 2);
461 fm801_wr(fm801, FM_PLAY_DMABUF1,fm801->play_start,4);
462 fm801_wr(fm801, FM_PLAY_DMABUF2,fm801->play_nextblk,4);
463 fm801_wr(fm801, FM_PLAY_CTL,
464 FM_PLAY_START | FM_PLAY_STOPNOW | fm801->play_fmt | fm801->play_shift,
467 fm801->play_flip = 0;
468 k1 = fm801_rd(fm801, FM_PLAY_CTL,2);
469 fm801_wr(fm801, FM_PLAY_CTL,
470 (k1 & ~(FM_PLAY_STOPNOW | FM_PLAY_START)) |
471 FM_PLAY_BUF1_LAST | FM_PLAY_BUF2_LAST, 2 );
473 } else if(ch->dir == PCMDIR_REC) {
474 if (go == PCMTRIG_START) {
475 fm801->rec_start = baseaddr;
476 fm801->rec_nextblk = fm801->rec_start + fm801->rec_blksize;
478 fm801_wr(fm801, FM_REC_DMALEN, fm801->rec_blksize - 1, 2);
479 fm801_wr(fm801, FM_REC_DMABUF1,fm801->rec_start,4);
480 fm801_wr(fm801, FM_REC_DMABUF2,fm801->rec_nextblk,4);
481 fm801_wr(fm801, FM_REC_CTL,
482 FM_REC_START | FM_REC_STOPNOW | fm801->rec_fmt | fm801->rec_shift,
486 k1 = fm801_rd(fm801, FM_REC_CTL,2);
487 fm801_wr(fm801, FM_REC_CTL,
488 (k1 & ~(FM_REC_STOPNOW | FM_REC_START)) |
489 FM_REC_BUF1_LAST | FM_REC_BUF2_LAST, 2);
496 /* Almost ALSA copy */
498 fm801ch_getptr(kobj_t obj, void *data)
500 struct fm801_chinfo *ch = data;
501 struct fm801_info *fm801 = ch->parent;
502 u_int32_t result = 0;
504 if (ch->dir == PCMDIR_PLAY) {
505 result = fm801_rd(fm801,
506 (fm801->play_flip&1) ?
507 FM_PLAY_DMABUF2:FM_PLAY_DMABUF1, 4) - fm801->play_start;
510 if (ch->dir == PCMDIR_REC) {
511 result = fm801_rd(fm801,
512 (fm801->rec_flip&1) ?
513 FM_REC_DMABUF2:FM_REC_DMABUF1, 4) - fm801->rec_start;
519 static struct pcmchan_caps *
520 fm801ch_getcaps(kobj_t obj, void *data)
522 return &fm801ch_caps;
525 static kobj_method_t fm801ch_methods[] = {
526 KOBJMETHOD(channel_init, fm801ch_init),
527 KOBJMETHOD(channel_setformat, fm801ch_setformat),
528 KOBJMETHOD(channel_setspeed, fm801ch_setspeed),
529 KOBJMETHOD(channel_setblocksize, fm801ch_setblocksize),
530 KOBJMETHOD(channel_trigger, fm801ch_trigger),
531 KOBJMETHOD(channel_getptr, fm801ch_getptr),
532 KOBJMETHOD(channel_getcaps, fm801ch_getcaps),
535 CHANNEL_DECLARE(fm801ch);
537 /* -------------------------------------------------------------------- */
540 * Init routine is taken from an original NetBSD driver
543 fm801_init(struct fm801_info *fm801)
548 fm801_wr(fm801, FM_CODEC_CTL, 0x0020,2);
550 fm801_wr(fm801, FM_CODEC_CTL, 0x0000,2);
553 fm801_wr(fm801, FM_PCM_VOLUME, 0x0808,2);
554 fm801_wr(fm801, FM_FM_VOLUME, 0x0808,2);
555 fm801_wr(fm801, FM_I2S_VOLUME, 0x0808,2);
556 fm801_wr(fm801, 0x40,0x107f,2); /* enable legacy audio */
558 fm801_wr((void *)fm801, FM_RECORD_SOURCE, 0x0000,2);
560 /* Unmask playback, record and mpu interrupts, mask the rest */
561 k1 = fm801_rd((void *)fm801, FM_INTMASK,2);
562 fm801_wr(fm801, FM_INTMASK,
563 (k1 & ~(FM_INTMASK_PLAY | FM_INTMASK_REC | FM_INTMASK_MPU)) |
565 fm801_wr(fm801, FM_INTSTATUS,
566 FM_INTSTATUS_PLAY | FM_INTSTATUS_REC | FM_INTSTATUS_MPU |
569 DPRINT("FM801 init Ok\n");
574 fm801_pci_attach(device_t dev)
576 struct ac97_info *codec = NULL;
577 struct fm801_info *fm801;
580 char status[SND_STATUSLEN];
582 fm801 = malloc(sizeof(*fm801), M_DEVBUF, M_WAITOK | M_ZERO);
583 fm801->type = pci_get_devid(dev);
585 pci_enable_busmaster(dev);
587 for (i = 0; (mapped == 0) && (i < PCI_MAXMAPS_0); i++) {
588 fm801->regid = PCIR_BAR(i);
589 fm801->regtype = SYS_RES_MEMORY;
590 fm801->reg = bus_alloc_resource_any(dev, fm801->regtype,
591 &fm801->regid, RF_ACTIVE);
594 fm801->regtype = SYS_RES_IOPORT;
595 fm801->reg = bus_alloc_resource_any(dev,
602 fm801->st = rman_get_bustag(fm801->reg);
603 fm801->sh = rman_get_bushandle(fm801->reg);
609 device_printf(dev, "unable to map register space\n");
613 fm801->bufsz = pcm_getbuffersize(dev, 4096, FM801_DEFAULT_BUFSZ, 65536);
617 codec = AC97_CREATE(dev, fm801, fm801_ac97);
618 if (codec == NULL) goto oops;
620 if (mixer_init(dev, ac97_getmixerclass(), codec) == -1) goto oops;
623 fm801->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &fm801->irqid,
624 RF_ACTIVE | RF_SHAREABLE);
626 snd_setup_intr(dev, fm801->irq, 0, fm801_intr, fm801, &fm801->ih)) {
627 device_printf(dev, "unable to map interrupt\n");
631 if (bus_dma_tag_create(/*parent*/bus_get_dma_tag(dev), /*alignment*/2,
633 /*lowaddr*/BUS_SPACE_MAXADDR_32BIT,
634 /*highaddr*/BUS_SPACE_MAXADDR,
635 /*filter*/NULL, /*filterarg*/NULL,
636 /*maxsize*/fm801->bufsz, /*nsegments*/1, /*maxsegz*/0x3ffff,
637 /*flags*/0, /*lockfunc*/busdma_lock_mutex,
638 /*lockarg*/&Giant, &fm801->parent_dmat) != 0) {
639 device_printf(dev, "unable to create dma tag\n");
643 snprintf(status, 64, "at %s 0x%jx irq %jd %s",
644 (fm801->regtype == SYS_RES_IOPORT)? "io" : "memory",
645 rman_get_start(fm801->reg), rman_get_start(fm801->irq),PCM_KLDSTRING(snd_fm801));
647 #define FM801_MAXPLAYCH 1
648 if (pcm_register(dev, fm801, FM801_MAXPLAYCH, 1)) goto oops;
649 pcm_addchan(dev, PCMDIR_PLAY, &fm801ch_class, fm801);
650 pcm_addchan(dev, PCMDIR_REC, &fm801ch_class, fm801);
651 pcm_setstatus(dev, status);
653 fm801->radio = device_add_child(dev, "radio", -1);
654 bus_generic_attach(dev);
659 if (codec) ac97_destroy(codec);
660 if (fm801->reg) bus_release_resource(dev, fm801->regtype, fm801->regid, fm801->reg);
661 if (fm801->ih) bus_teardown_intr(dev, fm801->irq, fm801->ih);
662 if (fm801->irq) bus_release_resource(dev, SYS_RES_IRQ, fm801->irqid, fm801->irq);
663 if (fm801->parent_dmat) bus_dma_tag_destroy(fm801->parent_dmat);
664 free(fm801, M_DEVBUF);
669 fm801_pci_detach(device_t dev)
672 struct fm801_info *fm801;
674 DPRINT("Forte Media FM801 detach\n");
676 fm801 = pcm_getdevinfo(dev);
678 r = bus_generic_detach(dev);
681 if (fm801->radio != NULL) {
682 r = device_delete_child(dev, fm801->radio);
688 r = pcm_unregister(dev);
692 bus_release_resource(dev, fm801->regtype, fm801->regid, fm801->reg);
693 bus_teardown_intr(dev, fm801->irq, fm801->ih);
694 bus_release_resource(dev, SYS_RES_IRQ, fm801->irqid, fm801->irq);
695 bus_dma_tag_destroy(fm801->parent_dmat);
696 free(fm801, M_DEVBUF);
701 fm801_pci_probe( device_t dev )
705 if ((id = pci_get_devid(dev)) == PCI_DEVICE_FORTEMEDIA1 ) {
706 device_set_desc(dev, "Forte Media FM801 Audio Controller");
707 return BUS_PROBE_DEFAULT;
710 if ((id = pci_get_devid(dev)) == PCI_DEVICE_FORTEMEDIA2 ) {
711 device_set_desc(dev, "Forte Media FM801 Joystick (Not Supported)");
718 static struct resource *
719 fm801_alloc_resource(device_t bus, device_t child, int type, int *rid,
720 rman_res_t start, rman_res_t end, rman_res_t count,
723 struct fm801_info *fm801;
725 fm801 = pcm_getdevinfo(bus);
727 if (type == SYS_RES_IOPORT && *rid == PCIR_BAR(0))
734 fm801_release_resource(device_t bus, device_t child, int type, int rid,
740 static device_method_t fm801_methods[] = {
741 /* Device interface */
742 DEVMETHOD(device_probe, fm801_pci_probe),
743 DEVMETHOD(device_attach, fm801_pci_attach),
744 DEVMETHOD(device_detach, fm801_pci_detach),
745 DEVMETHOD(device_shutdown, bus_generic_shutdown),
746 DEVMETHOD(device_suspend, bus_generic_suspend),
747 DEVMETHOD(device_resume, bus_generic_resume),
750 DEVMETHOD(bus_alloc_resource, fm801_alloc_resource),
751 DEVMETHOD(bus_release_resource, fm801_release_resource),
752 DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
753 DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
758 static driver_t fm801_driver = {
764 DRIVER_MODULE(snd_fm801, pci, fm801_driver, pcm_devclass, 0, 0);
765 MODULE_DEPEND(snd_fm801, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER);
766 MODULE_VERSION(snd_fm801, 1);