aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [media] tuner-core: Don't touch at standby during tuner_lookupMauro Carvalho Chehab2011-03-211-1/+0
| | | | | | | | It makes no sense that tuner_lookup would touch at the standby state. Remove it. Thanks-to: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tuner-core: Rearrange some functions to better documentMauro Carvalho Chehab2011-03-211-78/+90
| | | | | | | | | | Group a few functions together and add/fix comments for each block of the driver. This is just a cleanup patch meant to improve driver readability. No functional changes in this patch. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tuner-core: Improve function documentationMauro Carvalho Chehab2011-03-211-23/+116
| | | | | | | | | This driver is complex, and used by everyone. Better to have it properly documented. No functional changes are done in this patch. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tuner-core: remove usage of DIGITAL_TVMauro Carvalho Chehab2011-03-215-20/+11
| | | | | | | | tuner-core has no business to do with digital TV. So, don't use T_DIGITAL_TV on it, as it has no code to distinguish between them, and nobody fills T_DIGITAL_TV right. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] Remove the remaining usages for T_STANDBYMauro Carvalho Chehab2011-03-213-19/+35
| | | | | | | | | tda9887 used to use the T_STANDBY type internally, while tea5761 used it to put the device to sleep. Fix the code for it to work properly with the tuner core changes and remove this flag from tuner.h. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tuner-core: Fix a few comments on itMauro Carvalho Chehab2011-03-211-8/+15
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tuner-core: dead code removalMauro Carvalho Chehab2011-03-211-37/+10
| | | | | | | | | | | | | Remove the now obsolete set_freq. Also merge set_addr and set_type_addr. In the past, it used to have two different setup calls, one to set just the tuner type to any tuner found, and another to set the type only if the address matches. Those two internal calls were grouped together, but the functions weren't merged, making the code uglier. No functional changes are done in this patch. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tuner-core: Don't use a static var for xc5000_cfgMauro Carvalho Chehab2011-03-211-4/+6
| | | | | | | | A static var is evil, especially if a device has two boards with xc5000. Instead, just like the other drivers, use stack to store its config during setup. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tuner-core: CodingStyle cleanupsMauro Carvalho Chehab2011-03-211-45/+47
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tuner-core: do the right thing for suspend/resumeMauro Carvalho Chehab2011-03-211-5/+9
| | | | | | | Power down tuners at suspend. At resume, if the tuner is in standby, calls set_mode, that will turn it on and set the latest frequencies. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tuner-core: Better implement standby modeMauro Carvalho Chehab2011-03-212-95/+95
| | | | | | | | | | | | | | | | | In the past, T_STANDBY were used on devices with a separate radio tuner to mark a tuner that were disabled. With the time, it got newer meanings. Also, due to a bug at the logic, the driver might incorrectly return T_STANDBY to userspace. So, instead of keeping the abuse, just use a boolean for storing such information. We can't remove T_STANDBY yet, as this is used on two other drivers. A latter patch will address its usage outside tuner-core. Thanks-to: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tuner-core: Some cleanups at check_mode/set_modeMauro Carvalho Chehab2011-03-211-30/+42
| | | | | | | | Properly document those functions and do some cleanups around that. There's just one behavior change on this patchset: it will now restore TV frequency when changing from radio to TV mode. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tuner-core: Reorganize the functions internallyMauro Carvalho Chehab2011-03-211-431/+462
| | | | | | | | | | | | This is a big patch with no functional changes. It just rearranges everything inside the driver, and prepares to break TV and Radio into two separate fops groups. Currently, it has an heuristics logic to determine if the call came from radio or video. However, the caller driver knows for sure, so tuner-core shouldn't try to guess it. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tuner-core: move some messages to the proper placeMauro Carvalho Chehab2011-03-211-6/+6
| | | | | | | Move the frequency set debug printk's to the code that actually are changing it. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tuner-core: remove the legacy is_stereo() callMauro Carvalho Chehab2011-03-212-11/+0
| | | | | | Nobody is using this legacy call. Just remove it. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tuner-core: Remove V4L1/V4L2 API switchMauro Carvalho Chehab2011-03-211-21/+0
| | | | | | V4L1 was removed. So, the code there is just dead code. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx88: Don't allow opening a device while it is not readyMauro Carvalho Chehab2011-03-211-10/+12
| | | | | | | | After registering the cdev, it would be possible do have an open on it. In a matter of fact, some versions of udev do this. So, move registration to the end and protect it with a mutex. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx88: use unlocked_ioctl for cx88-video.Mauro Carvalho Chehab2011-03-211-2/+2
| | | | | | | cx88-video has locks. don't use the locked ioctl version, as it is not needed. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx: Add support for PV Xcapture USBMauro Carvalho Chehab2011-03-212-0/+32
| | | | | | | | | | Adds support for Pixelviex Xcapture USB grabber device. This device has one composite and one s-video entry only, plus a button. For now, the button is not supported. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx: Allow some boards to not use I2C port 3Mauro Carvalho Chehab2011-03-212-0/+3
| | | | | | | | Some devices don't need to use it. So allow to just disable this logic. Having it enabled on some devices cause power management to complain, generating error -71. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx: Use parameters to describe some board variantsMauro Carvalho Chehab2011-03-215-28/+30
| | | | | | | | | | | | | | | Instead of per-model tests all over the code, use some parameters at the board entries to describe the model variants for: - devices with 417 MPEG encoder; - devices that use external AV; - devices where vbi VANC endpoint doesn't work; - devices with xc5000 that require different IF initialization (and probably will cover also xc3028). - devices with xceive tuner that require a reset during init. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx: Use a generic check for TUNER_XC5000Mauro Carvalho Chehab2011-03-211-11/+20
| | | | | | | | | | | | The check for xc5000 assumes that the tuner will always be using the same bus and will have the same address. As those are configurable via dev->board, it should use, instead, the values defined there. Also, a similar type of test will be needed by other tuners (for example, for TUNER_XC2028) Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx231xx: Simplify interface checking logic at probeMauro Carvalho Chehab2011-03-211-96/+96
| | | | | | | | Just a cleanup patch. Removes one indent level by moving the return -ENODEV to happen before the device register logic, if the interface is not the audio/video (int 1). Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tuner-xc2028: More firmware loading retriesAlina Friedrichsen2011-03-211-3/+3
| | | | | | | My Hauppauge WinTV HVR-1400 needs sometimes more then only one retry to load the firmware successfully. Signed-off-by: Alina Friedrichsen <x-alina@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] double mutex lock in drivers/media/radio/si470x/radio-si470x-iceberg2011-03-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | KERNEL_VERSION: 2.6.37 common.c in function ssize_t si470x_fops_read. 1. First mutex_lock on &radio->lock in line 441 2. Second in line 462 I think that mutex in line 462 is not needed. 433static ssize_t si470x_fops_read(struct file *file, char __user *buf, 434 size_t count, loff_t *ppos) 435{ .... 441 mutex_lock(&radio->lock); 442 if ((radio->registers[SYSCONFIG1] & SYSCONFIG1_RDS) == 0) 443 si470x_rds_on(radio); 444 445 /* block if no new data available */ 446 while (radio->wr_index == radio->rd_index) { 447 if (file->f_flags & O_NONBLOCK) { 448 retval = -EWOULDBLOCK; 449 goto done; 450 } 451 if (wait_event_interruptible(radio->read_queue, 452 radio->wr_index != radio->rd_index) < 0) { 453 retval = -EINTR; 454 goto done; 455 } 456 } 457 458 /* calculate block count from byte count */ 459 count /= 3; 460 461 /* copy RDS block out of internal buffer and to user buffer */ 462 mutex_lock(&radio->lock); Found by Linux Device Drivers Verification Project Remove second mutex. Signed-off-by: Alexander Strakh <strakh@ispras.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tm6000: add/rework reg.definesDmitri Belimov2011-03-211-3/+60
| | | | | | | | Rework registers defines. Add TM6000 specific registers defines. Add marks and comments for TM6010 specific registers. Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cpia2: convert to video_ioctl2Hans Verkuil2011-03-211-247/+126
| | | | | | | Unable to test this due to lack of hardware. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] pwc: convert to video_ioctl2Hans Verkuil2011-03-213-565/+494
| | | | | | | Tested with a Logitech QuickCam Pro 4000. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] pwc: convert to core-assisted lockingHans Verkuil2011-03-212-13/+5
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] vivi: fix compiler warningHans Verkuil2011-03-211-2/+2
| | | | | | | drivers/media/video/vivi.c:1059: warning: this decimal constant is unsigned only in ISO C90 Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] vivi: convert to the control framework and add test controlsHans Verkuil2011-03-211-89/+139
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tvp7002: use control frameworkHans Verkuil2011-03-211-74/+43
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] vpx3220: use control frameworkHans Verkuil2011-03-211-86/+51
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tvp5150: use the control frameworkHans Verkuil2011-03-211-111/+46
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tvp514x: use the control frameworkHans Verkuil2011-03-211-179/+57
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tlv320aic23b: use control frameworkHans Verkuil2011-03-211-27/+47
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] saa7110: use control frameworkHans Verkuil2011-03-211-69/+46
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] bt819: use control frameworkHans Verkuil2011-03-211-80/+49
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] adv7343: use control frameworkHans Verkuil2011-03-212-112/+63
| | | | | | | | Also fixed a memory leak in the probe function if an error occurred. The gain control range was also fixed (a proper range from -64 to 64). Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx18: Use the control frameworkHans Verkuil2011-03-2112-512/+173
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cs5345: use the control frameworkHans Verkuil2011-03-211-28/+59
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] technisat-usb2: CodingStyle cleanupsMauro Carvalho Chehab2011-03-211-7/+6
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] add support for Encore FM3Mauro Carvalho Chehab2011-03-213-0/+41
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] saa7134: Properly report when a board doesn't have eepromMauro Carvalho Chehab2011-03-211-12/+23
| | | | | | | | | | | | When a device is not detected, the driver prints a warning message. That's ok, except for the fact that, even on newer devices that have eeprom but aren't yet supported, it prints a message saying that the device doesn't have eeprom. Fix it by having a separate message for devices with eeprom, but not yet known by the driver. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tuner-simple: add support for Tena TNF5337 MFDMauro Carvalho Chehab2011-03-212-0/+22
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] DocBook/v4l: fix validation errorsHans Verkuil2011-03-212-7/+8
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l: vivi: port to videobuf2Pawel Osciak2011-03-212-159/+200
| | | | | | | | | | | Make vivi use videobuf2 in place of videobuf. Signed-off-by: Pawel Osciak <p.osciak@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> CC: Pawel Osciak <pawel@osciak.com> Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] ngene: Fix compilation when cxd2099 is not enabledMauro Carvalho Chehab2011-03-211-1/+1
| | | | | | | | | | | | | | drivers/media/dvb/ngene/ngene-i2c.o: In function `cxd2099_attach': ngene-i2c.c:(.text+0x195): multiple definition of `cxd2099_attach' drivers/media/dvb/ngene/ngene-core.o:ngene-core.c:(.text+0x100): first defined here drivers/media/dvb/ngene/ngene-cards.o: In function `cxd2099_attach': ngene-cards.c:(.text+0x116): multiple definition of `cxd2099_attach' drivers/media/dvb/ngene/ngene-core.o:ngene-core.c:(.text+0x100): first defined here drivers/media/dvb/ngene/ngene-dvb.o: In function `cxd2099_attach': ngene-dvb.c:(.text+0x7ad): multiple definition of `cxd2099_attach' drivers/media/dvb/ngene/ngene-core.o:ngene-core.c:(.text+0x100): first defined here Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] Move CI cxd2099 driver to stagingMauro Carvalho Chehab2011-03-218-1/+44
| | | | | | | | | | This driver is abusing the kernel<=>userspace API, due to the lack of a proper solution for it. A discussion were done at: http://www.mail-archive.com/linux-media@vger.kernel.org/msg22196.html But there's not a solution for it yet. So, move the driver to staging, while we don't have a final solution. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] stv090x: 22kHz workaround must also be performed for the 2nd frontendOliver Endriss2011-03-211-15/+11
| | | | | | | | 22kHz workaround must also be performed for the 2nd frontend. Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>