Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/sound/pci/emu10k1.c
Show First 20 Lines • Show All 2,126 Lines • ▼ Show 20 Lines | emu_pci_attach(device_t dev) | ||||
sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &i, | sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &i, | ||||
RF_ACTIVE | RF_SHAREABLE); | RF_ACTIVE | RF_SHAREABLE); | ||||
if (!sc->irq || | if (!sc->irq || | ||||
snd_setup_intr(dev, sc->irq, INTR_MPSAFE, emu_intr, sc, &sc->ih)) { | snd_setup_intr(dev, sc->irq, INTR_MPSAFE, emu_intr, sc, &sc->ih)) { | ||||
device_printf(dev, "unable to map interrupt\n"); | device_printf(dev, "unable to map interrupt\n"); | ||||
goto bad; | goto bad; | ||||
} | } | ||||
snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld %s", | snprintf(status, SND_STATUSLEN, "at io 0x%jx irq %jd %s", | ||||
rman_get_start(sc->reg), rman_get_start(sc->irq), | rman_get_start(sc->reg), rman_get_start(sc->irq), | ||||
PCM_KLDSTRING(snd_emu10k1)); | PCM_KLDSTRING(snd_emu10k1)); | ||||
if (pcm_register(dev, sc, sc->nchans, gotmic ? 3 : 2)) goto bad; | if (pcm_register(dev, sc, sc->nchans, gotmic ? 3 : 2)) goto bad; | ||||
for (i = 0; i < sc->nchans; i++) | for (i = 0; i < sc->nchans; i++) | ||||
pcm_addchan(dev, PCMDIR_PLAY, &emupchan_class, sc); | pcm_addchan(dev, PCMDIR_PLAY, &emupchan_class, sc); | ||||
for (i = 0; i < (gotmic ? 3 : 2); i++) | for (i = 0; i < (gotmic ? 3 : 2); i++) | ||||
pcm_addchan(dev, PCMDIR_REC, &emurchan_class, sc); | pcm_addchan(dev, PCMDIR_REC, &emurchan_class, sc); | ||||
▲ Show 20 Lines • Show All 113 Lines • Show Last 20 Lines |