summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/saa7115.c
AgeCommit message (Collapse)Author
2009-04-02v4l2-subdev: change s_routing prototypeHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> 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. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-04-01v4l2-subdev: change prototype of s_crystal_freq.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Remove intermediate v4l2_crystal_freq struct. This is no longer needed with the v4l2_subdev API. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-03-30v4l2: use old-style i2c API for kernels < 2.6.26 instead of < 2.6.22Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Originally the intention was to switch to the new style i2c API starting with the introduction of the API in 2.6.22. However, the i2c_new_probed_device() function has a lethal bug that wasn't fixed until 2.6.25. Or more accurately, it was only fixed in the stable series of 2.6.25 and 2.6.26. Given the fact that the new i2c API also changed starting with 2.6.26 (the addition of i2c_device_id), it is easiest to switch APIs starting with 2.6.26. This patch updates all the legacy code accordingly. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-03-30v4l2: remove legacy fields in v4l2-i2c-drv.h.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-04-01v4l2-subdev: move s_std from tuner to core.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> 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. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-03-29saa7115: remove i2c legacy codeHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> All drivers that use saa7115 now use v4l2_subdev, so we can remove the legacy code from saa7115. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-03-30v4l: replace 'ioctl' references in v4l i2c driversHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Replace 'VIDIOC_' references in v4l i2c drivers by their new v4l2_subdev callback names. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-02-26merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-zoranMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-02-21v4l2-common: remove v4l2_ctrl_query_fill_stdHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> 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. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-02-18saa7115: add querystd and g_input_status support for zoran.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-02-18saa7115: don't access reg 0x87 if it is not present.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Devices like the saa7111 do not have this register, so check for this before using it. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
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>
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-11-29saa7115: convert to v4l2_subdev.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal 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-09-06saa7115: fix saa7111(a) supportHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> 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. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-08-24saa7115: call i2c_set_clientdata only when state != NULLHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Not a bug as such, but it looks really strange doing this before checking whether the state structure could be allocated. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-17saa7115: use saa7115_auto instead of saa711x as the autodetect driver name.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> 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>
2008-07-08v4l-dvb: remove support for kernels < 2.6.13Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Phase 3 of the compat cleanup. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-08v4l-dvb: remove support for kernels < 2.6.10Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Phase 2 removes support for kernels < 2.6.10. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-08v4l-dvb: remove support for kernels < 2.6.0Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> First phase of the backwards compatibility cleanup: stop supporting kernels older than 2.6.0. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-06-05backport I2C changes on several filesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Some I2C API change patches were committed at kernel. Backport those changes to V4L/DVB tree. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-05-02backport commit d2653e92732bd3911feff6bee5e23dbf959381dbMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> kernel-sync: Author: Jean Delvare <khali@linux-fr.org> Date: Tue Apr 29 23:11:39 2008 +0200 i2c: Add support for device alias names 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: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-03-09saa7115: fix PAL-Nc handlingHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> 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>
2008-01-27[PATCH] static memoryDouglas Schilling Landgraf
From: Douglas Schilling Landgraf <dougsland@gmail.com> - Static memory is always initialized with 0. - Replaced in some cases C99 comments for /* */ Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
2007-09-16Use correct error codes when chip is not recognized.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> 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> --- linux/drivers/media/video/cs53l32a.c | 2 +- linux/drivers/media/video/cx25840/cx25840-core.c | 6 +++++- linux/drivers/media/video/msp3400-driver.c | 4 ++-- linux/drivers/media/video/saa7115.c | 4 ++-- linux/drivers/media/video/saa7127.c | 6 +++--- linux/drivers/media/video/tlv320aic23b.c | 2 +- linux/drivers/media/video/upd64031a.c | 2 +- linux/drivers/media/video/upd64083.c | 2 +- linux/drivers/media/video/v4l2-common.c | 2 +- linux/drivers/media/video/vp27smpx.c | 2 +- linux/drivers/media/video/wm8739.c | 4 ++++ 11 files changed, 22 insertions(+), 14 deletions(-)
2007-09-13saa7115: convert to bus-based I2C APIHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> --- linux/drivers/media/video/saa7115.c | 102 ++++++------------------------------ 1 file changed, 17 insertions(+), 85 deletions(-)
2007-03-13merge: 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-03-13Fix SECAM handling on saa7115Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-03-11Add missing kfree in early exit of saa7115.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-02-27Improve VIDIOC_G_CHIP_IDENT (better diagnostics)Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Simplify the VIDIOC_G_CHIP_IDENT implementation by adding a single common function. The ident can now also return NONE: not found, UNKNOWN: found, but we don't know what chip it is, and AMBIGUOUS: multiple chips were matched so the match values were too general. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-02-24Add support for VIDIOC_G_CHIP_IDENTHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> 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> CC: Jonathan Corbet <corbet@lwn.net>
2007-02-24Improve chip matching in v4l2_register for VIDIOC_DBG_G/S_REGISTERHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The chip matching in struct v4l2_register was rather primitive. It could not be extended to other busses besides i2c and it lacked a way to differentiate between two i2c chips driven by the same driver on one board (e.g. a PVR500 with two tuner chips, one for analog TV and one for radio). It has now been improved making it much more powerful. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> CC: Mike Isely <isely@isely.net> CC: Trent Piepho <xyzzy@speakeasy.org>
2007-02-19compat: Add -include linux/version.h to cflagsTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> Add -include linux/version.h to the cflags. Now code can have backward compatibility test without including compat.h first. Linux headers included from compat.h are removed, so that code will get the same headers when compiling in v4l-dvb as it does in the kernel. Many drivers have compat.h moved to the end of their include list, as this lets compat.h do things it can't do at the beginning. Such as test of something is defined to include compat code, or to put a wrapper around a function without changing the function's name. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2007-02-03Fix CC handling in VIDIOC_INT_G_VBI_DATAHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> 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>
2007-01-30Add checks for CAP_SYS_ADMIN to VIDIOC_DBG_G_REGISTERTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> 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>
2007-01-23Make VIDIOC_INT_[SG]_REGISTER ioctls no longer internal onlyTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> 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>
2007-01-21Adds video output routingMauro Carvalho Chehab
From: Marco Schluessler <marco@lordzodiac.de> 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>
2006-11-25Minor coding style improvementsHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Remove coding style inconsistencies. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-11-25Improve saa711x checkHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> 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>
2006-10-09From: Pádraig Brady <P@draigBrady.com>Mauro Carvalho Chehab
Subject: SECAM support for saa7113 into saa7115 Date: Mon, 09 Oct 2006 12:02:17 +0100 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>
2006-09-12On saa7111/7113, LUMA_CTRL need a different valueMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Also sends the proper saa71111 init table. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-03Fix a typo: VRES, instead o HRESMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-02Fix saa7115 miscalculation that breaks NTSCMike Isely
From: Mike Isely <isely@pobox.com> This repairs a problem introduced by a commit earlier today from Mauro. Hans Verkuil gets the credit for solving this. I'm committing it now because (a) nobody else has and (b) I'm stuck without it. Thanks-to: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mike Isely <isely@pobox.com>
2006-09-02Fixes some troubles on saa7115Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Scaling were not working fine; Some reserved registers were wrong; On some situations, saa7115 were not properly being initializated. Removed some duplicated code. Thanks-to: Hans Verkuil <hverkuil@xs4all.nl> for co-working on this patch. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-01Code were preventing saa7111 and saa7118 to workMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-01Fix: There were some missing breaks at register check routineMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Without the breaks, saa7115 were not initializing PLL2. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-01saa7115 seems to need initializing some reserved registersMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Also fixed a scaling trouble Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-08-30Fix scaling calculusMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Thanks-to: Hans Verkuil <hverkuil@xs4all.nl> for testing it on ivtv. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-08-30Fix: standard need to be setted, before adjusting audioMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>