summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/ivtv/ivtv-ioctl.c
AgeCommit message (Collapse)Author
2007-12-08 ivtv: Some general fixesMauro Carvalho Chehab
From: Richard Knutsson <ricknu-0@student.ltu.se> Fix "warning: Using plain integer as NULL pointer". Convert 'x < y ? x : y' to use min() instead. Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-12-02 ivtv: Remove a invalid shadow-variableMauro Carvalho Chehab
From: Richard Knutsson <ricknu-0@student.ltu.se> Remove the shadowing 'struct v4l2_chip_ident *chip', since it already exists and makes the if-statement useless. Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-05ivtv: ivtv yuv format description correctionHans Verkuil
From: Ian Armstrong <ian@iarmst.demon.co.uk> The driver was incorrectly reporting that it supported YUV 4:2:2 output, when it is actually YUV 4:2:0. Though I believe the hardware can be pushed to 4:2:2, we don't currently support that. Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> 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-12ivtv: fix resizing MPEG1 streamsHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Resizing an MPEG 1 stream would cut off the right half of the image due to a missing divide by 2 in VIDIOC_S_FMT. Also did some minor cleanup in this part of the code. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-08-25ivtv: use new videodev2.h pixel formatsHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
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: fix VIDIOC_G_ENC_INDEX flag handlingHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Due to a documentation bug (the type mask is 3 bits long, not 2) the wrong frame types were filled in: the B and P frame types were swapped. This bug also hid a second bug: when a capture is stopped a last entry is written into the pgm index buffer with internal type 0, denoting the end of the program. This entry wasn't ignored, instead it was accidentally returned to the caller as a P frame. 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-22ivtv: log in status if framebuffer uses YUV instead of RGBHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-08-20ivtv: prevent changing VBI format while capture is in progress.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Changing the VBI format requires a CX2341X_ENC_INITIALIZE_INPUT firmware call. This can only be done if no capture is in progress. So return -EBUSY if the encoder is busy. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
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 VIDIOC_OVERLAYHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Add VIDIOC_OVERLAY to enable/disable the OSD. Also add the OSD state to the log status report. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-08-19ivtv: log stereo/bilingual audio modesHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-08-19ivtv: move serialization to the fileops level.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Serialization is now done on the open/close/ioctl level and also when the read/write/poll start an encoder/decoder stream. 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-18ivtv: fix handling of INITIALIZE_INPUT fw callHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The CX2341X_ENC_INITIALIZE_INPUT firmware call requires careful handling, otherwise the computer can freeze or the top-third of the screen can start flickering. This patch ensures that CX2341X_ENC_INITIALIZE_INPUT is called at the right time and in the right way. In addition the stop capture handling was improved so that the last pending DMA transfer is also processed. Otherwise this would be the first data that arrived when a new capture was started which is not what you want. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-08-04ivtv: make VIDIOC_INT_RESET support smarter.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Add support to optionally reset the IR and/or the video digitizer. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-08-04ivtv: show card name as well in the LOG_STATUS output.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-08-03ivtv: report ivtv version in status log.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-07-31ivtv: fix VIDIOC_S_FBUF support: new OSD values where never actually set.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The values set with VIDIOC_S_FBUF were not actually used until the next VIDIOC_S_FMT. Fixed. 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-06-16ivtv: fix return code of VIDIOC_G/S_FBUF when no framebuffer is present.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-06-07ivtv: fix ia64 printk format warnings.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-05-29Add ivtv CROPCAP support and fix ivtv S_CROP for video output.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The VIDIOC_CROPCAP ioctl was missing in ivtv. The handling of output video cropping was wrong. This has now been fixed. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-05-21Backed out changeset c7cb1aaec112a3ee7d6483b54d03d6a093754f10Hans Verkuil
2007-05-19Use v4l2_pix_out_fmt instead of v4l2_pix_fmt for video output formatHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Adding top/left fields to v4l2_pix_fmt broke the ABI. To fix this a new v4l2_pix_out_fmt struct was introduced to specify the video output format. This new struct *does* have the additional top/left fields. The V4L2_CAP_VIDEO_OUTPUT_POS capability that was introduced is no longer needed and is removed. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-05-17Adding new fields to v4l2_pix_format broke the ABI, reverted that changeHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Reverted the change to struct v4l2_pix_format. I completely missed that this struct was used by existing ioctls so that changing it broke the ABI. I will have to think of another way of setting the top/left coordinates but for now this change is reverted to preserve compatibility. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-04-10ivtv: fix incorrect bitwise-and for command flags.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-03-10Fix VIDIOC_TRY_ENCODER_CMD and VIDEO_TRY_COMMANDHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> VIDIOC_TRY_ENCODER_CMD did the same as VIDIOC_ENCODER_CMD, now it no longer touches the encoder. Both the encoder and decoder commands did not clear the flags field of unknown flags. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-03-10Use v4l_printk_ioctl instead of printing the ioctl name for each ioctl in ivtv.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Using v4l_printk_ioctl saves a lot of code duplication. Also moved a few ioctl cases to another function, improving the ioctl grouping. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-03-10Add VIDIOC_G/S_PRIORITY support to ivtv.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-03-10Set vsync_field correctly in ivtv.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-02-27Update ivtv VIDIOC_G_CHIP_IDENT.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> ivtv now sets the correct chip ident and returns the correct error codes. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-02-27Fix comment style and set default debug level to 0Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Convert the '//' comments to kernel approved /* */ style comments. Set the default debug level to 0. As a result of which change some DEBUG_WARNs to errors or remove them altogether. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-02-26Add ivtv driver for the Conexant cx23416/cx23415 MPEG encoder/decoderHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> It took three core maintainers, over four years of work, eight new i2c modules, eleven new V4L2 ioctls, three new DVB video ioctls, a Sliced VBI API, a new MPEG encoder API, an enhanced DVB video MPEG decoding API, major YUV/OSD contributions from Ian and John, web/wiki/svn/trac support from Axel Thimm, (hardware) support from Hauppauge, support and assistance from the v4l-dvb people and the many, many users of ivtv to finally make it possible to merge this driver into the kernel. Thank you all! 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>