Commit Graph

38 Commits (295439f2a341f2742fa11d143eda0940c5d4acfa)

Author SHA1 Message Date
Hans Verkuil 5325b4272a V4L/DVB (11380): v4l2-subdev: change s_routing prototype
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>
2009-04-06 21:44:27 -03:00
Hans Verkuil 2d26698e85 V4L/DVB (10731): zoran i2c modules: remove i2c autoprobing support.
Zoran doesn't do autoprobing anymore, so remove support for this from the
i2c modules.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:59 -03:00
Martin Dauskardt 0f3559ef17 V4L/DVB (10216): saa7127: fix broken S-Video with saa7129
Register 0x2d has to be set differently in the saa7129 compared to the
saa7127. This was not done correctly, so S-Video was broken in certain
circumstances.

This fixes a regression introduced in 2.6.28.

Signed-off-by: Martin Dauskardt <martin.dauskardt@gmx.de>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:35:38 -02:00
Hans Verkuil aecde8b53b V4L/DVB (10141): v4l2: debugging API changed to match against driver name 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>
2009-01-02 17:11:52 -02:00
Hans Verkuil 627426c675 V4L/DVB (9827): saa7127: convert to v4l2_subdev.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:38:40 -02:00
Jean Delvare 2a1d245b70 V4L/DVB (9240): saa7127: Fix two typos
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:25:11 -03:00
Jean Delvare 5daed07401 V4L/DVB (8379): saa7127: Make device detection optional
The saa7127 driver supports all of SAA7126, SAA7127, SAA7128 and
SAA1729 devices. Declare all these devices, so that board drivers can
tell which device is present, instead of always relying on
auto-detection (which needs to write to the chip, eek!).

We still need the detection for ivtv, so a special device name
"saa7127_auto" can be used when the caller doesn't know exactly which
device is present.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:28:17 -03:00
Hans Verkuil f87086e302 v4l-dvb: remove legacy checks to allow support for kernels < 2.6.10
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>
2008-07-20 07:17:52 -03:00
Jean Delvare af294867a5 i2c: Convert remaining new-style drivers to use module aliasing
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>
2008-05-18 20:49:40 +02:00
Jean Delvare d2653e9273 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: 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>
2008-04-29 23:11:39 +02:00
Hans Verkuil 9fad368b6d V4L/DVB (6867): saa7127: CodingStyle cleanups
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:06 -02:00
Hans Verkuil f69d419a0b V4L/DVB (6862): ivtv: really remove i2c legacy support from drivers that no longer need it
For some reason the include header wasn't changed from v4l2-i2c-drv-legacy.h
to v4l2-i2c-drv.h in the previous patch. This is now corrected.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:05 -02:00
Hans Verkuil 2a2bfbff3d V4L/DVB (6766): ivtv: remove i2c legacy support from drivers that no longer need it
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:24 -02:00
Hans Verkuil 188f3457c2 V4L/DVB (6465): Use correct error codes when chip is not recognized
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>
2008-01-25 19:01:27 -02:00
Hans Verkuil 77566dd724 V4L/DVB (6456): saa7127: convert to bus-based I2C API
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:01:20 -02:00
Hans Verkuil 2f3a98931f V4L/DVB (6116): ivtv: VBI cleanups and fixes
Besides some VBI cleanups this patch also fixes a subtle problem with the
VBI re-insertion stream where the PIO work handler wasn't called quickly
enough, resulting in occasional corrupt data.

Furthermore the CC output didn't disable CC correctly and at the right time,
causing duplicates to be sent.

An saa7127 fix for VPS output was also added: the wrong data was sent.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:07:14 -03:00
Hans Verkuil 3434eb7e14 V4L/DVB (5306): Add support for VIDIOC_G_CHIP_IDENT
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>
2007-04-27 15:43:27 -03:00
Hans Verkuil 045290b2a9 V4L/DVB (5290): Add support for VIDIOC_INT_G/S_STD_OUTPUT
Added VIDIOC_INT_G_STD_OUTPUT and VIDIOC_INT_S_STD_OUTPUT to allow drivers
to set the TV standard for video output separately from the video capture.
This is needed for cx23415 support where the decoder is separate from the
encoder and can have a different TV standard.
Modified the saa7127 module to listen to VIDIOC_INT_G/S_STD_OUTPUT instead
of VIDIOC_G/S_STD.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27 15:43:22 -03:00
Hans Verkuil f3d092b84a V4L/DVB (5304): Improve chip matching in v4l2_register
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>
2007-03-01 13:09:44 -02:00
Trent Piepho 62d50addf0 V4L/DVB (5163): Add checks for CAP_SYS_ADMIN to VIDIOC_DBG_G_REGISTER
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>
2007-02-21 13:35:10 -02:00
Trent Piepho 52ebc763d8 V4L/DVB (5146): Make VIDIOC_INT_[SG]_REGISTER ioctls no longer internal only
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>
2007-02-21 13:34:55 -02:00
Jose Alberto Reguero 35a303b1d7 V4L/DVB (4110): Small bug in saa7127.c
Fix wrong wss debug info.

Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-25 02:05:09 -03:00
Jose Alberto Reguero ea76ce526e V4L/DVB (3767): Pvr350 tv out (saa7127)
Witout this patch tv out don't work properly with my pvr350 card.

Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:54:52 -03:00
Hans Verkuil 39b6f687d3 V4L/DVB (3608): Implement new routing commands in saa7127.c
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-04-02 04:54:56 -03:00
Mauro Carvalho Chehab f167cb4e6e V4L/DVB (3345): Fixes some bad global variables
- 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>
2006-01-11 19:41:49 -02:00
Panagiotis Issaris 7408187d22 V4L/DVB (3344a): Conversions from kmalloc+memset to k(z|c)alloc
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>
2006-01-11 19:40:56 -02:00
Hans Verkuil fac9e89999 V4L/DVB (3278): convert diagnostics over to the new v4l2-common.h macros.
- 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>
2006-01-09 15:32:40 -02:00
Mauro Carvalho Chehab b060c25f70 V4L/DVB (3123a): remove uneeded #if from V4L subsystem
- some uneeded #if were introduced by a previous patch.
  this patch removes these.

Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2006-01-09 15:25:20 -02:00
Greg Kroah-Hartman 2b48716d1d [PATCH] I2C: Remove .owner setting from i2c_driver as it's no longer needed
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>
2006-01-05 22:16:25 -08:00
Laurent Riffard 604f28e2b8 [PATCH] i2c: Drop i2c_driver.{owner,name}, 5 of 11
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>
2006-01-05 22:16:23 -08:00
Jean Delvare cde7859bda [PATCH] i2c: Rework client usage count, 2 of 3
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>
2006-01-05 22:16:22 -08:00
Jean Delvare 8a9947552d [PATCH] i2c: Drop i2c_driver.flags, 2 of 3
Just about every i2c chip driver sets the I2C_DF_NOTIFY flag, so we
can simply make it the default and drop the flag. If any driver really
doesn't want to be notified when i2c adapters are added, that driver
can simply omit to set .attach_adapter. This approach is also more
robust as it prevents accidental NULL pointer dereferences.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-05 22:16:21 -08:00
Hans Verkuil 515432aa7a V4L/DVB (3191): Fix CC output
- CC data was swapped the wrong way around.
- Enabling CC disabled XDS and vice versa: these two should
be independent from one another.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-12-22 07:55:12 -02:00
Mauro Carvalho Chehab 769e24382d [PATCH] V4L: Some funcions now static and I2C hw code for IR
- Some funcions are now declared as static
- Added a I2C code for InfraRed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-01 15:48:57 -08:00
Mauro Carvalho Chehab e77f34d694 [PATCH] v4l: (966.1) Removes Obsoleted i2c-compat.h from newer drivers
Removed obsoleted i2c-compat.h file from cx25840, saa7115 and saa7127 drivers.

Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13 18:14:20 -08:00
Hans Verkuil 1f4b33651c [PATCH] v4l: (966) Authorship fixes for new Modules
Fixes Module Author macros

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13 18:14:20 -08:00
Andrew Morton 419d4e753a [PATCH] v4l-944-added-driver-for-saa7127-video-tidy
Remove unneeded (and undesirable) casts.

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Chris Kennedy <c@groovy.org>
Cc: Kevin Thayer <nufan_wfk@yahoo.com>
Cc: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13 18:14:19 -08:00
Hans Verkuil cfbb5b8cb0 [PATCH] v4l: (944) added driver for saa7127 video decoder
- Added driver for saa7127 video decoder.  Driver authors:Hans Verkuil,
  Chris Kennedy, Kevin Thayer

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Chris Kennedy <c@groovy.org>
Signed-off-by: Kevin Thayer <nufan_wfk@yahoo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13 18:14:18 -08:00