The newpcm headers currently #define away INTR_MPSAFE and INTR_TYPE_AV
because they bogusly check for defined(INTR_MPSAFE) -- something which never was a #define. Correct the definitions. This make INTR_TYPE_AV finally get used instead of the lower-priority INTR_TYPE_TTY, so it's quite possible some improvement will be had on sound driver performance. It would also make all the drivers marked INTR_MPSAFE actually run without Giant (which does seem to work for me), but: INTR_MPSAFE HAS BEEN REMOVED FROM EVERY SOUND DRIVER! It needs to be re-added on a case-by-case basis since there is no one who will vouch for which sound drivers, if any, willy actually operate correctly without Giant, since there hasn't been testing because of this bug disabling INTR_MPSAFE. Found by: "Yuriy Tsibizov" <Yuriy.Tsibizov@gfk.ru>
This commit is contained in:
parent
929789b42c
commit
8fb9a995cf
@ -604,7 +604,7 @@ ad1816_attach(device_t dev)
|
||||
ad1816_init(ad1816, dev);
|
||||
if (mixer_init(dev, &ad1816mixer_class, ad1816)) goto no;
|
||||
|
||||
snd_setup_intr(dev, ad1816->irq, INTR_MPSAFE, ad1816_intr, ad1816, &ad1816->ih);
|
||||
snd_setup_intr(dev, ad1816->irq, 0, ad1816_intr, ad1816, &ad1816->ih);
|
||||
if (bus_dma_tag_create(/*parent*/NULL, /*alignment*/2, /*boundary*/0,
|
||||
/*lowaddr*/BUS_SPACE_MAXADDR_24BIT,
|
||||
/*highaddr*/BUS_SPACE_MAXADDR,
|
||||
|
@ -841,7 +841,7 @@ ess_attach(device_t dev)
|
||||
if (sc->newspeed)
|
||||
ess_setmixer(sc, 0x71, 0x22);
|
||||
|
||||
snd_setup_intr(dev, sc->irq, INTR_MPSAFE, ess_intr, sc, &sc->ih);
|
||||
snd_setup_intr(dev, sc->irq, 0, ess_intr, sc, &sc->ih);
|
||||
if (!sc->duplex)
|
||||
pcm_setflags(dev, pcm_getflags(dev) | SD_F_SIMPLEX);
|
||||
|
||||
|
@ -1711,10 +1711,10 @@ mss_doattach(device_t dev, struct mss_info *mss)
|
||||
mixer_init(dev, (mss->bd_id == MD_YM0020)? &ymmix_mixer_class : &mssmix_mixer_class, mss);
|
||||
switch (mss->bd_id) {
|
||||
case MD_OPTI931:
|
||||
snd_setup_intr(dev, mss->irq, INTR_MPSAFE, opti931_intr, mss, &mss->ih);
|
||||
snd_setup_intr(dev, mss->irq, 0, opti931_intr, mss, &mss->ih);
|
||||
break;
|
||||
default:
|
||||
snd_setup_intr(dev, mss->irq, INTR_MPSAFE, mss_intr, mss, &mss->ih);
|
||||
snd_setup_intr(dev, mss->irq, 0, mss_intr, mss, &mss->ih);
|
||||
}
|
||||
if (pdma == rdma)
|
||||
pcm_setflags(dev, pcm_getflags(dev) | SD_F_SIMPLEX);
|
||||
|
@ -803,7 +803,7 @@ sb16_attach(device_t dev)
|
||||
goto no;
|
||||
if (mixer_init(dev, &sb16mix_mixer_class, sb))
|
||||
goto no;
|
||||
if (snd_setup_intr(dev, sb->irq, INTR_MPSAFE, sb_intr, sb, &sb->ih))
|
||||
if (snd_setup_intr(dev, sb->irq, 0, sb_intr, sb, &sb->ih))
|
||||
goto no;
|
||||
|
||||
if (sb->bd_flags & BD_F_SB16X)
|
||||
|
@ -716,7 +716,7 @@ sb_attach(device_t dev)
|
||||
goto no;
|
||||
if (mixer_init(dev, (sb->bd_id < 0x300)? &sbmix_mixer_class : &sbpromix_mixer_class, sb))
|
||||
goto no;
|
||||
if (snd_setup_intr(dev, sb->irq, INTR_MPSAFE, sb_intr, sb, &sb->ih))
|
||||
if (snd_setup_intr(dev, sb->irq, 0, sb_intr, sb, &sb->ih))
|
||||
goto no;
|
||||
|
||||
pcm_setflags(dev, pcm_getflags(dev) | SD_F_SIMPLEX);
|
||||
|
@ -430,7 +430,7 @@ sbc_attach(device_t dev)
|
||||
err = "setup_intr";
|
||||
for (i = 0; i < IRQ_MAX; i++) {
|
||||
scp->ihl[i].parent = scp;
|
||||
if (snd_setup_intr(dev, scp->irq[i], INTR_MPSAFE, sbc_intr, &scp->ihl[i], &scp->ih[i]))
|
||||
if (snd_setup_intr(dev, scp->irq[i], 0, sbc_intr, &scp->ihl[i], &scp->ih[i]))
|
||||
goto bad;
|
||||
}
|
||||
|
||||
|
@ -863,7 +863,7 @@ cmi_attach(device_t dev)
|
||||
sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irqid,
|
||||
RF_ACTIVE | RF_SHAREABLE);
|
||||
if (!sc->irq ||
|
||||
snd_setup_intr(dev, sc->irq, INTR_MPSAFE, cmi_intr, sc, &sc->ih)) {
|
||||
snd_setup_intr(dev, sc->irq, 0, cmi_intr, sc, &sc->ih)) {
|
||||
device_printf(dev, "cmi_attach: Unable to map interrupt\n");
|
||||
goto bad;
|
||||
}
|
||||
|
@ -275,7 +275,7 @@ csa_attach(device_t dev)
|
||||
goto err_mem;
|
||||
|
||||
/* Enable interrupt. */
|
||||
if (snd_setup_intr(dev, resp->irq, INTR_MPSAFE, csa_intr, scp, &scp->ih))
|
||||
if (snd_setup_intr(dev, resp->irq, 0, csa_intr, scp, &scp->ih))
|
||||
goto err_intr;
|
||||
#if 0
|
||||
if ((csa_readio(resp, BA0_HISR) & HISR_INTENA) == 0)
|
||||
|
@ -795,7 +795,7 @@ pcmcsa_attach(device_t dev)
|
||||
rman_get_start(resp->irq),PCM_KLDSTRING(snd_csa));
|
||||
|
||||
/* Enable interrupt. */
|
||||
if (snd_setup_intr(dev, resp->irq, INTR_MPSAFE, csa_intr, csa, &csa->ih)) {
|
||||
if (snd_setup_intr(dev, resp->irq, 0, csa_intr, csa, &csa->ih)) {
|
||||
ac97_destroy(codec);
|
||||
csa_releaseres(csa, dev);
|
||||
return (ENXIO);
|
||||
|
@ -991,7 +991,7 @@ ds_pci_attach(device_t dev)
|
||||
sc->irqid = 0;
|
||||
sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irqid,
|
||||
RF_ACTIVE | RF_SHAREABLE);
|
||||
if (!sc->irq || snd_setup_intr(dev, sc->irq, INTR_MPSAFE, ds_intr, sc, &sc->ih)) {
|
||||
if (!sc->irq || snd_setup_intr(dev, sc->irq, 0, ds_intr, sc, &sc->ih)) {
|
||||
device_printf(dev, "unable to map interrupt\n");
|
||||
goto bad;
|
||||
}
|
||||
|
@ -1944,7 +1944,7 @@ emu_pci_attach(device_t dev)
|
||||
sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &i,
|
||||
RF_ACTIVE | RF_SHAREABLE);
|
||||
if (!sc->irq ||
|
||||
snd_setup_intr(dev, sc->irq, INTR_MPSAFE, emu_intr, sc, &sc->ih)) {
|
||||
snd_setup_intr(dev, sc->irq, 0, emu_intr, sc, &sc->ih)) {
|
||||
device_printf(dev, "unable to map interrupt\n");
|
||||
goto bad;
|
||||
}
|
||||
|
@ -745,7 +745,7 @@ ich_pci_attach(device_t dev)
|
||||
sc->irqid = 0;
|
||||
sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irqid,
|
||||
RF_ACTIVE | RF_SHAREABLE);
|
||||
if (!sc->irq || snd_setup_intr(dev, sc->irq, INTR_MPSAFE, ich_intr, sc, &sc->ih)) {
|
||||
if (!sc->irq || snd_setup_intr(dev, sc->irq, 0, ich_intr, sc, &sc->ih)) {
|
||||
device_printf(dev, "unable to map interrupt\n");
|
||||
goto bad;
|
||||
}
|
||||
|
@ -845,7 +845,7 @@ tr_pci_attach(device_t dev)
|
||||
tr->irqid = 0;
|
||||
tr->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &tr->irqid,
|
||||
RF_ACTIVE | RF_SHAREABLE);
|
||||
if (!tr->irq || snd_setup_intr(dev, tr->irq, INTR_MPSAFE, tr_intr, tr, &tr->ih)) {
|
||||
if (!tr->irq || snd_setup_intr(dev, tr->irq, 0, tr_intr, tr, &tr->ih)) {
|
||||
device_printf(dev, "unable to map interrupt\n");
|
||||
goto bad;
|
||||
}
|
||||
|
@ -77,18 +77,13 @@
|
||||
|
||||
#define USING_MUTEX
|
||||
#define USING_DEVFS
|
||||
#else
|
||||
#define INTR_TYPE_AV INTR_TYPE_TTY
|
||||
#define INTR_MPSAFE 0
|
||||
#endif
|
||||
|
||||
#define SND_DYNSYSCTL
|
||||
|
||||
#ifndef INTR_MPSAFE
|
||||
#define INTR_TYPE_AV INTR_TYPE_TTY
|
||||
#endif
|
||||
|
||||
#ifndef INTR_MPSAFE
|
||||
#define INTR_MPSAFE 0
|
||||
#endif
|
||||
|
||||
struct pcm_channel;
|
||||
struct pcm_feeder;
|
||||
struct snd_dbuf;
|
||||
|
Loading…
Reference in New Issue
Block a user