summaryrefslogtreecommitdiff
path: root/drivers/media/video
AgeCommit message (Collapse)Author
2011-03-22[media] hdpvr: i2c master enhancementsJarod Wilson
Make the hdpvr's i2c master implementation more closely mirror that of the pvrusb2 driver. Currently makes no significant difference in IR reception behavior with ir-kbd-i2c (i.e., it still sucks). Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] saa7134: Fix strange kconfig dependency on RC_CORESteven Rostedt
As the code in saa7134-input is not a module, but the config for it is set as a boolean instead of a tristate, this causes a strange dependency on RC_CORE. VIDEO_SAA7134_RC (which determines if saa7134-input.o is built) depends on RC_CORE and VIDEO_SAA7134. If VIDEO_SAA7134 is compiled as 'y' but RC_CORE is compiled as 'm' VIDEO_SAA7134_RC can still be set to 'y' which causes undefined symbols that it needs from RC_CORE. The simplest solution is to not allow VIDEO_SAA7134_RC be enabled if RC_CORE compiled as a module (m) and VIDEO_SA7134 is compiled into the kernel (y). Suggested-by: Mauro Carvalho Chehab <mchehab@redhat.com> Cc: Michal Marek <mmarek@suse.cz> Cc: linux-kbuild <linux-kbuild@vger.kernel.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] gspca - zc3xx: Add exposure control for sensor hv7131rJean-François Moine
Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] gspca - main: Add endpoint direction test in alt_xferPatrice Chotard
This patch fixes a bug in gspca, more precisely in alt_xfer(). This function looks for an input transfer endpoint in an alternate setting. By default it returns the first endpoint corresponding to the transfer type indicated in parameter. But with some USB devices, the first endpoint corresponding to the transfer type is not always an INPUT endpoint but an OUTPUT one. This patch adds the endpoint direction test to be sure to return an INPUT endpoint Signed-off-by: Patrice CHOTARD <patricechotard@free.fr> Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] gspca - nw80x: Fix exposure for some webcamsJean-François Moine
Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] gspca - nw80x: Get the sensor ID when bridge et31x110Jean-François Moine
Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] gspca - nw80x: Fix some image resolutionsJean-François Moine
No 352x288 for Ds3303 and no 320x240 for Generic802. Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] gspca - nw80x: Check the bridge from the webcam typeJean-François Moine
Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] gspca - nw80x: Fix the gain, exposure and autogainJean-François Moine
The autogain now uses common functions. Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] gspca - nw80x: Do some initialization at probe timeJean-François Moine
Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] gspca - nw80x: The webcam dsb-c110 is the same as the twinkleJean-François Moine
Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] gspca - nw80x: Cleanup sourceJean-François Moine
Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] v4l2: use new flag to enable core priority handlingHans Verkuil
Rather than guess which driver supports core priority handling, require drivers that do to explicitly set the V4L2_FL_USE_FH_PRIO flag in video_device. Updated the core prio handling accordingly and set the flag in the three drivers that do. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] ivtv: replace ugly casts with a proper container_ofHans Verkuil
ivtv-ioctl cast the 'void *fh' directly to 'ivtv_open_id *'. This should be done properly with a contained_of since the 'void *fh' is really a 'struct v4l2_fh *'. It worked because the v4l2_fh field is also the first field in the ivtv_open_id struct, but it is not clean code. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] ivtv: add missing v4l2_fh_exitHans Verkuil
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] vivi: convert to core priority handlingHans Verkuil
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] v4l2-device: add kref and a release functionHans Verkuil
The video_device struct has proper ref counting and its release function will be called when the last user releases it. But no such support was available for struct v4l2_device. This made it hard to determine when a USB driver can release the device if it has multiple device nodes. With one device node it is easy of course, since when the device node is released, the whole device can be released. This patch adds refcounting to v4l2_device. When registering device nodes the v4l2_device refcount will be increased, when releasing device nodes it will be decreased. The (optional) release function will be called when the last device node was released. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] cx18: use core priority handlingHans Verkuil
VIDIOC_S/G_PRIORITY handling is now done by the v4l2 core framework. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] cx18: use v4l2_fh as preparation for adding core priority supportHans Verkuil
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] ivtv: convert to core priority handlingHans Verkuil
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] v4l2-ioctl: add priority handling supportHans Verkuil
Drivers that use v4l2_fh can now use the core framework support of g/s_priority. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] v4l2-fh: add v4l2_fh_is_singularHans Verkuil
Several drivers need to do something when the first filehandle is opened or the last filehandle is closed. Most implement some use count mechanism, but if they use v4l2_fh, then you can also just check if this is the only filehandle for the device node. A simple helper function can do this. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] v4l2-fh: add v4l2_fh_open and v4l2_fh_release helper functionsHans Verkuil
Add two new functions: v4l2_fh_open allocates and initializes a struct v4l2_fh based on a struct file pointer and v4l2_fh_release releases and frees a struct v4l2_fh. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] v4l2-fh: implement v4l2_priority supportHans Verkuil
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] v4l2: add v4l2_prio_state to v4l2_device and video_deviceHans Verkuil
Integrate the v4l2_prio_state into the core, ready for use. One struct v4l2_prio_state is added to v4l2_device and a pointer to a prio state is added to video_device. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] v4l2_prio: move from v4l2-common to v4l2-devHans Verkuil
We are going to move priority handling into the v4l2 core. As a consequence the v4l2_prio helper functions need to be moved into the core videodev module as well to prevent circular dependencies. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] saa7134-input: key up events not sent after suspend/resumeVadim Solomin
On my AverMedia AverTV Studio 507, key up events are no longer sent after a suspend-to-disk/resume cycle, resulting in "stuck" keys. Apparently, for key up events to be generated, a certain GPIO pin must be set. Currently it's set in saa7134_input_init1(), but that function is not called on device resume. I suggest that code be moved to __saa7134_ir_start(), which is called both on init and resume. Signed-off-by: Vadim Solomin <vadic052@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] via-camera: Fix OLPC serial checkDaniel Drake
The code that checks the OLPC serial port is never built at the moment, because CONFIG_OLPC_XO_1_5 doesn't exist and probably won't be added. Fix it so that it gets compiled in, only executes on OLPC laptops, and move the check into the probe routine. The compiler is smart enough to eliminate this code when CONFIG_OLPC=n (due to machine_is_olpc() always returning false). Signed-off-by: Daniel Drake <dsd@laptop.org> Acked-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] drivers/media/video/tlg2300/pd-video.c: Remove second mutex_unlock ↵Alexander Strakh
in pd_vidioc_s_fmt Error path in file drivers/media/video/tlg2300/pd-video.c: 1. First mutex_unlock on &pd->lock in line 767 (in function that called from line 805) 2. Second in line 806 805 pd_vidioc_s_fmt(pd, &f->fmt.pix); 806 mutex_unlock(&pd->lock); Found by Linux Device Drivers Verification Project Signed-off-by: Alexander Strakh <strakh@ispras.ru> Acked-by: Huang Shijie <shijie8@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] V4L: videobuf, don't use dma addr as physicalJiri Slaby
mem->dma_handle is a dma address obtained by dma_alloc_coherent which needn't be a physical address in presence of IOMMU, as a hardware IOMMU can (and most likely) will return a bus address where physical != bus address. So ensure we are remapping (remap_pfn_range) the right page in __videobuf_mmap_mapper by using virt_to_phys(mem->vaddr) and not mem->dma_handle. While at it, use PFN_DOWN instead of explicit shift. [mchehab@redhat.com: Fix compilation breakage due to the lack of a comma] Signed-off-by: Jiri Slaby <jslaby@suse.cz> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] uvcvideo: Fix descriptor parsing for video output devicesLaurent Pinchart
Commit 4057ac6ca9a77c4275b34b5925ab5c99557913b1 V4L/DVB (13505): uvcvideo: Refactor chain scan broke output terminals parsing. Fix it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: stable@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] uvcvideo: Fix uvc_fixup_video_ctrl() format searchStephan Lachowsky
The scheme used to index format in uvc_fixup_video_ctrl() is not robust: format index is based on descriptor ordering, which does not necessarily match bFormatIndex ordering. Searching for first matching format will prevent uvc_fixup_video_ctrl() from using the wrong format/frame to make adjustments. Signed-off-by: Stephan Lachowsky <stephan.lachowsky@maxim-ic.com> Cc: stable@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] vb2: Handle return value from start_streaming callbackPawel Osciak
Fix vb2 not handling return value from start_streaming() callback. Signed-off-by: Pawel Osciak <pawel@osciak.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] vb2: vb2_poll() fix return values for file I/O modePawel Osciak
poll() should be returning poll-specific error values, not E* errors. Signed-off-by: Pawel Osciak <pawel@osciak.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] Update Pawel Osciak's e-mail addressPawel Osciak
Signed-off-by: Pawel Osciak <pawel@osciak.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] gspca - nw80x: New subdriver for Divio based webcamsJean-François Moine
[mchehab@redhat.com: Fix a few CodingStyle issues] Tested-by: Kjell Claesson <kjell.claesson@epost.tidanet.se> Tested-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] gspca - main: Cleanup sourceJean-François Moine
- change copyright and erroneous comment - small code optimization - have constant the device template Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] gspca - ov519: Add exposure and autogain controls for ov2610/2610aeJean-François Moine
Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] gspca - jeilinj / stv06xx: Fix some warningsJean-François Moine
Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] gspca - sonixb: Clenup sourceJean-François Moine
- update copyright and module author - set the sensor table as constant Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] gspca - sonixb: Update inactive flags to reflect autogain settingHans de Goede
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] gspca - sonixb: Use the new control mechanismJean-François Moine
Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] gspca: New file autogain_functions.hJean-François Moine
This file contains functions for the auto gain. It must be used with the new control mechanism. Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] gspca - zc3xx: Cleanup sourceJean-François Moine
- change some comments and copyright - change an erroneous register name - change hdcs2020b to hdcs2020 Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] gspca - zc3xx: Remove double definitionJean-François Moine
Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] gspca_cpia1: Add support for buttonHans de Goede
Not only the qx3 microscope has a button, but some cameras too. Tested with the Trust sp@cecam 100 (and with a creative and ezcam without button). Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] pvrusb2: check kmalloc return valueXiaochen Wang
allows the driver to proceed and initialize the below two values even if the kmalloc() fails. hdw->std_info_enum.def.type_enum.value_names hdw->std_info_enum.def.type_enum.count Signed-off-by: Xiaochen Wang <wangxiaochen0@gmail.com> Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] pvrusb2: Remove dead codeMike Isely
This was caught via a compiler warning. Amazingly enough this bit of benign dreck dates all the way back to 2008. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] pvrusb2: Implement support for Terratec Grabster AV400Mike Isely
Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] v4l2: vb2-dma-sg: fix potential security holeAndrzej Pietrasiewicz
Memory allocated by alloc_page() function might contain some potentially important data from other system processes. The patch adds a flag to zero the allocated page before giving it to videobuf2 (and then to userspace). Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>