summaryrefslogtreecommitdiff
path: root/drivers/media/video/cx18/cx18-driver.c
AgeCommit message (Collapse)Author
2011-05-20[media] cx18: Make RF analog TV work for newer HVR-1600 models with silicon ↵Andy Walls
tuners A previous changes which added the newer model HVR-1600's and DTV support for them, neglected to add RF analog TV for them. Fix RF analog TV for the newer HVR-1600's which have a worldwide analog tuner assembly with a TDA18271 tuner and TDA8295 demodulator. Thanks go to Jeff Campbell and Mike Bradley for reproting the problem, and also to Mike Bradley for doing a lot of the legwork to figure out the tuner reset GPIO line, the demodulator I2C address, and that the GPIOs have to be reinitialized after a cardtype switch. Reported-by: Jeff Campbell <jac1dlists@gmail.com> Tested-by: Andy Walls <awalls@md.metrocast.net> 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>
2011-03-21[media] cx18: fix kernel oops when setting MPEG control before capturingHans Verkuil
The cxhdl->priv field was not set initially, only after capturing started. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Acked-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21[media] cx18: Use the control frameworkHans Verkuil
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-02[media] cx18: Add support for Hauppauge HVR-1600 models with s5h1411Devin Heitmueller
The newest variants of the HVR-1600 have an s5h1411/tda18271 for the digital frontend. Add support for these boards. Thanks to Hauppauge Computer Works for providing sample hardware. [awalls@md.metrocast.net: Changed an additional log message to clarify for the end user that the driver is defaulting to an original HVR-1600 for unknown model numbers.] Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-19[media] v4l/cx18: update workqueue usageTejun Heo
With cmwq, there's no reason to use separate out_work_queue. Drop it and use system_wq instead. The in_work_queue needs to be ordered so can't use one of the system wqs; however, as it isn't used to reclaim memory, allocate the workqueue with alloc_ordered_workqueue() without WQ_MEM_RECLAIM. Signed-off-by: Tejun Heo <tj@kernel.org> Reviewed-by: Andy Walls <awalls@md.metrocast.net> Acked-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-07Merge branch 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wqLinus Torvalds
* 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: (33 commits) usb: don't use flush_scheduled_work() speedtch: don't abuse struct delayed_work media/video: don't use flush_scheduled_work() media/video: explicitly flush request_module work ioc4: use static work_struct for ioc4_load_modules() init: don't call flush_scheduled_work() from do_initcalls() s390: don't use flush_scheduled_work() rtc: don't use flush_scheduled_work() mmc: update workqueue usages mfd: update workqueue usages dvb: don't use flush_scheduled_work() leds-wm8350: don't use flush_scheduled_work() mISDN: don't use flush_scheduled_work() macintosh/ams: don't use flush_scheduled_work() vmwgfx: don't use flush_scheduled_work() tpm: don't use flush_scheduled_work() sonypi: don't use flush_scheduled_work() hvsi: don't use flush_scheduled_work() xen: don't use flush_scheduled_work() gdrom: don't use flush_scheduled_work() ... Fixed up trivial conflict in drivers/media/video/bt8xx/bttv-input.c as per Tejun.
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-12-29[media] Patch for cx18 module with added support of GoTView PCI DVD3 Hybrid ↵Alexey Chernov
tuner I've got code which adds support of GoTView PCI DVD3 Hybrid tuner in cx18 module and Andy Walls in ivtv mailing-list gave me some advice on making a patch and sending it here. So here's the patch against staging/2.6.37-rc1 branch (the tutorial recommends to include it as plain text but if it's the case I can surely send as an attachment): Several comments on the patch: 1. Both users on the official Gotview forum and support said that PCI DVD3 is very similar to Yuan MPC718 card so the main part of code is taken from Yuan configuration. Some users reported it to work properly. 2. Everything is being initialized correctly including analog, dvb, radio and alsa parts. Analogue part and alsa virtual card is tested by myself using original Gotview card. [mchehab@redhat.com: Whitespace cleanups] Signed-off-by: Alexey Chernov <4ernov@gmail.com> Signed-off-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-24media/video: explicitly flush request_module workTejun Heo
Video drivers request submodules using a work during probe and calls flush_scheduled_work() on exit to make sure the work is complete before being unloaded. This patch makes these drivers flush the work directly instead of using flush_scheduled_work(). While at it, relocate request_submodules() call in saa7134_initdev() right right before successful return as in other drivers to avoid failing after the work is scheduled and returning failure without the work still active. This is in preparation for the deprecation of flush_scheduled_work(). Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
2010-06-01V4L/DVB: cx18, cx23885, v4l2 doc, MAINTAINERS: Update Andy Walls' email addressAndy Walls
A trivial change to update my email address from my dead awalls@radix.net address to my current awalls@md.metrocast.net address. Signed-off-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26cx18: Fix compilation when CONFIG_MODULE is disabledMauro Carvalho Chehab
drivers/media/video/cx18/cx18-driver.c:252: warning: ‘request_modules’ used but never defined Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26V4L/DVB: cx18: codingstyle fixesDevin Heitmueller
Codingstyle fixes, some introduced as a result of the ALSA work, some pre-existing. This patch is a whitespace change only. This work was sponsored by ONELAN Limited. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26V4L/DVB: cx18: rework cx18-alsa module loading to support automatic loadingDevin Heitmueller
Restructure the way the module gets loaded so that it gets loaded automatically when cx18 is loaded, and make it work properly if there are multiple cards present (since the old code would only take one opportunity to connect to cx18 instances when the module first loaded). This work was sponsored by ONELAN Limited. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26V4L/DVB (13902): cx18: Update MPEG Index stream buffers module option processingAndy Walls
Update the module options related to INDEX stream buffer allocation. A single CX2341[5678] index entry is only 24 bytes. Large buffers for the IDX stream will prevent the CX23418 from transferring index data over at all. Buffers of around 1.5 kB or 64 index entries seem to be just fine. We'll default to 63 buffers/MDLs as that is the firmware limit per stream and IDX stream buffers are not high rate. There is no reason on earth to allocate the previous 1 MB default of buffer space for the IDX stream. This is in anticipation of implementing the G_ENC_INDEX ioctl() in the cx18 driver. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13478): cx18: remove bogus init call.Hans Verkuil
The cx18 av core implemented an init call for no good reason. It's now turned into an internal function. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Reviewed-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13432): cx18: Adjust encoder VBI MDL size to be exactly frame's ↵Andy Walls
worth of VBI data Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13430): cx18: Fix YUV capture so that encoder passes a single frame ↵Andy Walls
per transfer Fix YUV capture such that the encoder will pass one frame per transfer. This will allow the application to maintain frame alignment when a transfer from the encoder is missed due to high system latency in service the CX23418 IRQ. Also force YUV buffer sizes to be specified in multiples of 33.75 kB, the smalled amount of buffer sizes need to store a complete set of HM12 4:2:0 macroblocks specifying 32 lines of the frame. A full 60Hz/525 line screen requires 15 * 33.75 kB per frame and a full 50Hz/625 line screen requires 18 * 33.75 kB per frame so the default buffer size is 3 * 33.75 kB, requiring exactly 5 or 6 buffers per MDL respectively. The bytes needed per frame and hence MDL need not be the bytes in an integer number of buffers. However, if frame artifacts are seen with scaled screen sizes, the YUV buffer size can be set 34 kB (33.75 kB) to get rid of the artifacts at the cost of more copies between the kernel and userspace. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13429): cx18: Add Memory Descriptor List (MDL) layer to buffer handlingAndy Walls
Add a Memory Descriptor List (MDL) layer to buffer handling to implement scatter-gather I/O. Currently there is still only 1 buffer per MDL. 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 (12207): cx18: Add an EEPROM dump routine for the Yuan MPC718 and ↵Andy Walls
future cards Add a routine for dumping the EEPROM of the MPC718. It is generic enough to use for other cards in the future that may have an EEPROM. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11950): cx18: Split LeadTek PVR2100 and DVR3100 H into 2 separate ↵Andy Walls
card entries Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11752): cx18: Add missing newline to tuner detection error messageAndy Walls
Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11619): cx18: Simplify the work handler for outgoing mailbox commandsAndy Walls
Simplify the way outgoing work handler gets scheduled to send empty buffers back to the firmware for use. Also reduced the memory required for scheduling this outgoing work, by using a single, per stream work object. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11616): cx18: Add a work queue for deferring empty buffer handoffs ↵Andy Walls
to the firmware This change defers sending all CX18_CPU_DE_SET_MDL commands, for a stream with an ongoing capture, by adding a work queue to handle sending such commands when needed. This prevents any sleeps, caused by notifying the firmware of new usable buffers, when a V4L2 application read() is being satisfied or when an incoming buffer is processed by the cx18-NN-in work queue thread. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11615): cx18: Rename the work queue to "in_work_queue"Andy Walls
Rename the work queue to "in_work_queue" to indicate it is handling incoming mailbox commands. This is preparation for adding a work queue for handling deferrable outgoing mailbox commands. Signed-off-by: Andy Walls <awalls@radix.net> 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 (10850): cx18: Use strlcpy() instead of strncpy() for temp eeprom ↵Andy Walls
i2c_client setup Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (10764): cx18: Disable AC3 controls as the firmware doesn't support AC3Andy Walls
Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (10762): cx18: Get rid of unused variables related to video outputAndy Walls
Remove variables that were holdovers from ivtv for supporting the CX23415 MPEG decoder output. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (10761): cx18: Change log lines for internal subdevs and fix ↵Andy Walls
tveeprom reads Give messages originating from internal subdevs a header using the subdev's name. Fixed an uninitialized variable problem with reading the EEPROM, noticed from log output. Got rid of the unused cx18_av_exit() function. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (10760): cx18: Fix a memory leak of buffers used for sliced VBI ↵Andy Walls
insertion We leaked buffers every time a device was removed, if the user had enabled sliced VBI insertion into the MPEG stream. MythTV uses that. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (10759): cx18: Convert GPIO connected functions to act as ↵Andy Walls
v4l2_subdevices Convert GPIO line functions, such a audio routing and device resets, to v4l2_subdevices. This essentially completes the conversion of cx18 to the v4l2_device/v4l2_subdevice framework. No regression testing has taken place as of yet. Also an ivtv legacy bug with GPIO mux routing and going to/from radio mode was commented, but not fixed. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (10758): cx18: Convert I2C devices to v4l2_subdevicesAndy Walls
This is a major perturbation to cx18 I2C device handling to convert it to the v4l2_device/subdeivce framework. This change breaks GPIO audio multiplexer control for the time being. It will be fixed in a coming change. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (10757): cx18, v4l2-chip-ident: Finish conversion of AV decoder core ↵Andy Walls
to v4l2_subdev Added a new chip identifer to v4l2-chip-ident for the integrated A/V broadcast decoder core internal to the CX23418. Completed separation and encapsulation of the A/V decoder core interface as a v4l2_subdevice. The cx18 driver now compiles and links again. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (10756): cx18: Slim down instance handling, build names from ↵Andy Walls
v4l2_device.name Convert card instance handling to a lighter weight mechanism like ivtv. Also convert name strings and debug messages to use v4l2_device.name. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (10446): cx18: Finally get sliced VBI working - for 525 line 60 Hz ↵Andy Walls
systems at least Sliced VBI, in the manner that ivtv implements it as a separate data stream, now works for 525 line 60 Hz systems like NTSC-M. It may work for 625 line 50 Hz systems, but I have more engineering work to do, to verify it is operating properly. Sliced data insertion into the MPEG PS should be working, but is untested. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (10445): cx18: Process Raw VBI on a whole frame basis; fix VBI ↵Andy Walls
buffer size The cx23418 appears to send Raw VBI buffers with a PTS on a per frame basis, not per field, so process Raw VBI on a whole frame basis and reduce some complexity. Fix VBI buffer size computation to handle a whole frame of Raw VBI for a 625 line system, which is the worst case and will work for 525 lines systems as well. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (10439): cx18: Clean-up and enable sliced VBI handlingAndy Walls
Removed legacy ivtv state variables, added comments, and cleaned up sliced VBI related code. Enabled sliced VBI. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (10437): cx18: Remove an unused spinlockAndy Walls
Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (10435): cx18: Normalize APU after second APU firmware loadAndy Walls
Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (10284): cx18: Add initial entry for a Leadtek DVR3100 H hybrid cardAndy Walls
Card report provided by Patryk on the ivtv-devel list: http://ivtvdriver.org/pipermail/ivtv-devel/2009-January/005922.html Reported-by: Pat <tatyrza@mm.pl> Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (10283): cx18: Call request_module() with proper argument types.Andy Walls
request_module() needs to be called with a string literal for a format string or with 1 or more variable arguments to avoid compiler warnings and possible exploits, if someone could cause us to get a format string with a '%' code in the format string when we make the call. Reported-by: Brandon Jenkins <bcjenkins@tvwhere.com> Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (10281): cx18: Conversion to new V4L2 framework: use v4l2_device objectAndy Walls
First step in conversion to the new V4L2 framework. Added per cx18 device instance of the v4l2_device and its registration. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (10280): cx18: Rename structure members: dev to pci_dev and v4l2dev ↵Andy Walls
to video_dev Renamed structure member name to be more specific to type in anticipation of updating to the v4l2_device/v4l2_subdev framework. Too many objects named "dev" and /v4l2_\{0,1\}dev/ would be to confusing. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (10278): cx18: Fix bad audio in first analog capture.Andy Walls
Normalize the APU state before the second firmware load so that audio for the first analog capture is correct. Many thanks to Conexant for supporting me in finding a solution for this problem. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (10277): cx18, cx2341x: Fix bugs in cx18 AC3 control and comply with ↵Andy Walls
V4L2 spec Fix bugs in the cx18 AC3 control implementation that would have affected ivtv and other drivers via the cx2341x module. Bring AC3 controls behavior into comliance with V4L2 specification. Thanks to Hans Verkuil for reviewing the previous patch and pointing out the problems. Reported-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (10276): cx18, cx2341x, ivtv: Add AC-3 audio encoding control to cx18Andy Walls
Initial addition of controls to set AC-3 audio encoding for the CX23418 - it does not work yet due to firmware or cx18 driver issues. This change affects the common cx2341x and ivtv modules due to shared structures and common functions. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30V4L/DVB (9895): cx18: Refine the firmware load and firmware startup processAndy Walls
Refine the firmware load and firmware startup process. Significant changes are to ensure the SCB and IPC area are correct before starting up the firmware, and letting the CPU firmware start up the APU firmware for us. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>