From be97bd96dbc343cb3c070cf32bfe2ea0a485d13b Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Mon, 9 Aug 2004 19:49:28 +0000 Subject: [PATCH] The SF64-PCR card has no sound support but stupidly uses the same PCI id as other cards. The hack that was supposed to detect the lack of sound support does not work, causing a number of other cards to improperly probe as not having sound support. so disable it for the moment. People who actually have this card will have to set I_HAVE_SF64_PCR in their /etc/make.conf. Source: Barry Bouwsma --- sys/dev/sound/pci/fm801.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/sys/dev/sound/pci/fm801.c b/sys/dev/sound/pci/fm801.c index 5dda0715cf..6f5f75e184 100644 --- a/sys/dev/sound/pci/fm801.c +++ b/sys/dev/sound/pci/fm801.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sound/pci/fm801.c,v 1.3.2.8 2002/12/24 21:17:42 semenu Exp $ - * $DragonFly: src/sys/dev/sound/pci/fm801.c,v 1.4 2003/08/07 21:17:13 dillon Exp $ + * $DragonFly: src/sys/dev/sound/pci/fm801.c,v 1.5 2004/08/09 19:49:28 dillon Exp $ */ #include @@ -32,7 +32,7 @@ #include #include -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/fm801.c,v 1.4 2003/08/07 21:17:13 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/fm801.c,v 1.5 2004/08/09 19:49:28 dillon Exp $"); #define PCI_VENDOR_FORTEMEDIA 0x1319 #define PCI_DEVICE_FORTEMEDIA1 0x08011319 @@ -737,11 +737,24 @@ fm801_pci_probe( device_t dev ) * power-on value should be `0', while on AC97-less tuner * card (SF64-PCR) it was 0x80. */ + /* + * HACK (on top of the hack above?) + * Unfortunately, some fully-sound-capable cards, like the + * TerraTec 512i, return 0x80. I don't know of any other + * differences to detect between the cards. As I have one + * of these cards but not an SF64-PCR, I'd prefer to have + * the card work, as would others with the same card. + * Therefore, not knowing better, disable this check. + */ +#ifdef I_HAVE_SF64_PCR if (bus_space_read_1(st, sh, 0x28) == 0) { +#endif device_set_desc(dev, "Forte Media FM801 Audio Controller"); result = 0; +#ifdef I_HAVE_SF64_PCR } +#endif bus_release_resource(dev, regtype, regid, reg); } -- 2.41.0