summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7115.c
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* V4L/DVB (4592): Fixes some troubles on saa7115Mauro Carvalho Chehab2006-09-261-147/+141
| | | | | | | | | | | | 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>
* V4L/DVB (4586): Code were preventing saa7111 and saa7118 to workMauro Carvalho Chehab2006-09-261-5/+1
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (4573): Fix: There were some missing breaks at register check routineMauro Carvalho Chehab2006-09-261-1/+6
| | | | | | Without the breaks, saa7115 were not initializing PLL2. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (4565): Fix scaling calculusMauro Carvalho Chehab2006-09-261-12/+4
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (4555): Cleanup: removed hardcoded tablesMauro Carvalho Chehab2006-09-261-157/+79
| | | | | | | saa7115 module is capable of calculating the proper FIR tables. However, there were 4 hardcoded tables for the standard resolution. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (4554): Renamed several common structs/functions to saa711x instead ↵Mauro Carvalho Chehab2006-09-261-141/+141
| | | | | | of saa7115 Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (4553): Add support for saa7111 and partial support for saa7118Mauro Carvalho Chehab2006-09-261-65/+187
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (4551): Added register aliases for saa711x registers, instead of ↵Mauro Carvalho Chehab2006-09-261-342/+451
| | | | | | using reg numbers Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (4550): Make saa7115 to report the complete chipset nameMauro Carvalho Chehab2006-09-261-1/+11
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (4192): Use control helpers for saa7115, cx25840, msp3400.Hans Verkuil2006-06-251-49/+9
| | | | | | | | Replace hardcoded control description by the standard ones supplied by v4l2-common. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (3712): Fix video input setting of em28xx, use _INT_S_VIDEO_ROUTING ↵Hans Verkuil2006-06-251-28/+0
| | | | | | | | | | | | | | | in tvp5150 - Use new routing input defines in em28xx-cards.c - Fix S-Video settings for tvp5150-based cards (input was copied from saa7115 based cards and worked only because S-Video was selected in the default: case) - Replace VIDIOC_S_INPUT by VIDIOC_INT_S_VIDEO_ROUTING in em28xx-video.c - Remove the now obsolete VIDIOC_S_INPUT handler in saa7115.c - Add VIDIOC_INT_G/S_VIDEO_ROUTING in tvp5150.c - Add new media/tvp5150.h with the routing defines. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (3711): Add support for VIDIOC_INT_S_CRYSTAL_FREQ internal command.Hans Verkuil2006-06-251-8/+43
| | | | | | | | | | | | | Some saa7115-based cards use a different crystal frequency and a different audio clock generation. Add a new VIDIOC_INT_S_CRYSTAL_FREQ command to be able to set these values. Also change the default APLL setting to 0. It makes no sense to have the audio clock independent from the video clock, this can lead to audio/video synchronization problems. Setting this to 0 is also consistent with the old saa7114.c source and the way the Hauppauge Windows driver sets it. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (3692): Keep experimental SLICED_VBI defines under an #if 0Hans Verkuil2006-04-021-3/+3
| | | | | | | | The sliced VBI defines added in videodev2.h are removed since requires more discussion. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (3607): Implement routing command for saa7115.cHans Verkuil2006-04-021-0/+41
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (3606): Minor layout changes to make it consistentHans Verkuil2006-04-021-9/+9
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (3577): Cleanup audio input handlingHans Verkuil2006-03-241-1/+0
| | | | | | | | | | | | | | | | | | | | | | Cleanup audio input handling in bttv and tvaudio: - inputs were specified that were never used - mute was handled as a special input which led to confusing code - confusing naming made it difficult to see if the setting was for i2c or gpio. The old audiochip.h input names moved to tvaudio.h. Currently this is used both by tvaudio and msp3400 until the msp3400 implements the new msp3400-specific inputs. Detect in bttv the tvaudio and msp3400 i2c clients and use these client pointers to set the inputs directly instead of broadcasting the command. Removed AUDC_SET_INPUT. Now replaced by VIDIOC_S_AUDIO. This will be replaced again later by the new ROUTING commands. Removed VIDIOC_G_AUDIO implementations in i2c drivers: this command is a user level command and not to be used internally. It wasn't called at all anyway. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (3522): Fixed a trouble with other PAL standardsMauro Carvalho Chehab2006-03-211-12/+8
| | | | | | | V4L2_STD_PAL define is not correct. It specifies only 50Hz PAL standards. This patch fixes saa7113 color config for other PAL video standards. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (3514): SAA7113 doesn't have auto std chroma detection modeMauro Carvalho Chehab2006-03-211-0/+29
| | | | | | | This patch makes chroma standard selection based at possible values, according with datasheet. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (3513): Remove saa711x driverMauro Carvalho Chehab2006-03-211-14/+62
| | | | | | | Now, em28xx uses saa7115 instead of saa711x. saa7115 driver is capable of handling saa 7113, 7114 and 7115. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (3354): Fix maximum for the saturation and contrast controls.Hans Verkuil2006-02-271-2/+2
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (3408): Included new sliced VBI types to videodev2.h and tvp5150Mauro Carvalho Chehab2006-01-231-3/+3
| | | | | | | | | | - Added other sliced VBI types to videodev2.h - tvp5150 now uses standard V4L2 API codes from videodev2.h - Implemented VIDIOC_G_SLICED_VBI_CAP for tvp5150. This is dynamically filled based on defined VDP C-RAM values filled by the driver. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (3345): Fixes some bad global variablesMauro Carvalho Chehab2006-01-111-19/+19
| | | | | | | | | - Debug global var is already used inside kernel. - v4l_dbg now expects the debug var - global vars inside msp34xx renamed to msp_* Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (3344a): Conversions from kmalloc+memset to k(z|c)allocPanagiotis Issaris2006-01-111-4/+2
| | | | | | | | Conversions from kmalloc+memset to k(z|c)alloc. Signed-off-by: Panagiotis Issaris <takis@issaris.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (3280): Added VIDIOC_QUERYCTRL to saa7115Hans Verkuil2006-01-091-0/+55
| | | | | | | - Added VIDIOC_QUERYCTRL to saa7115 Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
* V4L/DVB (3278): convert diagnostics over to the new v4l2-common.h macros.Hans Verkuil2006-01-091-51/+36
| | | | | | | | | - Convert diagnostics over to the new v4l2-common.h macros. - deprecated tuner_debug option, the new option is debug. - renamed cx25840_debug to debug. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
* V4L/DVB (3257): Add missing audiochip.h include.Hans Verkuil2006-01-091-0/+1
| | | | | | | - Add missing audiochip.h include. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
* V4L/DVB (3256): When in radio mode ignore VIDIOC_G_TUNERHans Verkuil2006-01-091-0/+12
| | | | | | | | - Detect when AUDC_SET_RADIO is called. - When in radio mode ignore VIDIOC_G_TUNER. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
* V4L/DVB (3254): Don't reprogram the video standard if it is unchanged.Hans Verkuil2006-01-091-0/+10
| | | | | | | | - Don't reprogram the video standard if the new standard equals the old standard. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
* V4L/DVB (3214): Calculate the saa7115 AMCLK regs instead of using fixed valuesHans Verkuil2006-01-091-119/+36
| | | | | | | | | | | - Calculate the audio master clock registers from the actual frequencies. This simplifies the code and it also prepares for adding CGC2 support. - VIDIOC_INT_AUDIO_CLOCK_FREQ now receives an u32 instead of an enum. It is more generic and actually easier to implement. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
* V4L/DVB (3248): Add selected input to saa7115 VIDIOC_LOG_STATUS output.Hans Verkuil2006-01-091-0/+5
| | | | | | | - Add selected input to VIDIOC_LOG_STATUS output. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
* V4L/DVB (3123a): remove uneeded #if from V4L subsystemMauro Carvalho Chehab2006-01-091-4/+0
| | | | | | | - some uneeded #if were introduced by a previous patch. this patch removes these. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
* [PATCH] I2C: Remove .owner setting from i2c_driver as it's no longer neededGreg Kroah-Hartman2006-01-051-1/+0
| | | | | | | | | | Now that i2c_add_driver() doesn't need the module owner to be set by hand, we can delete it from the drivers. This patch catches all of the drivers that I found in the current tree (if a driver sets the .owner by hand, it's not a problem, just not needed.) Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Cc: Jean Delvare <khali@linux-fr.org>
* [PATCH] i2c: Drop i2c_driver.{owner,name}, 5 of 11Laurent Riffard2006-01-051-5/+8
| | | | | | | | | | | We should use the i2c_driver.driver's .name and .owner fields instead of the i2c_driver's ones. This patch updates the drivers/media/video and usb/media drivers. Signed-off-by: Laurent Riffard <laurent.riffard@free.fr> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] i2c: Rework client usage count, 2 of 3Jean Delvare2006-01-051-1/+0
| | | | | | | | | Make I2C_CLIENT_ALLOW_USE the default for all i2c clients. It doesn't hurt if the usage count is actually never used for any given driver, and allows for nice code simplifications in i2c-core. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
OpenPOWER on IntegriCloud