summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/uvc/uvc_ctrl.c
AgeCommit message (Collapse)Author
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-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-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>
2008-11-11uvcvideo: Enable compilation on kernels older than 2.6.22Laurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> The uvcvideo driver makes use of the usb_endpoint_* functions as well as the list_first_entry and uninitialized_var macros. Add them to v4l/compat.h and update the driver with kernel version-based conditional compilation sections. Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2008-09-23fix buffer overflow in uvc-videoMauro Carvalho Chehab
From: Ralph Loader <suckfish@ihug.co.nz> There is a buffer overflow in drivers/media/video/uvc/uvc_ctrl.c: INFO: 0xf2c5ce08-0xf2c5ce0b. First byte 0xa1 instead of 0xcc INFO: Allocated in uvc_query_v4l2_ctrl+0x3c/0x239 [uvcvideo] age=13 cpu=1 pid=4975 ... A fixed size 8-byte buffer is allocated, and a variable size field is read into it; there is no particular bound on the size of the field (it is dependent on hardware and configuration) and it can overflow [also verified by inserting printk's.] The patch attempts to size the buffer to the correctly. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-27uvcvideo: Fix control cache access when setting composite auto-update controlsMauro Carvalho Chehab
From: Laurent Pinchart <laurent.pinchart@skynet.be> Auto-update controls are never marked is loaded to prevent uvc_get_ctrl from loading the control value from the cache. When setting a composite (mapped to several V4L2 controls) auto-update UVC control, the driver updates the control cache value before processing each V4L2 control, overwriting the previously set V4L2 control. This fixes the problem by marking all controls as loaded in uvc_set_ctrl regardless of their type and resetting the loaded flag in uvc_commit_ctrl for auto-update controls. Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-22uvcvideo: Declare missing camera and processing unit controls.Mauro Carvalho Chehab
From: Laurent Pinchart <laurent.pinchart@skynet.be> This declares all missing UVC camera and processing unit controls. V4L2 mappings are not supported yet for those controls. Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-07-31uvcvideo: don't use stack-based buffers for USB transfers.Mauro Carvalho Chehab
From: Laurent Pinchart <laurent.pinchart@skynet.be> Data buffers on the stack are not allowed for USB I/O. Use dynamically allocated buffers instead. Signed-off-by: Bruce Schmid <duck@freescale.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-17uvcvideo: Return sensible min and max values when querying a boolean control.Mauro Carvalho Chehab
From: Laurent Pinchart <laurent.pinchart@skynet.be> Although the V4L2 spec states that the minimum and maximum fields may not be valid for control types other than V4L2_CTRL_TYPE_INTEGER, it makes sense to set the bounds to 0 and 1 for boolean controls instead of returning uninitialized values. Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-26uvcvideo: Make the auto-exposure menu control V4L2 compliantMauro Carvalho Chehab
From: Laurent Pinchart <laurent.pinchart@skynet.be> V4L2 and UVC enumerate the auto-exposure settings in a different order. This patch fixes the auto-exposure menu declaration to match the V4L2 spec. Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-30From: Laurent Pinchart <laurent.pinchart@skynet.be>Mauro Carvalho Chehab
USB Video Class driver This driver supports video input devices compliant with the USB Video Class specification. This means lots of currently manufactured webcams, and probably most of the future ones. Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Notice: Due to MAINTAINERS file that isn't at mercurial tree, I've committed it on my -git and backported to -hg. kernel-sync: Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>