aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx18
Commit message (Collapse)AuthorAgeFilesLines
* V4L/DVB (9728): cx18: Copyright attribution update for files modified by awallsAndy Walls2008-12-3025-0/+25
| | | | | | | Add copyright attribution for files modified by awalls in 2008 Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9727): cx18: Adjust outgoing mailbox timeouts and remove statistics ↵Andy Walls2008-12-306-54/+8
| | | | | | | | | | | | | logging cx18: Adjust outgoing mailbox timeouts and remove statistics logging. This saves some wasted storage in struct cx18 for each card. Cutting the outgoing mailbox timeouts in half from the previous value appears to be safe with MythTV. Got rid of interrupted case code path after a wait uninterruptable returns. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9726): cx18: Restore buffers that have fallen out of the transfer ↵Andy Walls2008-12-303-27/+92
| | | | | | | | | | rotation Restore buffers that have fallen out of the transfer rotation, and check for coherent mailbox data when processing a stale mailbox. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9725): cx18: Remove unnecessary MMIO accesses in time critical irq ↵Andy Walls2008-12-304-22/+22
| | | | | | | | | | | handling path Remove unnecessary MMIO accesses in time critical irq handling path. Also ensured that the mailbox ack field is read in last, so we know for sure if we have a stale mailbox or not on receipt. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9724): cx18: Streamline cx18-io[ch] wrappers and enforce MMIO retry ↵Andy Walls2008-12-309-449/+71
| | | | | | | | | | | | | strategy cx18: Streamline cx18-io[ch] wrappers and enforce MMIO retry strategy so that write retries always occur and read retries never occur (as they never help). Remove MMIO statistics logging to speed up MMIO accesses. Deprecate & ignore retry_mmio and mmio_ndelay module parameters, to essentially force retry_mmio=1 and mmio_ndelay=0. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9723): cx18: Propagate staleness of mailbox and mdl ack data to ↵Andy Walls2008-12-302-14/+27
| | | | | | | | | | | | | work handler cx18: Propagate staleness of mailbox and mdl ack data to work handler to let the work handler know that the data from the encoder may not be coherent. Allows for smarter handling of buffers in future, to deal with MDLs that fall out of rotation due to irq handler being late in collecting mailbox and mdl ack info. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9722): cx18: Convert per stream queue spinlocks into mutexesAndy Walls2008-12-303-16/+11
| | | | | | | | | | Convert the per stream queue spinlocks into mutexes. All queue manipulation happens via the work queue or system calls into the driver, and not in an interrupt context. This reduces the amout of time the cx18 driver keeps interrupts disabled. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9721): cx18: Change to singlethreaded global work queue thread for ↵Andy Walls2008-12-303-2/+26
| | | | | | | | | | | | deferable work Change to singlethreaded global work queue thread for deferable work, instead of the kernel default multithreaded work queue. This ensures execution of deferable work is always in the proper order, so caputred buffers don't get reordered. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9720): cx18: Major rewrite of interrupt handling for incoming ↵Andy Walls2008-12-3016-215/+408
| | | | | | | | | | | | | | | | | | mailbox processing A major rewrite of interrupt handling for incoming mailbox processing, to split the timing critical steps from the the deferrable steps as the sending XPU on the CX23418 will time out and overwrite our incoming mailboxes rather quickly. Setup a pool of work "order forms" for the irq handler to send jobs to the new work handler routine which uses the kernel default work queue to do the deferrable work. Started optimizing some of the cx18-io calls as they are now the low hanging fruit for recoving microseconds back from the timeline. Future optimizations will get rid of mmio read retries, mmio stats logging, and combine smaller functions in the irq path into the larger ones to save ~2 us each. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9599): cx18: Fix unitialized variable problem upon APU firmware ↵Andy Walls2008-12-301-3/+6
| | | | | | | | | | | file read failure If APU firmware file read failed, the jump vector to the APU was undefined and the APU would be started executing garbage. Fix uninitialized variable to be an infinite loop for the APU, but also bail out before even starting the APU. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9598): cx18: Prevent CX23418 from clearing it's outgoing ack ↵Andy Walls2008-12-304-0/+20
| | | | | | | | | | | | | interrupts to driver When the CX23418 CPU unit sent out an ack interrupt to the linux driver, it also received that interrupt and cleared the flag before the linux driver could see what the interrupt was for. This fix prevents the CPU from receiving an IRQ for it's own outgoing ack's to the linux driver. This fix is critical now that the linux driver doesn't poll but relies on these ack interrupts. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9597): cx18: Minor fixes to APU firmware load processAndy Walls2008-12-301-7/+14
| | | | | | | | Use the APU fw start address from rom file instead of a hardcoded entry vector. Fixed cx18_setup_page() calls to use the correct APU image load addresses. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9596): cx18: Further changes to improve mailbox protocol integrity ↵Andy Walls2008-12-304-18/+42
| | | | | | | | | | | & performnce All waits for cx18 mailbox API commands are now uninterruptable. Added code to collect mailbox ack statistics. Tweaked timeouts based on collected stats and video vertical frame and field rates. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9595): cx18: Improve handling of outgoing mailboxes detected to be busyAndy Walls2008-12-302-69/+64
| | | | | | | | | | | | cx18: Improve handling of outgoing mailboxes detected to be busy. When encountering a busy mailbox, sleep instead of polling, and wait for interrupt or timeout. If the mailbox is still busy, force it free. When sending commands, make sure we never create a situation where we mark the mailbox busy upon sending, and ensure we always have a method to cleanly recover from a busy mailbox. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9594): cx18: Roll driver version number due to significant changesAndy Walls2008-12-301-1/+1
| | | | | | | | Driver interrupt and mailbox handling has change significantly. Time for a roll to v1.0.2. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9593): cx18: Add outgoing mailbox mutexes and check for ack via ↵Andy Walls2008-12-305-63/+60
| | | | | | | | | | | waitq vs poll Add mutexes to ensure exclusive access for outgoing driver to CX23418 mailboxes. Also wait on a waitq for mailbox acknowledgement from the CX23418 instead of polling. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9592): cx18: Use default kernel work queue; fix streaming flag for ↵Andy Walls2008-12-305-37/+26
| | | | | | | | | | | | work handler cx18: Use default kernel work queue; fix streaming flag for work handler. Eliminate cx18 specific work queue and use the kernel default work queue. Fixed the F_STREAMING_FLAG for the TS stream so cx18_dvb_work_handler() can know when it is not safe to send MDLs to the firmware. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9513): cx18: Reduce number of mmio read retriesAndy Walls2008-12-304-21/+22
| | | | | | | | | | | | cx18: Reduce number of mmio read retries to improve performance. Experiments have shown 2 things: read retries never improve the result of a suspect mmio read from the CX23418 (the result stays all 0xff's), and that most of the suspected read failures are actually proper reads of values that should be all 0xff's. This change reduces the number of read retries and keeps the count separate from write retries. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9514): cx18: Fix PLL freq computation for debug displayAndy Walls2008-12-291-3/+2
| | | | | | | | | | cx18: Fix PLL freq computation for debug display. The code to compute the PLL freq from register values was storing an intermediate 56 bit result in a 32 bit type, causing a nonsense value to be displayed. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9512): cx18: Fix write retries for registers that always change - ↵Andy Walls2008-12-297-80/+185
| | | | | | | | | | | | | | part 3. cx18: Fix write retries for registers that always change - part 3. Fix the io for the rest of the registers that will often not read back the value just written. Modified register readback checks to make sure the intended effect was achieved without constantly rewriting the registers. The one outstanding register remaining is 0xc72014 CX18_AUDIO_ENABLE, whose behavior on writes I have yet to determine. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9474): cx18: Remove redundant block scope variable in cx18_probe() ↵Andy Walls2008-12-291-2/+0
| | | | | | | | | | for sparse cx18: Remove redundant block scope variable in cx18_probe() to eliminate sparse build warning. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9885): drivers/media Kconfig's: fix bugzilla #12204Mauro Carvalho Chehab2008-12-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | When the tuner modules were moved to common/tuners, a separate customize option were added for tuners. However, the automatic selection of the tuners were still using the older option. This causes that the automatic selection to fail, if DVB_FE_CUSTOMISE is selected. Also, since those tuners are now under MEDIA_TUNER_CUSTOMIZE menu, if you unset MEDIA_TUNER_CUSTOMIZE, you can't manually select the tuners. This patch fixes this error by replacing DVB_FE_CUSTOMISE by MEDIA_TUNER_CUSTOMIZE on all places were a tuner is selected. The patch were generated by this small script: for i in `find drivers/media -name Kconfig`; do cat $i|perl -ne 's/(MEDIA_TUNER.*)DVB_FE_CUSTOMISE/\1MEDIA_TUNER_CUSTOMIZE/; print $_' >a mv a $i done Also, manually reordered the tuner entries. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9516): cx18: Move DVB buffer transfer handling from irq handler to ↵Andy Walls2008-11-117-26/+75
| | | | | | | | | | | | | work_queue cx18: Move DVB buffer transfer handling from irq handler to work_queue thread. In order to properly lock the epu2cpu mailbox for driver to CX23418 commands, the DVB/TS buffer handling needs to be moved from the IRQ handler and IRQ context to a work queue. This work_queue implmentation is strikingly similar to the ivtv implementation - for better or worse. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9515): cx18: Use correct Mailbox IRQ Ack values and misc IRQ ↵Andy Walls2008-11-114-48/+49
| | | | | | | | | | | | | handling cleanup cx18: Use correct Mailbox IRQ Ack values and misc IRQ handling cleanup. The SCB field definitions for Ack IRQ's for mailboxes were inconsistent with the bitmasks being loaded into those SCB fields and the SW2 Ack IRQ handling logic. Renamed fields in SCB to make things consistent and did misc IRQ handling cleanups: removing legacy ivtv dma_reg_lock, HPU IRQ flags, etc. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9511): cx18: Mark CX18_CPU_DE_RELEASE_MDL as a slow API callAndy Walls2008-11-111-1/+1
| | | | | | | | | | | cx18: Mark CX18_CPU_DE_RELEASE_MDL as a slow API call. Give the encoder time to complete the MDL release before destroying the encoder internal task. This avoids an encoder lockup on the next digital capture and error messages about buffers being returned for an inactive encoder task handle. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9510): cx18: Fix write retries for registers that always change - ↵Andy Walls2008-11-114-12/+45
| | | | | | | | | | | | part 2. cx18: Fix write retries for registers that always change - part 2. Some registers, especially interrupt related ones, will never read back the value just written. Modified interrupt register readback checks to make sure the intended effect was achieved. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9506): ivtv/cx18: fix test whether modules should be loaded or not.Hans Verkuil2008-11-111-2/+2
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9475): cx18: Disable write retries for registers that always change ↵Andy Walls2008-11-113-7/+7
| | | | | | | | | | | | | | - part 1. cx18: Disable write retries for registers that always change - part 1. Interrupt related registers will likely not read back the value we just wrote. Disable retries for these registers for now to avoid accidently discarding interrupts. More intelligent read back verification criteria are needed for these and other registers (e.g. GPIO line registers), which will be addressed in subsequent changes. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9299): cx18: Don't mask many real init error codes by mapping them ↵Andy Walls2008-10-212-15/+24
| | | | | | | | | | | | to ENOMEM Changes to let error return codes bubble up to the user visible error message on card initialization. A number of them were being remapped to ENOMEM when no memory or array resource shortage existed. That hampered diagnosis of user trouble reports. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9298): cx18: Add __iomem address space qualifier to ↵Andy Walls2008-10-211-2/+2
| | | | | | | | | | cx18_log_*_retries() argument cx18: Add __iomem address space qualifier to cx18_log_*_retries() addr argument to clean up sparse build warnings. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9297): cx18: Fix memory leak on card initialization failureAndy Walls2008-10-211-2/+6
| | | | | | | | On error exit, the cx18_probe() function did not use the proper entry in cx18_cards[] with kfree() when card init failed; leaking memory. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* byteorder: remove direct includes of linux/byteorder/swab[b].hHarvey Harrison2008-10-201-0/+1
| | | | | | | | | | | | A consolidated implementation will provide this generically through asm/byteorder, remove direct includes to avoid breakage when the changeover to the new implementation occurs. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org> Acked-by: "Paul E. McKenney" <paulmck@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* V4L/DVB (9157): cx18/ivtv: add 'PCI:' prefix to bus_info.Hans Verkuil2008-10-131-1/+1
| | | | | | | Suggested by Martin Dauskardt. This is conform what the other drivers do. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9133): v4l: disconnect kernel number from minorHans Verkuil2008-10-122-21/+24
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* V4L/DVB (9132): cx18: Fix warning message for DMA done notification for ↵Andy Walls2008-10-121-2/+2
| | | | | | | | | | | inactive stream. cx18: Fix warning message for DMA done notification for inactive stream. The warning message would always gripe that the radio stream was to blame, which was misleading and wrong (/dev/radioN nodes never transfer data). Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9131): cx18: Add entries for the Leadtek PVR2100 and Toshiba Qosmio ↵Andy Walls2008-10-123-1/+106
| | | | | | | | | | | | | | | DVB-T/Analog cx18: Add entries for the Leadtek PVR2100 and Toshiba Qosmio DVB-T/Analog capture cards. Both cards are hybrids cards, but no digital capture functionality has been added yet. These entries are a first guess at the card entries to get analog working, given the information available. Terry Wu <terrywu at leadtek.com.tw> provided a pointer to information for the PVR2100. Martin Juhl <mj at casalogic.dk>, an owner of the Toshiba DVB-T/Analog tuner card, provided the DDR timing information from his Windows inf file. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9111): cx18: Up the version to 1.0.1Andy Walls2008-10-121-1/+1
| | | | | | | | | | cx18: Up the version to 1.0.1. This will make it easy to tell if retries of MMIO access are implemented or not in trouble reports. First course of action for I2C and other initialization problem reports will be to have user upgrade to v1.0.1 of driver. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9110): cx18: Add default behavior of checking and retrying PCI MMIO ↵Andy Walls2008-10-128-36/+427
| | | | | | | | | | | | | | | accesses cx18: Add default behavior of checking and retrying PCI MMIO accesses. The concept of checking and retrying PCI MMIO accesses for better reliability in older motherboards was suggested by Steve Toth <stoth@linuxtv.org>. This change implements MMIO retries and the retry_mmio module parameter that is enabled by default. Limited experiments have shown this is more reliable than the mmio_ndelay parameter. mmio_ndelay has insignificant effect with retries enabled. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9049): convert tuner drivers to use dvb_frontend->callbackMichael Krufky2008-10-122-2/+2
| | | | | Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (8939): cx18: fix sparse warningsHans Verkuil2008-10-122-3/+3
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (8924): cx18: Set mmio throttling delay default to 0 nsec.Andy Walls2008-10-121-2/+2
| | | | | | | | cx18: Set mmio throttling delay default to 0 nsec. Not doing so makes analog tuner audio not work on some mahcines. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (8920): cx18/ivtv: fix check of window boundaries for VIDIOC_S_FMTHans Verkuil2008-10-121-3/+3
| | | | | | | | It was possible to set out-of-bounds windows sizes, this is now fixed. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (8915): cx18: Increment u8 pointers not void pointers.Andy Walls2008-10-121-26/+30
| | | | | | | | | cx18: Increment u8 pointers not void pointers. Incrementing void pointers is dubious and the real intent in cx18_memcpy_fromio() and cx18_memset_io() is to increment by bytes, so use u8 pointers instead. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (8914): cx18: Throttle mmio to/from the CX23418 so boards work in ↵Andy Walls2008-10-126-88/+168
| | | | | | | | | | | | | | | | | older systems cx18: Throttle mmio to/from the CX23418 so boards work in older systems. The CX23418 couldn't reliably handle mmio at the rate at which the cx18 driver was attempting to access the chip. The PCI bridge arrangements and settings on modern motherboards still allowed the CX23418 to work OK, but it didn't work well on many older motherboards: mysterious I2C errors, firmware loading errors, etc. This patch adds a throttle to *all* mmio access to the CX23418. It defaults to a delay of 31 ns, but is adjustable by the mmio_ndelay module parm. My HVR-1600 and Raptor PAL/SECAM card now function for analog capture on a motherboard with an Intel 82810E Northbridge and 82801AA Southbridge. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (8913): cx18: Create cx18_ specific wrappers for all pci mmio ↵Andy Walls2008-10-1219-263/+468
| | | | | | | | | | | accessesors. cx18: Create cx18_ specific wrappers for all pci mmio accessesors. This is a first step in instrumenting all CX23418 PCI bus IO, to debug problems with accessing the CX23418's PCI memory mapped IO. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (8912): cx18: Correct CX23418 PCI configuration settings.Andy Walls2008-10-121-7/+2
| | | | | | | | | | cx18: Correct CX23418 PCI configuration settings. The CX23418 doesn't have I/O space registers, so there was no need to try and turn them on (the card ignores the attempt to set the bit anyway). Also removed incorrect config space register setting that was errantly borrowed from ivtv. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (8856): v4l: fix assorted compile warnings/errorsHans Verkuil2008-10-122-3/+0
| | | | | | | | BIT define conflicts on kernels < 2.6.24, byteorder/swab.h doesn't need to be included at all. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (8774): cx18: Have CX23418 release buffers at end of capture.Andy Walls2008-10-123-1/+12
| | | | | | | | | | | | cx18: Have CX23418 release buffers at end of capture. The CX23418 reuses task handles so we need to have it release the buffers associated with a task handle at the end of a capture. If we don't, buffer ids used for one type of stream in the driver (MPEG, TS, PCM), could be used for another type of stream by the CX23418, if a previously used handle is assigned to a different type of stream. The driver would drop valid buffers when this happened. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (8773): cx18: Fix cx18_find_handle() and add error checkingAndy Walls2008-10-124-19/+51
| | | | | | | | | | cx18: Fix cx18_find_handle() and add error checking. cx18_find_handle() did not find a good task handle and would use the invalid task handle under common conditions. Added a define for the invalid task handle and added error checking as well. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (8772): cx18: Convert cx18_queue buffers member to atomic_tAndy Walls2008-10-124-10/+11
| | | | | | | | | cx18: Convert cx18_queue buffers member to atomic_t. This allows safe concurrent access to check if a queue has data without having to acquire the queue spinlock. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>