diff options
author | Cameron Grant <cg@FreeBSD.org> | 2000-01-11 10:37:16 +0000 |
---|---|---|
committer | Cameron Grant <cg@FreeBSD.org> | 2000-01-11 10:37:16 +0000 |
commit | e7fb32964c8e12fac2fd5a7e9115882b4d7744d3 (patch) | |
tree | 9e894fdfd9b7b34e14c499bfba4a16aaa07535bc /sys | |
parent | 4ed62fbd7fa09c5b412d9a87a261da99710499e0 (diff) | |
download | src-e7fb32964c8e12fac2fd5a7e9115882b4d7744d3.tar.gz src-e7fb32964c8e12fac2fd5a7e9115882b4d7744d3.zip |
exclude chips with subdevices specified on a list of non-ac97 chips
Notes
Notes:
svn path=/head/; revision=55802
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/sound/pci/neomagic.c | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/sys/dev/sound/pci/neomagic.c b/sys/dev/sound/pci/neomagic.c index d18820e90fda..cdc0a6c6dc8c 100644 --- a/sys/dev/sound/pci/neomagic.c +++ b/sys/dev/sound/pci/neomagic.c @@ -106,9 +106,23 @@ static void nm_wr(struct sc_info *, int, u_int32_t, int); static u_int32_t nm_rdbuf(struct sc_info *, int, int); static void nm_wrbuf(struct sc_info *, int, u_int32_t, int); +static u_int32_t badcards[] = { + 0x0007103c, + 0x008f1028, +}; +#define NUM_BADCARDS (sizeof(badcards) / sizeof(u_int32_t)) + /* The actual rates supported by the card. */ static int samplerates[9] = { - 8000, 11025, 16000, 22050, 24000, 32000, 44100, 48000, 99999999 + 8000, + 11025, + 16000, + 22050, + 24000, + 32000, + 44100, + 48000, + 99999999 }; /* -------------------------------------------------------------------- */ @@ -534,10 +548,18 @@ static int nm_pci_probe(device_t dev) { char *s = NULL; + u_int32_t subdev, i; + subdev = (pci_get_subdevice(dev) << 16) | pci_get_subvendor(dev); switch (pci_get_devid(dev)) { case NM256AV_PCI_ID: - s = "NeoMagic 256AV"; + i = 0; + while ((i < NUM_BADCARDS) && (badcards[i] != subdev)) + i++; + if (i == NUM_BADCARDS) + s = "NeoMagic 256AV"; + else + device_printf(dev, "this is a non-ac97 NM256AV, not attaching\n"); break; case NM256ZX_PCI_ID: |