summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx18
AgeCommit message (Collapse)Author
2008-10-25cx18: Remove redundant block scope variable in cx18_probe() for sparseAndy Walls
From: Andy Walls <awalls@radix.net> cx18: Remove redundant block scope variable in cx18_probe() to eliminate sparse build warning. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-10-18backport commit 1a651a00e20fd4997f0b91258f6f95b7d96edcd9Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Author: Harvey Harrison <harvey.harrison@gmail.com> byteorder: remove direct includes of linux/byteorder/swab[b].h A consolidated implementation will provide this generically through asm/byteorder, remove direct includes to avoid breakage when the changeover to the new implementation occurs. kernel-sync: Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-18cx18: Don't mask many real init error codes by mapping them to ENOMEMAndy Walls
From: Andy Walls <awalls@radix.net> 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. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-10-18cx18: Add __iomem address space qualifier to cx18_log_*_retries() argumentAndy Walls
From: Andy Walls <awalls@radix.net> cx18: Add __iomem address space qualifier to cx18_log_*_retries() addr argument to clean up sparse build warnings. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-10-18cx18: Fix memory leak on card initialization failureAndy Walls
From: Andy Walls <awalls@radix.net> On error exit, the cx18_probe() function did not use the proper entry in cx18_cards[] with kfree() when card init failed; leaking memory. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-09-08cx18/ivtv: add 'PCI:' prefix to bus_info.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Suggested by Martin Dauskardt. This is conform what the other drivers do. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-10-11merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-devMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-04cx18: Fix warning message for DMA done notification for inactive stream.Andy Walls
From: Andy Walls <awalls@radix.net> 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). Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-10-04cx18: Add entries for the Leadtek PVR2100 and Toshiba Qosmio DVB-T/AnalogAndy Walls
From: Andy Walls <awalls@radix.net> 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. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-10-04v4l: disconnect kernel number from minorHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> 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. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-10-03cx18: Up the version to 1.0.1Andy Walls
From: Andy Walls <awalls@radix.net> 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. Priority: high Signed-off-by: Andy Walls <awalls@radix.net>
2008-09-28cx18: Add default behavior of checking and retrying PCI MMIO accessesAndy Walls
From: Andy Walls <awalls@radix.net> 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. Priority: high Signed-off-by: Andy Walls <awalls@radix.net>
2008-09-12convert tuner drivers to use dvb_frontend->callbackMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Priority: normal Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2008-09-10merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-cleanupsMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-08merge: http://linuxtv.org/hg/~awalls/v4l-dvbMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-06cx18: Set mmio throttling delay default to 0 nsec.Andy Walls
From: Andy Walls <awalls@radix.net> cx18: Set mmio throttling delay default to 0 nsec. Not doing so makes analog tuner audio not work on some mahcines. Priority: high Signed-off-by: Andy Walls <awalls@radix.net>
2008-09-06cx18: fix sparse warningsHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-09-06cx18/ivtv: fix check of window boundaries for VIDIOC_S_FMTHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> It was possible to set out-of-bounds windows sizes, this is now fixed. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-09-06cx18: Fix tuner audio input for Compro H900 cardsHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Earlier fixes to get the tuner audio working correctly broke the audio on the Compro VideoMate H900 cards. This is now fixed. Priority: high Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-09-05merge: http://linuxtv.org/hg/~awalls/v4l-dvbMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Fixed a trivial conflict between a janitor's patch from Hans Verkuil and Andy patch series. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-04cx18: Increment u8 pointers not void pointers.Andy Walls
From: Andy Walls <awalls@radix.net> 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. Priority: high Signed-off-by: Andy Walls <awalls@radix.net>
2008-08-31cx18: Throttle mmio to/from the CX23418 so boards work in older systemsAndy Walls
From: Andy Walls <awalls@radix.net> 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. Priority: high Signed-off-by: Andy Walls <awalls@radix.net>
2008-08-30cx18: Create cx18_ specific wrappers for all pci mmio accessesors.Andy Walls
From: Andy Walls <awalls@radix.net> 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. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-08-29cx18: Correct CX23418 PCI configuration settings.Andy Walls
From: Andy Walls <awalls@radix.net> 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. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-08-23cx18: Have CX23418 release buffers at end of capture.Andy Walls
From: Andy Walls <awalls@radix.net> 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. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-08-23cx18: Fix cx18_find_handle() and add error checkingAndy Walls
From: Andy Walls <awalls@radix.net> 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. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-08-22cx18: Convert cx18_queue buffers member to atomic_tAndy Walls
From: Andy Walls <awalls@radix.net> 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. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-08-22cx18: Remove redundant struct cx18_queue length member.Andy Walls
From: Andy Walls <awalls@radix.net> cx18: Remove redundant struct cx18_queue length member. It can be trivially computed from queue->buffers * stream->buf_size, if ever really needed. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-08-22cx18: get rid of ununsed buffers stolen fieldAndy Walls
From: Andy Walls <awalls@radix.net> cx18: get rid of ununsed buffers stolen field. It's an unused holdover from ivtv. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-08-22cx18: Simplify queue flush logic to prevent oops in cx18_flush_queues()Andy Walls
From: Andy Walls <awalls@radix.net> cx18: Simplify queue flush logic to prevent oops in cx18_flush_queues(). If accounting of a queue is in error, logic borrowed from ivtv will cause an oops when flushing the queues for a stream. This change greatly simplifies the queue flush logic, and sets the queue back to sane defaults on a flush. Priority: high Signed-off-by: Andy Walls <awalls@radix.net>
2008-08-17cx18: Add missing lock for when the irq handler manipulates the queuesAndy Walls
From: Andy Walls <awalls@radix.net> cx18: Add missing lock for when the irq handler manipulates the queues. This was a potential source of stream queue corruption. Also changed the name of cx18_queue_find_buf() to cx18_queue_get_buf_irq(). Priority: high Signed-off-by: Andy Walls <awalls@radix.net>
2008-07-27remove select's of FW_LOADERMauro Carvalho Chehab
From: Adrian Bunk <bunk@kernel.org> After commit d9b19199e4894089456aaad295023263b5225c1a (always enable FW_LOADER unless EMBEDDED=y) we can remove the FW_LOADER select's and corresponding dependencies on HOTPLUG. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-26v4l2-dev: remove unused type and type2 field from video_deviceHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> 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>
2008-07-21videodev: move all ioctl callbacks to a new v4l2_ioctl_ops structHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> 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>
2008-07-25cx18: Lock the aux PLL to the video pixle rate for analog capturesAndy Walls
From: Andy Walls <awalls@radix.net> cx18: Lock the aux PLL to the video pixel rate for analog captures. The datasheet for the CX25840 says this is important for MPEG encoding applications. To ensure the PLL locking was correct, also fixed the aux PLL's multiplier to be computed based on a precise crystal freq of 4.5 MHz/286 * 455/2 * 8 = 28636363.6363... instead of the imporperly rounded 28636363. Signed-off-by: Andy Walls <awalls@radix.net>
2008-07-23cx18: Fix 32 kHz audio sample output rate for analog tuner SIF inputAndy Walls
From: Andy Walls <awalls@radix.net> cx18: Fix 32 kHz audio sample output rate for analog tuner SIF input so it works. The AUX_PLL VCO was being operated at 196.6 MHz out of the spec'ed 200-600 MHz range. Fixed the multipler and post dividers to operate the VCO within specification and added comments on how magic numbers are derived. Thanks to Hans Verkuil for pointing out this interesting problem to solve. Signed-off-by: Andy Walls <awalls@radix.net>
2008-07-20merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-videodev2Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20videodev: move some functions from v4l2-dev.h to v4l2-common.h or v4l2-ioctl.hHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> 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>
2008-07-20videodev: rename 'dev' to 'parent'Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The field 'dev' is not the video device, but the parent of the video device. Rename accordingly. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-19cx18: remove firmware size checkHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> This check was an ivtv leftover that served no purpose for the cx18. Removed it, as this allows the user to load different firmware versions. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-18videodev/cx18: fix get_index bug and error-handling lock-upsHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Fix a bug in get_index that was introduced earlier. Also fix two error handling lock-ups in videodev and cx18 that where found thanks to that bug. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-17cx18/smsusb: fix compile errors when building for kernels < 2.6.19Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-17cx18: move cx18_av_vbi_setup to av-core.c and rename to cx18_av_std_setupHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Same issue as for cx25840: this function sets up the standard timings and has nothing to do with VBI setup. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-17ivtv/cx18: ensure the default control values are correctHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> For several MPEG controls and the volume control the default as returned by VIDIOC_QUERYCTRL was incorrect and did not match the actual initial value. This is now fixed for cx18 and ivtv. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-13cx18: Suport external reset of the Z8F0811 IR controller on HVR-1600 for lircAndy Walls
From: Andy Walls <awalls@radix.net> cx18: added in cx18_ir_reset_gpio function for lirc_pvr150 like module. Also added the ability to reset the IR chip via ioctl like ivtv. This needs the mutex to protect gpio_dir and gpio_val in struct cx18 as gpio changes can come from a few different asynchronous sources now. Signed-off-by: Andy Walls <awalls@radix.net>
2008-07-13cx18: Add locking for struct cx18 GPIO state variablesAndy Walls
From: Andy Walls <awalls@radix.net> cx18: Add locking for struct cx18 GPIO state variables in anticpation of adding IR microcontroller reset support for use by external IR modules. Signed-off-by: Andy Walls <awalls@radix.net>
2008-07-08Fix a const pointer error in the Conexant cx23418 MPEG encoder driverMauro Carvalho Chehab
From: David Howells <dhowells@redhat.com> Fix a const pointer to non-const pointer assignment error in the Conexant cx23418 MPEG encoder driver. This was introduces in patch 1c1e45d17b663d4749af456ab7c2fc1f36405ef8. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-08v4l-dvb: remove support for kernels < 2.6.16Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Phase 4 removes the compatibility support for kernels < 2.6.16. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-08v4l-dvb: remove support for kernels < 2.6.13Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Phase 3 of the compat cleanup. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-08v4l-dvb: remove support for kernels < 2.6.10Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Phase 2 removes support for kernels < 2.6.10. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>