FreeBSD Bugzilla – Attachment 8304 Details for
Bug 17453
Added sys/pci/ device identification for Aureal Sound Cards
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.69 KB, created by
lioux
on 2000-03-18 03:30:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
lioux
Created:
2000-03-18 03:30:01 UTC
Size:
1.69 KB
patch
obsolete
>diff -u sys/pci/pci.c /tmp/aureal/pci.c >--- sys/pci/pci.c Fri Mar 17 23:50:38 2000 >+++ /tmp/aureal/pci.c Fri Mar 17 22:06:41 2000 >@@ -1237,6 +1237,7 @@ > desc = pci_ata_match(child); > if (!desc) desc = pci_usb_match(child); > if (!desc) desc = pci_vga_match(child); >+ if (!desc) desc = pci_snd_match(child); > if (!desc) { > desc = "unknown card"; > unknown++; >diff -u sys/pci/pcisupport.c /tmp/aureal/pcisupport.c >--- sys/pci/pcisupport.c Fri Mar 17 23:50:38 2000 >+++ /tmp/aureal/pcisupport.c Fri Mar 17 23:31:24 2000 >@@ -1831,6 +1831,61 @@ > return type; > } > >+ >+const char* pci_snd_match(device_t dev) >+{ >+ u_int id = pci_get_devid(dev); >+ const char *vendor, *chip, *type; >+ >+ vendor = chip = type = 0; >+ switch (id & 0xffff) { >+ case 0x12eb: >+ vendor = "Aureal"; >+ switch (id >> 16) { >+ case 0x0001: >+ chip = "Au8820"; >+ type = "Vortex1"; break; >+ case 0x0002: >+ chip = "Au8830"; >+ type = "Vortex2 SuperQuad or SQ2500"; break; >+ case 0x0003: >+ chip = "Au8810"; >+ type = "Vortex Advantage or SQ1500"; break; >+ default: >+ chip = "Au88xx"; break; >+ } >+ break; >+ } >+ >+ if (vendor && chip) { >+ char *buf; >+ int len; >+ >+ if (type == 0) >+ type = "Sound Card Device"; >+ >+ len = strlen(vendor) + strlen(chip) + strlen(type) + 4; >+ MALLOC(buf, char *, len, M_TEMP, M_NOWAIT); >+ if (buf) >+ sprintf(buf, "%s %s %s", vendor, chip, type); >+ return buf; >+ } >+ >+ if (vendor) { >+ char *buf; >+ int len; >+ >+ len = strlen(vendor) + strlen(type) + 2 + 6 + 4 + 1; >+ MALLOC(buf, char *, len, M_TEMP, M_NOWAIT); >+ if (buf) >+ sprintf(buf, "%s model %04x %s", vendor, id >> 16, type); >+ return buf; >+ } >+ return 0; >+} >+ >+ >+ > /*--------------------------------------------------------- > ** > ** Devices to ignore
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 17453
: 8304