Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] [PATCH] fix for stream corruption on budget / Nova-T cards
Here is a patch which completely fixes all the stream distortion
problems i've been seeing on my P4 system. This works without needing to
apply any of the proposed PCI tweaks.
After many hours of debugging last night, it looks like the corruption
is caused by a hardware bug in the DMA engine used in the SAA7146. See
the patch for more info.
A similar problem might effect the other DMA engines used by the full
featured cards, but I don't have one to experiment with.
Jon
--- cvs/dvb-kernel/linux/drivers/media/dvb/ttpci/budget-core.c 2003-06-26 18:42:36.000000000 +0100
+++ dvb-kernel/linux/drivers/media/dvb/ttpci/budget-core.c 2003-08-30 03:15:44.000000000 +0100
@@ -68,6 +68,18 @@
u32 olddma = budget->ttbp;
u32 newdma = saa7146_read(budget->dev, PCI_VDP3);
+ if ((newdma == 0) || (newdma == TS_BUFLEN / 2)) {
+ /* The DMA Pointer is unreliable at 0% and 50% of buffer and
+ * frequently gets the two positions confused, we make a
+ * guess of the likely value based on the last known value
+ */
+ if (olddma < TS_BUFLEN/2) {
+ newdma = TS_BUFLEN/2;
+ } else {
+ newdma = 0;
+ }
+ }
+
/* nearest lower position divisible by 188 */
newdma -= newdma % 188;
Home |
Main Index |
Thread Index