View | Details | Raw Unified | Return to bug 162181
Collapse All | Expand All

(-)/usr/src/sys/dev/sound/pci/emu10k1.c Sun 30 Oct 2011 13:42:48 PDT (-11 / +13 lines)
Lines 1120-1131 Link Here
1120
static void
1120
static void
1121
emu_midiattach(struct sc_info *sc)
1121
emu_midiattach(struct sc_info *sc)
1122
{
1122
{
1123
	/* midi2 uses a software interupt
1123
	int i;
1124
	int i;
1124
1125
1125
	i = emu_rd(sc, INTE, 4);
1126
	i = emu_rd(sc, INTE, 4);
1126
	i |= INTE_MIDIRXENABLE;
1127
	i |= INTE_MIDIRXENABLE;
1127
	emu_wr(sc, INTE, i, 4);
1128
	emu_wr(sc, INTE, i, 4);
1128
1129
	*/
1130
	
1129
	sc->mpu = mpu401_init(&emu_mpu_class, sc, emu_intr2, &sc->mpu_intr);
1131
	sc->mpu = mpu401_init(&emu_mpu_class, sc, emu_intr2, &sc->mpu_intr);
1130
}
1132
}
1131
/* -------------------------------------------------------------------- */
1133
/* -------------------------------------------------------------------- */
Lines 2026-2032 Link Here
2026
		device_printf(dev, "unable to create dma tag\n");
2028
		device_printf(dev, "unable to create dma tag\n");
2027
		goto bad;
2029
		goto bad;
2028
	}
2030
	}
2029
2031
	
2032
	i = 0;
2033
	sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &i,
2034
	    RF_ACTIVE | RF_SHAREABLE);
2035
	if (!sc->irq ||
2036
	    snd_setup_intr(dev, sc->irq, INTR_MPSAFE, emu_intr, sc, &sc->ih)) {
2037
		device_printf(dev, "unable to map interrupt\n");
2038
		goto bad;
2039
	}
2040
	
2030
	if (emu_init(sc) == -1) {
2041
	if (emu_init(sc) == -1) {
2031
		device_printf(dev, "unable to initialize the card\n");
2042
		device_printf(dev, "unable to initialize the card\n");
2032
		goto bad;
2043
		goto bad;
Lines 2039-2053 Link Here
2039
2050
2040
	emu_midiattach(sc);
2051
	emu_midiattach(sc);
2041
2052
2042
	i = 0;
2043
	sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &i,
2044
	    RF_ACTIVE | RF_SHAREABLE);
2045
	if (!sc->irq ||
2046
	    snd_setup_intr(dev, sc->irq, INTR_MPSAFE, emu_intr, sc, &sc->ih)) {
2047
		device_printf(dev, "unable to map interrupt\n");
2048
		goto bad;
2049
	}
2050
2051
	snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld %s",
2053
	snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld %s",
2052
	    rman_get_start(sc->reg), rman_get_start(sc->irq),
2054
	    rman_get_start(sc->reg), rman_get_start(sc->irq),
2053
	    PCM_KLDSTRING(snd_emu10k1));
2055
	    PCM_KLDSTRING(snd_emu10k1));

Return to bug 162181