summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tvp5150.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-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-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-29tvp5150: remove i2c legacy code.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> All drivers that use tvp5150 now use v4l2_subdev, so we can remove the legacy code from tvp5150. 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-26Get rid of video_decoder.h header were uneededMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Now, just a few modules are still dependent of this legacy header: $ grep -l DECODER_ `find linux/drivers/media/ -name '*.[ch]' -exec grep -l video_decoder '{}' \;` linux/drivers/media/video/v4l2-ioctl.c linux/drivers/media/video/indycam.c linux/drivers/media/video/saa7191.c linux/drivers/media/video/vino.c Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29v4l: remove unused I2C_DRIVERIDs.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> I2C_DRIVERIDs are phased out. Remove those that are unused at the moment. 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-12-22tvp5150: add support for VIDIOC_G_CHIP_IDENT ioctlMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-18tvp5150: convert to v4l2_subdev.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-10-24tvp5150: add support to enable raw vbiMauro Carvalho Chehab
From: Markus Rechberger <mrechberger@gmail.com> Priority: normal Signed-off-by: Markus Rechberger <mrechberger@sundtek.de> [mchehab@redhat.com: Fix bad whitespaces] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-07-25videodev: replace videodev.h includes by videodev2.h where possibleHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Several V4L2 drivers still included videodev.h. Fix this. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-08v4l-dvb: remove support for kernels < 2.6.16Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Phase 4 removes the compatibility support for kernels < 2.6.16. 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.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-04-15Backport changeset 5fa1247a2b56f33f88432c24e109deaf91ef8281Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Original patch from Al Viro <viro@ftp.linux.org.uk> Date: Sat Mar 29 03:07:38 2008 +0000 NULL noise: drivers/media kernel-sync: Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-03-09 tvp5150.c: logical-bitwise and confusionMauro Carvalho Chehab
From: Roel Kluin <12o3l@tiscali.nl> logical-bitwise & confusion Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
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-11-03Fix S-video mode on tvp5150Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Thanks to Markus Reichberger to point this. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-01Fix tvp5150 default valuesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-08-21Cleanup: remove linux/moduleparam.h from drivers/media filesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> 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>
2007-06-05Replace C code with calls to ARRAY_SIZE macro.Mauro Carvalho Chehab
From: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
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-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>
2006-08-19merge from mainPatrick Boettcher
From: Patrick Boettcher <pb@linuxtv.org> merge from main Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
2006-08-18TVP5150 routing logic were broken.Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> As pointed by The Coverity checker, commit c7c0b34c27bbf0671807e902fbfea6270c8f138d broked input selection. Thanks-to: Adrian Bunk <bunk@stusta.de> for pointing this CC: Adrian Bunk <bunk@stusta.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-04-02Fix video input setting of em28xx, use _INT_S_VIDEO_ROUTING in tvp5150Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> - 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>
2006-04-01Remove obsolete commands from tvp5150.cHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> - Remove old DECODER_ commands from tvp5150.c, replacing them with newer ones if appropriate. - Small VIDIOC_G_TUNER fixes in msp3400 and tuner. - Fix VIDIOC_S_TUNER support in em28xx. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-04-01Keep experimental SLICED_VBI defines under an #if 0Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> As per request by Mauro the experimental SLICED_VBI defines are back under placed under an #if 0. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-03-29Reverted sliced VBI API changes made in videodev2.h.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The sliced VBI defines added in videodev2.h are removed. One define changed the meaning of a old define, thus breaking existing apps, another used more than 16 bits (the max size is u16), and many types were added that were untested and whose payload was undocumented. New types should be shown to exist 'in the wild' and the payload format must be documented in the V4L2 API spec. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-03-28Fix default values for tvp5150 controlsMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Default values were wrong. Fixing it. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-02-07disabled debug on by default in tvp5150Markus Rechberger
From: Markus Rechberger <mrechberger@gmail.com> disabled debug on by default in tvp5150 Signed-off-by: Markus Rechberger <mrechberger@gmail.com>
2006-02-06Sync patches to kernelMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> dvb_bt8xx_remove return code changed to zero to avoid warning tvp5150_read doesn't need to be inline Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-01-31Last tvp5150 patch introduced lots of bad whitespaces.Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> This patch removes all bad whitespaces introduced on tvp5150 Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-01-31added signal detection support to tvp5150Markus Rechberger
From: Markus Rechberger <mrechberger@gmail.com> added signal detection support to tvp5150 Signed-off-by: Markus Rechberger <mrechberger@gmail.com>
2006-01-21Added iocls to configure VBI on tvp5150Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> - Added iocls to configure VBI on tvp5150 Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-01-19Implemented sliced VBI set on VIDIOC_S_FMTMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> - Implemented sliced VBI set on VIDIOC_S_FMT Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-01-19Included new sliced VBI types to videodev2.h and tvp5150Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> - 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>
2006-01-19added some code for VBI processing and cleanup debug dumpMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> - Renamed some registers and improved register debug message - Some cleanups at register dump - Added code to set VBI processor (VDP) - VBI code still incomplete Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-01-19Fixes tvp5150a/am1 detection.Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> - tvp5150 type were determined by a secondary register instead of using ROM code. - tvp5150am1 have ROM=4.0, while tvp5150a have ROM=3.33 (decimal). All other ROM versions are reported as unknown tvp5150. - Except for reporting, current code doesn't enable any special feature for tvp5150am1 or tvp5150a. Code should work for both models (but were tested only for tvp5150am1). Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-01-15From: Adrian Bunk <bunk@stusta.de>Mauro Carvalho Chehab
make some code static This patch makes some needlessly global code static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-01-11From: Panagiotis Issaris <takis@issaris.org>Mauro Carvalho Chehab
Conversions from kmalloc+memset to k(z|c)alloc Conversions from kmalloc+memset to k(z|c)alloc. kernel-sync 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>
2006-01-09Several i2C cleanups to compile on both current linux and kernels >2.6.15Mauro Carvalho Chehab
kernel-sync Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2006-01-08i2c fixes and cleanupsMauro Carvalho Chehab
- Miscelaneous i2c cleanups and fixes to work with kernel >2.6.15 - linux/sound/pci/bt87x.c updated to kernel version. kernel-sync Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-12-26Included advanced debug option to tvp5150.cMauro Carvalho Chehab
- Included advanced debug option to tvp5150.c - Now, advanced debug info is the first item at V4L menu. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-12-25Several improvements at tvp5150 driverMauro Carvalho Chehab
- Now reset do init tvp5150 registers to its default. - Debug messages improved. - Implemented video standard selection function. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-12-25replace <media/i2c-compat.h> with "i2c-compat.h"Michael Krufky
-#include <media/i2c-compat.h> +#include "i2c-compat.h" Signed-off-by: Michael Krufky <mkrufky@m1k.net>
2005-12-07kernel-sync patches.Mauro Carvalho Chehab
kernel-sync Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-12-02Fixed device controls for em28xx on WinTV USB2 devicesMauro Carvalho Chehab
- Controls now come from video and audio decoder driver for msp3400 and tvp5150. - Added audio and sound controls as provided by msp3400 and tvp5150. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>