aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7115.c
Commit message (Collapse)AuthorAgeFilesLines
* [media] fix saa7111 non-detectionRussell King2011-01-311-1/+1
| | | | | | | | | | | | One saa7111 device is reporting a different ID: saa7115 0-0024: chip found @ 0x48 (ID 0f7111d0e111111) does not match a known saa711x chip. As this is for sure a saa7111, change the detection code to also cover this device. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] saa7115: allow input standard autodetection for more chipsAnatolij Gustschin2010-12-291-1/+10
| | | | | | | | | Autodetect input's standard using field frequency detection feature (FIDT in status byte at 0x1F) of the chips saa7111/ saa7111a/saa7113/saa7114/saa7118. Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: saa7115: remove obsolete v4l2-i2c-drv.h headerHans Verkuil2010-10-211-9/+24
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: saa7115: convert to the new control frameworkHans Verkuil2010-08-081-100/+83
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: saa7115: remove obsolete g/s_fmt opsHans Verkuil2010-06-011-17/+0
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: saa7115: add s_mbus_fmt opHans Verkuil2010-06-011-0/+10
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: cx18/cx25840/saa7115/tvp5150: remove vbi support from s_fmtHans Verkuil2010-05-191-4/+0
| | | | | | | | Now that s_fmt is no longer used for VBI format setup in subdevs, remove the VBI support from s_fmt. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: saa7115: support new vbi ops to set/get VBI formatHans Verkuil2010-05-191-12/+27
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: v4l: move vbi-specific video ops to a new vbi ops structHans Verkuil2010-05-191-2/+6
| | | | | | | | | Only a relatively small number of video receivers and transmitters actually support VBI. So start moving the vbi specific ops to an ops struct of their own. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: v4l2-common: add ability to use v4l2_ctrl_query_fill for chroma gainDevin Heitmueller2010-05-181-10/+1
| | | | | | | | | | | | Add the ability to use the v4l2_ctrl_query_fill() function for the newly introduced chroma gain control. Also, make use of the centralized function by the one caller. This work was sponsored by EyeMagnet Limited. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: saa115: add support for chroma AGC and chroma gainDevin Heitmueller2010-05-181-1/+37
| | | | | | | | | | Add support for chroma agc and gain to the saa7115 driver. This allows for users to do manual adjustment for abnormal signal conditions. This work was sponsored by EyeMagnet Limited. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: saa7115: enable anti-alias filterDevin Heitmueller2010-05-181-1/+1
| | | | | | | | | | | | | This patch enables the anti-alias filter, which was originally enabled for the saa7113, but the saa7115_init_misc was trampling the value. Without this patch, there would be visible vertical bands in the chroma. Thanks to Andy Walls for helping test this change against other ivtv products. This work was sponsored by EyeMagnet Limited. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: saa7115: fix saa7111a supportHans Verkuil2010-02-261-11/+16
| | | | | | | | | When the saa7111 driver was merged into saa7115 several bugs were introduced, in particular with the saa7111a support as is used in the mxb.c driver. This patch fixes the saa7111a support. This was tested with the mxb driver. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (11380): v4l2-subdev: change s_routing prototypeHans Verkuil2009-04-061-14/+16
| | | | | | | | | It is no longer needed to use a struct pointer as argument, since v4l2_subdev doesn't require that ioctl-like approach anymore. Instead just pass the input, output and config (new!) arguments directly. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (11377): v4l: increase version numbers of drivers converted to ↵Hans Verkuil2009-04-061-7/+6
| | | | | | | | | | | | | | v4l2_subdev. With all the v4l2_subdev changes that were made to these drivers it is a good idea to increase the version number of each driver. It's just the patch level that is increased, except for the zoran and saa7146 drivers where the minor number was increased due to the more substantial changes that were made to those two drivers. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (11371): v4l2: remove legacy fields in v4l2-i2c-drv.h.Hans Verkuil2009-04-061-1/+0
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (11370): v4l2-subdev: move s_std from tuner to core.Hans Verkuil2009-04-061-1/+1
| | | | | | | | | s_std didn't belong in the tuner ops. Stricly speaking it should be part of the video ops, but it is used by audio and tuner devices as well, so it is more efficient to make it part of the core ops. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (11362): saa7115: remove i2c legacy codeHans Verkuil2009-04-061-14/+1
| | | | | | | | All drivers that use saa7115 now use v4l2_subdev, so we can remove the legacy code from saa7115. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (11311): v4l: replace 'ioctl' references in v4l i2c driversHans Verkuil2009-03-301-2/+2
| | | | | | | | Replace 'VIDIOC_' references in v4l i2c drivers by their new v4l2_subdev callback names. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10702): saa7115: add querystd and g_input_status support for zoran.Hans Verkuil2009-03-301-0/+43
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10700): saa7115: don't access reg 0x87 if it is not present.Hans Verkuil2009-03-301-5/+6
| | | | | | | | Devices like the saa7111 do not have this register, so check for this before using it. 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-1/+3
| | | | | | | | | | | | 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 (10408): v4l2: fix incorrect hue range checkHans Verkuil2009-03-301-1/+1
| | | | | | | | A hue of -128 was rejected due to an incorrect range check, which was faithfully copy-and-pasted into four drivers... Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (10141): v4l2: debugging API changed to match against driver name ↵Hans Verkuil2009-01-021-7/+6
| | | | | | | | | | | | | | | | instead of ID. 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. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9826): saa7115: convert to v4l2_subdev.Hans Verkuil2008-12-301-364/+399
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9162): ivtv: fix raw/sliced VBI mixupHans Verkuil2008-10-131-2/+6
| | | | | | | | | | | | | | 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. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (8940): saa7115: fix saa7111(a) supportHans Verkuil2008-10-121-5/+29
| | | | | | | | | The saa7111 support in saa7115.c was missing some features and did not properly take some of the differences into account. With this patch saa7115 can be used in the mxb driver instead of saa7111.c. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (8790): saa7115: call i2c_set_clientdata only when state != NULLHans Verkuil2008-09-031-3/+2
| | | | | | | | Not a bug as such, but it looks really strange doing this before checking whether the state structure could be allocated. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (8380): saa7115: use saa7115_auto instead of saa711x as the ↵Hans Verkuil2008-07-201-1/+1
| | | | | | | | | | | | autodetect driver name. Having an _auto suffix is less ambiguous than a 'saa711x' identifier. It's also used like this in the saa7127 driver. Thanks to Jean Delvare for suggesting this. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* v4l-dvb: remove legacy checks to allow support for kernels < 2.6.10Hans Verkuil2008-07-201-2/+0
| | | | | | | | Also remove some blank lines that were used to split compat code at -devel tree. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* i2c: Convert remaining new-style drivers to use module aliasingJean Delvare2008-05-181-12/+28
| | | | | | | | | | | | Update all the remaining new-style i2c drivers to use standard module aliasing instead of the old driver_name/type driver matching scheme. Note that the tuner driver is a bit quirky at the moment, as it overwrites i2c_client.name with arbitrary strings. We write "tuner" back on remove, to make sure that driver cycling will work properly, but there may still be troublesome corner cases. Signed-off-by: Jean Delvare <khali@linux-fr.org>
* i2c: Add support for device alias namesJean Delvare2008-04-291-1/+2
| | | | | | | | | | | | | | Based on earlier work by Jon Smirl and Jochen Friedrich. This patch allows new-style i2c chip drivers to have alias names using the official kernel aliasing system and MODULE_DEVICE_TABLE(). At this point, the old i2c driver binding scheme (driver_name/type) is still supported. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Jochen Friedrich <jochen@scram.de> Cc: Jon Smirl <jonsmirl@gmail.com> Cc: Kay Sievers <kay.sievers@vrfy.org>
* V4L/DVB (7342): saa7115: fix PAL-Nc handlingHans Verkuil2008-04-241-1/+1
| | | | | | | | Fsc 3.58 refers to Combination PAL-N (aka PAL-Nc), not to plain PAL-N (that uses Fsc 4.43). Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (7094): static memoryDouglas Schilling Landgraf2008-04-241-1/+1
| | | | | | | | - Static memory is always initialized with 0. - Replaced in some cases C99 comments for /* */ Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6465): Use correct error codes when chip is not recognizedHans Verkuil2008-01-251-2/+2
| | | | | | | | | | If the chip isn't recognized, then the correct errors should be returned. The v4l2_i2c_attach() utility function will return 0 for all errors except -ENOMEM to provide proper compatibility support for the old I2C probing function. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6455): saa7115: convert to bus-based I2C APIHans Verkuil2008-01-251-60/+16
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (5414): Add missing kfree in early exit of saa7115.Hans Verkuil2007-04-271-0/+1
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (5306): Add support for VIDIOC_G_CHIP_IDENTHans Verkuil2007-04-271-5/+4
| | | | | | | | | | | VIDIOC_G_CHIP_IDENT improves debugging of card problems: it can be used to detect which chips are on the board and based on that information selected register dumps can be made, making it easy to debug complicated media chips containing tens or hundreds of registers. This ioctl replaces the internal VIDIOC_INT_G_CHIP_IDENT ioctl. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (5408): Fix SECAM handling on saa7115Mauro Carvalho Chehab2007-03-271-1/+1
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (5304): Improve chip matching in v4l2_registerHans Verkuil2007-03-011-1/+1
| | | | | | | | | The chip matching in struct v4l2_register for VIDIOC_DBG_G/S_REGISTER was rather primitive. It could not be extended to other busses besides i2c and it lacked a way to. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (5183): Fix CC handling in VIDIOC_INT_G_VBI_DATAHans Verkuil2007-02-211-6/+9
| | | | | | | | | When capturing a 60 Hz input the internal field ID is inverted. The VIDIOC_INT_G_VBI_DATA didn't take that into account and so returned XDS instead of CC and vice versa. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (5163): Add checks for CAP_SYS_ADMIN to VIDIOC_DBG_G_REGISTERTrent Piepho2007-02-211-10/+4
| | | | | | | | | | Before, root privileges were only needed to set hardware registers, not to read them. On some hardware, reading from the wrong place at the wrong time can hang the machine. So, to be consistent, root privileges are required to read registers on all hardware. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (5146): Make VIDIOC_INT_[SG]_REGISTER ioctls no longer internal onlyTrent Piepho2007-02-211-2/+2
| | | | | | | | | | | | | | | | | | | | | The direct register access ioctls were defined as kernel internal only, but they are very useful for debugging hardware from userspace and are used as such. Officially export them. VIDIOC_INT_[SG]_REGISTER is renamed to VIDIOC_DBG_[SG]_REGISTER Definition of ioctl and struct v4l2_register is moved from v4l2-common.h to videodev2.h. Types used in struct v4l2_register are changed to the userspace exportable versions (u32 -> __u32, etc). Use of VIDIOC_DBG_S_REGISTER requires CAP_SYS_ADMIN permission, so move the check into the video_ioctl2() dispatcher so it doesn't need to be duplicated in each driver's call-back function. CAP_SYS_ADMIN check is added to pvrusb2 (which doesn't use video_ioctl2). Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (5113): Adds video output routingMarco Schluessler2007-02-211-6/+18
| | | | | | | Nexus CA needs to use a different routing on saa7115 module. Signed-off-by: Marco Schluessler <marco@lordzodiac.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (4886): Minor coding style improvementsHans Verkuil2006-12-101-9/+9
| | | | | | | Remove coding style inconsistencies. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (4885): Improve saa711x checkHans Verkuil2006-11-261-2/+7
| | | | | | | | | | The old code would accept any device on the same i2c address as the saa711x chips as an saa711x. However, this fails with saa717x chips, which use that same address and so are misdetected as a saa7111. Now check whether the chip is really a saa711x model. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (4739): SECAM support for saa7113 into saa7115Pádraig Brady2006-10-141-0/+2
| | | | | | | | | | Without the attached trivial patch, the saa7113 is set up for PAL when SECAM is selected and hence will see only show black and white for SECAM signals. Tested the patch against the saa7115 module in linux-2.6.17 with a Pinnacle 50e USB tuner (em28xx). Signed-off-by: Pádraig Brady <P@draigBrady.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (4626): On saa7111/7113, LUMA_CTRL need a different valueMauro Carvalho Chehab2006-09-261-8/+12
| | | | | | Also sends the proper saa71111 init table. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (4598): Fix a typo: VRES, instead o HRESMauro Carvalho Chehab2006-09-261-4/+4
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (4596): Fix saa7115 miscalculation that breaks NTSCMike Isely2006-09-261-1/+1
| | | | | | | | This repairs a problem introduced by a commit earlier applied. Thanks-to: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>