Hi,
I found a problem when using my webcam. First, it's ok, but after I unplug
it. Systerm call poll() will not return.
I looked at the src code, and found that uvc_queue_poll() always return 0, it
didn't know the webcam have unpluged at that time.
And I saw in funtion uvc_video_complete(), if urb->status is
-ESHUTDOWN,uvc_queue_cancel(queue, urb->status == -ESHUTDOWN);
will be called.
But, if just when in uvc_video_complete()> usb_submit_urb() , the webcam
is unpluged, the usb_submit_urb() will failed, but just with a printk. Won't
call uvc_queue_cancel(). So, uvc_queue_poll() will always return 0. And, I add
uvc_queue_cancel() after usb_submit_urb() failed ,erverything is ok.
Is this a bug ?
Funtions uvc_video_complete():
716 if ((ret = usb_submit_urb(urb, GFP_ATOMIC)) < 0) {
717 uvc_printk(KERN_ERR, "Failed to resubmit video URB (%d).\n",
718 ret);
719 }
Thanks!
---
Best regards
Bo Liu
_________________________________________________________________
With Windows Live, you can organize, edit, and share your photos.
http://www.microsoft.com/middleeast/windows/windowslive/products/photo-gallery-edit.aspx
_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel