GUS Sucess (sort of)

Andrew J. Anderson (andrew@db.erau.edu)
Sun, 12 Apr 1998 01:39:30 -0400 (EDT)


OK, I've finally eliminated the panic when CONFIG_GUSMAX is set. It was
caused by calling adintr in gus_card.c. If that is removed, the GUS is
found, and the CS4231 is detected without causing a panic. Also in this
patch is a hack to find the GUS PnP with a non-standard memory
configuration (at least from the point of the Interwave processor on
board). And finally the kernel messages printed are a little more
informative about what port it found or failed to find a card on.

That's the good news, the bad news is that the GUS driver now suffers from
the "Sound: DMA (output) timed out - IRQ/DRQ config error?" that I saw
others having problems with. This hardware works fine under 2.0.32 and
2.1.91 w/ the Linux UltraSound drivers, under DOS and 95 also. Was this a
more general sound problem? Could someone point me in the direction to
start tracking this one down?

Thanks,
Andrew

--- Makefile.orig Sun Apr 12 01:32:25 1998
+++ Makefile Sun Apr 12 01:32:51 1998
@@ -76,6 +76,9 @@

ifeq ($(CONFIG_GUS),y)
L_OBJS += gus.o
+ ifeq ($(CONFIG_GUSMAX),y)
+ LX_OBJS += ad1848.o
+ endif
else
ifeq ($(CONFIG_GUS),m)
M_OBJS += gus.o
--- gus_card.c.orig Sun Apr 12 01:27:10 1998
+++ gus_card.c Sun Apr 12 01:27:29 1998
@@ -118,11 +118,6 @@

sti();

-#ifdef CONFIG_GUSMAX
- if (have_gus_max)
- adintr(irq, (void *)hw_config->slots[3], NULL);
-#endif
-
while (1)
{
if (!(src = inb(u_IrqStatus)))
--- gus_wave.c.orig Sun Apr 12 01:29:25 1998
+++ gus_wave.c Sun Apr 12 01:03:16 1998
@@ -989,8 +989,28 @@
printk(KERN_INFO "Interwave: Try reordering
SIMMS.\n");
}
}
+ /*
+ * Special case for Advanced Gravis UltraSound PnP.
+ * This card will allow you to configure 256/256/4096/4096
+ * which is not in any of the 12 "standard" configurations.
+ * Treat this card as 256/256/1024/1024 until we figure out
+ * what to do with it better.
+ */
+ if (bits == -1)
+ {
+ if(bank_sizes[0] == mem_decode[6][0] &&
+ bank_sizes[1] == mem_decode[6][1] &&
+ bank_sizes[2] >= mem_decode[6][2] &&
+ bank_sizes[3] >= mem_decode[6][3])
+ {
+ printk(KERN_INFO "Interwave: It looks like you
have a GUS PnP with 8.5 Megs of RAM\n");
+ printk(KERN_INFO "Interwave: Unfortuately, you can
only
use 2.5 Megs of it right now\n");
+ bits = 6;
+ }
+ }
if (bits == -1)
{
+ DDB(printk(KERN_INFO "Interwave: %d %d %d %d : %d %d %d
%d\n", bank_sizes[0], bank_sizes[1], bank_sizes[2], bank_sizes[3],
mem_decode[6][0], mem_decode[6][1], mem_decode[6][2], mem_decode[6][3]));
printk(KERN_INFO "Interwave: Can't find working DRAM
encoding.\n");
printk(KERN_INFO "Interwave: Defaulting to 256k. Try
reordering
SIMMS.\n");
bits = 0;
@@ -1044,12 +1064,12 @@
{
if ((gus_look8(0x5b) & 0x0f) == ((~val) & 0x0f)) /*
Change */
{
- DDB(printk("Interwave chip version %d detected\n",
(val
& 0xf0) >> 4));
+ DDB(printk("Interwave chip version %d detected at
0x%x\n", (val & 0xf0) >> 4, baseaddr));
gus_pnp_flag = 1;
}
}
else
{
- DDB(printk("Not an Interwave chip (%x)\n",
gus_look8(0x5b)));
+ DDB(printk("Not an Interwave chip (%x) at 0x%x\n",
gus_look8(0x5b), baseaddr));
gus_pnp_flag = 0;
}
}

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Andrew Anderson http://amelia.db.erau.edu/~andrew/
if(!(family_tree=fork())){redneck=TRUE;}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu