Some time ago I reported the problem, that after starting a read access the 
screen is sometimes black. 
http://www.isely.net/pipermail/pvrusb2/2009-October/002637.html

This is definetely a timing issue. A similar problem existed in the ivtv 
driver and was solved 2007 by adding a 300ms sleep. Obviously only devices 
with saa7115 digitizer are effected.
This has been discussed again in December and January on 
<http://article.gmane.org/gmane.linux.drivers.video-input-
infrastructure/14332>

The attached patch fixes the problem in a similar way for the pvrusb2 driver.
I reverted also a previous increase for another delay as this was the wrong 
place.

Greets,
Martin
diff -ur v4l-dvb-2a50a0a1c951-old/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c v4l-dvb-2a50a0a1c951-new/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
--- v4l-dvb-2a50a0a1c951-old/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c	2010-01-23 03:14:32.000000000 +0100
+++ v4l-dvb-2a50a0a1c951-new/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c	2010-01-24 18:17:31.849262974 +0100
@@ -50,10 +50,8 @@
 #define TIME_MSEC_DECODER_WAIT 50
 
 /* This defines a minimum interval that the encoder must remain quiet
-   before we are allowed to configure it.  I had this originally set to
-   50msec, but Martin Dauskardt <[email protected]> reports that
-   things work better when it's set to 100msec. */
-#define TIME_MSEC_ENCODER_WAIT 100
+   before we are allowed to configure it. */
+#define TIME_MSEC_ENCODER_WAIT 50
 
 /* This defines the minimum interval that the encoder must successfully run
    before we consider that the encoder has run at least once since its
@@ -1720,6 +1718,10 @@
 		/* We get here if the encoder has been noticed.  Otherwise
 		   we'll issue a warning to the user (which should
 		   normally never happen). */
+		if ((hdw->decoder_client_id != PVR2_CLIENT_ID_CX25840) &&
+		    (enablefl != 0)) {
+			msleep(300); /*avoid black screen */
+		}
 		return 0;
 	}
 	if (!hdw->flag_decoder_missed) {
_______________________________________________
pvrusb2 mailing list
[email protected]
http://www.isely.net/cgi-bin/mailman/listinfo/pvrusb2

Reply via email to