From owner-freebsd-current Thu Jul 6 22:12: 5 2000 Delivered-To: freebsd-current@freebsd.org Received: from lips.borg.umn.edu (lips.borg.umn.edu [160.94.232.50]) by hub.freebsd.org (Postfix) with ESMTP id EABEA37BCEB for ; Thu, 6 Jul 2000 22:11:56 -0700 (PDT) (envelope-from cattelan@thebarn.com) Received: from thebarn.com (nic-25-c125-118.mn.mediaone.net [24.25.125.118]) by lips.borg.umn.edu (8.10.1/8.10.1) with ESMTP id e675Bqb30406; Fri, 7 Jul 2000 00:11:52 -0500 (CDT) Message-ID: <39656697.B358306A@thebarn.com> Date: Fri, 07 Jul 2000 00:11:52 -0500 From: Russell Cattelan Reply-To: cattelan@thebarn.com X-Mailer: Mozilla 4.73 [en] (X11; U; FreeBSD 4.0-STABLE i386) X-Accept-Language: en MIME-Version: 1.0 To: Ollivier Robert Cc: freebsd-current@FreeBSD.ORG, culverk@wam.umd.edu Subject: Re: could someone with committer access commit this? References: <20000702161721.A97851@keltia.freenix.fr> Content-Type: multipart/mixed; boundary="------------CE9C01862C6B0E6A6E54B1FB" Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This is a multi-part message in MIME format. --------------CE9C01862C6B0E6A6E54B1FB Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Ollivier Robert wrote: > According to Kenneth Wayne Culver: > > This is the patch to make my soundcard, a Creative Ensoniq AudioPCI (an > > es1371 chip, device id 0x58801274 rev 0x02). Can someone commit it please? > > Done. There is a problem with that patch. I'm not sure if there are older 1371 rev 2 boards out there, but they would be incorrectly inited. Test this patch first, but it should be more definitive. --------------CE9C01862C6B0E6A6E54B1FB Content-Type: text/plain; charset=us-ascii; name="patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch" Index: es137x.c =================================================================== RCS file: /usr/FreeBSD-CVS/src/sys/dev/sound/pci/es137x.c,v retrieving revision 1.21 diff -u -r1.21 es137x.c --- es137x.c 2000/07/03 20:52:26 1.21 +++ es137x.c 2000/07/07 05:05:48 @@ -107,7 +107,7 @@ static void es1371_src_write(struct es_info *, u_short, unsigned short); static u_int es1371_adc_rate(struct es_info *, u_int, int); static u_int es1371_dac_rate(struct es_info *, u_int, int); -static int es1371_init(struct es_info *es, int); +static int es1371_init(struct es_info *es, device_t); static int es1370_init(struct es_info *); static int es1370_wrcodec(struct es_info *, u_char, u_char); @@ -484,9 +484,11 @@ /* ES1371 specific */ int -es1371_init(struct es_info *es, int rev) +es1371_init(struct es_info *es, device_t dev) { int idx; + int devid = pci_get_devid(dev); + int rev = pci_get_revid(dev); if (debug > 0) printf("es_init\n"); @@ -494,7 +496,7 @@ es->ctrl = 0; es->sctrl = 0; /* initialize the chips */ - if (rev == 7 || rev >= 9 || rev == 2) { + if (rev == 7 || rev >= 9 || (devid == ES1371_PCI_ID3 && rev == 2)) { #define ES1371_BINTSUMM_OFF 0x07 bus_space_write_4(es->st, es->sh, ES1371_BINTSUMM_OFF, 0x20); if (debug > 0) printf("es_init rev == 7 || rev >= 9\n"); @@ -793,7 +795,7 @@ if (pci_get_devid(dev) == ES1371_PCI_ID || pci_get_devid(dev) == ES1371_PCI_ID2 || pci_get_devid(dev) == ES1371_PCI_ID3) { - if(-1 == es1371_init(es, pci_get_revid(dev))) { + if(-1 == es1371_init(es, dev)) { device_printf(dev, "unable to initialize the card\n"); goto bad; } --------------CE9C01862C6B0E6A6E54B1FB-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message