Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: [PATCH] fix for stream corruption on budget /Nova-T cards



Lauri Tischler wrote:

Where do you apply that to DVB cvs ?
I haven't tried the DVB driver. Try the patch attached, it is completely untested, but it looks like the code in the DVB driver is similar enough for it to work the same.

Jon

diff -Nurw DVB/driver/av7110/av7110.c DVB-cvs/driver/av7110/av7110.c
--- DVB/driver/av7110/av7110.c	Thu Aug 28 14:05:53 2003
+++ DVB-cvs/driver/av7110/av7110.c	Sat Aug 30 13:28:27 2003
@@ -919,6 +919,19 @@
         u32 dmapos;
 
         dmapos=saa7146_read(av7110->saa_mem, PCI_VDP3);
+
+	if ((dmapos == 0) || (dmapos == 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 (av7110->ttbp < TS_BUFLEN/2) {
+		           dmapos = TS_BUFLEN/2;
+		   } else {
+		           dmapos = 0;
+		   }
+	}
+
         dmapos-=(dmapos%188);
 
         if (dmapos >= TS_BUFLEN)

Home | Main Index | Thread Index