Patch against 2.1.95 for GUS classic (was Program hangs after playing sound)

nathanh@chirp.com.au
Sun, 12 Apr 1998 20:50:55 +1000 (EST)


I've had similar problems with sound programs hanging in close()
after using /dev/dsp on a GUS classic. The following patch seems
to solve my problems, but it will need Alan's approval because I
don't trust my understanding of the existing sound code.

--- linux/drivers/sound/dmabuf.c.orig Sun Apr 12 19:45:42 1998
+++ linux/drivers/sound/dmabuf.c Sun Apr 12 19:46:03 1998
@@ -959,7 +959,7 @@
}
if (!(adev->flags & DMA_AUTOMODE))
dmap->flags &= ~DMA_ACTIVE;
- while (dmap->qlen <= 0) {
+ while (dmap->qlen < 0) {
dmap->underrun_count++;
dmap->qlen++;
if (dmap->flags & DMA_DIRTY && dmap->applic_profile != APF_CPUINTENS) {

Notice that without this patch the dmabuf.c code does not really
make any sense because the if stmt following the while loop will
always be true. The qlen problem was preventing DMAbuf_sync from
finishing during the DMAbuf_release call.

Now I've just got to figure out why stereo mode has intermittent
hiss but mono output is fine...

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