Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 01 Mar 2001 13:26:46 -0500
From:      Russell Cattelan <cattelan@thebarn.com>
To:        e-devil@e-devil.org
Cc:        freebsd-multimedia@freebsd.org
Subject:   Re: SoundBlaster 16PCI (ES1371) problem
Message-ID:  <3A9E9465.BDF9519A@thebarn.com>
References:  <20010222211308.A29708@e-devil.org> <3A957EEE.C11812CD@thebarn.com> <20010222221610.A29985@e-devil.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------7710555B9866969FAD9476EB
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

e-devil@e-devil.org wrote:

Try this patch...
I have no way of testing it so let me know if it works.
Looking over the init routines from Linux driver it appears some cleanup
is in order.
If this fixes the problem I'll clean things up and submit a proper fix.

Note this patch is against 5.0 current... it should apply to 4.2 but if it doesn't
let me know I'll  rework it for 4.2.


> okey.
>
> here is my output from pciconf -l:
>
> pcm0@pci0:10:0: class=0x040100 card=0x20001274 chip=0x58801274 rev=0x02 hdr=0x00
>
>                                 Oyvind Albrigtsen
>
> On Thu, Feb 22, 2001 at 04:04:46PM -0500, Russell Cattelan wrote:
> > e-devil@e-devil.org wrote:
> >
> > > hi,
> > >
> > > i'm using the es137x driver with freebsd, and i was hoping u will soon fix it, so i dont have to boot windows to get it initialized (if i dont boot windows first it plays at a third of the actual speed of the audio).
> > >
> > >                                 Oyvind Albrigtsen
> >
> > I sent and email out asking for pciconf -l output.... nobody has responded as
> > of yet, so I don't know which version of the card is having problems.
> >
> >
> > --
> > Russell Cattelan
> > --
> > Digital Elves inc. -- Currently on loan to SGI
> > Linux XFS core developer.
> >
> >
> >

--
Russell Cattelan
--
Digital Elves inc. -- Currently on loan to SGI
Linux XFS core developer.



--------------7710555B9866969FAD9476EB
Content-Type: text/plain; charset=us-ascii;
 name="es1371patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="es1371patch"

Index: es137x.c
===================================================================
RCS file: /export/purple/cvs/src/sys/dev/sound/pci/es137x.c,v
retrieving revision 1.31
diff -u -u -r1.31 es137x.c
--- es137x.c	2001/02/16 13:29:41	1.31
+++ es137x.c	2001/03/01 18:22:51
@@ -61,7 +61,7 @@
 
 #include "mixer_if.h"
 
-static int debug = 0;
+static int debug = 1;
 SYSCTL_INT(_debug, OID_AUTO, es_debug, CTLFLAG_RW, &debug, 0, "");
 
 #define MEM_MAP_REG 0x14
@@ -486,10 +486,16 @@
 	es->ctrl = 0;
 	es->sctrl = 0;
 	/* initialize the chips */
-	if (revid == 7 || revid >= 9 || (devid == ES1371_PCI_ID3 && revid == 2)) {
+	if (revid == 7 || revid >= 9 ) {
 #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");
+	} else if ((devid == ES1371_PCI_ID3 && revid == 2)) {
+#define CSTAT_5880_AC97_RST 0x20000000 /* CT5880 Reset bit */
+     	bus_space_write_4(es->st, es->sh, CSTAT_5880_AC97_RST , ES1371_REG_STATUS);
+		if (debug > 0) printf("es_init ES1371_PCI_ID3 rev == 2\n");
+		/* wait for CODECs to wakeup */
+		DELAY(2000);
 	} else { /* pre ac97 2.1 card */
 		bus_space_write_4(es->st, es->sh, ES1370_REG_CONTROL, es->ctrl);
 		if (debug > 0) printf("es_init pre ac97 2.1\n");
Index: es137x.h
===================================================================
RCS file: /export/purple/cvs/src/sys/dev/sound/pci/es137x.h,v
retrieving revision 1.4
diff -u -u -r1.4 es137x.h
--- es137x.h	2000/04/05 00:38:00	1.4
+++ es137x.h	2001/03/01 18:13:03
@@ -150,6 +150,7 @@
 #define CODEC_WIP		0x40000000  /* AC97 write in progress */
 
 #define ES1370_REG_CONTROL	0x00
+#define ES1371_REG_STATUS         0x04 /* on the 5880 it is control/status */
 #define ES1370_REG_SERIAL_CONTROL	0x20
 #define ES1371_REG_CODEC	0x14
 #define ES1371_REG_LEGACY	0x18	     /* W/R: Legacy control/status register */

--------------7710555B9866969FAD9476EB--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-multimedia" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A9E9465.BDF9519A>