summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx88/cx88-video.c
AgeCommit message (Collapse)Author
2007-08-24cx88: auto-load rtc and ir receiver i2c modules for FusionHDTV5 RT GoldMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> 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>
2007-08-21Cleanup: remove linux/moduleparam.h from drivers/media filesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> 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-08-18cx88: Add symbolic names for the PCI interrupt bitsTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> Used for the PCI_INTMSK and PCI_INT_STAT registers. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2007-08-15cx88: Clean up some ugly and inconsistent printk()sTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> 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>
2007-08-15cx88: Copy board information into card stateTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> 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>
2007-07-31cx8800: Add register debug functions to radio device tooTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> 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>
2007-07-23Clean up duplicate includes in drivers/media/Mauro Carvalho Chehab
From: Jesper Juhl <jesper.juhl@gmail.com> 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-19Conexant 2388x: check for kthread_runMauro Carvalho Chehab
From: Cyrill Gorcunov <gorcunov@gmail.com> 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-13Backport several cleanups at includesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> kernel-sync: Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-05-01cx88: fix compilation on alphaMauro Carvalho Chehab
From: Alexey Dobriyan <adobriyan@gmail.com> error: 'DMA_32BIT_MASK' undeclared Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-03-30Replace DMA magic mask for its aliasesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-03-29Fix cx88_print_irqbits calls to use ARRAY_SIZEMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> 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-02-24Improve chip matching in v4l2_register for VIDIOC_DBG_G/S_REGISTERHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The chip matching in struct v4l2_register was rather primitive. It could not be extended to other busses besides i2c and it lacked a way to differentiate between two i2c chips driven by the same driver on one board (e.g. a PVR500 with two tuner chips, one for analog TV and one for radio). It has now been improved making it much more powerful. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> CC: Mike Isely <isely@isely.net> CC: Trent Piepho <xyzzy@speakeasy.org>
2007-02-21Backport: make file_operations constMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Backport a kernel patch by Arjan van de Ven <arjan@linux.intel.com> that made all file_operations instances const. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-06Cx88-video.c: remove struct radionormsMauro Carvalho Chehab
From: Adrian Bunk <bunk@stusta.de> 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-01-23Make VIDIOC_INT_[SG]_REGISTER ioctls no longer internal onlyTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> 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>
2007-01-22Restore VIDIOC_INT_[SG]_REGISTER callsTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> Add support for these ioctls to the video_ioctl2 system and the cx88 driver. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2007-01-20keep the previous tvnorm default for cx88 and cx88-blackbirdMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> 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-01-20Fix vidioc_g_tuner handlingMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> --- linux/drivers/media/video/cx88/cx88-video.c | 2 ++ 1 file changed, 2 insertions(+)
2007-01-20Removed v4l2_tvnorm and made videodev to auto-generate standardsMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> v4l2_tvnorm were meant to describe video standards and its names to V4L2 API. However, this were meaning several static structures at the driver. This patch changes the internals in a way that, at the driver, only a v4l2_tvnorm (a 32 bit integer) should be filled, with all supported parameters. videodev will dynamically generate the proper API array based on supported standards. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-01-20Renamed video_mux to cx88_video_mux and exported to cx88-blackbirdMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> --- linux/drivers/media/video/cx88/cx88-video.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
2007-01-20Make cx88-blackbird to work againMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> --- linux/drivers/media/video/cx88/cx88-video.c | 84 ++- linux/drivers/media/video/cx88/cx88.h | 12 3 files changed, 421 insertions(+), 238 deletions(-)
2007-01-20Uncommented NTSC/443 video standardMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-01-20Convert cx8800 driver to video_ioctl2 handlerMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> video_ioctl2 handler provides V4L2 API parsing. Using it makes the driver simpler, and isolates API parsing. This allows future reusage of driver controls using other ways, like sysfs and/or procfs and increases isolation of driver-specific handling from the generic common ioctl processing. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-10-21IRQ: Maintain regs pointer globally rather than passing to IRQ handlersMauro Carvalho Chehab
Kernel-sync: This patch is required to allow compilation of the tree with kernel 2.6.19. This is the original description of the original patch, signed by David Howells <dhowells@redhat.com>: Maintain a per-CPU global "struct pt_regs *" variable which can be used instead of passing regs around manually through all ~1800 interrupt handlers in the Linux kernel. The regs pointer is used in few places, but it potentially costs both stack space and code to pass it around. On the FRV arch, removing the regs parameter from all the genirq function results in a 20% speed up of the IRQ exit path (ie: from leaving timer_interrupt() to leaving do_IRQ()). Where appropriate, an arch may override the generic storage facility and do something different with the variable. On FRV, for instance, the address is maintained in GR28 at all times inside the kernel as part of general exception handling. Having looked over the code, it appears that the parameter may be handed down through up to twenty or so layers of functions. Consider a USB character device attached to a USB hub, attached to a USB controller that posts its interrupts through a cascaded auxiliary interrupt controller. A character device driver may want to pass regs to the sysrq handler through the input layer which adds another few layers of parameter passing. I've build this code with allyesconfig for x86_64 and i386. I've runtested the main part of the code on FRV and i386, though I can't test most of the drivers. I've also done partial conversion for powerpc and MIPS - these at least compile with minimal configurations. This will affect all archs. Mostly the changes should be relatively easy. Take do_IRQ(), store the regs pointer at the beginning, saving the old one: struct pt_regs *old_regs = set_irq_regs(regs); And put the old one back at the end: set_irq_regs(old_regs); Don't pass regs through to generic_handle_irq() or __do_IRQ(). In timer_interrupt(), this sort of change will be necessary: - update_process_times(user_mode(regs)); - profile_tick(CPU_PROFILING, regs); + update_process_times(user_mode(get_irq_regs())); + profile_tick(CPU_PROFILING); I'd like to move update_process_times()'s use of get_irq_regs() into itself, except that i386, alone of the archs, uses something other than user_mode(). Some notes on the interrupt handling in the drivers: (*) input_dev() is now gone entirely. The regs pointer is no longer stored in the input_dev struct. (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does something different depending on whether it's been supplied with a regs pointer or not. (*) Various IRQ handler function pointers have been moved to type irq_handler_t. Signed-Off-By: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-10-16cx88: determine whether or not to use external adc based on input settingMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Some cx88-blackbird boards use an external adc, but not necessarily for all inputs. Thus, this needs to be configurable on the card level for each input. This patch allows for the usage of the external adc to be determined by a bit setting in the cx88_input struct for cards based on the cx88 blackbird design. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2006-10-04cx88: Add support for VIDIOC_INT_[SR]_REGISTER ioctlsTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> Add support for the advanced debugging ioctls, to allow access to the cx88 registers from userspace. Only i2c_id == 0 is supported, for access to the cx88 adapter itself. There isn't any support for access to I2C clients of the adapter. Most of them don't have R/W registers anyway, and its necessary to use i2c-dev to talk to them from userspace. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2006-09-25Ensure the WM8775 driver is loaded generically for any board.Steven Toth
From: Steven Toth <stoth@hauppauge.com> A generic change to cards to allow any board to specify whether it needs the wm8775 module loaded (by the core) or not. Signed-off-by: Steven Toth <stoth@hauppauge.com>
2006-08-12CONFIG_PM=n slim: drivers/media/video/*Mauro Carvalho Chehab
From: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-07-30Fix a typo that caused some compat stuff to not workMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Config option typo: -#ifdef CONFIG_V4L1_COMPAT +#ifdef CONFIG_VIDEO_V4L1_COMPAT Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-07-24OVERLAY flag were enabled by mistakeMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> A patch from Aug, 17 activated by mistake OVERLAY flag on cx88-video, together with several cx88-blackbird cleanups. This makes the cx88 driver to report: /dev/video0 [v4l2]: ioctl VIDIOC_G_FBUF: Invalid argument instead of: /dev/video0 [v4l2]: no overlay support Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-07-23Fix for compilation without V4L1 or V4L1_COMPATMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Removed usage of HAVE_V4L1 Including videodev.h will just include videodev2.h if V4L1 is not supported V4L1 code at core drivers will honor CONFIG_V4L1_COMPAT stuff Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-07-19[PATCH] 64bit resource: fix up printks for resources in video driversMauro Carvalho Chehab
From: Greg Kroah-Hartman <gregkh@suse.de> This is needed if we wish to change the size of the resource structures. kernel-sync: backport from kernel to v4l/dvb tree Based on an original patch from Vivek Goyal <vgoyal@in.ibm.com> Cc: Vivek Goyal <vgoyal@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-07-19[PATCH] irq-flags: media: Use the new IRQF_ constantsMauro Carvalho Chehab
From: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: "David S. Miller" <davem@davemloft.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-27merge: http://linuxtv.org/hg/~mkrufky/v4l-dvbMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-27kernel sync: use list_move() and fix a typoMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> This patch works fine with previous kernel versions (tested up to 2.6.12). kernel-sync Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-26Remove all instances of request_module("tda9887")Michael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> We should no longer try to load the tda9887 module, because it no longer exists. The tda9887 driver has been merged into the tuner module. This patch removes all instances of request_module("tda9887") from the following video4linux drivers: bttv, cx88, em28xx and saa7134. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2006-06-26cx88-blackbird: implement VIDIOC_QUERYCTRL and VIDIOC_QUERYMENUMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> This patch implements the newer v4l2 control features to make the standard user controls and mpeg encoder controls of cx88-blackbird video encoder boards available to userspace. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2006-04-11Merge: from V4L1 treeMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-04-11Since we are not using CVS, $Id makes no sense anymoreMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-03-15Merging from mchehab vivi branchMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> merge: Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-03-13BUG_ON() Conversion in drivers/video/mediaMauro Carvalho Chehab
From: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-03-12Cx88 default picture controls valuesMauro Carvalho Chehab
From: Marcin Rudowski <mar_rud@poczta.onet.pl> This patch fixes default values for some picture controls: - brightness set to 50% by default (now is 0%) - hue set to 50% by default (now is 0%) - sets saturation to datasheet value - volume set to 0dB (now is -32dB) and some left small fixes: - twice offset adding - balance didn't follow datasheet (bits[0:5] = attenuation; bit[6] = channel to provide attenuation) Signed-off-by: Marcin Rudowski <mar_rud@poczta.onet.pl> Signed-off-by: Ian Pickworth <ian@pickworth.me.uk> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-03-10Make video_buf more genericMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Video_buf were concerned to allow PCI devices to be used as video capture devices. This patch extends video_buf features by virtualizing pci-dependent functions and allowing other type of devices to use it. It is still DMA centric, although it may be used also by devices that emulates scatter/gather behavior or a DMA device Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-02-26cx88: reduce excessive loggingMichael Krufky
From: Ian Pickworth <ian@pickworth.me.uk> - fix temporary debug code by changing printk to dprintk at level 1. - move CORE_IOCTL messages from level 1 to level 2. - this should help with selective debugging, while not filling people's logs up during normal use. Signed-off-by: Ian Pickworth <ian@pickworth.me.uk> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2006-02-06sem2mutex: drivers/media/, #2Mauro Carvalho Chehab
Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Kernel-sync from patch 3318b Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-01-11From: Panagiotis Issaris <takis@issaris.org>Mauro Carvalho Chehab
Conversions from kmalloc+memset to k(z|c)alloc Conversions from kmalloc+memset to k(z|c)alloc. kernel-sync Signed-off-by: Panagiotis Issaris <takis@issaris.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-01-01ioctls cleanups.Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@brturbo.com.br> - Now, all internal ioctls are at v4l2-common.h - removed unused ioctl at saa6752hs.h - all debug ioctl code moved to v4l2-common.c - removed duplicated stuff from other cards Signed-off-by: Michael Krufky <mkrufky@m1k.net> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-12-10Some fixes at cx88 controlsMauro Carvalho Chehab
- now, default control values at cx88_cx8800_ctls are honored - default value for contrast/saturation were changed to be in line with available documentation for the chipset; - Removed some bad coding at set_control; - U/V Saturation now changes proportionally Signed-off-by: Michael Krufky <mkrufky@m1k.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-11-10em28xx IR fixup and explicit compat_ioctl32 handlerMauro Carvalho Chehab
- Commented the code to avoid repeating events when pressing IR keys. - Included explicit compat_ioctl32 handler. CC: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>