Hi,
1.)
I had a closer look at susend/resuming and the uvcdriver on my notebook.
After resuming the driver is unable to read some registers, the
usbsubsystem always returns -EPROTO (-71).
Adding a softreset to the resume handler fixes this issue.
The system still doesn't resume if a videoapplication is open (I'll do
some further work on that).
(the msleep isn't required)
2.)
mplayer requires an ENUMSTD ioctl, afterwards mplayer tv:// -tv
driver=v4l2 just works fine.
3.)
the stream randomly stops on that notebook for some reason. ignoring
the errors in the callback handler seems to work fine. This especially
happens if I disconnect a usb storage device which hangs on the same
hub. Maybe adding a module param to ignore those return values as a
hack would be acceptable?
thanks for all the work,
Markus
Index: uvc_queue.c
===================================================================
--- uvc_queue.c (revision 143)
+++ uvc_queue.c (working copy)
@@ -293,7 +293,9 @@
case UVC_BUF_STATE_ERROR:
uvc_trace(UVC_TRACE_CAPTURE, "[W] Corrupted data "
"(transmission error).\n");
- ret = -EIO;
+ //ret = -EIO;
+ buf->state = UVC_BUF_STATE_IDLE;
+ break;
case UVC_BUF_STATE_DONE:
buf->state = UVC_BUF_STATE_IDLE;
break;
Index: uvc_video.c
===================================================================
--- uvc_video.c (revision 143)
+++ uvc_video.c (working copy)
@@ -402,7 +402,7 @@
default:
uvc_printk(KERN_WARNING, "Non-zero status (%d) in status "
"completion handler.\n", urb->status);
- return;
+// return;
}
len = urb->actual_length;
@@ -569,6 +569,7 @@
default:
uvc_printk(KERN_WARNING, "Non-zero status (%d) in video "
"completion handler.\n", urb->status);
+ break;
case -ENOENT: /* usb_kill_urb() called. */
if (queue->frozen)
Index: uvc_v4l2.c
===================================================================
--- uvc_v4l2.c (revision 143)
+++ uvc_v4l2.c (working copy)
@@ -891,6 +891,15 @@
/* Analog video standards make no sense for digital cameras. */
case VIDIOC_ENUMSTD:
+ {
+ struct v4l2_standard *std =arg;
+ if (std->index!=0)
+ return -EINVAL;
+
+ ret = v4l2_video_std_construct(std,0,"Cam");
+ return 0;
+ }
+
case VIDIOC_QUERYSTD:
case VIDIOC_G_STD:
case VIDIOC_S_STD:
Index: uvc_driver.c
===================================================================
--- uvc_driver.c (revision 143)
+++ uvc_driver.c (working copy)
@@ -1621,7 +1621,12 @@
static int uvc_resume(struct usb_interface *intf)
{
struct uvc_device *dev = usb_get_intfdata(intf);
+ struct usb_device *udev = dev->udev;
+ usb_reset_device(udev);
+
+ msleep(1500);
+
uvc_trace(UVC_TRACE_SUSPEND, "Resuming interface %u\n",
intf->cur_altsetting->desc.bInterfaceNumber);
_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel