summaryrefslogtreecommitdiff
path: root/drivers/media/video/ivtv/ivtv-driver.c
AgeCommit message (Collapse)Author
2011-06-01[media] ivtv: Internally separate encoder & decoder standard settingIan Armstrong
Internally separates the setting of the broadcast standard for the encoder & decoder. Externally there's no change in functionality. [awalls@md.metrocast.net: Edited to fix a checkpatch gripe about multiple assignment and to remove a now unused DEFINE_WAIT() due to this patch] Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20[media] use pci_dev->revisionBjørn Mork
pci_setup_device() has saved the PCI revision in the pci_dev struct since Linux 2.6.23. Use it. Cc: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29[media] ivtv, cx18: Make ioremap failure messages more useful for usersAndy Walls
The error messages these drivers emitted for ioremap() failures were misleading and not helpful for users. Reworded those messages to help the user take action to resolve vmalloc address space exhaustion. Signed-off-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-08V4L/DVB: ivtv: convert to the new control frameworkHans Verkuil
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-08V4L/DVB: ivtv: convert gpio subdev to new control frameworkHans Verkuil
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-08V4L/DVB: cx25840/ivtv: replace ugly priv control with s_configHans Verkuil
The cx25840 used a private control CX25840_CID_ENABLE_PVR150_WORKAROUND to be told whether to enable a workaround for certain pvr150 cards. This is really config data that it needs to get at load time. Implemented this in cx25840 and ivtv. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-07Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wqLinus Torvalds
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: (55 commits) workqueue: mark init_workqueues() as early_initcall() workqueue: explain for_each_*cwq_cpu() iterators fscache: fix build on !CONFIG_SYSCTL slow-work: kill it gfs2: use workqueue instead of slow-work drm: use workqueue instead of slow-work cifs: use workqueue instead of slow-work fscache: drop references to slow-work fscache: convert operation to use workqueue instead of slow-work fscache: convert object to use workqueue instead of slow-work workqueue: fix how cpu number is stored in work->data workqueue: fix mayday_mask handling on UP workqueue: fix build problem on !CONFIG_SMP workqueue: fix locking in retry path of maybe_create_worker() async: use workqueue for worker pool workqueue: remove WQ_SINGLE_CPU and use WQ_UNBOUND instead workqueue: implement unbound workqueue workqueue: prepare for WQ_UNBOUND implementation libata: take advantage of cmwq and remove concurrency limitations workqueue: fix worker management invocation without pending works ... Fixed up conflicts in fs/cifs/* as per Tejun. Other trivial conflicts in include/linux/workqueue.h, kernel/trace/Kconfig and kernel/workqueue.c
2010-08-02V4L/DVB: ivtv: Automatic firmware reloadIan Armstrong
If the firmware has failed, this patch will automatically reload & restart the card. The previous card state will be restored on a successful restart. Firmware reload will only happen if neither the encoder or decoder is active. If the card is busy then behaviour is as before, returning -EIO on device access until the reload can occur. On cards that support video output, coloured bars will be displayed during the reload. Andy Walls (ivtv maintainer and patch committer) made minor tweaks to comments and the logged messages, but nothing substantial otherwise. Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: ivtv: Add firmare monitoring and debug mode to ignore firmware problemsIan Armstrong
>From Ian's e-mail: When a device is opened the firmware state will be checked. If it isn't responding then the open will fail with -EIO. Due to the nature of the hardware, a single failed check will block everything since we don't know exactly what has failed. A side effect of this is the blocking of debug access, so an additional debug level has been created which allows the block to be bypassed. Andy Walls' modifications: I modified Ian's patch to add a separate fw_debug module parameter to change the driver's behavior, as opposed to using the normal debug module parameter. The fw_debug module parameter is only available when CONFIG_VIDEO_ADV_DEBUG is set. I also made some minor whitespace adjustments and changed some warning messages to be a bit more specific. s/happy/glad/g Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-06-29ivtv: use kthread_worker instead of workqueueTejun Heo
Upcoming workqueue updates will no longer guarantee fixed workqueue to worker kthread association, so giving RT priority to the irq worker won't work. Use kthread_worker which guarantees specific kthread association instead. This also makes setting the priority cleaner. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Andy Walls <awalls@md.metrocast.net> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: ivtv-devel@ivtvdriver.org Cc: linux-media@vger.kernel.org
2010-05-18V4L/DVB: ivtv: Avoid hard system lock on decoder output mode changeIan Armstrong
Changing the decoder video standard just prior to, or during, the output of the lower field may result in a hard system lock. To avoid this, try to ensure the firmware call occurs only during the first 100 lines of the top field. (Minor comment addition and a line break added Andy Walls <awalls@radix.net>.) Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26V4L/DVB: ivtv: Add initial entry for Sony VAIO Giga Pocket (Kikyou) cardsEric Anderson
This is a slightly modified version of Eric Anderson's original patch for the Sony Giga Pocket board. It has been updated to apply to the latest ivtv driver version by Hans Verkuil <hverkuil@xs4all.nl> and Andy Walls <awalls@radix.net>. Also Andy Walls modified the patch to use a new Sony BTF-Pnx01Z tuner entry based on Eric Anderson's experimental findings for the bandswitch. >From Eric Anderson's original email: 1. The tuner on the card doesn't seem to match any standard ones. I modified an existing tuner entry. Ideally a new tuner entry should be created. (The only difference from the one I modified is that the low-to-mid range frequency cut-off is slightly different, as are the bit config settings.) 2. It wasn't obvious how to choose a second audio input other than using "radio" as an option. Basically there's two GPIO audio inputs. Using radio allowed me to avoid major restructuring to the code. (perhaps other cards don't have this often...) 3. It's not clear that there's a mute setting that works. Not sure why. 4. I haven't had a chance to test the two Svideo inputs. I set them to COMPOSITE1 and SVIDEO2, but I'm not sure those are the correct settings. The standard composite video inputs seem to work. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13446): ivtv: Add more explicit detection of known IR devices for ↵Andy Walls
Hauppauge cards Avoid legacy IR I2C probing for PVR-150, PVR-500, and PVR-350 cards. This still probes, but restricts the possbile addresses probed per card. Also removed legacy probe addresses for the KNC and PixelView cards which are not supported by ivtv as far as I know. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13443): ivtv: Defer legacy I2C IR probing until after setup of ↵Andy Walls
known I2C devices This avoids collisions of legacy IR controller probing with known I2C devices in the card definitions in ivtv-cards.c. I2C driver modules for device listed explicitly in a card definition should always take precedence over a probe guessing where and IR controller may be. Reviewed-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13442): ivtv: Add module parameter to adjust I2C SCL clock period ↵Andy Walls
per board Add a module parameter to adjust I2C SCL clock period per board. This allows some experimental fine tuning by end users to overcome quirky I2C device problems. Reported-by: "Aleksandr V. Piskunov" <aleksandr.v.piskunov@gmail.com> Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13288): adding __init/__exit macros to various driversPeter Huewe
Trivial patch which adds the __init/__exit macros to the module_init/ module_exit functions of the following drivers in media video: drivers/media/video/ivtv/ivtv-driver.c drivers/media/video/cx18/cx18-driver.c drivers/media/video/davinci/dm355_ccdc.c drivers/media/video/davinci/dm644x_ccdc.c drivers/media/video/saa7164/saa7164-core.c drivers/media/video/saa7134/saa7134-core.c drivers/media/video/cx23885/cx23885-core.c Cc: Hermann Pitton <hermann-pitton@arcor.de> Acked-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Acked-by: Andy Walls <awalls@radix.net> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Muralidharan Karicheri <m-karicheri2@ti.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19V4L/DVB (12723): ivtv/cx18: replace 'kernel number' with 'device node number'.Hans Verkuil
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12V4L/DVB (12209): ivtv: Add card entry for AVerMedia UltraTV 1500 MCE (M113 ↵Andy Walls
variant) Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12V4L/DVB (12198): ivtv-driver.c: Remove unnecessary semicolonsJoe Perches
Cc: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11932): ivtv: Add missing newlineAndy Walls
Reported-by: Martin Dauskardt <martin.dauskardt@gmx.de> Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11672): ivtv: use v4l2_device_set_name.Hans Verkuil
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-05-09V4L/DVB (11668): ivtv: fix compiler warning.Hans Verkuil
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06V4L/DVB (11377): v4l: increase version numbers of drivers converted to ↵Hans Verkuil
v4l2_subdev. With all the v4l2_subdev changes that were made to these drivers it is a good idea to increase the version number of each driver. It's just the patch level that is increased, except for the zoran and saa7146 drivers where the minor number was increased due to the more substantial changes that were made to those two drivers. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06V4L/DVB (11369): v4l2-subdev: add load_fw and use that instead of abusing ↵Hans Verkuil
core->init. The init callback was used in several places to load firmware. Make a separate load_fw callback for that. This makes the code a lot more understandable. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (10488): ivtv: cleanup naming conventionsHans Verkuil
Use consistent naming for pci_dev, v4l2_device and video_device. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29V4L/DVB (10229): ivtv: fix memory leakHans Verkuil
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02V4L/DVB (10141): v4l2: debugging API changed to match against driver name ↵Hans Verkuil
instead of ID. Since the i2c driver ID will be removed in the near future we have to modify the v4l2 debugging API to use the driver name instead of driver ID. Note that this API is not used in applications other than v4l2-dbg.cpp as it is for debugging and testing only. Should anyone use the old VIDIOC_G_CHIP_IDENT, then this will be logged with a warning that it is deprecated and will be removed in 2.6.30. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30V4L/DVB (9835): ivtv/ivtvfb: convert to v4l2_device/v4l2_subdev.Hans Verkuil
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11V4L/DVB (9506): ivtv/cx18: fix test whether modules should be loaded or not.Hans Verkuil
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21V4L/DVB (9326): ivtv: avoid green flashing when loading ivtvMartin Dauskardt
When loading ivtv the TV-out of the PVR-350 will flash green since the saa712x is activated before the MPEG decoder has been initialized. Deactivate the saa712x until the MPEG decoder has been initialized. Signed-off-by: Martin Dauskardt <martin.dauskardt@gmx.de> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13V4L/DVB (9162): ivtv: fix raw/sliced VBI mixupHans Verkuil
The service_set field was used in saa7115 and cx25840 to determine whether raw or sliced VBI was desired. This is incorrect since it is perfectly valid to select sliced VBI with a service_set of 0. Instead these drivers should checked on VIDIOC_S_FMT whether the type field matches the raw or sliced VBI type. Updated ivtv accordingly. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12V4L/DVB (9133): v4l: disconnect kernel number from minorHans Verkuil
The v4l core creates four different video devices (video, vbi, radio, vtx) and each has its own range of minor numbers. However, modern devices keep increasing the number of devices that they need so a maximum of 64 video devices will not be enough in the future. In addition this scheme makes it very hard to add new device types. This patch disconnects the kernel number allocation (e.g. video0, video1, etc.) from the actual minor number (just pick the first free minor). This allows for much more flexibility in the future. However, it does require the use of udev. For those who cannot use udev a new CONFIG option was created that changes the allocation scheme back to the old behavior. Thanks to Greg KH for suggesting this approach during the 2008 LPC. In addition, several bugs were fixed in the ivtv and cx18 drivers: these drivers try to allocate specific kernel numbers but that scheme contained a bug which caused what should have been e.g. video17 to appear as e.g. video2. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12V4L/DVB: follow lspci device/vendor styleBjorn Helgaas
Use "[%04x:%04x]" for PCI vendor/device IDs to follow the format used by lspci(8). Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03V4L/DVB (8648): ivtv: improve CC supportHans Verkuil
- change the work-queue to a single threaded high prio workqueue - use DMA instead of PIO for the sliced VBI data. - remove some incorrect tests - increase the internal VBI capture queue size for sliced VBI packets - ignore duplicate VBI lines With these changes it should finally be possible to get reliable closed captions. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-26V4L/DVB (8479): tveeprom/ivtv: fix usage of has_ir fieldHans Verkuil
has_ir was set to and compared to -1 in several cases, even though it is an u32. ivtv also contained a FIXME for an old kernel that could be removed. Thanks to Roel Kluin for creating an initial patch for this. Although I chose a different solution here it did help in pointing out the problem. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8164): cx18/ivtv: choose a better initial TV standard for cards ↵Hans Verkuil
without eeprom. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8079): ivtv: Convert to video_ioctl2.Hans Verkuil
Based on an initial conversion patch from Douglas Landgraf. Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (7926): ivtv: add support for the Buffalo PC-MV5L/PCI card.Hans Verkuil
Thanks to Peter Brandt for doing the necessary tests to fill out the card definition! Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (7924): ivtv/cx18: snprintf fixesJean Delvare
snprinf() takes the trailing \0 into account in its length calculations, so there is no need to subtract 1 to the buffer size. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-05-14V4L/DVB (7854): cx18/ivtv: improve and fix out-of-memory handlingHans Verkuil
- don't show kernel backtrace when the allocation of the buffers fails: the normal ivtv/cx18 messages are clear enough and the backtrace scares users. - fix cleanup after the buffer allocation fails (caused kernel panic). Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-05-14V4L/DVB (7853): ivtv/cx18: fix compile warningsHans Verkuil
Fix compile warnings if MODULE is not defined. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-30V4L/DVB (7792): ivtv: correct misspelled "HIMEM4G" to "HIGHMEM4G" in error ↵Robert P. J. Day
message Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-29Rename common tuner Kconfig names to use the sameMauro Carvalho Chehab
namespace for all of them.
2008-04-29V4L/DVB (7757): ivtv: add autodetect for the AVermedia M104 cardHans Verkuil
Note that this card is only detected and not yet working. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-29V4L/DVB (7755): ivtv: add support for card comments and detected but ↵Hans Verkuil
unsupported cards Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-29V4L/DVB (7754): ivtv: change initialization order to fix an oops when device ↵Hans Verkuil
registration failed Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24V4L/DVB (7535): saa717x: add new audio/video decoder i2c driverHans Verkuil
Added the last remaining out-of-tree kernel driver from the ivtv project. The saa717x is used in several Japanese cards and a Russian card. The driver is not complete in that only NTSC is supported and no PAL/SECAM. Hopefully this will be added in the future. Signed-off-by: Takahiro Adachi <tadachi@tadachi-net.com> Signed-off-by: Kyuma Ohta <whatisthis@jcom.home.ne.jp> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24V4L/DVB (7341): ivtv: rename tunerhz to tunertypeHans Verkuil
There are two tuner types: those for M/N standards and those for all others. However, M/N standards are not always 60 Hz (PAL-N/Nc are 50 Hz), so rename the module option accordingly. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24V4L/DVB (7340): ivtv: fix tunerhz bug: PAL-N(c) is 50 Hz, not 60Hans Verkuil
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24V4L/DVB (7338): ivtv: improve pal/secam module options, add tunerhz module ↵Hans Verkuil
option Allow options like pal=bgh, improve description of those options. Add tunerhz option: 50=card has 50Hz tuner, 60=card has 60Hz tuner. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>