summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/ivtv/ivtv-driver.h
AgeCommit message (Collapse)Author
2009-02-07ivtv: cleanup naming conventionsMauro Carvalho Chehab
From: Hans Verkuil <hverkuil@xs4all.nl> Use consistent naming for pci_dev, v4l2_device and video_device. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
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>
2008-11-29ivtv/ivtvfb: convert to v4l2_device/v4l2_subdev.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
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-09ivtv - Fix potential race condition in yuv handlerHans Verkuil
From: Ian Armstrong <ian@iarmst.demon.co.uk> Modified yuv register update handling to remove a potential race condition which could occur with the first video frame. Also removed a forced yuv position update, since changing the source video dimensions or interlace settings doesn't affect the frame already being displayed. Priority: normal Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-10-04ivtv: fix raw/sliced VBI mixupHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The service_set field was used in saa7115 and cx25840 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 these drivers should checked on VIDIOC_S_FMT whether the type field matches the raw or sliced VBI type. Updated ivtv accordingly. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-08-30v4l: fix assorted compile warnings/errorsHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> BIT define conflicts on kernels < 2.6.24, byteorder/swab.h doesn't need to be included at all. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-08-09ivtv: improve CC supportHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> - change the work-queue to a single threaded high prio workqueue - use DMA instead of PIO for the sliced VBI data. - remove some incorrect tests - increase the internal VBI capture queue size for sliced VBI packets - ignore duplicate VBI lines With these changes it should finally be possible to get reliable closed captions. Priority: high Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
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-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-05-21 ivtv: trivial annotationsMauro Carvalho Chehab
From: Al Viro <viro@ftp.linux.org.uk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-21ivtv: yuv framebuffer trackingHans Verkuil
From: Ian Armstrong <ian@iarmst.demon.co.uk> The existing yuv code limits output to the display area occupied by the framebuffer. This patch allows the yuv output to be 'detached' via V4L2_FBUF_FLAG_OVERLAY. By default, the yuv output window will be restricted to the framebuffer dimensions and the output position is relative to the top left corner of the framebuffer. This matches the behaviour of previous versions. If V4L2_FBUF_FLAG_OVERLAY is cleared, the yuv output will no longer be linked to the framebuffer. The maximum dimensions are either 720x576 or 720x480 depending on the current broadcast standard, with the output position relative to the top left corner of the display. The framebuffer itself can be resized, moved and panned without affecting the yuv output. Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-12-22ivtv: add XC2028 support for Club3D cardsHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-12-08ivtv: convert to bus-based i2c API.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-11-05ivtv: Initial merge of video48 yuv handling into the IVTV_IOC_DMA_FRAME ↵Hans Verkuil
framework From: Ian Armstrong <ian@iarmst.demon.co.uk> Previously, all yuv data written to /dev/video48 had only basic support with no double buffering to avoid display tearing. With this patch, yuv frames written to video48 are now handled by the existing IVTV_IOC_DMA_FRAME framework. As such, the frames are hardware buffered to avoid tearing, and honour scaling mode & field order options. Unlike the proprietary IVTV_IOC_DMA_FRAME ioctl, all parameters are controlled by the V4L2 API. Due to mpeg & yuv output restrictions being different, their V4L2 output controls have been separated. To control the yuv output, the V4L2 calls must be done via video48. If the ivtvfb module is loaded, there will be one side effect to this merge. The yuv output window will be constrained to the visible framebuffer area. In the event that a virtual framebuffer size is being used, the limit to the output size will be the virtual dimensions, but only the portion that falls within the currently visible area of the framebuffer will be shown. Like the IVTV_IOC_DMA_FRAME ioctl, the supplied frames must be padded to 720 pixels wide. However the height must only be padded up the nearest multiple of 32. This would mean an image of 102 lines must be padded to 128. As long as the true source image size is given, the padding will not be visible in the final output. Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-10-22ivtv: yuv interlace mode changeHans Verkuil
From: Ian Armstrong <ian@iarmst.demon.co.uk> Interlace mode selection code moved into the frame setup phase, so it's now run before the frame is loaded into a hardware buffer. Given that it can affect how a new frame is displayed, it was a bit stupid running it after the frame was already visible. A few stray interlace related variables which were linked to individual frames have now been moved into the yuv_frame_info struct. This means that all variables linked to a specific frame are in the same place & not scattered. Minor code reformatting in areas touched by the above changes. Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-10-20ivtv: ivtv_yuv_prep_frame breakup and yuv hardware buffer changesHans Verkuil
From: Ian Armstrong <ian@iarmst.demon.co.uk> ivtv_yuv_prep_frame is split in smaller code blocks. Modified yuv buffer handling on the PVR350 itself. We now cycle through all 8 hardware buffers. With this patch in place, driver behaviour should remain unchanged from the existing release. Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-10-16ivtv: ivtv yuv stream handling changeHans Verkuil
From: Ian Armstrong <ian@iarmst.demon.co.uk> Currently the yuv output stream buffer is divided into blocks whose size depend on the broadcast standard selected during the driver init phase. However, the standard can be changed after the init phase. This effectively breaks the yuv output stream handler, since it relies on the different yuv planes being block aligned. This patch changes the setup, so that the block size is always the same. The decoder dma function has been modified to cope with the fact that the second yuv plane may no longer be block aligned. The start of the yuv frame must still be at the beginning of a block, so the stream write function has also been modified to ensure this is always true. Also, the stream write function will now initiate a yuv dma transfer as soon as a full frame is ready. It will not wait until the current write request has completed, or the stream buffer becomes full. Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-11-02Backport some changesets touching S/G codeMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> kernel-sync: Backport kernel changesets: 45711f1af6eff1a6d010703b4862e0d2b9afd056 117636092a87a28a013a4acb5de5492645ed620f 642f149031d70415d9318b919d50b71e4724adbd Also, added newer entreis at compat.h, to avoid needing to add checks for linux versions inside the source codes. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-08-26ivtv: move ivtv.h public header to include/linux.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-08-26ivtvfb: rename some missed ivtv-fb references to ivtvfb.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-08-25ivtv: finish VBI related cleanup.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-08-25ivtv: VBI cleanups and fixesHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Besides some VBI cleanups this patch also fixes a subtle problem with the VBI re-insertion stream where the PIO work handler wasn't called quickly enough, resulting in occasional corrupt data. Furthermore the CC output didn't disable CC correctly and at the right time, causing duplicates to be sent. An saa7127 fix for VPS output was also added: the wrong data was sent. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-08-24merge: http://linuxtv.org/hg/~hverkuil/v4l-dvbMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-08-24ivtv: set correct pixel format and alpha properties in VIDIOC_G_FBUFHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-08-23ivtv: more ivtv-driver.h cleanups.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-08-23ivtv: reorganized and cleanup ivtv structHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-08-23ivtv: more cleanups, merged ivtv-audio.c and ivtv-video.c into ivtv-routing.cHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-08-23ivtv: header cleanupHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> - add guards - remove unused header includes - move card-specific stuff from ivtv-driver.h to ivtv-cards.h - move YUV-specific stuff from ivtv-driver.h to ivtv-yuv.h Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
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-20ivtv: fix output mode processing: UDMA_YUV wasn't cleared.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> - Always clear when stopping the decoder - Clear if the filehandle that is being close was used for UDMA_YUV output. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-08-19ivtv: add support for highmem udmaHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> When trying to DMA userspace buffers to the cx23415 you need to check whether the page is in highmem. If this is the case, then bounce buffers have to be used to allow DMA. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-08-19ivtv: improve debug messagesHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> - add FILE debug flag for open/close/read/write/poll. - show cmd for encoder/decoder command ioctl. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-08-19ivtv: specify some stream sizes in kB instead of MBHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Some streams (PCM, VBI decoding) do not need that much memory, so specify the allocated memory in kB instead of MB to limit memory usage. E.g. 1 MB is overkill for the VBI decoding stream, 64 kB is enough. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-07-29ivtv: Fix scatter/gather DMA timeoutsHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> It turns out that the cx23415/6 DMA engine cannot do scatter/gather DMA reliably. Every so often depending on the phase of the moon and your hardware configuration the cx2341x DMA engine simply chokes on it and you have to reboot to get it working again. This change replaced the scatter/gather DMA by single transfers at a time, where the driver is now responsible for DMA-ing each buffer. UDMA is still done using scatter/gather DMA, that will be fixed soon. Many thanks to Mark Bryars <mark.bryars@etvinteractive.com> for discovering the link between scatter/gather and the DMA timeouts. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-07-28ivtv: always steal full frames if out of buffers.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> When there are no more free buffers, then buffers are stolen from the predma queue. Buffers should be stolen from the head of that queue (which is where the most recently added buffers are) and all buffers belonging to a frame should be stolen. Otherwise 'half-frames' would remain in the queue, which leads to ugly playback and complete sync failure for YUV buffers. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-08-07ivtv: remove unused struct field.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-08-07ivtv: remove userspace tuner dependent codeHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> By request of mchehab I've removed the userspace tuner dependent code. Use my v4l-dvb-xc tree in the meantime for the userspace tuner support. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-08-05ivtv: simplify setting CONFIG_XC3028Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-08-04ivtv: add AverMedia M116, prepare for userspace Xceive tunerHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> - Split Club3D card from Yuan PG600-2, GotView PCI DVD Lite (different composite input) - Add AVerTV MCE 116 Plus (M116) card - Allow Xceive cards to be used without Xceive support - Update Xceive support to latest userspace tuner (still not on by default, pending inclusion of userspace tuner in the kernel). - Use CONFIG_XC3028 rather than HAVE_XC3028: gentree.pl will remove them automatically. Thanks to Markus Rechberger for help with the userspace tuner support. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-08-03ivtv: attach yuv field order to each frameHans Verkuil
From: Ian Armstrong <ian@iarmst.demon.co.uk> In the current driver, the field order is global. As soon as it's changed it takes immediate effect. This is a problem when the video changes order mid stream. Although it mostly works okay, the video may judder / flicker. This patch attaches the field order to the frame, so that any buffered frames will not be displayed until the correct field. In the event that the field order is changed mid stream, the driver will ensure that the previous frame is displayed for a minimum of 3 fields. These are the two original fields the frame should have occupied, plus the one extra since the new frame still has to wait for the correct field. Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-07-30ivtv: fix semaphore / mutex compat for kernels 2.6.15 and earlierMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2007-07-25Merge: from hg/~hverkuil/v4l-dvb2Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-07-22ivtv, cx25840: postpone fw load until first use.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The firmware is now loaded when the driver is actually used for the first time. This allows the driver to be compiled in-kernel instead of as a module. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-07-22ivtv: fix pause/continue/play handlingHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Pausing a decoder followed by a Play command would do nothing. Fixed. Pausing a decoder running at non-standard speed following by a Continue would reset the speed to 100%. Fixed. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-07-20Add ivtv-fb framebuffer driver.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Add the ivtv-fb framebuffer driver for cx23415 devices (currently only the Hauppauge PVR-350 cards). This makes it possible to use the On-Screen Display functionality of these cards, either for menus during MPEG playback, or as a console or X display. Signed-off-by: Kevin Thayer <nufan_wfk@yahoo.com> Signed-off-by: Chris Kennedy <c@groovy.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: John P Harvey <john.p.harvey@btinternet.com> Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
2007-07-19Remove usage of HZ on ivtv driver, replacing by msecs_to_jiffiesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-10ivtv: add high volume debugging flagHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Add support for high volume debug messages, allowing them to be turned on selectively. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-07-10ivtv: Add locking to ensure stream setup is atomic.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Starting an MPEG and VBI capture simultaneously caused errors in the VBI setup: this setup was done twice when it should be done only for the first stream that is opened. Added a mutex to prevent this from happening. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-06-16ivtv: fix broken VBI output supportHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The old service_set_out setting was still tested, even though it no longer was ever set and was in fact obsolete. This meant that everything that was written to /dev/vbi16 was ignored. Removed the service_set_out variable altogether and now it works again. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>