android_kernel_samsung_msm8976/drivers/media/usb/uvc
Oleksij Rempel 63e3c3d7be media: uvcvideo: Do not use usb_set_interface on bulk EP
commit b1e43f232698274871e1358c276d7b0242a7d607 upstream.

The UVC specification uses alternate setting selection to notify devices
of stream start/stop. This breaks when using bulk-based devices, as the
video streaming interface has a single alternate setting in that case,
making video stream start and video stream stop events to appear
identical to the device. Bulk-based devices are thus not well supported
by UVC.

The webcam built in the Asus Zenbook UX302LA ignores the set interface
request and will keep the video stream enabled when the driver tries to
stop it. If USB autosuspend is enabled the device will then be suspended
and will crash, requiring a cold reboot.

USB trace capture showed that Windows sends a CLEAR_FEATURE(HALT)
request to the bulk endpoint when stopping the stream instead of
selecting alternate setting 0. The camera then behaves correctly, and
thus seems to require that behaviour.

Replace selection of alternate setting 0 with clearing of the endpoint
halt feature at video stream stop for bulk-based devices. Let's refrain
from blaming Microsoft this time, as it's not clear whether this
Windows-specific but USB-compliant behaviour was specifically developed
to handle bulkd-based UVC devices, or if the camera just took advantage
of it.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-06 07:55:31 -07:00
..
Kconfig
Makefile
uvc_ctrl.c [media] uvcvideo: Return -EINVAL when setting a menu control to an invalid value 2013-03-28 18:37:11 -03:00
uvc_debugfs.c
uvc_driver.c [media] uvcvideo: Mark first output terminal as default video node 2012-11-28 10:30:00 -02:00
uvc_entity.c [media] uvcvideo: Mark first output terminal as default video node 2012-11-28 10:30:00 -02:00
uvc_isight.c
uvc_queue.c [media] vb2: Add support for non monotonic timestamps 2013-03-05 14:53:05 -03:00
uvc_status.c
uvc_v4l2.c [media] uvcvideo: Fix race of open and suspend in error case 2013-02-05 14:32:21 -02:00
uvc_video.c media: uvcvideo: Do not use usb_set_interface on bulk EP 2014-05-06 07:55:31 -07:00
uvcvideo.h [media] uvcvideo: Mark first output terminal as default video node 2012-11-28 10:30:00 -02:00