Hi Herton,

On Tuesday 15 January 2008, Herton Ronaldo Krzesinski wrote:
> Hi Laurent, thanks for the commit and advice. We played with the webcam
> again (sorry for delay) and we found out that it isn't really reporting the
> FID bit, but only end of frame marker (EOF). This is strange indeed, as
> from what I understand from UVC spec FID is required while EOF is optional.

The bmFramingInfo field in the probe&commit control can be used by the device 
to report if it supports FID and/or EOF. However, for known frame-based 
formats, the field must be ignored. Just out of curiosity, could you print 
the field's value when reading the probe and commit controls ?

> I reworked the quirk that Claudio made against revision 166 from svn, but
> now using the EOF to sync the stream (the previous quirk was ok, but on
> laggy communication, like using to transmit a video stream over internet
> etc., the frames would overlap etc. resulting in many display issues):

Your patch could drop the last payload of each frame. Could you please try the 
attached patch ?

Best regards,

Laurent Pinchart
Index: uvc_video.c
===================================================================
--- uvc_video.c	(revision 163)
+++ uvc_video.c	(working copy)
@@ -370,6 +370,8 @@
 		if (data[0] == len)
 			uvc_trace(UVC_TRACE_FRAME, "EOF in empty payload.\n");
 		buf->state = UVC_BUF_STATE_DONE;
+		if (video->dev->quirks & UVC_QUIRK_STREAM_NO_FID)
+			video->last_fid ^= UVC_STREAM_FID;
 	}
 }
 
Index: uvc_driver.c
===================================================================
--- uvc_driver.c	(revision 165)
+++ uvc_driver.c	(working copy)
@@ -1752,6 +1752,16 @@
 	  .bInterfaceProtocol	= 0,
 	  .driver_info		= UVC_QUIRK_PROBE_MINMAX
 	},
+	/* Syntek (HP Spartan) */
+	{ .match_flags		= USB_DEVICE_ID_MATCH_DEVICE
+				| USB_DEVICE_ID_MATCH_INT_INFO,
+	  .idVendor		= 0x174f,
+	  .idProduct		= 0x5212,
+	  .bInterfaceClass	= USB_CLASS_VIDEO,
+	  .bInterfaceSubClass	= 1,
+	  .bInterfaceProtocol	= 0,
+	  .driver_info		= UVC_QUIRK_STREAM_NO_FID
+	},
 	/* Ecamm Pico iMage */
 	{ .match_flags		= USB_DEVICE_ID_MATCH_DEVICE
 				| USB_DEVICE_ID_MATCH_INT_INFO,
Index: uvcvideo.h
===================================================================
--- uvcvideo.h	(revision 162)
+++ uvcvideo.h	(working copy)
@@ -313,6 +313,7 @@
 #define UVC_QUIRK_PROBE_MINMAX		0x00000002
 #define UVC_QUIRK_PROBE_EXTRAFIELDS	0x00000004
 #define UVC_QUIRK_BUILTIN_ISIGHT	0x00000008
+#define UVC_QUIRK_STREAM_NO_FID		0x00000010
 
 /* Format flags */
 #define UVC_FMT_FLAG_COMPRESSED		0x00000001
_______________________________________________
Linux-uvc-devel mailing list
Linux-uvc-devel@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to