Subject: Aztech sound card error
To: None <port-i386@netbsd.org>
From: None <cliff@vixen.snipe444.org>
List: port-i386
Date: 09/04/2001 13:42:50
My sound card had stopped working correctly with NetBSD some time ago.
I finally had time to look at the problem.
I have an Aztech card that is one of the CS4231 wss clones(actually uses
the CS4231A chip with an Aztech front end chip).
I found that a fifo overrun was occurring during dma.
By turning off the dma DEMAND mode the card once again worked.
I see this was added at CVS version 1.8 of the dev/isa/ad1849_isa.c file.
I also see the comment "Tested on a CS4231 in a WSS clone.".
Since this is a very old sound card, and the change has been in for some
time, it may not be appropriate to pull the DEMAND feature out of the code.
However just in case someone else runs into this, thought I would mail the
patch that I used to make the card work.
	Cliff Wright(cliff@snipe444.org)

--- ad1848_isa.c.distrib	Mon Feb 26 14:08:11 2001
+++ ad1848_isa.c	Mon Sep  3 02:18:44 2001
@@ -554,7 +554,7 @@
 
 	isa_dmastart(isc->sc_ic, isc->sc_recdrq, start,
 	    (char *)end - (char *)start, NULL,
-	    DMAMODE_READ | DMAMODE_LOOPDEMAND, BUS_DMA_NOWAIT);
+	    DMAMODE_READ | DMAMODE_LOOP, BUS_DMA_NOWAIT);
 
 	isc->sc_recrun = 1;
 	if (sc->mode == 2 && isc->sc_playdrq != isc->sc_recdrq) {
@@ -596,7 +596,7 @@
 
 	isa_dmastart(isc->sc_ic, isc->sc_playdrq, start,
 	    (char *)end - (char *)start, NULL,
-	    DMAMODE_WRITE | DMAMODE_LOOPDEMAND, BUS_DMA_NOWAIT);
+	    DMAMODE_WRITE | DMAMODE_LOOP, BUS_DMA_NOWAIT);
 
 	isc->sc_playrun = 1;
 	isc->sc_pintr = intr;