diff options
author | cg <cg@FreeBSD.org> | 2001-06-16 21:25:10 +0000 |
---|---|---|
committer | cg <cg@FreeBSD.org> | 2001-06-16 21:25:10 +0000 |
commit | 4a0664e88e403e97d641f7ad4fd6dab71095bd0b (patch) | |
tree | b90a72aa9539fc95aa3dfcae3c1ed22290a8bec2 /sys/dev/sound/pci | |
parent | b81ba90a5fa7778120861346194bdd1912baa63b (diff) | |
download | FreeBSD-src-4a0664e88e403e97d641f7ad4fd6dab71095bd0b.zip FreeBSD-src-4a0664e88e403e97d641f7ad4fd6dab71095bd0b.tar.gz |
use a global devclass for all drivers - i'm not entirely sure why this
worked before.
mixer, dsp and sndstat are seperate devices - give them their own cdevsws
instead of demuxing requests sent to a single cdevsw.
use the si_drv1/si_drv2 fields in dev_t structures for holding information
specific to an open instance of mixer/dsp.
nuke /dev/{dsp,dspW,audio}[0-9]* links - this functionality is now provided
using cloning.
various locking fixes.
Diffstat (limited to 'sys/dev/sound/pci')
-rw-r--r-- | sys/dev/sound/pci/als4000.c | 66 | ||||
-rw-r--r-- | sys/dev/sound/pci/aureal.c | 2 | ||||
-rw-r--r-- | sys/dev/sound/pci/cmi.c | 49 | ||||
-rw-r--r-- | sys/dev/sound/pci/cs4281.c | 4 | ||||
-rw-r--r-- | sys/dev/sound/pci/csapcm.c | 2 | ||||
-rw-r--r-- | sys/dev/sound/pci/ds1.c | 2 | ||||
-rw-r--r-- | sys/dev/sound/pci/emu10k1.c | 2 | ||||
-rw-r--r-- | sys/dev/sound/pci/es137x.c | 2 | ||||
-rw-r--r-- | sys/dev/sound/pci/fm801.c | 2 | ||||
-rw-r--r-- | sys/dev/sound/pci/maestro.c | 2 | ||||
-rw-r--r-- | sys/dev/sound/pci/maestro3.c | 2 | ||||
-rw-r--r-- | sys/dev/sound/pci/neomagic.c | 4 | ||||
-rw-r--r-- | sys/dev/sound/pci/solo.c | 2 | ||||
-rw-r--r-- | sys/dev/sound/pci/t4dwave.c | 2 | ||||
-rw-r--r-- | sys/dev/sound/pci/via82c686.c | 2 | ||||
-rw-r--r-- | sys/dev/sound/pci/vibes.c | 1 |
16 files changed, 58 insertions, 88 deletions
diff --git a/sys/dev/sound/pci/als4000.c b/sys/dev/sound/pci/als4000.c index c9e3198..72352fe 100644 --- a/sys/dev/sound/pci/als4000.c +++ b/sys/dev/sound/pci/als4000.c @@ -32,7 +32,7 @@ * The ALS4000 is a effectively an SB16 with a PCI interface. * * This driver derives from ALS4000a.PDF, Bart Hartgers alsa driver, and - * SB16 register descriptions. + * SB16 register descriptions. */ #include <dev/sound/pcm/sound.h> @@ -91,7 +91,7 @@ static struct pcmchan_caps als_caps = { 4000, 48000, als_format, 0 }; /* ------------------------------------------------------------------------- */ /* Register Utilities */ -static u_int32_t +static u_int32_t als_gcr_rd(struct sc_info *sc, int index) { bus_space_write_1(sc->st, sc->sh, ALS_GCR_INDEX, index); @@ -144,9 +144,9 @@ als_esp_wr(struct sc_info *sc, u_int8_t data) DELAY(20); } while (--tries != 0); - if (tries == 0) + if (tries == 0) device_printf(sc->dev, "als_esp_wr timeout"); - + bus_space_write_1(sc->st, sc->sh, ALS_ESP_WR_DATA, data); } @@ -165,15 +165,15 @@ als_esp_reset(struct sc_info *sc) u = bus_space_read_1(sc->st, sc->sh, ALS_ESP_RD_STATUS8); if (u & 0x80) { v = bus_space_read_1(sc->st, sc->sh, ALS_ESP_RD_DATA); - if (v == 0xaa) + if (v == 0xaa) return 0; - else + else break; } DELAY(20); } while (--tries != 0); - if (tries == 0) + if (tries == 0) device_printf(sc->dev, "als_esp_reset timeout"); return 1; } @@ -189,7 +189,7 @@ als_ack_read(struct sc_info *sc, u_int8_t addr) /* Common pcm channel implementation */ static void * -alschan_init(kobj_t obj, void *devinfo, +alschan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c, int dir) { struct sc_info *sc = devinfo; @@ -216,7 +216,7 @@ alschan_init(kobj_t obj, void *devinfo, } static int -alschan_setformat(kobj_t obj, void *data, u_int32_t format) +alschan_setformat(kobj_t obj, void *data, u_int32_t format) { struct sc_chinfo *ch = data; @@ -231,7 +231,7 @@ alschan_setspeed(kobj_t obj, void *data, u_int32_t speed) struct sc_info *sc = ch->parent; other = (ch->dir == PCMDIR_PLAY) ? &sc->rch : &sc->pch; - + /* Deny request if other dma channel is active */ if (other->dma_active) { ch->speed = other->speed; @@ -283,7 +283,7 @@ als_set_speed(struct sc_chinfo *ch) als_esp_wr(sc, ch->speed >> 8); als_esp_wr(sc, ch->speed & 0xff); } else { - DEB(printf("speed locked at %d (tried %d)\n", + DEB(printf("speed locked at %d (tried %d)\n", other->speed, ch->speed)); } } @@ -317,7 +317,7 @@ als_get_playback_command(u_int32_t format) return &playback_cmds[i]; } } - DEB(printf("als_get_playback_command: invalid format 0x%08x\n", + DEB(printf("als_get_playback_command: invalid format 0x%08x\n", format)); return &playback_cmds[0]; } @@ -349,7 +349,7 @@ als_playback_start(struct sc_chinfo *ch) als_esp_wr(sc, p->format_val); als_esp_wr(sc, count & 0xff); als_esp_wr(sc, count >> 8); - + ch->dma_active = 1; } @@ -404,13 +404,13 @@ static u_int8_t als_get_fifo_format(struct sc_info *sc, u_int32_t format) { switch (format) { - case AFMT_U8: + case AFMT_U8: return ALS_FIFO1_8BIT; - case AFMT_U8 | AFMT_STEREO: + case AFMT_U8 | AFMT_STEREO: return ALS_FIFO1_8BIT | ALS_FIFO1_STEREO; - case AFMT_S16_LE: + case AFMT_S16_LE: return ALS_FIFO1_SIGNED; - case AFMT_S16_LE | AFMT_STEREO: + case AFMT_S16_LE | AFMT_STEREO: return ALS_FIFO1_SIGNED | ALS_FIFO1_STEREO; } device_printf(sc->dev, "format not found: 0x%08x\n", format); @@ -517,7 +517,7 @@ struct sb16props { }; static int -alsmix_init(struct snd_mixer *m) +alsmix_init(struct snd_mixer *m) { u_int32_t i, v; @@ -528,7 +528,7 @@ alsmix_init(struct snd_mixer *m) for (i = v = 0; i < SOUND_MIXER_NRDEVICES; i++) { if (amt[i].iselect) v |= 1 << i; - } + } mix_setrecdevs(m, v); return 0; } @@ -545,7 +545,7 @@ alsmix_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right) l = (left * mask / 100) & mask; v = als_mix_rd(sc, amt[dev].lreg) & ~mask; als_mix_wr(sc, amt[dev].lreg, l | v); - + if (amt[dev].rreg) { r = (right * mask / 100) & mask; v = als_mix_rd(sc, amt[dev].rreg) & ~mask; @@ -553,7 +553,7 @@ alsmix_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right) } else { r = 0; } - + /* Zero gain does not mute channel from output, but this does. */ v = als_mix_rd(sc, SB16_OMASK); if (l == 0 && r == 0) { @@ -599,15 +599,15 @@ als_intr(void *p) { struct sc_info *sc = (struct sc_info *)p; u_int8_t intr, sb_status; - + intr = als_intr_rd(sc); - + if (intr & 0x80) chn_intr(sc->pch.channel); - + if (intr & 0x40) chn_intr(sc->rch.channel); - + /* ACK interrupt in PCI core */ als_intr_wr(sc, intr); @@ -623,7 +623,7 @@ als_intr(void *p) if (sb_status & ALS_IRQ_CR1E) als_ack_read(sc, ALS_CR1E_ACK_PORT); return; -} +} /* ------------------------------------------------------------------------- */ /* H/W initialization */ @@ -641,10 +641,10 @@ als_init(struct sc_info *sc) /* Enable write on DMA_SETUP register */ v = als_mix_rd(sc, ALS_SB16_CONFIG); als_mix_wr(sc, ALS_SB16_CONFIG, v | 0x80); - + /* Select DMA0 */ als_mix_wr(sc, ALS_SB16_DMA_SETUP, 0x01); - + /* Disable write on DMA_SETUP register */ als_mix_wr(sc, ALS_SB16_CONFIG, v & 0x7f); @@ -725,7 +725,7 @@ als_resource_grab(device_t dev, struct sc_info *sc) goto bad; } - if (bus_setup_intr(dev, sc->irq, INTR_TYPE_TTY, als_intr, + if (bus_setup_intr(dev, sc->irq, INTR_TYPE_TTY, als_intr, sc, &sc->ih)) { device_printf(dev, "unable to setup interrupt\n"); goto bad; @@ -736,7 +736,7 @@ als_resource_grab(device_t dev, struct sc_info *sc) /*lowaddr*/BUS_SPACE_MAXADDR_24BIT, /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, - /*maxsize*/ALS_BUFFER_SIZE, + /*maxsize*/ALS_BUFFER_SIZE, /*nsegments*/1, /*maxsegz*/0x3ffff, /*flags*/0, &sc->parent_dmat) != 0) { device_printf(dev, "unable to create dma tag\n"); @@ -854,11 +854,11 @@ static int als_pci_resume(device_t dev) { struct sc_info *sc = pcm_getdevinfo(dev); - + if (als_init(sc) != 0) { device_printf(dev, "unable to reinitialize the card\n"); return ENXIO; - } + } if (mixer_reinit(dev) != 0) { device_printf(dev, "unable to reinitialize the mixer\n"); @@ -891,8 +891,6 @@ static driver_t als_driver = { sizeof(struct snddev_info), }; -static devclass_t pcm_devclass; - DRIVER_MODULE(snd_als, pci, als_driver, pcm_devclass, 0, 0); MODULE_DEPEND(snd_als, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); MODULE_VERSION(snd_als, 1); diff --git a/sys/dev/sound/pci/aureal.c b/sys/dev/sound/pci/aureal.c index 419eb98..fbd3bd2 100644 --- a/sys/dev/sound/pci/aureal.c +++ b/sys/dev/sound/pci/aureal.c @@ -681,8 +681,6 @@ static driver_t au_driver = { sizeof(struct snddev_info), }; -static devclass_t pcm_devclass; - DRIVER_MODULE(snd_aureal, pci, au_driver, pcm_devclass, 0, 0); MODULE_DEPEND(snd_aureal, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); MODULE_VERSION(snd_aureal, 1); diff --git a/sys/dev/sound/pci/cmi.c b/sys/dev/sound/pci/cmi.c index de29003..aaf1d0f 100644 --- a/sys/dev/sound/pci/cmi.c +++ b/sys/dev/sound/pci/cmi.c @@ -30,7 +30,7 @@ * registers and the 8738 mixer devices. His Linux was driver a also * useful reference point. * - * TODO: MIDI + * TODO: MIDI * * SPDIF contributed by Gerhard Gonter <gonter@whisky.wu-wien.ac.at>. * @@ -159,7 +159,7 @@ cmi_wr(struct sc_info *sc, int regno, u_int32_t data, int size) } static void -cmi_partial_wr4(struct sc_info *sc, +cmi_partial_wr4(struct sc_info *sc, int reg, int shift, u_int32_t mask, u_int32_t val) { u_int32_t r; @@ -232,9 +232,9 @@ cmpci_regvalue_to_rate(u_int32_t r) * playback or capture. We use ch0 for playback and ch1 for capture. */ static void -cmi_dma_prog(struct sc_info *sc, struct sc_chinfo *ch, u_int32_t base) +cmi_dma_prog(struct sc_info *sc, struct sc_chinfo *ch, u_int32_t base) { - u_int32_t s, i, sz, physbuf; + u_int32_t s, i, sz, physbuf; physbuf = vtophys(sndbuf_getbuf(ch->buffer)); @@ -246,7 +246,7 @@ cmi_dma_prog(struct sc_info *sc, struct sc_chinfo *ch, u_int32_t base) i = sz / (ch->bps * CMI_INTR_PER_BUFFER) - 1; cmi_wr(sc, base + 6, i, 2); -} +} static void @@ -254,8 +254,8 @@ cmi_ch0_start(struct sc_info *sc, struct sc_chinfo *ch) { cmi_dma_prog(sc, ch, CMPCI_REG_DMA0_BASE); - cmi_set4(sc, CMPCI_REG_FUNC_0, CMPCI_REG_CH0_ENABLE); - cmi_set4(sc, CMPCI_REG_INTR_CTRL, + cmi_set4(sc, CMPCI_REG_FUNC_0, CMPCI_REG_CH0_ENABLE); + cmi_set4(sc, CMPCI_REG_INTR_CTRL, CMPCI_REG_CH0_INTR_ENABLE); ch->dma_active = 1; @@ -267,8 +267,8 @@ cmi_ch0_stop(struct sc_info *sc, struct sc_chinfo *ch) u_int32_t r = ch->dma_active; cmi_clr4(sc, CMPCI_REG_INTR_CTRL, CMPCI_REG_CH0_INTR_ENABLE); - cmi_clr4(sc, CMPCI_REG_FUNC_0, CMPCI_REG_CH0_ENABLE); - cmi_set4(sc, CMPCI_REG_FUNC_0, CMPCI_REG_CH0_RESET); + cmi_clr4(sc, CMPCI_REG_FUNC_0, CMPCI_REG_CH0_ENABLE); + cmi_set4(sc, CMPCI_REG_FUNC_0, CMPCI_REG_CH0_RESET); cmi_clr4(sc, CMPCI_REG_FUNC_0, CMPCI_REG_CH0_RESET); ch->dma_active = 0; return r; @@ -278,9 +278,9 @@ static void cmi_ch1_start(struct sc_info *sc, struct sc_chinfo *ch) { cmi_dma_prog(sc, ch, CMPCI_REG_DMA1_BASE); - cmi_set4(sc, CMPCI_REG_FUNC_0, CMPCI_REG_CH1_ENABLE); + cmi_set4(sc, CMPCI_REG_FUNC_0, CMPCI_REG_CH1_ENABLE); /* Enable Interrupts */ - cmi_set4(sc, CMPCI_REG_INTR_CTRL, + cmi_set4(sc, CMPCI_REG_INTR_CTRL, CMPCI_REG_CH1_INTR_ENABLE); DEB(printf("cmi_ch1_start: dma prog\n")); ch->dma_active = 1; @@ -292,8 +292,8 @@ cmi_ch1_stop(struct sc_info *sc, struct sc_chinfo *ch) u_int32_t r = ch->dma_active; cmi_clr4(sc, CMPCI_REG_INTR_CTRL, CMPCI_REG_CH1_INTR_ENABLE); - cmi_clr4(sc, CMPCI_REG_FUNC_0, CMPCI_REG_CH1_ENABLE); - cmi_set4(sc, CMPCI_REG_FUNC_0, CMPCI_REG_CH1_RESET); + cmi_clr4(sc, CMPCI_REG_FUNC_0, CMPCI_REG_CH1_ENABLE); + cmi_set4(sc, CMPCI_REG_FUNC_0, CMPCI_REG_CH1_RESET); cmi_clr4(sc, CMPCI_REG_FUNC_0, CMPCI_REG_CH1_RESET); ch->dma_active = 0; return r; @@ -324,7 +324,7 @@ cmi_spdif_speed(struct sc_info *sc, int speed) { /* Channel Interface implementation */ static void * -cmichan_init(kobj_t obj, void *devinfo, +cmichan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c, int dir) { struct sc_info *sc = devinfo; @@ -740,18 +740,18 @@ cmi_init(struct sc_info *sc) CMPCI_REG_CH0_INTR_ENABLE | CMPCI_REG_CH1_INTR_ENABLE); /* Configure DMA channels, ch0 = play, ch1 = capture */ - cmi_clr4(sc, CMPCI_REG_FUNC_0, CMPCI_REG_CH0_DIR); - cmi_set4(sc, CMPCI_REG_FUNC_0, CMPCI_REG_CH1_DIR); + cmi_clr4(sc, CMPCI_REG_FUNC_0, CMPCI_REG_CH0_DIR); + cmi_set4(sc, CMPCI_REG_FUNC_0, CMPCI_REG_CH1_DIR); /* Attempt to enable 4 Channel output */ - cmi_set4(sc, CMPCI_REG_MISC, CMPCI_REG_N4SPK3D); + cmi_set4(sc, CMPCI_REG_MISC, CMPCI_REG_N4SPK3D); /* Disable SPDIF1 - not compatible with config */ cmi_clr4(sc, CMPCI_REG_FUNC_1, CMPCI_REG_SPDIF1_ENABLE); cmi_clr4(sc, CMPCI_REG_FUNC_1, CMPCI_REG_SPDIF_LOOP); return 0; -} +} static void cmi_uninit(struct sc_info *sc) @@ -860,15 +860,15 @@ cmi_attach(device_t dev) return 0; bad: - if (sc->parent_dmat) + if (sc->parent_dmat) bus_dma_tag_destroy(sc->parent_dmat); - if (sc->ih) + if (sc->ih) bus_teardown_intr(dev, sc->irq, sc->ih); - if (sc->irq) + if (sc->irq) bus_release_resource(dev, SYS_RES_IRQ, sc->irqid, sc->irq); - if (sc->reg) + if (sc->reg) bus_release_resource(dev, SYS_RES_IOPORT, sc->regid, sc->reg); - if (sc) + if (sc) free(sc, M_DEVBUF); return ENXIO; @@ -921,7 +921,7 @@ cmi_resume(device_t dev) if (mixer_reinit(dev) == -1) { device_printf(dev, "unable to reinitialize the mixer\n"); return ENXIO; - } + } if (sc->pch.dma_was_active) { cmichan_setspeed(NULL, &sc->pch, sc->pch.spd); @@ -952,7 +952,6 @@ static driver_t cmi_driver = { sizeof(struct snddev_info) }; -static devclass_t pcm_devclass; DRIVER_MODULE(snd_cmipci, pci, cmi_driver, pcm_devclass, 0, 0); MODULE_DEPEND(snd_cmipci, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); MODULE_VERSION(snd_cmipci, 1); diff --git a/sys/dev/sound/pci/cs4281.c b/sys/dev/sound/pci/cs4281.c index 9465975..088761d 100644 --- a/sys/dev/sound/pci/cs4281.c +++ b/sys/dev/sound/pci/cs4281.c @@ -780,7 +780,7 @@ cs4281_pci_attach(device_t dev) if (data & CS4281PCI_PMCS_PS_MASK) { /* Reset the power state. */ device_printf(dev, "chip is in D%d power mode " - "-- setting to D0\n", + "-- setting to D0\n", data & CS4281PCI_PMCS_PS_MASK); pci_write_config(dev, CS4281PCI_PMCS_OFFSET, data & ~CS4281PCI_PMCS_PS_MASK, 4); @@ -974,8 +974,6 @@ static driver_t cs4281_driver = { sizeof(struct snddev_info), }; -static devclass_t pcm_devclass; - DRIVER_MODULE(snd_cs4281, pci, cs4281_driver, pcm_devclass, 0, 0); MODULE_DEPEND(snd_cs4281, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); MODULE_VERSION(snd_cs4281, 1); diff --git a/sys/dev/sound/pci/csapcm.c b/sys/dev/sound/pci/csapcm.c index 19ea977..8218813 100644 --- a/sys/dev/sound/pci/csapcm.c +++ b/sys/dev/sound/pci/csapcm.c @@ -841,8 +841,6 @@ static driver_t pcmcsa_driver = { sizeof(struct snddev_info), }; -static devclass_t pcm_devclass; - DRIVER_MODULE(snd_csapcm, csa, pcmcsa_driver, pcm_devclass, 0, 0); MODULE_DEPEND(snd_csapcm, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); MODULE_DEPEND(snd_csapcm, snd_csa, 1, 1, 1); diff --git a/sys/dev/sound/pci/ds1.c b/sys/dev/sound/pci/ds1.c index 1870917..cb1f848 100644 --- a/sys/dev/sound/pci/ds1.c +++ b/sys/dev/sound/pci/ds1.c @@ -1071,8 +1071,6 @@ static driver_t ds1_driver = { sizeof(struct snddev_info), }; -static devclass_t pcm_devclass; - DRIVER_MODULE(snd_ds1, pci, ds1_driver, pcm_devclass, 0, 0); MODULE_DEPEND(snd_ds1, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); MODULE_VERSION(snd_ds1, 1); diff --git a/sys/dev/sound/pci/emu10k1.c b/sys/dev/sound/pci/emu10k1.c index cabe512..14e0837 100644 --- a/sys/dev/sound/pci/emu10k1.c +++ b/sys/dev/sound/pci/emu10k1.c @@ -1547,8 +1547,6 @@ static driver_t emu_driver = { sizeof(struct snddev_info), }; -static devclass_t pcm_devclass; - DRIVER_MODULE(snd_emu10k1, pci, emu_driver, pcm_devclass, 0, 0); MODULE_DEPEND(snd_emu10k1, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); MODULE_VERSION(snd_emu10k1, 1); diff --git a/sys/dev/sound/pci/es137x.c b/sys/dev/sound/pci/es137x.c index 6b169dc..02b1931 100644 --- a/sys/dev/sound/pci/es137x.c +++ b/sys/dev/sound/pci/es137x.c @@ -954,8 +954,6 @@ static driver_t es_driver = { sizeof(struct snddev_info), }; -static devclass_t pcm_devclass; - DRIVER_MODULE(snd_es137x, pci, es_driver, pcm_devclass, 0, 0); MODULE_DEPEND(snd_es137x, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); MODULE_VERSION(snd_es137x, 1); diff --git a/sys/dev/sound/pci/fm801.c b/sys/dev/sound/pci/fm801.c index 0584c01..25979d4 100644 --- a/sys/dev/sound/pci/fm801.c +++ b/sys/dev/sound/pci/fm801.c @@ -704,6 +704,4 @@ static driver_t fm801_driver = { sizeof(struct snddev_info), }; -static devclass_t pcm_devclass; - DRIVER_MODULE(fm801, pci, fm801_driver, pcm_devclass, 0, 0); diff --git a/sys/dev/sound/pci/maestro.c b/sys/dev/sound/pci/maestro.c index 2042eaf..c93060f 100644 --- a/sys/dev/sound/pci/maestro.c +++ b/sys/dev/sound/pci/maestro.c @@ -1185,8 +1185,6 @@ static driver_t agg_driver = { sizeof(struct snddev_info), }; -static devclass_t pcm_devclass; - DRIVER_MODULE(snd_maestro, pci, agg_driver, pcm_devclass, 0, 0); MODULE_DEPEND(snd_maestro, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); MODULE_VERSION(snd_maestro, 1); diff --git a/sys/dev/sound/pci/maestro3.c b/sys/dev/sound/pci/maestro3.c index 7f109a2..589339e 100644 --- a/sys/dev/sound/pci/maestro3.c +++ b/sys/dev/sound/pci/maestro3.c @@ -1495,8 +1495,6 @@ static driver_t m3_driver = { sizeof(struct snddev_info), }; -static devclass_t pcm_devclass; - DRIVER_MODULE(snd_maestro3, pci, m3_driver, pcm_devclass, 0, 0); MODULE_DEPEND(snd_maestro3, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); MODULE_VERSION(snd_maestro3, 1); diff --git a/sys/dev/sound/pci/neomagic.c b/sys/dev/sound/pci/neomagic.c index 01e0792..8681cd6 100644 --- a/sys/dev/sound/pci/neomagic.c +++ b/sys/dev/sound/pci/neomagic.c @@ -591,7 +591,7 @@ nm_pci_probe(device_t dev) return ENXIO; } - if ((nm_rd(sc, NM_MIXER_PRESENCE, 2) & + if ((nm_rd(sc, NM_MIXER_PRESENCE, 2) & NM_PRESENCE_MASK) != NM_PRESENCE_VALUE) { i = 0; /* non-ac97 card, but not listed */ DEB(device_printf(dev, "subdev = 0x%x - badcard?\n", @@ -746,8 +746,6 @@ static driver_t nm_driver = { sizeof(struct snddev_info), }; -static devclass_t pcm_devclass; - DRIVER_MODULE(snd_neomagic, pci, nm_driver, pcm_devclass, 0, 0); MODULE_DEPEND(snd_neomagic, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); MODULE_VERSION(snd_neomagic, 1); diff --git a/sys/dev/sound/pci/solo.c b/sys/dev/sound/pci/solo.c index d6d7c71..a78ea49 100644 --- a/sys/dev/sound/pci/solo.c +++ b/sys/dev/sound/pci/solo.c @@ -115,8 +115,6 @@ static int ess_dmasetup(struct ess_info *sc, int ch, u_int32_t base, u_int16_t c static int ess_dmapos(struct ess_info *sc, int ch); static int ess_dmatrigger(struct ess_info *sc, int ch, int go); -static devclass_t pcm_devclass; - /* * Common code for the midi and pcm functions * diff --git a/sys/dev/sound/pci/t4dwave.c b/sys/dev/sound/pci/t4dwave.c index 76254cc..1f32d31 100644 --- a/sys/dev/sound/pci/t4dwave.c +++ b/sys/dev/sound/pci/t4dwave.c @@ -829,8 +829,6 @@ static driver_t tr_driver = { sizeof(struct snddev_info), }; -static devclass_t pcm_devclass; - DRIVER_MODULE(snd_t4dwave, pci, tr_driver, pcm_devclass, 0, 0); MODULE_DEPEND(snd_t4dwave, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); MODULE_VERSION(snd_t4dwave, 1); diff --git a/sys/dev/sound/pci/via82c686.c b/sys/dev/sound/pci/via82c686.c index 78ce348..aa1d22a 100644 --- a/sys/dev/sound/pci/via82c686.c +++ b/sys/dev/sound/pci/via82c686.c @@ -581,8 +581,6 @@ static driver_t via_driver = { sizeof(struct snddev_info), }; -static devclass_t pcm_devclass; - DRIVER_MODULE(via, pci, via_driver, pcm_devclass, 0, 0); MODULE_DEPEND(via, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); MODULE_VERSION(via, 1); diff --git a/sys/dev/sound/pci/vibes.c b/sys/dev/sound/pci/vibes.c index 30ea12a..f160351 100644 --- a/sys/dev/sound/pci/vibes.c +++ b/sys/dev/sound/pci/vibes.c @@ -923,7 +923,6 @@ static driver_t sonicvibes_driver = { sizeof(struct snddev_info) }; -static devclass_t pcm_devclass; DRIVER_MODULE(snd_sonicvibes, pci, sonicvibes_driver, pcm_devclass, 0, 0); MODULE_DEPEND(snd_sonicvibes, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER); MODULE_VERSION(snd_sonicvibes, 1); |