aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx2341x.c
Commit message (Collapse)AuthorAgeFilesLines
* [media] v4l2-ctrls: use const char * const * for the menu arraysHans Verkuil2010-12-301-4/+4
| | | | | | | | | | This prevents checkpatch warnings generated when defining 'static const char *foo[]' arrays. It makes sense to use const char * const * anyway since the pointers in the array are indeed const. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: cx2341x: convert to the control frameworkHans Verkuil2010-08-081-112/+635
| | | | | | | | | | | | | | | | Since this module is also used by drivers that are not yet converted, the old and new code have to co-exist. The source is split into three parts: a common part at the top, which is used by both old and new code, then the old code followed by the new control framework implementation. This new code is much more readable (and shorter!) than the original code. Once all bridge drivers that use this are converted the old code can be deleted. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: cx2341x: Report correct temporal setting for log-statusIan Armstrong2010-06-011-5/+1
| | | | | | | | | [Andy Walls comment:] This patch from Ian removes the cx2341x module lying about the setting of the temporal filter for the log status ioctl(). Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: cx2341x: Remove temporal filter control restrictionIan Armstrong2010-05-181-14/+0
| | | | | | | | | | Since the change that stops the CX23415/6 firmware-intiiated secondary stream appears to fix the temporal filter, it's now fully re-enabled for all capture resolutions. Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12104): ivtv/cx18: fix regression: class controls are no longer seenHans Verkuil2009-06-231-0/+2
| | | | | | | | | | | | A previous change (v4l2-common: remove v4l2_ctrl_query_fill_std) broke the handling of class controls in VIDIOC_QUERYCTRL. The MPEG class control was broken for all drivers that use the cx2341x module and the USER class control was broken for ivtv and cx18. This change adds back proper class control support. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10698): v4l2-common: remove v4l2_ctrl_query_fill_stdHans Verkuil2009-03-301-23/+85
| | | | | | | | | | | | The v4l2_ctrl_query_fill_std() function wasn't one the best idea I ever had. It doesn't add anything valuable that cannot be expressed equally well with v4l2_ctrl_query_fill and only adds overhead. Replace it with v4l2_ctrl_query_fill() everywhere it is used and remove it from v4l2_common.c. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10544): v4l2-common: add comments warning that about the sort orderHans Verkuil2009-03-301-0/+1
| | | | | | | | | Control arrays as are used with v4l2_ctrl_next must be sorted from low to high. Add a comment at the top of all such arrays to warn about this. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10540): cx2341x: fixed bug causing several audio controls to be no ↵Hans Verkuil2009-03-301-1/+1
| | | | | | | | | | | | longer listed The cx2341x_mpeg_ctrls array must be ordered by control ID. I know that this is bad design, but for now I will just fix this bug and revisit it when all drivers have moved to v4l2_device/v4l2_subdev, since that will allow me to do greatly improve control handling. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10277): cx18, cx2341x: Fix bugs in cx18 AC3 control and comply with ↵Andy Walls2009-03-301-11/+35
| | | | | | | | | | | | | V4L2 spec 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> Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10276): cx18, cx2341x, ivtv: Add AC-3 audio encoding control to cx18Andy Walls2009-03-301-6/+67
| | | | | | | | | | 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. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (8634): v4l2: extend MPEG Encoding API with AVC and AACJanne Grunau2008-10-121-1/+4
| | | | | | | | | | Adds Advanced Audio Coding (AAC) and MPEG-4 Advanced Video Coding (AVC/H.264) as audio/video codecs to the extended controls API. Updates cx2341x driver to the new values. Signed-off-by: Janne Grunau <j@jannau.net> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (8377): ivtv/cx18: ensure the default control values are correctHans Verkuil2008-07-201-70/+81
| | | | | | | | | | | 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> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (8105): cx2341x: add TS capabilityHans Verkuil2008-07-201-9/+20
| | | | | | | | The cx18 can support transport streams with newer firmwares. Add a TS capability to the generic cx2341x module. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6861): cx2341x: command argument should be u32 instead of intHans Verkuil2008-01-251-1/+1
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6741): cx2341x: codingstyle cleanupsHans Verkuil2008-01-251-139/+174
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6088): cx2341x: some controls can't be changed while the device is busyHans Verkuil2007-10-091-3/+15
| | | | | | | | | | | | | | The driver should now pass the 'busy' state of the device to the cx2341x module whenever controls are set or tried. -EBUSY will be returned if the device is busy and the user attempts to modify certain 'dangerous' controls. It concerns controls that change the audio or video compression mode and bitrates. The cx88-blackbird and pvrusb2 drivers currently always pass '0' (not busy) to the cx2341x, effectively keeping the old behavior for now. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6079): Cleanup: remove linux/moduleparam.h from drivers/media filesMauro Carvalho Chehab2007-10-091-1/+0
| | | | | | | 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>
* i2c: Cleanup the includes of <linux/i2c.h>Jean Delvare2007-05-011-1/+0
| | | | | | | Clean up the includes of <linux/i2c.h>. Only include this header file when we actually need it. Signed-off-by: Jean Delvare <khali@linux-fr.org>
* V4L/DVB (5268): Add support for three new MPEG controls.Hans Verkuil2007-04-271-5/+67
| | | | | | | | | Added V4L2_CID_MPEG_AUDIO_MUTE, V4L2_CID_MPEG_VIDEO_MUTE and V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS controls together with their implementation in the cx2341x module. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (4986): Removed unimplemented cx2341x API commandsHans Verkuil2007-02-211-15/+2
| | | | | | | | | | The commands CX2341X_DEC_SET_AUDIO_OUTPUT, CX2341X_DEC_SET_AV_DELAY and CX2341X_ENC_SET_3_2_PULLDOWN are not implemented in the Conexant firmware. So these commands are removed. This also means that the V4L2_CID_MPEG_VIDEO_PULLDOWN control in cx2341x.c and pvrusb2-hdw.c is removed. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (4984): LOG_STATUS should show the real temporal filter value.Hans Verkuil2006-12-271-1/+5
| | | | | | | | | The temporal filter is forced off when scaling. The VIDIOC_LOG_STATUS handler still showed the old temporal filter. It is now consistent with the real temporal filter value. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (4983): Force temporal filter to 0 when scaling to prevent ghosting.Hans Verkuil2006-12-271-9/+6
| | | | | | | | | Change the code to unconditionally turn off the temporal filter when scaling. If the window is not full screen the filter will introduce a nasty ghosting effect. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (4548): Better temporal filter handling.Hans Verkuil2006-09-261-3/+22
| | | | | | | | | | | | | | | Adjust temporal filter if necessary. The problem with the temporal filter is that it works well with full resolution capturing, but not when the capture window is scaled (the filter introduces a ghosting effect). So if the capture window changed, and there is no updated filter value, then the filter is set depending on whether the new window is full resolution or not. For full resolution a setting of 8 really improves the video quality, especially if the original video quality is suboptimal. Also report VBI Format in VIDIOC_LOG_STATUS, it was missing. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (4259): Pass an explicit log prefix to cx2341x_log_statusHans Verkuil2006-06-271-19/+19
| | | | | | | | A card number is not unique enough. Instead, let the caller specify the prefix of the status messages. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (4257): Fix 64-bit compile warnings.Hans Verkuil2006-06-271-1/+1
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (4223): Add V4L2_CID_MPEG_STREAM_VBI_FMT controlHans Verkuil2006-06-261-0/+17
| | | | | | | | | | V4L2_CID_MPEG_STREAM_VBI_FMT controls if and how VBI data is embedded in an MPEG stream. Currently only one format is supported: the format designed for the ivtv driver. This should be extended with new standard formats (such as defined for DVB) in the future. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (4202): allow selecting CX2341x port modeHans Verkuil2006-06-251-1/+2
| | | | | | | | | | | CX2341X port was always set to 'memory', but 'streaming' is also possible ivtv uses the memory (DMA) interface with the CX2341X, while pvrusb2 and cx88-blackbird use the streaming interface. This setting is now selectable by the driver. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (4200): Disable bitrate_mode when encoding mpeg-1.Hans Verkuil2006-06-251-0/+6
| | | | | | | MPEG-1 always uses CBR, so make the BITRATE_MODE control inactive. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (4199): Add cx2341x-specific control array to cx2341x.cHans Verkuil2006-06-251-0/+35
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (4191): Add CX2341X MPEG encoder module.Hans Verkuil2006-06-251-0/+873
Adds the cx2341x.c module that handles the programming of the Conexant cx23415/6 MPEG encoder chip used by cx88-blackbird, pvrusb2 and ivtv. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>