Hi,

attached is a patch fixing the 'prebuffering pause' errors and resulting
skips in playback I had with the ATI IXP on-board sound on my Shuttle
ST62K.

The patch is against alsa-1.0.8rc2. It has been submitted to the ALSA
CVS and will be part of the official 1.0.8 release. Credits go to
Takashi Iwai for fixing the problem. 

As there were others on this list having the same problem I thought it
may be a good idea to post it here. Using the patch playback is smooth
now.

BB
--- alsa-kernel/pci/atiixp.c	2005-01-11 20:04:04.000000000 +0100
+++ alsa-kernel/pci/atiixp.c.ORIGINAL	2005-01-10 20:13:10.000000000 +0100
@@ -630,20 +630,21 @@
 	snd_pcm_runtime_t *runtime = substream->runtime;
 	atiixp_dma_t *dma = (atiixp_dma_t *)runtime->private_data;
 	unsigned int curptr;
-	int timeout = 1000;
 
-       while (timeout--) {
-                curptr = readl(chip->remap_addr + dma->ops->dt_cur);
-                if (curptr < dma->buf_addr)
-                       continue;
+	spin_lock(&chip->reg_lock);
+	curptr = readl(chip->remap_addr + dma->ops->dt_cur);
+	if (curptr < dma->buf_addr) {
+		snd_printdd("curptr = %x, base = %x\n", curptr, dma->buf_addr);
+		curptr = 0;
+	} else {
 		curptr -= dma->buf_addr;
-		if (curptr >= dma->buf_bytes)
-                       continue;
-      		return bytes_to_frames(runtime, curptr);
-	}
-	snd_printd("atiixp: invalid DMA pointer read 0x%x (buf=%x)\n",
-                  readl(chip->remap_addr + dma->ops->dt_cur), dma->buf_addr);
-       return 0;
+		if (curptr >= dma->buf_bytes) {
+			snd_printdd("curptr = %x, size = %x\n", curptr, dma->buf_bytes);
+			curptr = 0;
+		}
+	}
+	spin_unlock(&chip->reg_lock);
+	return bytes_to_frames(runtime, curptr);
 }
 
 /*

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
mythtv-users mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

Reply via email to