aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* [media] r820t: quiet gcc warning on n_ringFengguang Wu2013-04-25
| | | | | | | | | | drivers/media/tuners/r820t.c: In function 'r820t_imr': drivers/media/tuners/r820t.c:1871:8: warning: 'n_ring' may be used uninitialized in this function [-Wmaybe-uninitialized] Mauro: This is a FALSE POSITIVE: the loop will always return a value for n_ring, as the last test will fill it with 15, if the loop fails. Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] r820t: memory leak in release()Dan Carpenter2013-04-25
| | | | | | | | I've moved the kfree(fe->tuner_priv) one line earlier, otherwise it is a no-op. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] r820t: precendence bug in r820t_xtal_check()Dan Carpenter2013-04-25
| | | | | | | | The test as written is always false. It looks like the intent was to test that the bit was not set. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] videodev2.h: Remove the unused old V4L1 buffer typesMauro Carvalho Chehab2013-04-25
| | | | | | Those aren't used anywhere for a long time. Drop it. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* Merge branch 'topic/cx25821' into patchworkMauro Carvalho Chehab2013-04-25
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * topic/cx25821: (31 commits) [media] cx25821: remove cx25821-audio-upstream.c from the Makefile [media] cx25821: replace custom ioctls with write() [media] cx25821: drop cx25821-video-upstream-ch2.c/h [media] cx25821: add output format ioctls [media] cx25821: prepare querycap for output support [media] cx25821: group all fmt functions together [media] cx25821: setup output nodes correctly [media] cx25821: remove references to subdevices that aren't there [media] cx25821: remove custom ioctls that duplicate v4l2 ioctls [media] cx25821: g/s/try/enum_fmt related fixes and cleanups [media] cx25821: switch to v4l2_fh, add event and prio handling [media] cx25821: replace resource management functions with fh ownership [media] cx25821: move vidq from cx25821_fh to cx25821_channel [media] cx25821: remove 'type' field from cx25821_fh [media] cx25821: use core locking [media] cx25821: remove unnecessary debug messages [media] cx25821: remove TRUE/FALSE/STATUS_(UN)SUCCESSFUL defines [media] cx25821: convert to the control framework [media] cx25821: embed video_device, clean up some kernel log spam [media] cx25821: remove bogus dependencies ...
| * [media] cx25821: remove cx25821-audio-upstream.c from the MakefileHans Verkuil2013-04-16
| | | | | | | | | | | | | | | | The audio output is currently not used as this should be rewritten as an alsa driver. For the time being remove this source from the Makefile. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx25821: replace custom ioctls with write()Hans Verkuil2013-04-16
| | | | | | | | | | | | | | Ideally this should be implemented with vb2, but it'll do for now. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx25821: drop cx25821-video-upstream-ch2.c/hHans Verkuil2013-04-16
| | | | | | | | | | | | | | | | | | cx25821-video-upstream_ch2.c/h is practically identical to cx25821-video-upstream.c/h so add support for ch2 into cx25821-video-upstream.c instead. After this we can replace the custom ioctls with a proper write() interface. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx25821: add output format ioctlsHans Verkuil2013-04-16
| | | | | | | | | | Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx25821: prepare querycap for output supportHans Verkuil2013-04-16
| | | | | | | | | | Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx25821: group all fmt functions togetherHans Verkuil2013-04-16
| | | | | | | | | | | | | | No other changes, just function reordering. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx25821: setup output nodes correctlyHans Verkuil2013-04-16
| | | | | | | | | | | | | | | | | | Drop the custom ioctls and enable the video output nodes again, this time using standard ioctls. The next step will be to provide a proper write() interface. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx25821: remove references to subdevices that aren't thereHans Verkuil2013-04-16
| | | | | | | | | | | | | | | | | | This driver does not have subdevices, so why call subdev ops? After removing that it became apparent that only Composite is supported as input, so remove also any reference to other inputs. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx25821: remove custom ioctls that duplicate v4l2 ioctlsHans Verkuil2013-04-16
| | | | | | | | | | | | | | | | No idea why these custom ioctls exist: they have perfectly normal v4l2 counterparts which are already implemented. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx25821: g/s/try/enum_fmt related fixes and cleanupsHans Verkuil2013-04-16
| | | | | | | | | | | | | | | | | | | | | | | | - fill in colorspace - zero priv - delete unsupported formats - fix field handling - s_std should update width/height - proper mapping of width/height to valid resolutions Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx25821: switch to v4l2_fh, add event and prio handlingHans Verkuil2013-04-16
| | | | | | | | | | | | | | | | It is now possible to remove cx25821_fh and replace it with v4l2_fh, which in turn makes event handling and core prio handling possible. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx25821: replace resource management functions with fh ownershipHans Verkuil2013-04-16
| | | | | | | | | | | | | | | | | | Just remember which filehandle is streaming instead of using complicated resource masks. After this patch we can replace cx25821_fh with v4l2_fh. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx25821: move vidq from cx25821_fh to cx25821_channelHans Verkuil2013-04-16
| | | | | | | | | | | | | | This is not a per-filehandle object, it's a per-channel object. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx25821: remove 'type' field from cx25821_fhHans Verkuil2013-04-16
| | | | | | | | | | Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx25821: use core lockingHans Verkuil2013-04-16
| | | | | | | | | | | | | | This allows us to replace .ioctl with .unlocked_ioctl. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx25821: remove unnecessary debug messagesHans Verkuil2013-04-16
| | | | | | | | | | | | | | | | The v4l2 core already has support for debugging ioctls/file operations. No need to do that again. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx25821: remove TRUE/FALSE/STATUS_(UN)SUCCESSFUL definesHans Verkuil2013-04-16
| | | | | | | | | | Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx25821: convert to the control frameworkHans Verkuil2013-04-16
| | | | | | | | | | Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx25821: embed video_device, clean up some kernel log spamHans Verkuil2013-04-16
| | | | | | | | | | | | | | | | | | Embed the video_device struct instead of allocating it. Remove some of the annoying and ugly kernel messages shown during loading and unloading of the module. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx25821: remove bogus dependenciesHans Verkuil2013-04-16
| | | | | | | | | | | | | | This driver doesn't use DVB, RC, cx25840 or tveeprom. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx25821: remove cropping ioctlsHans Verkuil2013-04-16
| | | | | | | | | | | | | | This driver does not implement cropping, so remove the cropping ioctls. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx25821: make lots of externals staticHans Verkuil2013-04-16
| | | | | | | | | | | | | | | | A lot of functions and variables were external when they really can be declared as static. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx25821: s_input didn't check for invalid inputHans Verkuil2013-04-16
| | | | | | | | | | | | | | The s_input implementation allowed input 1 even if that didn't exist. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx25821: remove unnecessary global devlistHans Verkuil2013-04-16
| | | | | | | | | | | | | | | | | | This device list is not necessary. The kernel already has all that information, so just use that instead. Also remove a bogus refcount and some dead 'private_free' code in the alsa driver. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx25821: make cx25821_sram_channels constHans Verkuil2013-04-16
| | | | | | | | | | | | | | | | And get rid of the channel0-11 external pointers and two more unused fields in cx25821.h. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx25821: fix log_status, querycapHans Verkuil2013-04-16
| | | | | | | | | | | | | | | | log_status shouldn't print LOG STATUS lines, the core does that already. Fix querycap version number and add device_caps support. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx25821: remove unused fields, ioctlsHans Verkuil2013-04-16
| | | | | | | | | | | | | | | | | | | | | | | | Do some spring cleaning: - there are no board defines with tuners, so remove bogus tuner support. - tv standard handling has nothing to do with tuners, so keep that. - replace the deprecated current_norm by g_std. - querystd isn't implemented, so remove the ioctl. - remove a bunch of unused fields in cx25821.h Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx25821: remove bogus radio/vbi/'video-ioctl' supportHans Verkuil2013-04-16
| | | | | | | | | | | | | | | | | | | | | | | | This device does not support radio or vbi, so remove anything referring to that. In addition, the driver created an 'video ioctl' node, which was unused and was effectively identical to the first video node. This bogus video node is now removed, leaving us with 8 video capture nodes and 2 video output nodes. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx25821: fix compiler warningHans Verkuil2013-04-16
| | | | | | | | | | | | | | | | | | drivers/media/pci/cx25821/cx25821-video.c: In function ‘cx25821_video_register’: drivers/media/pci/cx25821/cx25821-video.c:518:1: warning: the frame size of 1600 bytes is larger than 1024 bytes [-Wframe-larger-than=] Fixed by just making the struct video_device template static const. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx25821: the audio channel was registered as a video nodeHans Verkuil2013-04-15
| | | | | | | | | | | | | | | | | | | | Skip the audio channel when registering the video nodes. This fixes a bug where that incorrectly registered 'video' node was never unregistered. Note: this bug only surfaces if the video output nodes are enabled again after the previous patch disabled them. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx25821: do not expose broken video output streamsHans Verkuil2013-04-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cx25821 driver has support for one audio output channel and two video output channels. This is implemented in a very ugly and very evil way through a custom ioctl that passes the filename of a file containing the video data, which is then read by the driver itself using vfs. There are a number of problems with this: 1) it's very ugly and very evil (I can't say that often enough). 2) V4L2 supports video output, so why not use that? 3) it's very buggy, closing the filehandle through which you passed the ioctl will oops the kernel. 4) it's a nasty security leak since this allows you to load any file in the system as a video or audio source, so in theory you can output /etc/passwd to audio or video out and record & decode it on another device. Because of all these issues we no longer register those output video nodes. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | Merge branch 'topic/si476x' into patchworkMauro Carvalho Chehab2013-04-25
|\ \ | | | | | | | | | | | | | | | | | | | | | * topic/si476x: Revert "[media] mfd: Add chip properties handling code for SI476X MFD" Revert "[media] mfd: Add the main bulk of core driver for SI476x code" Revert "[media] mfd: Add commands abstraction layer for SI476X MFD" [media] v4l2: Add a V4L2 driver for SI476X MFD
| * | Revert "[media] mfd: Add chip properties handling code for SI476X MFD"Mauro Carvalho Chehab2013-04-18
| | | | | | | | | | | | | | | | | | | | | This reverts commit a118e9c122969a924061b48b6cc6bb73ccc8de4c. Requested-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * | Revert "[media] mfd: Add the main bulk of core driver for SI476x code"Mauro Carvalho Chehab2013-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit b40fe4f67de2c826868f408e03f2ef9fe39d85b9. Conflicts: drivers/mfd/si476x-i2c.c Requested-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * | Revert "[media] mfd: Add commands abstraction layer for SI476X MFD"Mauro Carvalho Chehab2013-04-18
| | | | | | | | | | | | | | | | | | | | | This reverts commit 626b67c1ad90b450e0afbd1c277fd81ad64c5539. Requested-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * | [media] v4l2: Add a V4L2 driver for SI476X MFDAndrey Smirnov2013-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a driver that exposes all the radio related functionality of the Si476x series of chips via the V4L2 subsystem. [mchehab@redhat.com: change it to depends on MFD_SI476X_CORE instead of selecting it; vidioc_s_register now uses const struct] Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | | Merge branch 'topic/r820t' into patchworkMauro Carvalho Chehab2013-04-25
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * topic/r820t: (31 commits) [media] r820t: Don't divide the IF by two [media] r820t: disable auto gain/VGA setting [media] rtl2832: Fix IF calculus [media] r820t: put it into automatic gain mode [media] r820t: Fix hp_cor filter mask [media] r820t: fix PLL calculus [media] r820t: Don't put it in standby if not initialized yet [media] r820t: avoid rewrite all regs when not needed [media] r820t: Allow disabling IMR callibration [media] r820t: add a commented code for GPIO [media] r820t: add IMR calibrate code [media] r820t: proper initialize the PLL register [media] r820t: use usleep_range() [media] r820t: fix prefix of the r820t_read() function [media] r820t: split the function that read cached regs [media] r820t: better report signal strength [media] r820t: add support for diplexer [media] r820t: Show the read data in the bit-reversed order [media] r820t: use the second table for 7MHz [media] r820t: Invert bits for read ops ...
| * | | [media] r820t: Don't divide the IF by twoMauro Carvalho Chehab2013-04-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original Win driver doesn't do; rtl-sdr also disabled that piece of the code. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Tested-by: Antti Palosaari <crope@iki.fi>
| * | | [media] r820t: disable auto gain/VGA settingMauro Carvalho Chehab2013-04-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On field tests, the auto gain routine is not working, nor it is used by the original driver. Let's comment it for now. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Tested-by: Antti Palosaari <crope@iki.fi>
| * | | [media] rtl2832: Fix IF calculusMauro Carvalho Chehab2013-04-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Spectrum is inverted. So, we need to invert it when calculating the value for the IF register Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Tested-by: Antti Palosaari <crope@iki.fi>
| * | | [media] r820t: put it into automatic gain modeMauro Carvalho Chehab2013-04-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, it is putting it on manual mode. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Tested-by: Antti Palosaari <crope@iki.fi>
| * | | [media] r820t: Fix hp_cor filter maskMauro Carvalho Chehab2013-04-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The bit mask was inverted here. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Tested-by: Antti Palosaari <crope@iki.fi>
| * | | [media] r820t: fix PLL calculusMauro Carvalho Chehab2013-04-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a few errors at the PLL calculus, causing the device to use wrong values. While here, change the calculus to use 32 bits, as there's no need for 64 bits there. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Tested-by: Antti Palosaari <crope@iki.fi>
| * | | [media] r820t: Don't put it in standby if not initialized yetMauro Carvalho Chehab2013-04-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r820t_standby() can be called before r820t_init(). If that happens, just do nothing. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Tested-by: Antti Palosaari <crope@iki.fi>
| * | | [media] r820t: avoid rewrite all regs when not neededMauro Carvalho Chehab2013-04-16
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Tested-by: Antti Palosaari <crope@iki.fi>