aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/cx88/cx88-video.c
AgeCommit message (Collapse)Author
2009-01-22MERGE-via-pending-tracking-hist-MERGE-via-stable-tracking-MERGE-via-mokopatc ↵merge
hes-tracking-fix-stray-endmenu-patch-1232632040-1232632141 pending-tracking-hist top was MERGE-via-stable-tracking-MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040-1232632141 / fdf777a63bcb59e0dfd78bfe2c6242e01f6d4eb9 ... parent commitmessage: From: merge <null@invalid> MERGE-via-stable-tracking-hist-MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040 stable-tracking-hist top was MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040 / 90463bfd2d5a3c8b52f6e6d71024a00e052b0ced ... parent commitmessage: From: merge <null@invalid> MERGE-via-mokopatches-tracking-hist-fix-stray-endmenu-patch mokopatches-tracking-hist top was fix-stray-endmenu-patch / 3630e0be570de8057e7f8d2fe501ed353cdf34e6 ... parent commitmessage: From: Andy Green <andy@openmoko.com> fix-stray-endmenu.patch Signed-off-by: Andy Green <andy@openmoko.com>
2008-10-21V4L/DVB (9327): v4l: use video_device.num instead of minor in video%dHans Verkuil
The kernel number of a v4l2 node (e.g. videoX, radioX or vbiX) is now independent of the minor number. So instead of using the minor field of the video_device struct one has to use the num field: this always contains the kernel number of the device node. I forgot about this when I did the v4l2 core change, so this patch converts all drivers that use it in one go. Luckily the change is trivial. Cc: michael@mihu.de Cc: mchehab@infradead.org Cc: corbet@lwn.net Cc: luca.risolia@studio.unibo.it Cc: isely@pobox.com Cc: pe1rxq@amsat.org Cc: royale@zerezo.com Cc: mkrufky@linuxtv.org Cc: stoth@linuxtv.org Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17V4L/DVB (9269): cx88: add I2S-ADC tvaudio methodDarron Broad
This adds I2S-ADC tvaudio mode as a formal method of audio delivery. This fixes one bug and adds fm audio via I2S-ADC on cards that support it. The bug occured before when I2S-ADC mode was initiated on composite/s-video open but was then reset within 500ms by the audio thread which used any previous audio tuning details. Signed-off-by: Darron Broad <darron@kewl.org> Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12V4L/DVB (9069): cx88: Bugfix: all client disconnects put the frontend to sleep.Darron Broad
From the author: "This fixes the problem where previously all client disconnects put the analogue frontend into standby. In the following example, the first command is succesfully watching TV but the second command which returns EBUSY detunes the receiver by entering it into the standby state. tvtime -d /dev/video0 & cat /dev/video0 " Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Darron Broad <darron@kewl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12V4L/DVB (8613): v4l: move BKL down to the driver level.Hans Verkuil
The BKL is now moved from the video_open function in v4l2-dev.c to the various drivers. It seems about a third of the drivers already has a lock of some sort protecting the open(), another third uses video_exclusive_open (yuck!) and the last third required adding the BKL in their open function. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-07-27V4L/DVB (8523): v4l2-dev: remove unused type and type2 field from video_deviceHans Verkuil
The type and type2 fields were unused and so could be removed. Instead add a vfl_type field that contains the type of the video device. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-26V4L/DVB (8482): videodev: move all ioctl callbacks to a new v4l2_ioctl_ops ↵Hans Verkuil
struct All ioctl callbacks are now stored in a new v4l2_ioctl_ops struct. Drivers fill in a const struct v4l2_ioctl_ops and video_device just contains a const pointer to it. This ensures a clean separation between the const ops struct and the non-const video_device struct. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-26V4L/DVB (8477): v4l: remove obsolete audiochip.hHans Verkuil
Converted the last users of audiochip.h to the v4l2-chip-ident.h header and remove the now unused audiochip.h header. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-23V4L/DVB (8430): videodev: move some functions from v4l2-dev.h to ↵Hans Verkuil
v4l2-common.h or v4l2-ioctl.h The functions in a header should not belong to another module. The prio functions belong to v4l2-common.c, so move them to v4l2-common.h. The ioctl functions belong to v4l2-ioctl.c, so create a new v4l2-ioctl.h header and move those functions to it. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (7949): videodev: renamed the vidioc_*_fmt_* callbacksHans Verkuil
The naming for the callbacks that handle the VIDIOC_ENUM_FMT and VIDIOC_S/G/TRY_FMT ioctls was very confusing. Renamed it to match the v4l2_buf_type name. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24V4L/DVB (7463): cx88: Enable color killer by defaultFrej Drejhammar
An enabled color killer will not degrade picture quality for color input signals, only suppress bogus color information on black-and-white input. Therefore enable it by default. Signed-off-by: Frej Drejhammar <frej.drejhammar@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24V4L/DVB (7454): cx88: Add user control for color killerFrej Drejhammar
The cx2388x family has a color killer. This patch implements the V4L2_CID_COLOR_KILLER control for the cx2388x family. By default the color killer is disabled, as in previous versions of the driver. Signed-off-by: "Frej Drejhammar <frej.drejhammar@gmail.com>" Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24V4L/DVB (7452): cx88: Enable chroma AGC by default for all non-SECAM modesFrej Drejhammar
An enabled chroma AGC will not degrade picture quality if enabled on a color PAL or NTSC signal with nominal signal levels. It will give a significant color reproduction improvement if the chroma signals diverge from nominal levels. Therefore enable chroma AGC by default for PAL and NTSC standards. Signed-off-by: "Frej Drejhammar <frej.drejhammar@gmail.com>" Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24V4L/DVB (7451): cx88: Add user control for chroma AGCFrej Drejhammar
The cx2388x family has support for chroma AGC. This patch implements a the V4L2_CID_CHROMA_AGC control for the cx2388x family. By default chroma AGC is disabled, as in previous versions of the driver. Signed-off-by: "Frej Drejhammar <frej.drejhammar@gmail.com>" Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24V4L/DVB (7449): cx88: fix oops on module removal caused by IR workerMarton Balint
If the IR worker is not stopped before the removal of the cx88xx module, an OOPS may occur, because the worker function cx88_ir_work gets called. So stop the ir worker. Signed-off-by: Marton Balint <cus@fazekas.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24V4L/DVB (7289): cx88: enable IR receiver and real time clock on FusionHDTV7 GoldMichael Krufky
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24V4L/DVB (7254): cx88: fix FusionHDTV 5 PCI nano name and enable IR supportMichael Krufky
load ir-kbd-i2c for IR remote control support on DViCO FusionHDTV 5 PCI nano Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24V4L/DVB (7237): Convert videobuf-dma-sg to generic DMA APIGuennadi Liakhovetski
videobuf-dma-sg does not need to depend on PCI. Switch it to using generic DMA API, convert all affected drivers, relax Kconfig restriction, improve compile-time type checking, fix some Coding Style violations while at it. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24V4L/DVB (7094): static memoryDouglas Schilling Landgraf
- Static memory is always initialized with 0. - Replaced in some cases C99 comments for /* */ Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-03-20V4L/DVB (7267): cx88: Fix: Loads tuner module before sending commands to itMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25V4L/DVB (6836): Fix CodingStyle troubles caused by the previous cx88 commitsMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25V4L/DVB (6833): Don't limit cx88 audio routing to blackbird boardsRicardo Cerqueira
All cx2388 boards need the line-in audio to be routed from an external ADC (refered to as "ADC mode" in the spec sheet), since the chip is uncapable of dealing with baseband audio directly. So... this patch enables normal mode when using the tuner (TV or Radio), and enables ADC mode with any other source. It'll probably only work with boards that have supported ADCs (such as the Wolfson wm9775) Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25V4L/DVB (6831): Audio routes fix for blackbird boards with the wm8775 ADCRicardo Cerqueira
Fix lack of audio on the MPEG-2 stream of wm8775 based blackbirds. The wm8775 module initializes the audio input at "route 2", which doesn't hold true for all boards. The HVR-1300, for example, uses route 1 for tuner audio, and route 2 for baseband. So we must route the audio to the proper input depending on what video input is being used. Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25V4L/DVB (6600): V4L: videobuf: don't chew up namespace STATE_.*, convert to ↵Brandon Philips
VIDEOBUF_ s/STATE_NEEDS_INIT/VIDEOBUF_NEEDS_INIT/g s/STATE_PREPARED/VIDEOBUF_PREPARED/g s/STATE_QUEUED/VIDEOBUF_QUEUED/g s/STATE_ACTIVE/VIDEOBUF_ACTIVE/g s/STATE_DONE/VIDEOBUF_DONE/g s/STATE_ERROR/VIDEOBUF_ERROR/g s/STATE_IDLE/VIDEOBUF_IDLE/g Signed-off-by: Brandon Philips <bphilips@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-12-11V4L/DVB (6602): V4L: Convert videobuf drivers to videobuf_stopBrandon Philips
Drivers were using cookie cutter code for stopping the read/stream. Use the new videobuf_stop function which is lock safe. Signed-off-by: Brandon Philips <bphilips@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-22V4L/DVB (6320): v4l core: remove the unused .hardware V4L1 fieldMauro Carvalho Chehab
struct video_device used to define a .hardware field. While initialized on severl drivers, this field is never used inside V4L. However, drivers using it need to include the old V4L1 header. This seems to cause compilation troubles with some random configs. Better just to remove it from all drivers. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10V4L/DVB (6312): cx88: Replace list_for_each+list_entry with list_for_each_entryTrent Piepho
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09V4L/DVB (6252): Adapt drivers to use the newer videobuf modulesMauro Carvalho Chehab
PCI-dependent videobuf_foo methods were renamed as videobuf_pci_foo. Also, videobuf_dmabuf is now part of videobuf-dma-sg private struct. So, to access it, a subroutine call is needed. This patch renames all occurences of those function calls to be consistent with the video-buf split. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> http://thread.gmane.org/gmane.comp.video.video4linux/34978/focus=34981 Reviewed-by: Ricardo Cerqueira <v4l@cerqueira.org>
2007-10-09V4L/DVB (6247): Fix bug #8689: Fixes IR stop/start during suspend/resumeMauro Carvalho Chehab
IR workqueue should be disabled during suspend. This avoids some troubles, like the one reported on bug #8689: "The Hauppauge HVR 1100 ir-remote control does not work after resume from suspend to ram or disk." This patch disables IR before suspending, re-enabling it after resume. Thanks to Peter Poklop <Peter.Poklop@gmx.at> for reporting it and helping with the fix. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> Reviewed-by: Peter Poklop <Peter.Poklop@gmx.at>
2007-10-09V4L/DVB (6181): cx88: auto-load rtc and ir receiver i2c modules for ↵Michael Krufky
FusionHDTV5 RT Gold Auto-load ir-kbd-i2c for ir receiver support, and rtc-isl1208 for rtc support for the FusionHDTV5 RT Gold. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09V4L/DVB (6079): Cleanup: remove linux/moduleparam.h from drivers/media filesMauro Carvalho Chehab
Since at least kernel 2.6.12-rc2, module.h includes moduleparm.h. This patch removes all occurences of moduleparm.h from drivers/media files. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09V4L/DVB (6064): cx88: Add symbolic names for the PCI interrupt bitsTrent Piepho
Used for the PCI_INTMSK and PCI_INT_STAT registers. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09V4L/DVB (6023): cx88: Clean up some ugly and inconsistent printk()sTrent Piepho
Get rid of the "CORE" prefix from cx88 printks. It was only used a few times, and it makes it look like they're coming from the kernel core or something. Fix the message, "TV tuner 60 at 0x1fe, Radio tuner -1 at 0x1fe", by adding a "cx88[0]" prefix to be consistent, and to keep people who grep their dmesg output for cx88 from missing it. Get rid of the addresses, which are always wrong. The addresses are always set to -1, but because it's an unsigned 8-bit value, the left shift converts it to the nonsense address 0x1fe. In the cx8802 driver, some cut and pasted code prefixed lines with "CORE cx88[0]:", which has been changed to "cx88[0]/2:" like the other printks from the cx8802 driver. Also fix some ugly printks in the cx8802 driver that used __FUNCTION__ for KERN_INFO and KERN_ERR messages. The changed printks in cx88-mpeg.c also needed lots of whitespace and 80-column fixes. A bunch of misc changes in cx88-dvb.c and cx88-video.c to add message levels or a consistent "cx88[?]/2" or "cx88[?]/0" prefix. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09V4L/DVB (6021): cx88: Copy board information into card stateTrent Piepho
The cx88 driver state stored the ID of the board type in core->board. Every time the driver need to get some information about the board configuration, it uses the board number as an index into board configuration array. This patch changes it so that the board number is in core->boardnr, and core->board is a copy of the board configuration information. This allows access to board information without the extra indirection. e.g. cx88_boards[core->board].mpeg becomes core->board.mpeg. This has a number of advantages: - The code is simpler to write. - It compiles to be smaller and faster, without needing the extra array lookup to get at the board information. - The cx88_boards array no longer needs to be exported to all cx88 modules. - The boards array can be made const - It should be possible to avoid keeping the (large) cx88_boards array around after the module is loaded. - If module parameters or eeprom info override some board configuration setting, it's not necessary to modify the boards array, which would affect all boards of the same type. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09V4L/DVB (5977): cx8800: Add register debug functions to radio device tooTrent Piepho
Add the advanced debug functions to the radio videodev template. One could already use them from the video and vbi devices. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09V4L/DVB (5912): Clean up duplicate includes in drivers/media/Jesper Juhl
This patch cleans up duplicate includes in drivers/media/ Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-20V4L/DVB (5871): Conexant 2388x: check for kthread_runCyrill Gorcunov
The patch adds checking of kthread_run return code and issues a message if it fails. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-05-09V4L/DVB (5565): Cx88: fix compilation on alphaAlexey Dobriyan
error: 'DMA_32BIT_MASK' undeclared Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-05-07cx88-video build fixAndrew Morton
alpha: drivers/media/video/cx88/cx88-video.c: In function 'cx8800_initdev': drivers/media/video/cx88/cx88-video.c:1782: error: 'DMA_32BIT_MASK' undeclared (first use in this function) drivers/media/video/cx88/cx88-video.c:1782: error: (Each undeclared identifier is reported only once drivers/media/video/cx88/cx88-video.c:1782: error: for each function it appears in.) Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-04-27V4L/DVB (5488): Replace DMA magic mask for its aliasesMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27V4L/DVB (5480): Fix cx88_print_irqbits calls to use ARRAY_SIZEMauro Carvalho Chehab
cx88_print_irqbits were expecting a string pointer with 32 bytes. Better to pass the string size and use ARRAY_SIZE on its calls. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-03-01V4L/DVB (5304): Improve chip matching in v4l2_registerHans Verkuil
The chip matching in struct v4l2_register for VIDIOC_DBG_G/S_REGISTER was rather primitive. It could not be extended to other busses besides i2c and it lacked a way to. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21V4L/DVB (5199): Cx88-video.c: remove struct radionormsAdrian Bunk
This patch removes the unused struct radionorms. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21V4L/DVB (5146): Make VIDIOC_INT_[SG]_REGISTER ioctls no longer internal onlyTrent Piepho
The direct register access ioctls were defined as kernel internal only, but they are very useful for debugging hardware from userspace and are used as such. Officially export them. VIDIOC_INT_[SG]_REGISTER is renamed to VIDIOC_DBG_[SG]_REGISTER Definition of ioctl and struct v4l2_register is moved from v4l2-common.h to videodev2.h. Types used in struct v4l2_register are changed to the userspace exportable versions (u32 -> __u32, etc). Use of VIDIOC_DBG_S_REGISTER requires CAP_SYS_ADMIN permission, so move the check into the video_ioctl2() dispatcher so it doesn't need to be duplicated in each driver's call-back function. CAP_SYS_ADMIN check is added to pvrusb2 (which doesn't use video_ioctl2). Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21V4L/DVB (5144): Restore VIDIOC_INT_[SG]_REGISTER callsTrent Piepho
Add support for these ioctls to the video_ioctl2 system and the cx88 driver. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21V4L/DVB (5110): Keep the previous tvnorm default for cx88 and cx88-blackbirdMauro Carvalho Chehab
The video_ioctl2 conversion replaced the default from NTSC to PAL_BG. This broke cx88-blackbird. Probably, there are some badness at this driver, not doing all required stuff to change video standard. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21V4L/DVB (5103): Fix vidioc_g_tuner handlingMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21V4L/DVB (5102): make videodev to auto-generate standardsMauro Carvalho Chehab
v4l2_tvnorm were meant to describe video standards and its names to V4L2 API. However, this were doing by some static structures at the driver. This patch changes the internals in a way that, at the driver, only a v4l2_tvnorm (a 64 bit integer) should be filled, with all supported tvnorms. videodev will dynamically generate the proper API array based on supported standards. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21V4L/DVB (5101): Renamed video_mux to cx88_video_mux Mauro Carvalho Chehab
video_mux is renamed to cx88_video_mux to be exported to cx88-blackbird Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21V4L/DVB (5100): Make cx88-blackbird to work againMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>