summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorariff <ariff@FreeBSD.org>2006-01-10 06:52:59 +0000
committerariff <ariff@FreeBSD.org>2006-01-10 06:52:59 +0000
commit102c8af8288f3384264c77b191aaff70b5806f29 (patch)
treeab81c604ce1271d167e4b19b2be2cea84be478ca /sys
parent706bc421bef442e4d94da400a14993c6b26df21a (diff)
downloadFreeBSD-src-102c8af8288f3384264c77b191aaff70b5806f29.zip
FreeBSD-src-102c8af8288f3384264c77b191aaff70b5806f29.tar.gz
More thorough fixes to enable inverted external amplifier sense flag.
Instead of dragging the entire ICH4/82801DB into this mess, select only few boards based on pci subdevice / subvendor. Tested by: Daisuke Orikasa <luxury-acura-3.5rl at nifty.com> MFC after: 3 days
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/sound/pci/ich.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/sys/dev/sound/pci/ich.c b/sys/dev/sound/pci/ich.c
index 49bacaf..638f663 100644
--- a/sys/dev/sound/pci/ich.c
+++ b/sys/dev/sound/pci/ich.c
@@ -737,6 +737,7 @@ ich_pci_probe(device_t dev)
static int
ich_pci_attach(device_t dev)
{
+ uint32_t subdev;
u_int16_t extcaps;
uint16_t devid, vendor;
struct sc_info *sc;
@@ -752,6 +753,7 @@ ich_pci_attach(device_t dev)
vendor = sc->vendor = pci_get_vendor(dev);
devid = sc->devid = pci_get_device(dev);
+ subdev = (pci_get_subdevice(dev) << 16) | pci_get_subvendor(dev);
/*
* The SiS 7012 register set isn't quite like the standard ich.
* There really should be a general "quirks" mechanism.
@@ -831,13 +833,18 @@ ich_pci_attach(device_t dev)
goto bad;
/*
- * Turn on inverted external amplifier sense flags for ICH4/82801DB.
- * Does ICH3/82801CA need this too ? I left them out for now.
- *
- * http://lists.freebsd.org/pipermail/freebsd-multimedia/2003-November/000531.html
+ * Turn on inverted external amplifier sense flags for few
+ * 'special' boards.
*/
- if (vendor == INTEL_VENDORID && devid == INTEL_82801DB)
+ switch (subdev) {
+ case 0x203a161f: /* Gateway 4028GZ */
+ case 0x8144104d: /* Sony - VAIO PCG-TR* */
+ case 0x8197104d: /* Sony S1XP */
ac97_setflags(sc->codec, ac97_getflags(sc->codec) | AC97_F_EAPD_INV);
+ break;
+ default:
+ break;
+ }
mixer_init(dev, ac97_getmixerclass(), sc->codec);
OpenPOWER on IntegriCloud