NetBSD Problem Report #5148
Received: (qmail 28129 invoked from network); 11 Mar 1998 02:37:23 -0000
Message-Id: <199803110236.DAA00313@gnyf.int.tele.dk>
Date: Wed, 11 Mar 1998 03:36:49 +0100 (CET)
From: "Soren S. Jorvang" <soren@t.dk>
To: gnats-bugs@gnats.netbsd.org
Cc: soren@t.dk
Subject: ad1848 slightly broken
X-Send-Pr-Version: 3.95
>Number: 5148
>Category: kern
>Synopsis: ad1848 slightly broken
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Mar 10 18:50:00 +0000 1998
>Closed-Date: Wed May 19 20:37:11 +0000 1999
>Last-Modified: Wed May 19 20:38:18 +0000 1999
>Originator: Soren S. Jorvang
>Release: NetBSD-current 19980310
>Organization:
>Environment:
System: NetBSD 1.3E i386
>Description:
ad1848 support for use by the gus (and most likely also pss) ISA audio drivers does not work.
The gus identification of device version is not entirely correct.
Since the ad1848 driver is for use by other higher-level drivers, it should not print
attachment messages itself.
>How-To-Repeat:
Feb 18 16:53:41 meow /netbsd: gus0 at isa0 port 0x220-0x22f irq 11 drq 6 drq2 1: CS4231 or AD1845
Feb 18 16:53:41 meow /netbsd: <Gravis UltraSound version 3.10, 1024KB DRAM, CS4231 or AD1845 codec/mixer, full-duplex, record drq 1>
Feb 18 17:21:08 meow /netbsd: gus0 at isa0 port 0x220-0x22f irq 11 drq 6 drq2 1
Feb 18 17:21:08 meow /netbsd: <Gravis UltraSound version 3.10, 1024KB DRAM, full-duplex, record drq 1>
Feb 11 01:23:47 meow /netbsd: gus0 at isa0 port 0x220-0x22f irq 11 drq 6 drq2 5: CS4231 or AD1845
Feb 11 01:23:47 meow /netbsd: <Gravis UltraSound version 3.10, 1024KB DRAM, CS4231 or AD1845 codec/mixer, full-duplex, record drq 1>
Mar 11 02:44:46 meow /netbsd: gus0 at isa0 port 0x220-0x22f irq 11 drq 6 drq2 5
Mar 11 02:44:46 meow /netbsd: gus0: Gravis UltraSound MAX, 1024KB memory
>Fix:
--- sys/dev/isa/gus.c.orig Mon Mar 9 13:18:55 1998
+++ sys/dev/isa/gus.c Wed Mar 11 11:14:36 1998
@@ -56,8 +56,8 @@
* For more detailed information, see the GUS developers' kit
* available on the net at:
*
- * ftp://freedom.nmsu.edu/pub/ultrasound/gravis/util/
- * gusdkXXX.zip (developers' kit--get rev 2.22 or later)
+ * http://www.gravis.com/Public/sdk/GUSDK222.ZIP
+ *
* See ultrawrd.doc inside--it's MS Word (ick), but it's the bible
*
*/
@@ -884,7 +884,7 @@
/*
* Program the IRQ and DMA channels on the GUS. Note that we hardwire
* the GUS to only use one IRQ channel, but we give the user the
- * option of using two DMA channels (the other one given by the flags
+ * option of using two DMA channels (the other one given by the drq2
* option in the config file). Two DMA channels are needed for full-
* duplex operation.
*
@@ -975,21 +975,29 @@
}
sc->sc_dsize = i;
- sprintf(gus_device.version, "3.%d", sc->sc_revision);
-
- printf("\n <Gravis UltraSound version 3.%d, %dKB DRAM, ",
- sc->sc_revision, sc->sc_dsize);
- if (HAS_MIXER(sc))
- printf("ICS2101 mixer, ");
- if (HAS_CODEC(sc))
- printf("%s codec/mixer, ", sc->sc_codec.chip_name);
- if (sc->sc_recdrq == sc->sc_drq) {
- printf("half-duplex");
- } else {
- printf("full-duplex, record drq %d", sc->sc_recdrq);
- }
- printf(">\n");
+ /* The "official" (3.x) version number cannot easily be obtained.
+ * The revision register does not correspond to the minor number
+ * of the board version. Simply use the revision register as
+ * identification.
+ */
+ sprintf(gus_device.version, "%d", sc->sc_revision);
+
+ printf("\n%s: Gravis UltraSound", sc->sc_dev.dv_xname);
+ if (sc->sc_revision >= 10)
+ printf(" MAX");
+ else
+ {
+ if (HAS_MIXER(sc))
+ printf(", mixer");
+ if (HAS_CODEC(sc))
+ printf(" with CODEC module");
+ }
+ printf(", %dKB memory\n", sc->sc_dsize);
+
+ /* A GUS MAX should always have a CODEC installed */
+ if ((sc->sc_revision >= 10) & !(HAS_CODEC(sc)))
+ printf("%s: WARNING: did not attach CODEC on MAX\n", sc->sc_dev.dv_xname);
/*
* Setup a default interrupt handler
@@ -2880,7 +2888,7 @@
sc->sc_codec.sc_iot = sc->sc_iot;
sc->sc_codec.sc_iobase = port+GUS_MAX_CODEC_BASE;
- if (ad1848_probe(&sc->sc_codec) == 0) {
+ if (ad1848_mapprobe(&sc->sc_codec, sc->sc_codec.sc_iobase) == 0) {
sc->sc_flags &= ~GUS_CODEC_INSTALLED;
return (0);
} else {
--- sys/dev/isa/ad1848.c.orig Tue Feb 24 13:10:53 1998
+++ sys/dev/isa/ad1848.c Wed Mar 11 11:19:51 1998
@@ -529,7 +529,7 @@
if (sc->sc_recdrq != -1 && sc->sc_recdrq != sc->sc_drq) {
if (isa_dmamap_create(sc->sc_isa, sc->sc_recdrq, MAX_ISADMA,
BUS_DMA_NOWAIT|BUS_DMA_ALLOCNOW)) {
- printf("ad1848_attach: can't creape map for drq %d\n",
+ printf("ad1848_attach: can't create map for drq %d\n",
sc->sc_recdrq);
return;
}
@@ -575,9 +575,6 @@
/* Set default port */
(void) ad1848_set_rec_port(sc, MIC_IN_PORT);
-
- printf(": %s", sc->chip_name);
-#undef WAITREADY
}
/*
--- sys/dev/isa/pss.c.orig Tue Jan 13 15:21:18 1998
+++ sys/dev/isa/pss.c Wed Mar 11 11:21:47 1998
@@ -821,7 +821,7 @@
pss_setaddr(cf->cf_iobase, pc->sc_iobase+PSS_WSS_CONFIG);
/* Is there an ad1848 chip at the WSS iobase ? */
- if (ad1848_probe(sc) == 0) {
+ if (ad1848_probe(sc, sc->sc_iobase) == 0) {
DPRINTF(("sp: no ad1848 ? iobase=%x\n", sc->sc_iobase));
return 0;
}
@@ -1060,8 +1060,7 @@
sc->sc_isa = parent->dv_parent;
ad1848_attach(sc);
-
- printf("\n");
+ printf("%s\n", sc->chip_name);
}
#ifdef notyet
--- sys/dev/isa/wss.c.orig Tue Feb 24 13:10:53 1998
+++ sys/dev/isa/wss.c Wed Mar 11 09:02:11 1998
@@ -129,6 +129,7 @@
ad1848_intr, &sc->sc_ad1848);
ad1848_attach(&sc->sc_ad1848);
+ printf("%s", sc->sc_ad1848.chip_name);
version = bus_space_read_1(sc->sc_iot, sc->sc_ioh, WSS_STATUS) & WSS_VERSMASK;
printf(" (vers %d)", version);
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: bad
State-Changed-When: Wed May 19 13:37:11 PDT 1999
State-Changed-Why:
Soren says augustss committed the patch.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.