aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/sound/pci/ich.c
diff options
context:
space:
mode:
authorAriff Abdullah <ariff@FreeBSD.org>2007-12-12 18:21:05 +0000
committerAriff Abdullah <ariff@FreeBSD.org>2007-12-12 18:21:05 +0000
commit909f7f7f4ea4671b61c556de0a97b337ed6e03e6 (patch)
tree803469c1a03b5dc6c1e494285c89c3d8f0c86818 /sys/dev/sound/pci/ich.c
parentf0cfdeddd2d142b37de756c83328c2d8225c6628 (diff)
downloadsrc-909f7f7f4ea4671b61c556de0a97b337ed6e03e6.tar.gz
src-909f7f7f4ea4671b61c556de0a97b337ed6e03e6.zip
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
Notes
Notes: svn path=/head/; revision=174552
Diffstat (limited to 'sys/dev/sound/pci/ich.c')
-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 64e2eec38986..7351355ea963 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 *