From 1bc9e7ad6db7a092d141d8bbc7a604bc03e09971 Mon Sep 17 00:00:00 2001 From: ariff Date: Fri, 13 Jan 2006 04:54:34 +0000 Subject: [PATCH] Joyport blacklist. Either we're facing with broken hardware or because this hardware need special (unknown) initialization procedures. Reported by: [1] Rob Clark MFC after: 3 days [1] http://lists.freebsd.org/pipermail/freebsd-multimedia/2006-January/003535.html --- sys/dev/sound/pci/es137x.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/sys/dev/sound/pci/es137x.c b/sys/dev/sound/pci/es137x.c index f8dfed3ca066..0f7f387b3933 100644 --- a/sys/dev/sound/pci/es137x.c +++ b/sys/dev/sound/pci/es137x.c @@ -794,18 +794,31 @@ es1370_init(struct es_info *es) int es1371_init(struct es_info *es) { - uint32_t cssr, devid, revid; + uint32_t cssr, devid, revid, subdev; int idx; ES_LOCK(es); /* This is NOT ES1370 */ es->escfg = ES_SET_IS_ES1370(es->escfg, 0); es->num = 0; - es->ctrl = CTRL_JYSTK_EN; es->sctrl = 0; cssr = 0; devid = pci_get_devid(es->dev); revid = pci_get_revid(es->dev); + subdev = (pci_get_subdevice(es->dev) << 16) | pci_get_subvendor(es->dev); + /* + * Joyport blacklist. Either we're facing with broken hardware + * or because this hardware need special (unknown) initialization + * procedures. + */ + switch (subdev) { + case 0x20001274: /* old Ensoniq */ + es->ctrl = 0; + break; + default: + es->ctrl = CTRL_JYSTK_EN; + break; + } if (devid == CT4730_PCI_ID) { /* XXX amplifier hack? */ es->ctrl |= (1 << 16);