summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/uvc
AgeCommit message (Collapse)Author
2009-08-09fix device match logicMauro Carvalho Chehab
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com> I forgot to change USB_DEVICE_ID_MATCH_VENDOR to USB_DEVICE_ID_MATCH_DEVICE in the last commit, defeating its whole purpose. Fix this. kernel-sync: Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-08-01uvcvideo: Avoid flooding the kernel log with "unknown event type" messagesLaurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> The iSight sends non-UVC status events through the interrupt endpoint. Those invalid events are reported to the kernel log, resulting in a log flood. Only log the events when the UVC_TRACE_STATUS flag is set. Priority: high Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2009-07-02uvcvideo: Multiple streaming interfaces supportLaurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> Restructure the UVC descriptors parsing code to handle multiple streaming interfaces. The driver now creates a uvc_video_chain instance for each chain detected in the UVC control interface descriptors, and tries to register one video device per streaming endpoint. Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2009-06-28uvcvideo: Restructure the driver to support multiple simultaneous streams.Laurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> As a first step towards multiple streaming interfaces support, reorganize the driver's data structures to cleanly separate video control and video streaming data. Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2009-07-20uvcvideo: Don't apply the FIX_BANDWIDTH quirk to all ViMicro devicesLaurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> Commit 50144aeeb702ea105697ae5249f059ea3990b838 broke the Samsung NC10 netbook webcam. Instead of applying the FIX_BANDWIDTH quirk to all ViMicro devices, list the devices explicitly. Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2009-07-19uvcvideo: Add PROBE_DEF quirk and enable it for the MT6227 deviceLaurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> At least one MT6227 model crashes when receiving a GET_DEF request on the video probe control. As the various models can't be told apart based on the descriptors, add a PROBE_DEF quirk to avoid sending the GET_DEF request and enable the quirk for all models. Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2009-07-05merge: http://linuxtv.org/hg/~pinchartl/uvcvideo/Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-07-03uvcvideo: Set PROBE_MINMAX quirk for Aveo Technology webcamsLaurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> Some Aveo Technology USB 2.0 Camera (1871:0306) revisions seem to require the PROBE_MINMAX quirk. As the camera supports uncompressed YUYV data only, it's safe to set the quirk even if not strictly required for all models. Update the device entry in the device IDs list. Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2009-06-26uvcvideo: Move UVC definitions to linux/usb/video.hLaurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> To make UVC constants accessible by a future UVC gadget driver, move them from drivers/media/video/uvc/uvcvideo.h to include/linux/usb/video.h. Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2009-06-26uvcvideo: Remove unused Logitech-specific constantsLaurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> Those constants are not used anymore, remove them. Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2009-06-26uvcvideo: Prefix all UVC constants with UVC_Laurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> In preparation to moving UVC constants to a public location, prefix all constants with UVC_ to avoid namespace clashes. Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2009-06-26uvcvideo: Use class-specific descriptor types from usb/ch9.hLaurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> uvcvideo.h redefines class-specific descriptor types already present in usb/ch9.h. Remove the duplicated definitions and use the ones from usb/ch9.h. Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2009-06-09uvcvideo: Ignore non-UVC trailing interface descriptors.Laurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> Herton Ronaldo Krzesinski from Mandriva reported that one Bison Electronics webcam exposes a non-UVC interface descriptor. Instead of failing completely, ignore trailing non-UVC descriptors and move on. Thanks to Herton for reporting the problem and submitting a patch proposal. Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2009-06-09uvcvideo: Add support for FSC V30S webcamsLaurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> The FSC WebCam V30S (18ec:3288) requires the MINMAX quirk. Add a corresponding entry in the device IDs list. Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2009-06-09uvcvideo: Add support for Aveo Technology webcamsLaurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> The Aveo Technology USB 2.0 Camera (1871:0306) requires the PROBE_EXTRAFIELDS quirk. Add a corresponding entry in the device IDs list. Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2009-06-04uvcvideo: Don't accept to change the format when buffers are allocated.Laurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> Setting a new frame format or size will likely change the buffer size required to store a complete video frame. To avoid a buffer overflow, don't allow VIDIOC_S_FMT calls when video buffers are already allocated. Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2009-05-31uvcvideo: Add generic control blacklist.Laurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> Another device (5986:0241) has been reported to advertise a UVC control it does not support. Rework the control blacklist to match devices by their VID:PID instead of trying to be clever about which controls might not be supported properly. Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2009-05-25merge: http://linuxtv.org/hg/~pinchartl/uvcvideo/Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-05-19uvcvideo: Add Lenovo Thinkpad SL400 to device list commentsLaurent Pinchart
From: Filipe Rosset <rosset.filipe@gmail.com> Update the 17ef:480b device comment to list Lenovo Thinkpad SL400. Priority: low Signed-off-by: Filipe Rosset <rosset.filipe@gmail.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2009-05-19uvcvideo: Start status polling on device openLaurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> Most UVC camera include an interrupt endpoint to report control value changes, video streaming errors and camera button events. The USB controller continuously polls the interrupt endpoint to retrieve such events. This prevents the device from being auto-suspended, and thus consumes power. Reporting video streaming errors don't make sense when the V4L2 device is closed. Control value changes are probably useless as well if nobody listens to the events, although caching will probably have to be completely disabled then. No polling is thus be required when /dev/videoX is not opened. To enable auto-suspend and save power do not poll the interrupt endpoint until the device is open. We lose the ability to detect button events if no application is using the camera. http://bugzilla.kernel.org/show_bug.cgi?id=11948 Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2009-06-12uvc: Fix for no return value check of uvc_ctrl_set() which calls ↵Mauro Carvalho Chehab
mutex_lock_interruptible() From: Robert Krakora <rob.krakora@messagenetsystems.com> Fix for no return value check of uvc_ctrl_set() which calls mutex_lock_interruptible(). Priority: normal Signed-off-by: Robert Krakora <rob.krakora@messagenetsystems.com> Acked-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-05-06uvcvideo: Add missing whitespaces to multi-line format strings.Laurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2009-05-06uvcvideo: Parse frame descriptors with non-continuous indexes.Laurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> The UVC specification requires frame descriptors indexes to range from 1 to the number of frame descriptors. At least some Hercules Dualpix Infinite webcams erroneously use non-continuous index ranges. Make the driver support them. Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2009-05-02uvc: fix compile warningMauro Carvalho Chehab
From: Hans Verkuil <hverkuil@xs4all.nl> The 2.6.30 kernel generates this warning: uvc_driver.c:1729: warning: 'ret' may be used uninitialized in this function I guess some new warning flag must have been turned on since this warning didn't appear with older kernels (gcc version 4.3.1). It's also a bogus warning, but since this code didn't comply to the coding standard anyway I've modified it to 1) remove the warning and 2) conform to the coding standard. Priority: high Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-18uvcvideo: fix uvc resume failedtom.leiming@gmail.com
From: Ming Lei <tom.leiming@gmail.com> Now urb buffers is not freed before suspend, so uvc_alloc_urb_buffers should return packet counts allocated originally during uvc resume, instead of zero. This version uses round down to return packet counts on Linus' suggestions, or else may lead to buffer destructed if packet size is changed before calling uvc_alloc_urb_buffers() in this kind of case. Priority: normal Signed-off-by: Ming Lei <tom.leiming@gmail.com> Acked-by: Laurent Pinchart <laurent.pinchart@skynet.be> --- linux/drivers/media/video/uvc/uvc_video.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
2009-04-20uvcvideo: fill reserved fields with zero of VIDIOC_QUERYMENULaurent Pinchart
From: Márton Németh <nm127@freemail.hu> When querying menu items with VIDIOC_QUERYMENU the reserved field is not set to zero as required by V4L2 API revision 0.24 [1]. Add this fill. The patch was tested with v4l-test 0.11 [2] with CNF7129 webcam found on EeePC 901. References: [1] V4L2 API specification, revision 0.24 http://v4l2spec.bytesex.org/spec/r13317.htm#V4L2-QUERYMENU [2] v4l-test: Test environment for Video For Linux Two API http://v4l-test.sourceforge.net/ [Modified by Laurent Pinchart] Use u32 instead of __u32 in non-exported kernel code. Priority: normal Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2009-04-15uvcvideo: Prevent invormation loss with removing implicit castingLaurent Pinchart
From: Márton Németh <nm127@freemail.hu> The uvcvideo driver supports only one input, which is input 0. For all other input index the return value shall be EINVAL. This patch fixes the problem when the value 0x80000000 was incorrectly casted and treated as a zero value. The patch was tested with v4l-test 0.10 [2] with CNF7129 webcam found on EeePC 901. References: [1] V4L2 API specification, revision 0.24 http://v4l2spec.bytesex.org/spec/r11217.htm [2] v4l-test: Test environment for Video For Linux Two API http://v4l-test.sourceforge.net/ [Modified by Laurent Pinchart] Invalid input value (u32)-1 would be accepted due to integer overflow. Make sure the driver rejects it and returns -EINVAL. Priority: normal Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2009-04-14backport commit 74ca11c2056d01d9ebb3615cd781a148450c3c82Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> kernel-sync: Author: Bastien Nocera <hadess@hadess.net> Date: Sat Jan 10 23:44:22 2009 -0800 Input: uvc - the button on the camera is KEY_CAMERA Cameras should generate KEY_CAMERA, not BTN_0. Also call input_sync() on the device once the button has been pressed. CC: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06UVC: uvc_status_cleanup(): undefined reference to `input_unregister_device'Mauro Carvalho Chehab
From: Randy Dunlap <randy.dunlap@oracle.com> Fix build errors when USB_VIDEO_CLASS=y and INPUT=m. Fixes kernel bugzilla #12671. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-27uvcvideo: Add zero fill for VIDIOC_ENUM_FMTLaurent Pinchart
From: Márton Németh <nm127@freemail.hu> When enumerating formats with VIDIOC_ENUM_FMT the uvcvideo driver does not fill the reserved fields of the struct v4l2_fmtdesc with zeros as required by V4L2 API revision 0.24 [1]. Add the missing initializations. The patch was tested with v4l-test 0.10 [2] with CNF7129 webcam found on EeePC 901. References: [1] V4L2 API specification, revision 0.24 http://v4l2spec.bytesex.org/spec/r8367.htm [2] v4l-test: Test environment for Video For Linux Two API http://v4l-test.sourceforge.net/ Priority: normal Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2009-03-27uvcvideo: Add support for Syntek cameras found in JAOtech Smart TerminalsLaurent Pinchart
Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2009-02-16uvcvideo: Add quirk to override wrong bandwidth value for Vimicro devicesLaurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> At least 3 Vimicro cameras (0x332d, 0x3410 and 0x3420) fail to return correct bandwidth information. The first model rounds the value provided by the host to the nearest supported packet size, while the other two always request the maximum bandwidth. Introduce a device quirk to override the value returned by the device with an estimated bandwidth computed by the driver from the frame size and frame rate, and enable it for all Vimicro cameras. Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2009-02-14uvcvideo: Ignore empty bulk URBsLaurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> Devices may send a zero-length packet to signal the end of a bulk payload. If the payload size is a multiple of the URB size the zero-length packet will be received by the URB completion handler. Handle this by ignoring all empty URBs. Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2009-02-14uvcvideo: Initialize streaming parameters with the probe control valueLaurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> The UVC specification requires SET_CUR requests on the streaming commit control to use values retrieved from a successful GET_CUR request on the probe control. Initialize streaming parameters with the probe control current value to make sure the driver always complies. Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2009-01-27uvcvideo: use usb_make_path to report bus infoThierry MERLE
From: Thierry MERLE <thierry.merle@free.fr> usb_make_path reports canonical bus info. Use it when reporting bus info in VIDIOC_QUERYCAP. Priority: normal Signed-off-by: Thierry MERLE <thierry.merle@free.fr> Acked-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2009-01-22uvcvideo: Fix memory leak in input device handlingLaurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> The dynamically allocated input_dev->phys buffer isn't freed when unregistering the device. As the input layer doesn't provide any release callback, use a fixed-size buffer inside the uvc_device structure. Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2009-01-18uvcvideo: Retry URB buffers allocation when the system is low on memory.Laurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> URB buffers for video transfers are sized to UVC_MAX_PACKETS bulk/isochronous packets by default. If the system is too low on memory try successively smaller numbers of packets until allocation succeeds. Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Reviewed-by: Johannes Berg <johannes@sipsolutions.net> Tested-by: Johannes Berg <johannes@sipsolutions.net>
2009-01-14uvcvideo: Add support for the Alcor Micro AU3820 chipset.Laurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> The Alcor Micro AU3820 chipset (found in the Future Boy PC USB webcam) requires the MINMAX quirk. Add a corresponding entry in the device IDs list. Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2009-01-08uvcvideo: replace strn{cpy,cat} with strl{cpy,cat}.Laurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> strncpy is unsafe as it doesn't append a terminating NUL character when the source string doesn't fit in the destination buffer. Replace it with strlcpy. strncat is misused as its size argument refers to the source string, not the destination buffer. Replace it with strlcat. Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2009-01-08merge: http://linuxtv.org/hg/~pinchartl/uvcvideoMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-07removed unused #include <version.h>'sMauro Carvalho Chehab
From: Huang Weiyi <weiyi.huang@gmail.com> Removed unused #include <version.h>'s in files below, drivers/media/video/cs5345.c drivers/media/video/pwc/pwc-if.c drivers/media/video/saa717x.c drivers/media/video/upd64031a.c drivers/media/video/upd64083.c drivers/media/video/uvc/uvc_ctrl.c drivers/media/video/uvc/uvc_driver.c drivers/media/video/uvc/uvc_queue.c drivers/media/video/uvc/uvc_video.c drivers/media/video/uvc/uvc_status.c Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com> Acked-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-04uvcvideo: Fix GET_DEF failure detection.Laurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> Commit 44f0079ec74330b457d990072c13cbe28b0f1abf erroneously considers all GET_DEF requests as unsuccessful. Fix this by checking the request return value. Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2009-01-03uvcvideo: Print the UVC version number in binary-coded decimal.Laurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> The UVC specification release number is a binary-coded decimal number, print it as such. Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2009-01-03uvcvideo: Whitespace and comments cleanup, copyright updates.Laurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2008-12-29uvcvideo: Add support for video output devicesLaurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> Extend the range of supported UVC devices by allowing video output devices matching the following structure: TT_STREAMING -> VC_PROCESSING_UNIT -> VC_EXTENSION_UNIT{0,n} -> OTT_* Video output devices are reported with the V4L2_CAP_VIDEO_OUTPUT capability flag and are subject to the same restrictions as video input devices. Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2008-12-29uvcvideo: Ignore interrupt endpoint for built-in iSight webcams.Laurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> Built-in iSight webcams have an interrupt endpoint but spit proprietary data that don't conform to the UVC status endpoint messages. Don't try to handle the interrupt endpoint for those cameras. Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2008-12-16uvcvideo: Fix bulk URB processing when the header is erroneousLaurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> When the first bulk URB of a video payload contains an erroneous header, or when no V4L2 buffer is available, the whole payload must be dropped. Change the skip logic to drop all bulk URBs until the end of the payload instead of the first one only. Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2008-12-16uvcvideo: V4L2 zoom controls supportLaurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> Add support for absolute and continuous zoom controls (mapped to absolute and relative UVC zoom controls). Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2008-12-16uvcvideo: V4L2 privacy control supportLaurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2008-12-06uvcvideo: Add a device quirk to prune bogus controls.Laurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> Bogus controls currently include processing unit auto controls for which no corresponding manual control is available. Such auto controls make little sense if any, and are known to crash at least the SiGma Micro webcam. Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>