summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/uvc/uvcvideo.h
Commit message (Collapse)AuthorAgeFilesLines
* [media] uvcvideo: Set alternate setting 0 on resume if the bus has been resetMing Lei2011-09-211-1/+1
| | | | | | | | | | | | | | | | If the bus has been reset on resume, set the alternate setting to 0. This should be the default value, but some devices crash or otherwise misbehave if they don't receive a SET_INTERFACE request before any other video control request. Microdia's 0c45:6437 camera has been found to require this change or it will stop sending video data after resume. uvc_video.c] Signed-off-by: Ming Lei <ming.lei@canonical.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] uvcvideo: Use LINUX_VERSION_CODE for VIDIOC_QUERYCAPMauro Carvalho Chehab2011-07-271-2/+1
| | | | | | | | | uvcvideo doesn't use vidioc_ioctl2. As the API is changing to use a common version for all drivers, we need to expliticly fix this driver. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] uvcvideo: Connect video devices to media entitiesLaurent Pinchart2011-05-251-0/+1
| | | | | | | | | The video devices associated to USB streaming terminals must be connected to their associated terminal's media entity instead of being standalone entities. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] uvcvideo: Register subdevices for each entityLaurent Pinchart2011-05-251-0/+13
| | | | | | | | Userspace applications can now discover the UVC device topology using the media controller API. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] uvcvideo: Register a v4l2_deviceLaurent Pinchart2011-05-251-0/+6
| | | | | | | | | As a first step to the media controller integration register a v4l2_device for each UVC control interface and make the video_device a child of the v4l2_device. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] uvcvideo: Add M420 format supportHans de Goede2011-05-201-0/+3
| | | | | | | | | The M420 format is used by the Microsoft LifeCam Studio HD. Signed-off-by: Hans de Goede <hdegoede@redhat.com> [laurent.pinchart@ideasonboard.com: split into v4l/uvcvideo patches] Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] uvcvideo: Add support for NOMMU archBob Liu2011-05-201-0/+4
| | | | | | | | | Add support to uvc driver for NOMMU arch including add function uvc_queue_get_unmapped_area() and make some changes in uvc_queue_mmap(). So that uvc camera can be used on nommu arch like blackfin. Signed-off-by: Bob Liu <lliubbo@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] uvcvideo: Make the API publicLaurent Pinchart2011-05-201-38/+30
| | | | | | | | | | Move the public API definitions to include/linux/uvcvideo.h and bump the version number to 1.1.0. Compatibility with the old API is kept, application can still be compiled against the private header and will not break. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] uvcvideo: Add support for V4L2_PIX_FMT_RGB565Laurent Pinchart2011-05-201-0/+3
| | | | | | | | The TomTom navigation system used in the Sony XNV 660BT and 770BT reports an RGB565 (RGBP) format, support it in the driver. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] uvcvideo: Rename UVC_CONTROL_* flags to UVC_CTRL_FLAG_*Laurent Pinchart2011-05-201-2/+17
| | | | | | | | | This makes the public driver API more uniform, in preparation of moving uvcvideo.h to include/linux. Keep the old names for backward compatibility with existing applications. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] uvcvideo: Add UVCIOC_CTRL_QUERY ioctlMartin Rubli2011-05-201-2/+11
| | | | | | | | | | | | | This ioctl extends UVCIOC_CTRL_GET/SET by not only allowing to get/set XU controls but to also send arbitrary UVC commands to XU controls, namely GET_CUR, SET_CUR, GET_MIN, GET_MAX, GET_RES, GET_LEN, GET_INFO and GET_DEF. This is required for applications to work with XU controls, so that they can properly query the size and allocate the necessary buffers. Signed-off-by: Martin Rubli <martin_rubli@logitech.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] uvcvideo: Lock stream mutex when accessing format-related informationLaurent Pinchart2010-12-011-1/+3
| | | | | | | | | The stream mutex protects access to the struct uvc_streaming ctrl, cur_format and cur_frame fields as well as to the hardware probe control. Lock it appropriately. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] uvcvideo: Move mmap() handler to uvc_queue.cLaurent Pinchart2010-12-011-0/+2
| | | | | | | | The mmap() implementation belongs to the video buffers queue, move it there. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] uvcvideo: Lock controls mutex when querying menusLaurent Pinchart2010-12-011-2/+2
| | | | | | | | uvc_find_control() must be called with the controls mutex locked. Fix uvc_query_v4l2_menu() accordingly. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] uvcvideo: Fix uvc_query_v4l2_ctrl() and uvc_xu_ctrl_query() lockingLaurent Pinchart2010-10-211-1/+1
| | | | | | | | Take the ctrl_mutex mutex before touching control information in those functions. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] uvcvideo: Embed uvc_control_info inside struct uvc_controlLaurent Pinchart2010-10-211-5/+6
| | | | | | | | | Now that control information structures are not shared between control instances, embed a uvc_control_info instance inside the uvc_control structure instead of storing a pointer. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] uvcvideo: Remove sysadmin requirements for UVCIOC_CTRL_MAPMartin Rubli2010-10-211-0/+4
| | | | | | | | | | | | | This patch removes the sysadmin requirements for UVCIOC_CTRL_MAP (and the stub implementation of UVCIOC_CTRL_ADD). This requirement no longer makes sense with the new XU control access mechanisms since XU controls can be accessed without adding control mappings first. A maximum number (currently 1024) of control mappings per device is enforced to avoid excess memory consumption caused by careless user space applications. Signed-off-by: Martin Rubli <martin_rubli@logitech.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] uvcvideo: Hardcode the index/selector relationship for XU controlsLaurent Pinchart2010-10-211-16/+5
| | | | | | | | | | | | | | | | | | | | | | | | Devices advertise XU controls using a bitmask, in which each bit corresponds to a control. The control selector, used to query the control, isn't available in the USB descriptors. All known UVC devices use control selectors equal to the control bit index plus one. Hardcode that relationship in the driver, making the UVCIOC_CTRL_ADD ioctl obsolete. All necessary information about XU controls can be obtained by the driver at enumeration time. The UVCIOC_CTRL_ADD ioctl is still supported for compatibility reasons, but now always returns -EEXIST. Finally, control mappings are now on a per-device basis and no longer global. As this changes the userspace interface, bump the driver version number to 1.0.0 (it was about time). Signed-off-by: Martin Rubli <martin_rubli@logitech.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] uvcvideo: Generate discontinuous sequence numbers when frames are lostLaurent Pinchart2010-10-211-1/+1
| | | | | | | | | Increase the sequence number of the v4l2_buffer structure regardless of any buffer states, so that discontinuous sequence numbers allow applications to detect lost video frames. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: uvcvideo: Restrict frame rates for Chicony CNF7129 webcamLaurent Pinchart2010-09-271-0/+1
| | | | | | | | | | | | At all frame rates except 30fps and 5fps the camera produces very dark pictures. Auto-exposure is probably disabled by the camera at all frame rates except 30fps, making them pretty unusable. Work around the problem by introducing a new RESTRICT_FRAME_RATE quirk that disables all the frame rates except the default one. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: uvcvideo: Drop corrupted compressed framesLaurent Pinchart2010-08-081-2/+3
| | | | | | | | | | | | | | | Corrupted video frames are dropped by default by the driver for uncompressed formats. Data corruption is not less problematic for compressed formats, so frame drop should be enabled by default for those formats as well. Mark buffers as faulty when an isochronous packet loss is detected for any format, or when the buffer length doesn't match the image size for uncompressed formats. Drop erroneous buffers regardless of whether the format is compressed or uncompressed. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: uvc: Move constants and structures definitions to linux/usb/video.hLaurent Pinchart2010-08-021-19/+0
| | | | | | | | | | | The UVC host and gadget drivers both define constants and structures in private header files. Move all those definitions to linux/usb/video.h where they can be shared by the two drivers (and be available for userspace applications). Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: uvcvideo: Don't use stack-based buffers for USB transfersLaurent Pinchart2010-08-021-1/+2
| | | | | | | | | | | | Data buffers on the stack are not allowed for USB I/O. Use dynamically allocated buffers instead when querying control length and control capabilities. The control capabilities are now also stored in the uvc_control structure. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: uvcvideo: Support menu controls in the control mapping APILaurent Pinchart2010-08-021-5/+18
| | | | | | | | | | | | | The UVCIOC_CTRL_MAP ioctl doesn't support menu entries for menu controls. As the uvc_xu_control_mapping structure has no reserved fields, this can't be fixed while keeping ABI compatibility. Modify the UVCIOC_CTRL_MAP ioctl to add menu entries support, and define UVCIOC_CTRL_MAP_OLD that supports the old ABI without any ability to add menu controls. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: uvcvideo: Add support for V4L2_PIX_FMT_Y16Laurent Pinchart2010-05-191-1/+3
| | | | | | | | The Miricle 307K (17dc:0202) camera reports a 16-bit greyscale format, support it in the driver. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: uvcvideo: Cache control min, max, res and def query resultsLaurent Pinchart2010-02-261-1/+2
| | | | | Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: uvcvideo: Use %pUl printk format specifier to print GUIDsLaurent Pinchart2010-02-261-10/+0
| | | | | | | | Replace the UVC_GUID_FORMAT and UVC_GUID_ARGS macros with the new %pUl printk format specifier. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: uvcvideo: Increase the streaming control timeout to 5 secondsLaurent Pinchart2010-02-261-1/+1
| | | | | | | | | This fixes timeout issues with some Logitech webcams. The timeout value seems to match the one used in the Logitech Windows driver, so no further increase should be necessary. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (13830): uvcvideo: add another YUYV format GUID for iSight camerasDaniel Ritz2010-02-261-0/+3
| | | | | | | | | | | | | 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 (13827): uvcvideo: Switch to a monotonic clock for V4L2 buffers ↵Laurent Pinchart2010-02-261-0/+1
| | | | | | | | | | | | | | | | | | | | 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-171-2/+3
| | | | | | | | | | | | | | | | 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 (13506): uvcvideo: Factorize common field in uvc_entity structureLaurent Pinchart2009-12-051-6/+3
| | | | | | | | | | 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 (13503): uvcvideo: Merge iterms, oterms and units linked listsLaurent Pinchart2009-12-051-3/+2
| | | | | | | | | 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 (13155): uvcvideo: Add a module parameter to set the streaming ↵Laurent Pinchart2009-12-051-1/+2
| | | | | | | | | | | | | | | | | | 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 (13152): uvcvideo: Rely on videodev to reference-count the deviceLaurent Pinchart2009-12-051-4/+1
| | | | | | | | | 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 (13149): uvcvideo: Add a new UVC_TRACE_VIDEO trace levelLaurent Pinchart2009-12-051-0/+1
| | | | | | | | 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 (12379): uvcvideo: Multiple streaming interfaces supportLaurent Pinchart2009-09-121-28/+31
| | | | | | | | | | 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-121-44/+42
| | | | | | | | | | | 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-121-0/+1
| | | | | | | | | | | | 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 (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-121-109/+109
| | | | | | | | 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-121-7/+0
| | | | | | | | 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 (11945): uvcvideo: Don't accept to change the format when buffers ↵Laurent Pinchart2009-06-161-0/+1
| | | | | | | | | | | 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-161-1/+0
| | | | | | | | | | 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 (11837): uvcvideo: Start status polling on device openLaurent Pinchart2009-06-161-0/+3
| | | | | | | | | | | | | | | | | | | | | 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 (10652): uvcvideo: Add quirk to override wrong bandwidth value for ↵Laurent Pinchart2009-03-301-0/+1
| | | | | | | | | | | | | | | | Vimicro devices 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. Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10296): uvcvideo: Fix memory leak in input device handlingLaurent Pinchart2009-03-301-0/+1
| | | | | | | | | 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. Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10295): uvcvideo: Retry URB buffers allocation when the system is ↵Laurent Pinchart2009-03-301-4/+2
| | | | | | | | | | | | | low on memory. 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. Tested-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Reviewed-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10197): uvcvideo: Whitespace and comments cleanup, copyright updates.Laurent Pinchart2009-01-291-116/+116
| | | | | Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
OpenPOWER on IntegriCloud