summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [media] dsbr100: ensure correct disconnect sequenceHans Verkuil2011-03-221-47/+12
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] dsbr100: convert to unlocked_ioctlHans Verkuil2011-03-221-48/+31
| | | | | | | Use core-assisted locking so .ioctl can be replaced by .unlocked_ioctl. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2-framework.txt: document new v4l2_device release() callbackHans Verkuil2011-03-221-0/+15
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2-device: add kref and a release functionHans Verkuil2011-03-223-0/+37
| | | | | | | | | | | | | | | | | | 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>
* [media] cx18: use core priority handlingHans Verkuil2011-03-223-61/+0
| | | | | | | 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>
* [media] cx18: use v4l2_fh as preparation for adding core priority supportHans Verkuil2011-03-223-41/+61
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2-framework.txt: improve v4l2_fh/priority documentationHans Verkuil2011-03-221-33/+87
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] ivtv: convert to core priority handlingHans Verkuil2011-03-223-45/+15
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2-ioctl: add priority handling supportHans Verkuil2011-03-2210-16/+73
| | | | | | | 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>
* [media] v4l2-fh: add v4l2_fh_is_singularHans Verkuil2011-03-222-0/+27
| | | | | | | | | | 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>
* [media] v4l2-fh: add v4l2_fh_open and v4l2_fh_release helper functionsHans Verkuil2011-03-222-0/+43
| | | | | | | | | 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>
* [media] v4l2-fh: implement v4l2_priority supportHans Verkuil2011-03-222-0/+5
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2: add v4l2_prio_state to v4l2_device and video_deviceHans Verkuil2011-03-224-0/+13
| | | | | | | | | | 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>
* [media] v4l2_prio: move from v4l2-common to v4l2-devHans Verkuil2011-03-224-78/+79
| | | | | | | | | 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>
* [media] saa7134-input: key up events not sent after suspend/resumeVadim Solomin2011-03-221-10/+39
| | | | | | | | | | | | | 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>
* [media] stv0367: typo in function parameterDan Carpenter2011-03-221-1/+1
| | | | | | | | The CellsCoeffs arrays are [3][6][5] not [2][6][5]. Signed-off-by: Dan Carpenter <error27@gmail.com> Cc: Igor M. Liplianin <liplianin@netup.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] stv0367: signedness bug in stv0367_get_tuner_freq()Dan Carpenter2011-03-221-2/+2
| | | | | | | | | We use err to store negative error codes so it should be signed. And if we return an error from stv0367_get_tuner_freq() that needs to be handled properly as well. (param->frequency is a u32). Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] via-camera: Fix OLPC serial checkDaniel Drake2011-03-221-46/+37
| | | | | | | | | | | | | | | 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>
* [media] Change to 32 bit and add other remote controls for lme2510Malcolm Priestley2011-03-221-27/+69
| | | | | | | | | | | These bubble button remote controls appear to be generic from China. These are the three variants known to be supplied with DM04/QQBOX DVB-S They could well be supplied with other devices from the region. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] DM04/QQBOX Update V1.76 - use 32 bit remote decodingMalcolm Priestley2011-03-221-2/+3
| | | | | | | | Use 32 bit decoding to add support for more than one variant of remote control. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] DM04 LME2510(C) Sharp BS2F7HZ0194 Firmware InformationMalcolm Priestley2011-03-221-2/+14
| | | | | | | DM04 LME2510(C) Sharp BS2F7HZ0194 Firmware Information Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v180 - DM04/QQBOX added support for BS2F7HZ0194 versionsMalcolm Priestley2011-03-221-60/+170
| | | | | | | | | | | | | Old versions of these boxes have the BS2F7HZ0194 tuner module on both the LME2510 and LME2510C. Firmware dvb-usb-lme2510-s0194.fw and/or dvb-usb-lme2510c-s0194.fw files are required. See Documentation/dvb/lmedm04.txt Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] drivers/media/video/tlg2300/pd-video.c: Remove second mutex_unlock ↵Alexander Strakh2011-03-221-3/+1
| | | | | | | | | | | | | | | | | | 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>
* [media] radio-wl1273: remove unused wl1273_device->workTejun Heo2011-03-221-5/+0
| | | | | | | | | wl1273_device->work is unused. Remove it along with the spurious flush_scheduled_work() call in wl1273_fm_module_exit(). Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Matti Aaltonen <matti.j.aaltonen@nokia.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] Zarlink zl10036 DVB-S: Fix mem leak in zl10036_attachJesper Juhl2011-03-221-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Thu, 17 Feb 2011, Matthias Schwarzott wrote: > On Sunday 06 February 2011, Jesper Juhl wrote: > > If the memory allocation to 'state' succeeds but we jump to the 'error' > > label before 'state' is assigned to fe->tuner_priv, then the call to > > 'zl10036_release(fe)' at the 'error:' label will not free 'state', but > > only what was previously assigned to 'tuner_priv', thus leaking the memory > > allocated to 'state'. > > There are may ways to fix this, including assigning the allocated memory > > directly to 'fe->tuner_priv', but I did not go for that since the > > additional pointer derefs are more expensive than the local variable, so I > > just added a 'kfree(state)' call. I guess the call to 'zl10036_release' > > might not even be needed in this case, but I wasn't sure, so I left it in. > > > Yeah, that call to zl10036_release can be completely eleminated. > Another thing is: jumping to the error label only makes sense when memory was > already allocated. So the jump in line 471 can be replaced by "return NULL", > as the other error handling before allocation: > if (NULL == config) { > printk(KERN_ERR "%s: no config specified", __func__); > goto error; > } > > I suggest to improve the patch to clean the code up when changing that. > > But I am fine with commiting this patch also if you do not want to change it. > Thank you for your feedback. It makes a lot of sense. Changing it is not a problem :) How about the updated patch below? If the memory allocation to 'state' succeeds but we jump to the 'error' label before 'state' is assigned to fe->tuner_priv, then the call to 'zl10036_release(fe)' at the 'error:' label will not free 'state', but only what was previously assigned to 'tuner_priv', thus leaking the memory allocated to 'state'. This patch fixes the leak and also does not jump to 'error:' before mem has been allocated but instead just returns. Also some small style cleanups. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Matthias Schwarzott <zzam@gentoo.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] V4L: videobuf, don't use dma addr as physicalJiri Slaby2011-03-221-1/+1
| | | | | | | | | | | | | | | | | | 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>
* [media] uvcvideo: Fix descriptor parsing for video output devicesLaurent Pinchart2011-03-221-0/+8
| | | | | | | | | | | | 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>
* [media] uvcvideo: Fix uvc_fixup_video_ctrl() format searchStephan Lachowsky2011-03-221-5/+9
| | | | | | | | | | | | 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>
* [media] vb2: Handle return value from start_streaming callbackPawel Osciak2011-03-221-3/+8
| | | | | | | 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>
* [media] vb2: vb2_poll() fix return values for file I/O modePawel Osciak2011-03-221-3/+3
| | | | | | | 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>
* [media] Update Pawel Osciak's e-mail addressPawel Osciak2011-03-2211-17/+17
| | | | | Signed-off-by: Pawel Osciak <pawel@osciak.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] Make 2.6.39 not 2.6.38 the version when Multi-planar API was addedPawel Osciak2011-03-222-20/+6
| | | | | | | Multi-planar API was added to 2.6.39 version of Video for Linux 2 API. Signed-off-by: Pawel Osciak <pawel@osciak.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9013: reimplement firmware downloadAntti Palosaari2011-03-221-16/+11
| | | | | | | | | | | | | Split FW download packages smarter way and bug free. Implementation is based of Andrea Merello's example he provided for tda18218 driver. Count remaining FW bytes down in loop instead of division and modulo combination used earlier. Thanks to: Andrea Merello <andrea.merello@gmail.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Cc: Andrea Merello <andrea.merello@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9013: download FW earlier in attach()Antti Palosaari2011-03-221-14/+14
| | | | | | | | Quick test shows that FW must be running before other checks so make it happen earlier. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9015: reimplement firmware downloadAntti Palosaari2011-03-221-15/+10
| | | | | | | | | | | | Split FW download packages smarter way and bug free. Implementation is based of Andrea Merello's example he provided for tda18218 driver. Count remaining FW bytes down in loop instead of division and modulo combination used earlier. Thanks-to: Andrea Merello <andrea.merello@gmail.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Cc: Andrea Merello <andrea.merello@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9015: map remote for TerraTec Cinergy T Stick RCAntti Palosaari2011-03-221-0/+2
| | | | | | | | | Map rc-terratec-slim-2 for TerraTec Cinergy T Stick RC device. Signed-off-by: Antti Palosaari <crope@iki.fi> Cc: Martin Groszhauser <mgroszhauser@gmail.com> Cc: TerraTux <TerraTux@terratec.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] add TerraTec remoteAntti Palosaari2011-03-223-0/+74
| | | | | | | | | | Remote used for TerraTec Cinergy T Stick RC. Keytable from Martin Groszhauser <mgroszhauser@gmail.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Cc: Martin Groszhauser <mgroszhauser@gmail.com> Cc: TerraTux <TerraTux@terratec.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9015: small RC changeAntti Palosaari2011-03-221-5/+12
| | | | | Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9015: enhance RCIan Armstrong2011-03-222-11/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch from Ian Armstrong. I've encountered a couple of problems with the current af9015 driver as supplied with the 2.6.37 kernel, that the attached patch appears to fix. (I've generated this patch against the current v4l-dvb git). Some key-presses are lost. A key-press is only generated upon 'valid' data (buf[14] == (u8) ~buf[15]), but the buffer is wiped before this check. Sometimes the 15th byte has not been set at the time of read, so the data isn't valid & ignored. On the next poll the 15th byte has been set, but the rest of the data was wiped previously, so the data is still invalid & the key is lost. Weird repeat error, where an old key press is sometimes repeated in error. ie. button sequence '1 (pause) 2 (pause) 3 (pause) 4' generates output like '1 (pause) 2 (pause) 23 (pause) 4'. The current driver zeroes the data for the key pushed, but sometimes this data is already zero but with other bytes set suggesting a repeat code. This results in the last key being incorrectly repeated. This patch attempts to reduce the risk of a missed key-press & also stop the random repeat of an old key-press when a new key is pressed. Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca - nw80x: New subdriver for Divio based webcamsJean-François Moine2011-03-225-0/+2464
| | | | | | | | [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>
* [media] gspca - main: Cleanup sourceJean-François Moine2011-03-221-6/+7
| | | | | | | | | - 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>
* [media] gspca - ov519: Add exposure and autogain controls for ov2610/2610aeJean-François Moine2011-03-221-14/+106
| | | | | Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca - jeilinj / stv06xx: Fix some warningsJean-François Moine2011-03-222-4/+0
| | | | | Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca - sonixb: Clenup sourceJean-François Moine2011-03-221-5/+5
| | | | | | | | - 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>
* [media] gspca - sonixb: Update inactive flags to reflect autogain settingHans de Goede2011-03-221-2/+12
| | | | | | 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>
* [media] gspca - sonixb: Use the new control mechanismJean-François Moine2011-03-221-193/+93
| | | | | | 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>
* [media] gspca: New file autogain_functions.hJean-François Moine2011-03-221-0/+179
| | | | | | | | | 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>
* [media] gspca - zc3xx: Cleanup sourceJean-François Moine2011-03-221-24/+24
| | | | | | | | | - 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>
* [media] gspca - zc3xx: Remove double definitionJean-François Moine2011-03-221-2/+0
| | | | | Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca_cpia1: Add support for buttonHans de Goede2011-03-221-5/+26
| | | | | | | | 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>
OpenPOWER on IntegriCloud