summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/uvc
Commit message (Collapse)AuthorAgeFilesLines
* V4L/DVB (13830): uvcvideo: add another YUYV format GUID for iSight camerasDaniel Ritz2010-02-262-0/+8
| | | | | | | | | | | | | For some unknown reason, on a MacBookPro5,3 the iSight sometimes report a different video format GUID. This patch add the other (wrong) GUID to the format table, making the iSight work always w/o other problems. What it should report: 32595559-0000-0010-8000-00aa00389b71 What it often reports: 32595559-0000-0010-8000-000000389b71 Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13828): uvcvideo: Make the quirks module parameter override the ↵Laurent Pinchart2010-02-261-5/+6
| | | | | | | | | | | | | | built-in quirks The quirks module parameter is or'ed with the built-in quirks for the device being probed. This make it impossible to disable a built-in quirk without recompiling the driver. Replace the built-in quirks with the quirks module parameter instead of or'ing the values. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13827): uvcvideo: Switch to a monotonic clock for V4L2 buffers ↵Laurent Pinchart2010-02-264-10/+51
| | | | | | | | | | | | | | | | | | | | timestamps The realtime clock provided by do_gettimeofday() is affected by time jumps caused by NTP or DST. Furthermore, preliminary investigation showed that SMP systems the realtime clock is based on the CPU TSC, and those could get slightly out of sync, resulting in jitter in the timestamps depending on which processor handles the USB interrupts. Instead of the realtime clock, use a monotonic high resolution clock to timestamp the buffer. As this could in theory introduce a regression with some userspace applications expecting a realtime clock timestamp, add a module parameter to switch back to the realtime clock. Thanks to Paulo Assis for pointing out and investigating the issue. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13831): uvcvideo: Fix oops caused by a race condition in buffer ↵Laurent Pinchart2010-01-173-14/+18
| | | | | | | | | | | | | | | | dequeuing Buffers were marked as done before being removed from the IRQ queue. If a userspace application dequeued and requeued the buffer fast enough during that time window, the buffer could end up being deleted twice, generating an oops in interrupt context. Add a new state, UVC_BUF_STATE_READY, to mark buffers as ready for reuse but not yet removed from the queue, and transition to UVC_BUF_STATE_DONE only when the buffer is removed from the queue. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13829): uvcvideo: Fix alternate setting selection in isochronous modeLaurent Pinchart2010-01-171-9/+22
| | | | | | | | | Unlike assumed by the driver, alternate settings are not sorted by endpoint max packet size. Iterate over all alternate settings to find the one with the smallest compatible max packet size. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13826): uvcvideo: Fix controls blacklistingLaurent Pinchart2010-01-171-1/+1
| | | | | | | | | | | | | | The control blacklisting code erroneously used usb_match_id() by passing a pointer to a usb_device_id structure instead of an array of such structures. Replace the usb_match_id() call by usb_match_id_one(). Thanks to Paulo Assis for diagnosing the bug and providing an initial fix. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13610): uvc: Correct size given to memsetJulia Lawall2009-12-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Memset should be given the size of the structure, not the size of the pointer. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ type T; T *x; expression E; @@ memset(x, E, sizeof( + * x)) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13556): v4l: Remove unneeded video_device::minor assignmentsLaurent Pinchart2009-12-161-1/+0
| | | | | | | | | | | | | Now that the video_device registration is tested using video_is_registered(), drivers don't need to initialize the video_device::minor field to -1 anymore. Remove those unneeded assignments. [mchehab.redhat.com: removed tm6000 changes as tm6000 is not ready yet for submission even on staging] Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13506): uvcvideo: Factorize common field in uvc_entity structureLaurent Pinchart2009-12-053-77/+57
| | | | | | | | | | The bNrInPins and baSourceID fields are common among all entities (some of use bSourceID but this is conceptually the same). Move those two fields out of entity type-specific unions into the uvc_entity structure top level. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13505): uvcvideo: Refactor chain scanLaurent Pinchart2009-12-051-32/+43
| | | | | | | | | Don't handle the first output terminal in a chain in a special way. Use uvc_scan_chain_entity() like for all other entities, making the chain scan code more generic. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13504): uvcvideo: Fix extension units parsingLaurent Pinchart2009-12-051-2/+2
| | | | | | | The bNrInPins field is an 8 bit integer, not a 16 bit integer. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13503): uvcvideo: Merge iterms, oterms and units linked listsLaurent Pinchart2009-12-054-56/+36
| | | | | | | | | All terminals and units are now added to a single linked list of entities per chain. This makes terminals and units handling code more generic. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13502): uvcvideo: Add support for Genius eFace 2025 webcamsLaurent Pinchart2009-12-051-0/+9
| | | | | | | | The Genius eFace 2025 (0458:706e) requires the MINMAX quirk. Add a corresponding entry in the device IDs list. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13310): uvcvideo: Return -EINVAL instead of -ENODEV in read()Laurent Pinchart2009-12-051-1/+1
| | | | | | | | -EINVAL is required by the V4L2 specification. -ENODEV is simply wrong as the device exists. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13308): uvcvideo: Add support for MSI StarCam 370i webcamsLaurent Pinchart2009-12-051-0/+9
| | | | | | | | The MSI StarCam 370i (1b3b:2951) requires the MINMAX quirk. Add a corresponding entry in the device IDs list. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13155): uvcvideo: Add a module parameter to set the streaming ↵Laurent Pinchart2009-12-053-3/+7
| | | | | | | | | | | | | | | | | | control timeout The default streaming control timeout was found by Ondrej Zary to be too low for some Logitech webcams. With kernel 2.6.22 and newer they would timeout during initialization unles the audio function was initialized before the video function. Add a module parameter to set the streaming control timeout and increase the default value from 1000ms to 3000ms to fix the above problem. Thanks to Ondrej Zary for investigating the issue and providing an initial patch. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13154): uvcvideo: Handle garbage at the end of streaming interface ↵Laurent Pinchart2009-12-051-3/+11
| | | | | | | | | | | | descriptors At least one 5986:0241 webcam model includes vendor-specific descriptors at the end of its streaming interface descriptors. Print an information UVC_TRACE_DESCR message and try to continue parsing the descriptors rather than bailing out with an error. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13153): uvcvideo: Fix uvc_alloc_urb_buffers()Ming Lei2009-12-051-2/+2
| | | | | | | | | | | | | | | | | | | | This patch sets stream->urb_size as psize*npackets before calling uvc_alloc_urb_buffers, which may fix a possible failure of usb_buffer_free in case usb_buffer_alloc returns NULL. The patch is based on the ideas below: 1,If usb_buffer_alloc can't allocate a buffer sucessfully, uvc_free_urb_buffers will be called to free the allocated buffers, and stream->urb_size is required to be passed to usb_buffer_free; 2,uvc_free_urb_buffers can reset stream->urb_size. This patch is against linux-v2.6.31-next-20090926. Signed-off-by: Ming Lei <tom.leiming@gmail.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13152): uvcvideo: Rely on videodev to reference-count the deviceLaurent Pinchart2009-12-053-104/+88
| | | | | | | | | The uvcvideo driver has a driver-wide lock and a reference count to protect against a disconnect/open race. Now that videodev handles the race itself, reference-counting in the driver can be removed. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13151): uvcvideo: Dismiss privileges when freeing video buffersLaurent Pinchart2009-12-051-1/+5
| | | | | | | | | Dismiss privileges on the file handle when calling VIDIOC_REQBUFS with a buffer count of 0. This allows applications to release the streaming permissions on the file handle without closing it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13150): uvcvideo: Don't acquire privileges in VIDIOC_TRY_FMTLaurent Pinchart2009-12-051-4/+0
| | | | | | | | The VIDIOC_TRY_FMT ioctl doesn't interfere with video streaming and thus should succeed on an unprivileged file handle. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13149): uvcvideo: Add a new UVC_TRACE_VIDEO trace levelLaurent Pinchart2009-12-052-4/+15
| | | | | | | | Use the trace level for messages related to video URB buffers allocation and alternate setting selection. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13148): uvcvideo: Handle V4L2_CTRL_TYPE_BUTTON control type in ↵Laurent Pinchart2009-12-051-0/+7
| | | | | | | | | VIDIOC_QUERYCTRL Return minimum, maximum and step set to 0 without querying the hardware. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13311): uvcvideo: Fix compilation warning with 2.6.32 due to type ↵Laurent Pinchart2009-11-071-1/+1
| | | | | | | | | | mismatch with abs() The abs() macro has changed in 2.6.32 and returns a long instead of an int. Fix the driver to avoid compilation warnings. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13309): uvcvideo: Ignore the FIX_BANDWIDTH for compressed videoLaurent Pinchart2009-11-071-1/+2
| | | | | | | | | The FIX_BANDWIDTH quirk tries to work around cameras requesting the maximum bandwidth regardless of the image size by computing a bandwidth estimate. This works only for uncompressed frames. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* const: mark struct vm_struct_operationsAlexey Dobriyan2009-09-271-1/+1
| | | | | | | | | | | * mark struct vm_area_struct::vm_ops as const * mark vm_ops in AGP code But leave TTM code alone, something is fishy there with global vm_ops being used. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* V4L/DVB (13012): uvc: introduce missing kfreeJulia Lawall2009-09-191-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the kzalloc and associated test after the stream/query test, to avoid the need to free the allocated if the stream/query test fails. The semantic match that finds the problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r exists@ local idexpression x; statement S; expression E; identifier f,f1,l; position p1,p2; expression *ptr != NULL; @@ x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...); ... if (x == NULL) S <... when != x when != if (...) { <+...x...+> } ( x->f1 = E | (x->f1 == NULL || ...) | f(...,x->f1,...) ) ...> ( return \(0\|<+...x...+>\|ptr\); | return@p2 ...; ) @script:python@ p1 << r.p1; p2 << r.p2; @@ print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12379): uvcvideo: Multiple streaming interfaces supportLaurent Pinchart2009-09-125-278/+411
| | | | | | | | | | 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. Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12378): uvcvideo: Restructure the driver to support multiple ↵Laurent Pinchart2009-09-125-421/+456
| | | | | | | | | | | simultaneous streams. As a first step towards multiple streaming interfaces support, reorganize the driver's data structures to cleanly separate video control and video streaming data. Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12327): uvcvideo: Add PROBE_DEF quirk and enable it for the MT6227 ↵Laurent Pinchart2009-09-123-1/+6
| | | | | | | | | | | | device 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. Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12188): uvcvideo: Set PROBE_MINMAX quirk for Aveo Technology webcamsLaurent Pinchart2009-09-121-1/+2
| | | | | | | | | | 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. Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12187): uvcvideo: Move UVC definitions to linux/usb/video.hLaurent Pinchart2009-09-121-135/+1
| | | | | | | | 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. Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12186): uvcvideo: Remove unused Logitech-specific constantsLaurent Pinchart2009-09-121-17/+0
| | | | | | | Those constants are not used anymore, remove them. Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12185): uvcvideo: Prefix all UVC constants with UVC_Laurent Pinchart2009-09-125-292/+307
| | | | | | | | In preparation to moving UVC constants to a public location, prefix all constants with UVC_ to avoid namespace clashes. Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12184): uvcvideo: Use class-specific descriptor types from usb/ch9.hLaurent Pinchart2009-09-122-9/+2
| | | | | | | | 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. Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12380): uvcvideo: Avoid flooding the kernel log with "unknown event ↵Laurent Pinchart2009-08-131-2/+2
| | | | | | | | | | | | type" messages 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. Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12328): uvcvideo: Don't apply the FIX_BANDWIDTH quirk to all ↵Laurent Pinchart2009-08-131-3/+21
| | | | | | | | | | | ViMicro devices Commit 50144aeeb702ea105697ae5249f059ea3990b838 broke the Samsung NC10 netbook webcam. Instead of applying the FIX_BANDWIDTH quirk to all ViMicro devices, list the devices explicitly. Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12002): uvc: Fix for no return value check of uvc_ctrl_set() which ↵Robert Krakora2009-06-161-3/+12
| | | | | | | | | | | calls mutex_lock_interruptible() Fix for no return value check of uvc_ctrl_set() which calls mutex_lock_interruptible(). 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>
* V4L/DVB (11948): uvcvideo: Ignore non-UVC trailing interface descriptors.Laurent Pinchart2009-06-161-2/+2
| | | | | | | | | | | 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. Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (11947): uvcvideo: Add support for FSC V30S webcamsLaurent Pinchart2009-06-161-0/+9
| | | | | | | | The FSC WebCam V30S (18ec:3288) requires the MINMAX quirk. Add a corresponding entry in the device IDs list. Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (11946): uvcvideo: Add support for Aveo Technology webcamsLaurent Pinchart2009-06-161-0/+9
| | | | | | | | The Aveo Technology USB 2.0 Camera (1871:0306) requires the PROBE_EXTRAFIELDS quirk. Add a corresponding entry in the device IDs list. Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (11945): uvcvideo: Don't accept to change the format when buffers ↵Laurent Pinchart2009-06-163-1/+16
| | | | | | | | | | | are allocated. 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. Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (11944): uvcvideo: Add generic control blacklist.Laurent Pinchart2009-06-163-23/+16
| | | | | | | | | | 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. Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (11838): uvcvideo: Add Lenovo Thinkpad SL400 to device list commentsFilipe Rosset2009-06-161-1/+1
| | | | | | | | Update the 17ef:480b device comment to list Lenovo Thinkpad SL400. Signed-off-by: Filipe Rosset <rosset.filipe@gmail.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (11837): uvcvideo: Start status polling on device openLaurent Pinchart2009-06-164-3/+34
| | | | | | | | | | | | | | | | | | | | | 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 Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (11836): uvcvideo: Add missing whitespaces to multi-line format strings.Laurent Pinchart2009-06-161-8/+8
| | | | | Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (11835): uvcvideo: Parse frame descriptors with non-continuous indexes.Laurent Pinchart2009-06-162-28/+13
| | | | | | | | | | 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. Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (11574): uvcvideo: fill reserved fields with zero of VIDIOC_QUERYMENUMárton Németh2009-06-161-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | 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. Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (11573): uvcvideo: Prevent invormation loss with removing implicit ↵Márton Németh2009-06-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | casting 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. 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> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (11669): uvc: fix compile warningHans Verkuil2009-05-091-3/+6
| | | | | | | | | | | | | | | 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. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
OpenPOWER on IntegriCloud