Re: USB isochronous frame lost

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

 



On Sat, 27 Oct 2012, Stefan May wrote:

> Dear Alan,
> 
> maybe there is a bug in VMWare. If so, there must be either a bug in the 
> firmware or in the uvc module, since the camera is not working on native 
> Linux without the nodrop option.
> 
> I verified the following. In uvc_video.c at line 595
> 
> if (urb->iso_frame_desc[i].status < 0) {
> 	uvc_trace(UVC_TRACE_FRAME, "USB isochronous frame "
> 		"lost (%d).\n", urb->iso_frame_desc[i].status);
> 	/* Mark the buffer as faulty. */
> 	if (buf != NULL)
> 		buf->error = 1;
> 	continue;
> }
> 
> a complete URB is dropped, if one of the packets is erroneous. The 
> format is uncompressed in my case. The comparison at line 627
> buf->buf.length != buf->buf.bytesused
> will set
> buf->error = 1;
> for almost every URB.

I'm not an expert on the uvcvideo driver.  You should ask that driver's 
maintainer about this.

> I added one line after above mentioned block for testing purposes:
> 
> if (urb->iso_frame_desc[i].status < 0) {
> 	uvc_trace(UVC_TRACE_FRAME, "USB isochronous frame "
> 		"lost (%d).\n", urb->iso_frame_desc[i].status);
> 	/* Mark the buffer as faulty. */
> 	if (buf != NULL)
> 		buf->error = 1;
> 	continue;
> }
> buf->error = 0;
> 
> resetting buf->error in order to receive at least the remaining packets 
> with no status flag < 0.
> So, I just discard erroneous packets, not the whole URB.
> Loading uvcvideo with this modification provides a data stream as 
> expected, even without the nodrop option. The syslog trace now looks 
> like below. You can see that for every URB three isochronous frames are 
> lost, and 29 packets are received. Are you sure that this is not a 
> firmware problem?

Let's try to be precise.

The fact that three frames out of 32 get dropped may well be caused by
a firmware bug in your camera.  But that's not what I was talking about
(and as far as I can tell, it's not what you asked about in the first
messages you posted on this topic).

The fact that VMWare changes the status codes from -71 to 0 has nothing 
to do with the firmware.  It is a bug in VMWare.  This was your 
original question; you asked why the camera worked without errors in 
the guest but not in the host.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux