summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx18
AgeCommit message (Collapse)Author
2009-01-29v4l2: fix incorrect hue range checkHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> A hue of -128 was rejected due to an incorrect range check, which was faithfully copy-and-pasted into four drivers... Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-01-19cx18: Add initial entry for a Leadtek DVR3100 H hybrid cardAndy Walls
From: Andy Walls <awalls@radix.net> Card report provided by Patryk on the ivtv-devel list: http://ivtvdriver.org/pipermail/ivtv-devel/2009-January/005922.html Reported-by: Pat <tatyrza@mm.pl> Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-01-17cx18: Call request_module() with proper argument types.Andy Walls
From: Andy Walls <awalls@radix.net> request_module() needs to be called with a string literal for a format string or with 1 or more variable arguments to avoid compiler warnings and possible exploits, if someone could cause us to get a format string with a '%' code in the format string when we make the call. Reported-by: Brandon Jenkins <bcjenkins@tvwhere.com> Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-01-11cx18: Conversion to new V4L2 framework: use v4l2_device objectAndy Walls
From: Andy Walls <awalls@radix.net> First step in conversion to the new V4L2 framework. Added per cx18 device instance of the v4l2_device and its registration. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-01-10cx18: Rename structure members: dev to pci_dev and v4l2dev to video_devAndy Walls
From: Andy Walls <awalls@radix.net> Renamed structure member name to be more specific to type in anticipation of updating to the v4l2_device/v4l2_subdev framework. Too many objects named "dev" and /v4l2_\{0,1\}dev/ would be to confusing. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-01-10cx18: Print driver version number when logging statusAndy Walls
From: Andy Walls <awalls@radix.net> Make sure v4l2-ctl --log-status outputs the driver version. Reported-by: David Dombroski <davedom@optonline.net> Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-01-04cx18: Fix bad audio in first analog capture.Andy Walls
From: Andy Walls <awalls@radix.net> Normalize the APU state before the second firmware load so that audio for the first analog capture is correct. Many thanks to Conexant for supporting me in finding a solution for this problem. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-01-03cx18, cx2341x: Fix bugs in cx18 AC3 control and comply with V4L2 specAndy Walls
From: Andy Walls <awalls@radix.net> Fix bugs in the cx18 AC3 control implementation that would have affected ivtv and other drivers via the cx2341x module. Bring AC3 controls behavior into comliance with V4L2 specification. Thanks to Hans Verkuil for reviewing the previous patch and pointing out the problems. Reported-by: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-01-01cx18, cx2341x, ivtv: Add AC-3 audio encoding control to cx18Andy Walls
From: Andy Walls <awalls@radix.net> Initial addition of controls to set AC-3 audio encoding for the CX23418 - it does not work yet due to firmware or cx18 driver issues. This change affects the common cx2341x and ivtv modules due to shared structures and common functions. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-01-01cx18: Additional debug to display outgoing mailbox parametersAndy Walls
From: Andy Walls <awalls@radix.net> Added debug display of outgoing mailbox arguments. Fixed a minor problem with display of stale incoming mailbox contents, when user was not looking for debug warnings. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-01-01cx18: Fix a PLL divisor update for the I2S master clockAndy Walls
From: Andy Walls <awalls@radix.net> A redundant PLL divisior update for the I2S master clock after AV core firmware load was missed in earlier PLL parameter changes. This one really doesn't matter because it's redundant and gets overwritten, but the driver should be self consistent in the values used. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-12-30v4l2: debugging API changed to match against driver name instead of ID.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Since the i2c driver ID will be removed in the near future we have to modify the v4l2 debugging API to use the driver name instead of driver ID. Note that this API is not used in applications other than v4l2-dbg.cpp as it is for debugging and testing only. Should anyone use the old VIDIOC_G_CHIP_IDENT, then this will be logged with a warning that it is deprecated and will be removed in 2.6.30. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-12-30v4l2-ioctl: change to long return type to match unlocked_ioctl.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Since internal to v4l2 the ioctl prototype is the same regardless of it being called through .ioctl or .unlocked_ioctl, we need to convert it all to the long return type of unlocked_ioctl. Thanks to Jean-Francois Moine for posting an initial patch for this and thus bringing it to our attention. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> CC: Jean-Francois Moine <moinejf@free.fr>
2008-12-30v4l2: introduce v4l2_file_operations.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Introduce a struct v4l2_file_operations for v4l2 drivers. Remove the unnecessary inode argument. Move compat32 handling (and llseek) into the v4l2-dev core: this is now handled in the v4l2 core and no longer in the drivers themselves. Note that this changeset reverts an earlier patch that changed the return type of__video_ioctl2 from int to long. This change will be reinstated later in a much improved version. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-12-20cx18: Use a consistent crystal value for computing all PLL parametersAndy Walls
From: Andy Walls <awalls@radix.net> Use a consistent crystal value of 28.636360 MHz for computing all PLL parameters so clocks don't have relative error due to assumed crystal value mismatches. Also aimed to have all PLLs run their VOCs at close to 400 MHz to minimze the error of these PLLs as frequency synthesizers. Also set the VDCLK and AIMCLK PLLs to sane values before the APU and CPU firmware are loaded. Also fixed I2S Master clock dividers. Many thanks to Mike Bradley and Jeff Campbell for reporting this problem and suggesting the solution, researching and experimenting, and performing extensive testing to support their suggested solution. Reported-by: Jeff Campbell <jac1dlists@gmail.com> Reported-by: Mike Bradley <mike.bradley@incanetworks.com> Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-12-20cx18: Disable locking of Video and Audio PLL for analog capturesAndy Walls
From: Andy Walls <awalls@radix.net> Disable AV_LOCK, locking of audio PLL to video PLL in the cx18-av-core for analog captures. It seems to have adverse effects on captures from SVideo and CVBS sources with current clock & crystal settings in the driver. Many thanks to Jeff Campbell and Mike Bradley for reporting this problem, and suggesting the solution and performing extensive testing to support their suggestion. Reported-by: Jeff Campbell <jac1dlists@gmail.com> Reported-by: Mike Bradley <mike.bradley@incanetworks.com> Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-12-16Revert changeset 9886Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Changeset 9886 were applied by mistake, reverting changeset 9885, that got a wrong comment. Let's revert it. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-15merge: http://linuxtv.org/hg/~awalls/v4l-dvbMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-14cx18: Refine the firmware load and firmware startup processAndy Walls
From: Andy Walls <awalls@radix.net> Refine the firmware load and firmware startup process. Significant changes are to ensure the SCB and IPC area are correct before starting up the firmware, and letting the CPU firmware start up the APU firmware for us. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-12-12cx18: Enable raw VBI captureAndy Walls
From: Andy Walls <awalls@radix.net> A combined authorship patch from Hans Verkuil and Andy Walls. Raw VBI can now be captured but requires a video capture to be in progress as well. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-12-12cx18: Port fix for raw/sliced VBI mixup from ivtv and cx25840Andy Walls
From: Andy Walls <awalls@radix.net> This is a port of the fixes Hans Verkuil made for ivtv/cx25840: The service_set field was used to determine whether raw or sliced VBI was desired. This is incorrect since it is perfectly valid to select sliced VBI with a service_set of 0. Instead the driver should check on VIDIOC_S_FMT whether the type field matches the raw or sliced VBI type. Updated the cx18 driver accordingly, including an additional check in cx18_start_v4l2_encode_stream() that didn't exist in ivtv. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-12-12cx18: Avoid making firmware API calls with the queue lock heldAndy Walls
From: Andy Walls <awalls@radix.net> cx18: Avoid making firmware API calls with the queue lock held. The source of MPEG strem corruption when not holding the queue lock was found to be that the MPEG buffer could be retrieved by the user app before it was sync'ed for the host cpu. Incoming buffers are now sync'ed before being put on q_full and releasing the queue lock. We can thus avoid the sometimes lengthy call to the firmware for CPU_DE_SET_MDL while holding the queue lock, so we can get better performance. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-12-08cx18: Increment version number due to siginificant buffering changesAndy Walls
From: Andy Walls <awalls@radix.net> cx18: Increment version number due to siginificant buffering changes. Now version 1.0.4 Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-12-07cx18: Add module parameters for finer control over buffer allocationsAndy Walls
From: Andy Walls <awalls@radix.net> cx18: Add module parameters for finer control over buffer allocations. User now has the option of setting smaller buffers to get lower latency transfers from the encoder. User can also now set the number of buffers used for a stream explicitly. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-12-08cx18: Allow more than 63 capture buffers in rotation per streamAndy Walls
From: Andy Walls <awalls@radix.net> cx18: Allow more than 63 capture buffers in rotation per stream. Implement q_busy to hold buffers the firmware has for use. q_free holds truly unused buffers in a pool. New buffers are given to the firmware as soon as the firmware returns one, if there are any to give to the firmware. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-11-27cx18: Eliminate q_io from stream buffer handlingAndy Walls
From: Andy Walls <awalls@radix.net> Eliminate q_io from stream buffer handling in anticipation of upcoming changes in buffer handling. q_io was a holdover from ivtv and it's function in cx18 was trivial and not necessary. We just push things back onto the front of q_full now, instead of maintaining a 1 buffer q_io queue. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-11-30cx18: cx18_writel_expect() should not declare success on a PCI read errorAndy Walls
From: Andy Walls <awalls@radix.net> cx18: cx18_writel_expect() should not declare success on a PCI read error. This removes the potential for cx18_write*_expect() calls to not accomplish a PCI write successfully as expected. The CX18-AV core uses the *expect() calls often and this may be the source of intermittent audio problems and standands switching problems. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-11-25cx18: Change work_queue teardown to work for kernels earlier than 2.6.22Andy Walls
From: Andy Walls <awalls@radix.net> For kernels earlier than 2.6.22, we can't cancel work, so we have to flush the work queue to completion before destroying it. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-11-25cx18: Change to per CX23418 device work queues for deferrable work handlingAndy Walls
From: Andy Walls <awalls@radix.net> cx18: Change to per CX23418 device work queues for deferrable work handling. Needed to support 2.6.22 and earlier kernels that can't selectively cancel work orders. Also will provide slightly better performance on SMP systems. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-11-23cx18: Use a known open task handle when setting stream CX2341x parametersAndy Walls
From: Andy Walls <awalls@radix.net> cx18: Use a known open task handle when setting stream CX2341x parameters Sometimes, we might only have VBI or YUV stream open instead of an MPEG stream. Let's make sure we use a valid task handle to perform the CX2341x control settings. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-12-14cx18: Convert some list manipulations to emphasize entries not listsAndy Walls
From: Andy Walls <awalls@radix.net> Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-12-14cx18: VBI comment corrections and comments about VBI issuesAndy Walls
From: Andy Walls <awalls@radix.net> VBI comment corrections to avoid future confusion about standards. Comments on cx18 VBI implementation shortcomings that need resolution. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-12-14cx18 Replace magic number 63 with CX18_MAX_FW_MDLS_PER_STREAMAndy Walls
From: Andy Walls <awalls@radix.net> Removed magic number that referred to firmware limit on the number of MDLs the firmware can maintain for any stream at any one time. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-12-14changeset: 9885:77f72ebfa794Mauro Carvalho Chehab
tag: tip user: Mauro Carvalho Chehab <mchehab@redhat.com> date: Sun Dec 14 09:16:55 2008 -0200 files: linux/drivers/media/dvb/b2c2/Kconfig linux/drivers/media/dvb/bt8xx/Kconfig linux/drivers/media/dvb/dvb-usb/Kconfig linux/drivers/media/dvb/ttpci/Kconfig linux/drivers/media/video/cx18/Kconfig linux/drivers/media/video/cx23885/Kconfig linux/drivers/media/video/cx88/Kconfig linux/drivers/media/video/pvrusb2/Kconfig linux/drivers/media/video/saa7134/Kconfig description: media Kconfigs: fix bugzilla #12204 From: Mauro Carvalho Chehab <mchehab@redhat.com> 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 A manual reordering were done to have the media selects just after the dvb ones. Priority: high Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-23cx18: Quiet a sometimes common warning that often has benign consequencesAndy Walls
From: Andy Walls <awalls@radix.net> cx18: Quiet a sometimes common warning that often has benign consequences. No one probably cares that the firmware took forever to ack our command, as they always seem to succeed whether or not the firmware acks it in a reasonable amount of time. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-11-21cx18: Update version due to significant irq handling changesAndy Walls
From: Andy Walls <awalls@radix.net> Update the version number due to significant changes in the way the mailboxes and interrupts are handled. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-11-21cx18: Copyright attribution update for files modified by awallsAndy Walls
From: Andy Walls <awalls@radix.net> Add copyright attribution for files modified by awalls in 2008 Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-11-21cx18: Adjust outgoing mailbox timeouts and remove statistics loggingAndy Walls
From: Andy Walls <awalls@radix.net> 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. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-11-18cx18: Restore buffers that have fallen out of the transfer rotationAndy Walls
From: Andy Walls <awalls@radix.net> Restore buffers that have fallen out of the transfer rotation, and check for coherent mailbox data when processing a stale mailbox. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-11-17cx18: Remove unnecessary MMIO accesses in time critical irq handling pathAndy Walls
From: Andy Walls <awalls@radix.net> 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. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-11-16cx18: Streamline cx18-io[ch] wrappers and enforce MMIO retry strategyAndy Walls
From: Andy Walls <awalls@radix.net> 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. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-11-16cx18: Propagate staleness of mailbox and mdl ack data to work handlerAndy Walls
From: Andy Walls <awalls@radix.net> 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. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-11-16cx18: Convert per stream queue spinlocks into mutexesAndy Walls
From: Andy Walls <awalls@radix.net> 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. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-11-16cx18: Change to singlethreaded global work queue thread for deferable workAndy Walls
From: Andy Walls <awalls@radix.net> 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. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-11-15cx18: Major rewrite of interrupt handling for incoming mailbox processingAndy Walls
From: Andy Walls <awalls@radix.net> 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. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-11-12merge: http://linuxtv.org/hg/~awalls/cx18-bugfixMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-09cx18: Fix unitialized variable problem upon APU firmware file read failureAndy Walls
From: Andy Walls <awalls@radix.net> 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. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-11-09cx18: Prevent CX23418 from clearing it's outgoing ack interrupts to driverAndy Walls
From: Andy Walls <awalls@radix.net> 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. Priority: high Signed-off-by: Andy Walls <awalls@radix.net>
2008-11-08cx18: Minor fixes to APU firmware load processAndy Walls
From: Andy Walls <awalls@radix.net> 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. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-11-08cx18: Further changes to improve mailbox protocol integrity & performnceAndy Walls
From: Andy Walls <awalls@radix.net> 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. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>