summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorariff <ariff@FreeBSD.org>2007-12-12 18:21:05 +0000
committerariff <ariff@FreeBSD.org>2007-12-12 18:21:05 +0000
commit6989ea14ce45be69597e3000d98b60df403656b1 (patch)
tree803469c1a03b5dc6c1e494285c89c3d8f0c86818
parentc381c996e1a95ec51089d00f480aa2548fd54876 (diff)
downloadFreeBSD-src-6989ea14ce45be69597e3000d98b60df403656b1.zip
FreeBSD-src-6989ea14ce45be69597e3000d98b60df403656b1.tar.gz
Disable AC97 microphone channel. Due to the channel allocation priority
that favours true hardware channel, the first instance of recording request will grab this channel (the first channel is being used as vchan master). In many cases, it is not really work as intended and give false impression of broken recording. PR: kern/118546 MFC after: 3 days
-rw-r--r--sys/dev/sound/pci/ich.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/sound/pci/ich.c b/sys/dev/sound/pci/ich.c
index 64e2eec..7351355 100644
--- a/sys/dev/sound/pci/ich.c
+++ b/sys/dev/sound/pci/ich.c
@@ -980,6 +980,10 @@ ich_pci_attach(device_t dev)
device_get_unit(dev), "fixedrate", &i) == 0 && i != 0)
sc->flags |= ICH_FIXED_RATE;
+ if (resource_int_value(device_get_name(dev),
+ device_get_unit(dev), "micchannel_enabled", &i) == 0 && i != 0)
+ sc->hasmic = 1;
+
sc->irqid = 0;
sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irqid,
RF_ACTIVE | RF_SHAREABLE);
@@ -1026,7 +1030,8 @@ ich_pci_attach(device_t dev)
extcaps = ac97_getextcaps(sc->codec);
sc->hasvra = extcaps & AC97_EXTCAP_VRA;
sc->hasvrm = extcaps & AC97_EXTCAP_VRM;
- sc->hasmic = ac97_getcaps(sc->codec) & AC97_CAP_MICCHANNEL;
+ sc->hasmic = (sc->hasmic != 0 &&
+ (ac97_getcaps(sc->codec) & AC97_CAP_MICCHANNEL)) ? 1 : 0;
ac97_setextmode(sc->codec, sc->hasvra | sc->hasvrm);
sc->dtbl_size = sizeof(struct ich_desc) * ICH_DTBL_LENGTH *
OpenPOWER on IntegriCloud