mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-28 08:02:54 +00:00
- Locking fixes. Release lock while chn_intr().
- Mark MPSAFE since most of the locking procedures already implemented. - Turn on inverted external amplifier sense flag for selected boards. Tested by: bland MFC after: 1 week
This commit is contained in:
parent
07a263153e
commit
40c012dd6d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=154215
@ -743,13 +743,17 @@ ds_intr(void *p)
|
||||
for (i = 0; i < DS1_CHANS; i++) {
|
||||
if (sc->pch[i].run) {
|
||||
x = 1;
|
||||
snd_mtxunlock(sc->lock);
|
||||
chn_intr(sc->pch[i].channel);
|
||||
snd_mtxlock(sc->lock);
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 2; i++) {
|
||||
if (sc->rch[i].run) {
|
||||
x = 1;
|
||||
snd_mtxunlock(sc->lock);
|
||||
chn_intr(sc->rch[i].channel);
|
||||
snd_mtxlock(sc->lock);
|
||||
}
|
||||
}
|
||||
i = ds_rd(sc, YDSXGR_MODE, 4);
|
||||
@ -986,12 +990,23 @@ ds_pci_attach(device_t dev)
|
||||
codec = AC97_CREATE(dev, sc, ds_ac97);
|
||||
if (codec == NULL)
|
||||
goto bad;
|
||||
/*
|
||||
* Turn on inverted external amplifier sense flags for few
|
||||
* 'special' boards.
|
||||
*/
|
||||
switch (subdev) {
|
||||
case 0x81171033: /* NEC ValueStar (VT550/0) */
|
||||
ac97_setflags(codec, ac97_getflags(codec) | AC97_F_EAPD_INV);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
mixer_init(dev, ac97_getmixerclass(), codec);
|
||||
|
||||
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, 0, ds_intr, sc, &sc->ih)) {
|
||||
if (!sc->irq || snd_setup_intr(dev, sc->irq, INTR_MPSAFE, ds_intr, sc, &sc->ih)) {
|
||||
device_printf(dev, "unable to map interrupt\n");
|
||||
goto bad;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user