summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx88/cx88-mpeg.c
AgeCommit message (Collapse)Author
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-02Fix v4l-dvb backward compatibilityMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Due to several internal API changes on kernel, kernel backward compatibility were lost. Basically, compat.h should be the last include for it to work properly. This patch basically reorders kernel headers to allow backward compat to work fine. Also: Some includes were added after some non-include macros, on old drivers. Better to keep all includes at the beginning of the files. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-06-22Fix excess of debug messages on cx88-mpegMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Closes the issue opened on Kernel bugzilla: http://bugzilla.kernel.org/show_bug.cgi?id=8383 There's no need to print timeout without debug turned on: Apr 27 23:02:14 video kernel: cx88[1]/2-mpeg: cx8802_timeout 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-mpeg.c: make 2 functions staticMauro Carvalho Chehab
From: Adrian Bunk <bunk@stusta.de> This patch makes two needlessly global functions static. Signed-off-by: Adrian Bunk <bunk@stusta.de> 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-21coding style changesMarkus Rechberger
From: Markus Rechberger <mrechberger@gmail.com> coding style changes Signed-off-by: Markus Rechberger <mrechberger@gmail.com>
2007-02-20added support for loading cx88-dvb and cx88-blackbirdMarkus Rechberger
From: Markus Rechberger <mrechberger@gmail.com> added support for loading cx88-dvb and cx88-blackbird Signed-off-by: Markus Rechberger <mrechberger@gmail.com>
2007-02-20added support for deferred module requesting to cx88Markus Rechberger
From: Markus Rechberger <mrechberger@gmail.com> added support for deferred module requesting to cx88 Signed-off-by: Markus Rechberger <mrechberger@gmail.com>
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-09merge: http://www.linuxtv.org/hg/~stoth/v4l-dvbMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-10-06cx88-blackbird module is rejected during probe.Steven Toth
From: Steven Toth <stoth@hauppauge.com> If the last cx88 board probed is not backbird based, and a previous board was, the entire module is unloaded leading to an oops during mpeg_open on the first /dev/videoN device. Signed-off-by: Steven Toth <stoth@hauppauge.com>
2006-10-05Bugfix: Select the correct cx8802_dev when enumerating by CX88_MPEG_typeSteven Toth
From: Steven Toth <stoth@hauppauge.com> A bug in cx8802_get_driver() meant that in multiboard environments, when testing frontends on the non primary board, the incorrect device was returned resulting in "Unsupported value in .mpeg.." messages. Depending on the electrical design of the hardware (serial, parallel, rising/falling edge detect), transport would still be delivered and the problem went unnoticed. This patch ensures the correct instance of cx8802_dev is returned. Signed-off-by: Steven Toth <stoth@hauppauge.com>
2006-09-29Remove the cx8802_dev driver lock and use the core mutexSteven Toth
From: Steven Toth <stoth@hauppauge.com> The cx8802_dev semaphore was unnecessary. This patch removes is and uses the existing core mutex. Signed-off-by: Steven Toth <stoth@hauppauge.com>
2006-09-28Fix some errors at cx88-mpegMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> The previous cx88-mpeg patch introduced those errors while compiling: CC [M] /home/v4l/master2/v4l/cx88-mpeg.o /home/v4l/master2/v4l/cx88-mpeg.c: In function 'cx8802_request_acquire': /home/v4l/master2/v4l/cx88-mpeg.c:645: warning: comparison between pointer and integer /home/v4l/master2/v4l/cx88-mpeg.c:645: error: called object '"<7>%s/2-mpeg: "' is not a function /home/v4l/master2/v4l/cx88-mpeg.c: In function 'cx8802_request_release': /home/v4l/master2/v4l/cx88-mpeg.c:660: warning: comparison between pointer and integer /home/v4l/master2/v4l/cx88-mpeg.c:660: error: called object '"<7>%s/2-mpeg: "' is not a function Also, at cx88.h, it is reintroducing this prototype: extern void cx88_print_ioctl(char *name, unsigned int cmd) This function were removed in the past, since it were replaced by a more generic one on v4l2-common.c. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-27Dynamic cx88 mpeg port management for HVR1300 MPEG2/DVB-T support. Steven Toth
From: Steven Toth <stoth@hauppauge.com> A series of patches to change the cx88 framework to allow the PCI mpeg port to be shared dynamically between different types of drivers or applications. This patch changes the cx88-dvb and cx88-blackbird drivers to become 'sub drivers' of a higher single cx88-mpeg driver. The cx88-mpeg driver is a superset of the previous cx88-mpeg/blackbird drivers and now owns the IRQ. cx88-dvb/blackbird now become mini drivers, registering themselves with cx88-mpeg through a standard interface with callbacks. Sub drivers request access to hardware via the cx88-mpeg driver. In turn the cx88-mpeg driver determines whether the hardware is busy and accepts or refuses the request, grant access using callbacks into the sub drivers. The net effect is that you are no longer able to tamper with the mpeg port from multiple different applications at the same time, potentially breaking a live mpeg2 hardware encoding or dvb stream. The mechanism extends to enable multiple dvb frontends to be registered and share the single resource. Signed-off-by: Steven Toth <stoth@hauppauge.com>
2006-09-25cx88: rename mpeg capability flags from CX88_BOARD_FOO to CX88_MPEG_FOOMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> The flags for mpeg capabilities are sub-optimally named as CX88_BOARD_DVB and CX88_BOARD_BLACKBIRD, which creates some confusion. This patch renames the above to CX88_MPEG_DVB and CX88_MPEG_BLACKBIRD. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> CC: Steven Toth <stoth@hauppauge.com> Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2006-09-25Changed cx88_board .dvb and .register to an enum.Steven Toth
From: Steven Toth <stoth@hauppauge.com> Some basic cleanup in preperation for a future patch where the cx88-mpeg functions have to deal with the port being used by multiple frontends in (mpeg2 hw encoder and dvb demod). Signed-off-by: Steven Toth <stoth@hauppauge.com>
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-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-04-10Silence some dprintk's in cx88-mpegAndrew de Quincey
From: Trent Piepho <xyzzy@speakeasy.org> Changeset 395c7c4d8f0c changed several dprintks from level 1 to level 0 (always on). They generate four lines every time DMA starts, which don't containing any information with a use outside of debugging. This turns them back to level 1. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2006-04-07Add support for pcHDTV HD5500 ATSC/QAMRusty Scott
From: Rusty Scott <rustys@ieee.org> Added card definitions for the pcHDTV HD5500 ATSC/QAM card Signed-off-by: Rusty Scott <rustys@ieee.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.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-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-03-09PATCH cx88-mpeg: cx8802_restart_queue() for blackbirdMauro Carvalho Chehab
Fixes "cx8802_restart_queue: queue is empty" storm in syslog =============================================================================== Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2005-12-11Makes v4l compile under 2.4 kernelsMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@brturbo.com.br> kernel-sync - Makes V4L compile with kernel 2.4 - em28xx doesn't compile with 2.4 kernels. Additional work is necessary to make it compile. Thanks-to: Stefan Leichter <Stefan.Leichter@camLine.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-11-13Added V4L support for the Nova-S-Plus and Nova-SE2 DVB-S products.Michael Krufky
From: Steven Toth <stoth@hauppauge.com> - Added V4L support for the Nova-S-Plus and Nova-SE2 DVB-S products. - Basic DVB-S support is working, analog video inputs work. - It has one or two fixme comments, primarily analog GPIOs (audio) and eeprom parsing. - This should not be sent upstream yet! - CX24123 code (in cx88-dvb.c) disabled until the cx24123 module is added to dvb-kernel cvs. Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: Michael Krufky <mkrufky@m1k.net>
2005-10-16- Whitespace Cleanups.Mauro Carvalho Chehab
- Whitespace script improved. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-09-06Implemented the v4l2 mpeg api for blackbird cards.Catalin Climov
2005-08-30 - Some error treatment implemented at resume functions.Mauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-08-20removed nested #if 1Michael Krufky
2005-08-16Get rid of '//' comments, replace them with #if 0 and /**/.Catalin Climov
2005-08-16Some reorg: move some bits to struct cx88_core, factor out common ioctl'sCatalin Climov
to cx88_do_ioctl.
2005-07-27 * cx88-mpeg.c:Michael Krufky
- convert ugly if-else statement to switch-case. Signed-off-by: Michael Krufky <mkrufky@m1k.net>
2005-07-27 * cx88-mpeg.c:Michael Krufky
- update for FusionHDTV 5 Gold. Signed-off-by: Michael Krufky <mkrufky@m1k.net>
2005-07-15 - linux/version.h removed at linux-2.6.13-rc3-mm1.Mauro Carvalho Chehab
- Removed remaining trailing spaces. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-07-07 * cx88-core.c, cx88-mpeg.c, cx88-video.c, cx88.h:Mauro Carvalho Chehab
- Some debug structs moved to their own .c file and converted to static - some // comments converted to #if 0 * cx88-mpeg.c: - Small cleanup for thinks like 0<<14 Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-07-05 * cx88-mpeg.c, doc/not-in-cx2388x-datasheet.txt:Michael Krufky
- Correct sync byte for MPEG-2 transport stream packets. All DVB compliant frontends output packets with this start code. Thanks to Johannes Stezenbach and Mac Michaels. Signed-off-by: Michael Krufky <mkrufky@m1k.net>
2005-07-04 * cx88-cards.c, cx88-dvb.c, cx88-mpeg.c:Michael Krufky
* dvb-pll.c, dvb-pll.h: - Add DVB support for DViCO FusionHDTV3 Gold-T. Signed-off-by: Michael Krufky <mkrufky@m1k.net>
2005-06-20 * cx88-cards.c, cx88-dvb.c, cx88-mpeg.c:Michael Krufky
* cx88-video.c, cx88.h, tuner.h: * CARDLIST.cx88: - Fix DViCO Board names as per email from DViCO Systems Software Engineer Jeff Lee: "DTT7611 model is 3Gold-T ... Temic 4042 is the 3Gold-Q model." Signed-off-by: Michael Krufky <mkrufky@m1k.net>
2005-06-17 * Makefile, cx88-cards.c, cx88-dvb.c, cx88-i2c.c, cx88-mpeg.c, dvb-pll.c, ↵Michael Krufky
dvb-pll.h, lgdt3302.c, lgdt3302.h, lgdt3302_priv.h - added support for LGDT3302 demod for cx88 cards: DViCO FusionHDTV 3 Gold Signed-off-by: Mac Michaels <wmichaels1@earthlink.net> Signed-off-by: Michael Krufky <mkrufky@m1k.net> * Make.config - Allow DVB to compile if kernel is later than 2.6.10
2005-06-03Mauro Chehab:Mauro Carvalho Chehab
* cx88-cards.c: - changed tuner number by it's name as defined on tuner.h. * scripts/make_kern_diff.sh - now it also makes diff for include files. Catalin Climov <catalin@climov.com>: * cx88-blackbird.c: - Blackbird firmware API cleanup, symbolic constants for param values. - improved readability and comprehensibility for api calls. * cx88-cards.c: - PVR2000 & MEC gpio fixes. * cx88-tvaudio.c: - enable sound input from external adc * cx88-video.c: - initialize the hue, contrast and brightness controls to default values * cx88-mpeg.c: - s/cx_write/cx_set for MO_TS_INTMSK, MO_DEV_CNTRL2, MO_TS_DMACNTRL
2005-03-07- fix cx88-dvb.Gerd Knorr
2005-03-07- add flyvideo duo.Gerd Knorr
2005-03-04- hopefully fix dvb ts setup.Gerd Knorr
2005-02-18- more HD3000 stuff from Rusty Scott.Gerd Knorr
2005-02-15- some powermanagement stuff.Gerd Knorr
- misc fixes. - fixup patch generation control files.