kern/54810: Patch to support old Creative Audio PCI sound card
David Xu
davidxu at FreeBSD.org
Thu Jul 24 06:10:04 PDT 2003
>Number: 54810
>Category: kern
>Synopsis: Patch to support old Creative Audio PCI sound card
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Jul 24 06:10:02 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: David Xu
>Release: FreeBSD current
>Organization:
FreeBSD.org
>Environment:
System:FreeBSD tiger.my 5.1-CURRENT FreeBSD 5.1-CURRENT #3: Mon Jul 21 08:24:03 CST 2003 davidxu at tiger.my:/home/davidxu/src/sys/i386/compile/mpnw i386
>Description:
A patch for Creative Audio PCI chip CT4730
>How-To-Repeat:
N/A
>Fix:
Index: dev/sound/pci/es137x.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/sound/pci/es137x.c,v
retrieving revision 1.44
diff -u -r1.44 es137x.c
--- dev/sound/pci/es137x.c 1 Jul 2003 15:52:01 -0000 1.44
+++ dev/sound/pci/es137x.c 24 Jul 2003 12:54:23 -0000
@@ -71,6 +71,7 @@
#define ES1371_PCI_ID 0x13711274
#define ES1371_PCI_ID2 0x13713274
#define CT5880_PCI_ID 0x58801274
+#define CT4730_PCI_ID 0x89381102
#define ES1371REV_ES1371_A 0x02
#define ES1371REV_ES1371_B 0x09
@@ -85,6 +86,8 @@
#define CT5880REV_CT5880_D 0x03
#define CT5880REV_CT5880_E 0x04
+#define CT4730REV_CT4730_A 0x00
+
#define ES_DEFAULT_BUFSZ 4096
/* device private data */
@@ -505,7 +508,8 @@
(devid == ES1371_PCI_ID && revid == ES1371REV_CT5880_A) ||
(devid == CT5880_PCI_ID && revid == CT5880REV_CT5880_C) ||
(devid == CT5880_PCI_ID && revid == CT5880REV_CT5880_D) ||
- (devid == CT5880_PCI_ID && revid == CT5880REV_CT5880_E)) {
+ (devid == CT5880_PCI_ID && revid == CT5880REV_CT5880_E) ||
+ (devid == CT4730_PCI_ID)) {
bus_space_write_4(es->st, es->sh, ES1370_REG_STATUS, 0x20000000);
DELAY(20000);
if (debug > 0) device_printf(dev, "ac97 2.1 enabled\n");
@@ -791,6 +795,17 @@
device_printf(dev, "unknown revision %d -- please report to cg at freebsd.org\n", pci_get_revid(dev));
return 0;
+ case CT4730_PCI_ID:
+ switch(pci_get_revid(dev)) {
+ case CT4730REV_CT4730_A:
+ device_set_desc(dev, "Creative SB AudioPCI CT4730");
+ return 0;
+ default:
+ device_set_desc(dev, "Creative SB AudioPCI CT4730-?");
+ device_printf(dev, "unknown revision %d -- please report to cg at freebsd.org\n", pci_get_revid(dev));
+ return 0;
+ }
+
case CT5880_PCI_ID:
switch(pci_get_revid(dev)) {
case CT5880REV_CT5880_C:
@@ -868,7 +883,8 @@
if (pci_get_devid(dev) == ES1371_PCI_ID ||
pci_get_devid(dev) == ES1371_PCI_ID2 ||
- pci_get_devid(dev) == CT5880_PCI_ID) {
+ pci_get_devid(dev) == CT5880_PCI_ID ||
+ pci_get_devid(dev) == CT4730_PCI_ID) {
if(-1 == es1371_init(es, dev)) {
device_printf(dev, "unable to initialize the card\n");
goto bad;
Index: dev/sound/pcm/ac97.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/sound/pcm/ac97.c,v
retrieving revision 1.42
diff -u -r1.42 ac97.c
--- dev/sound/pcm/ac97.c 23 Apr 2003 16:49:53 -0000 1.42
+++ dev/sound/pcm/ac97.c 24 Jul 2003 12:54:24 -0000
@@ -113,6 +113,7 @@
{ 0x56494100, "VIA Technologies" },
{ 0x574d4c00, "Wolfson" },
{ 0x594d4800, "Yamaha" },
+ { 0x01408300, "Creative" },
{ 0x00000000, NULL }
};
@@ -188,6 +189,7 @@
{ 0x594d4800, 0x00, 0, "YMF743", 0 },
{ 0x594d4802, 0x00, 0, "YMF752", 0 },
{ 0x594d4803, 0x00, 0, "YMF753", 0 },
+ { 0x01408384, 0x00, 0, "EV1938", 0 },
{ 0, 0, 0, NULL, 0 }
};
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list