pandora-kernel.git
14 years agoV4L/DVB: media-spec: Fix documentation mistakes regarding I/O streaming
Hans Verkuil [Sat, 20 Feb 2010 12:41:03 +0000 (09:41 -0300)]
V4L/DVB: media-spec: Fix documentation mistakes regarding I/O streaming

The media spec contains several errors in the description of the
I/O streaming ioctls, in particular with respect to the userptr
I/O method.

The most important change is that you really need to set count
and index in v4l2_requestbuffer and v4l2_buffer when dealing with
user pointer streaming.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: saa7115: fix saa7111a support
Hans Verkuil [Sat, 20 Feb 2010 11:07:51 +0000 (08:07 -0300)]
V4L/DVB: saa7115: fix saa7111a support

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>
14 years agoV4L/DVB: saa7146_vv: fix regression where v4l2_device was registered too late
Hans Verkuil [Sat, 20 Feb 2010 10:56:25 +0000 (07:56 -0300)]
V4L/DVB: saa7146_vv: fix regression where v4l2_device was registered too late

v4l2_device_register needs to be called before the i2c subdevs are loaded.
However, it was called afterwards in the saa7146 driver. This caused an oops
when loading the mxb and hexium drivers. The vv_init function is now split
into two: one registers the v4l2_device, the other does the rest of the
initialization. The three drivers that depend on this have been updated to
call the new vv_devinit function.

Thanks to Michael Hunold for reporting this.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: uvcvideo: Check uvc_ctrl_begin return value in VIDIOC_S_CTRL
Laurent Pinchart [Fri, 5 Feb 2010 00:43:37 +0000 (21:43 -0300)]
V4L/DVB: uvcvideo: Check uvc_ctrl_begin return value in VIDIOC_S_CTRL

The function return value wasn't checked due to a missing variable
assignment.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: uvcvideo: Blacklist gain control for Asus EeePC T91 integrated webcam
Laurent Pinchart [Wed, 3 Feb 2010 09:49:35 +0000 (06:49 -0300)]
V4L/DVB: uvcvideo: Blacklist gain control for Asus EeePC T91 integrated webcam

The Asus EeePC T91 integrated webcam exposes a gain control in the
processing unit but stalls when the control is queried. Blacklist the
gain control for that camera.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: uvcvideo: Clamp control values to the minimum and maximum values
Laurent Pinchart [Sat, 23 Jan 2010 10:07:53 +0000 (07:07 -0300)]
V4L/DVB: uvcvideo: Clamp control values to the minimum and maximum values

When setting a control, the V4L2 specification requires drivers to
either clamp the control value to the [minimum, maximum] range or return
the -ERANGE error.

Fix the driver to clamp control values to the valid range in
uvc_ctrl_set() and make sure the value differs from the minimum by an
integer multiple of step.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: uvcvideo: Cache control min, max, res and def query results
Laurent Pinchart [Sat, 23 Jan 2010 09:30:20 +0000 (06:30 -0300)]
V4L/DVB: uvcvideo: Cache control min, max, res and def query results

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: uvcvideo: Return -ERANGE when setting a control to an out-of-range menu...
Laurent Pinchart [Thu, 21 Jan 2010 19:53:11 +0000 (16:53 -0300)]
V4L/DVB: uvcvideo: Return -ERANGE when setting a control to an out-of-range menu index

The V4L2 specification states that out of bounds control values must
either be clamped to the valid range or result in a -ERANGE error code.

Fix the driver to return -ERANGE instead of -EINVAL when setting a menu
control to an invalid value.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: uvcvideo: Use %pUl printk format specifier to print GUIDs
Laurent Pinchart [Tue, 19 Jan 2010 12:06:22 +0000 (09:06 -0300)]
V4L/DVB: uvcvideo: Use %pUl printk format specifier to print GUIDs

Replace the UVC_GUID_FORMAT and UVC_GUID_ARGS macros with the new %pUl
printk format specifier.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: uvcvideo: Increase the streaming control timeout to 5 seconds
Laurent Pinchart [Tue, 19 Jan 2010 11:59:21 +0000 (08:59 -0300)]
V4L/DVB: uvcvideo: Increase the streaming control timeout to 5 seconds

This fixes timeout issues with some Logitech webcams. The timeout value
seems to match the one used in the Logitech Windows driver, so no
further increase should be necessary.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - main: Fix a compile error when CONFIG_INPUT is not set
Jean-François Moine [Thu, 18 Feb 2010 18:02:51 +0000 (15:02 -0300)]
V4L/DVB: gspca - main: Fix a compile error when CONFIG_INPUT is not set

Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - sonixj: Set the vertical flip at capture start for all sensors
Jean-François Moine [Thu, 18 Feb 2010 17:56:33 +0000 (14:56 -0300)]
V4L/DVB: gspca - sonixj: Set the vertical flip at capture start for all sensors

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - sonixj: Add vertical flip control for sensor hv7131r
Jean-François Moine [Thu, 18 Feb 2010 07:12:06 +0000 (04:12 -0300)]
V4L/DVB: gspca - sonixj: Add vertical flip control for sensor hv7131r

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: videobuf: add missing checks for kzalloc returning NULL
Pawel Osciak [Mon, 22 Feb 2010 16:10:06 +0000 (13:10 -0300)]
V4L/DVB: videobuf: add missing checks for kzalloc returning NULL

Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: cx88-alsa: prevent out-of-range volume setting
Clemens Ladisch [Mon, 22 Feb 2010 09:45:07 +0000 (06:45 -0300)]
V4L/DVB: cx88-alsa: prevent out-of-range volume setting

Ensure that volume values are always in the allowed range.  Otherwise,
it would be possible to set other bits in the AUD_VOL_CTL register or to
get a wrong sign in the AUD_BAL_CTL register.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: mfd: Add timb-radio to the timberdale MFD
Richard Röjfors [Fri, 19 Feb 2010 22:41:54 +0000 (19:41 -0300)]
V4L/DVB: mfd: Add timb-radio to the timberdale MFD

This patch addes timb-radio to all configurations of the timberdale MFD.

Connected to the FPGA is a TEF6862 tuner and a SAA7706H DSP, the I2C
board info of these devices is passed via the timb-radio platform data.

Signed-off-by: Richard Röjfors <richard.rojfors@pelagicore.com>
Cc: sameo@linux.intel.com
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: dvb-usb/opera1: misplaced parenthesis
Roel Kluin [Mon, 15 Feb 2010 22:30:38 +0000 (19:30 -0300)]
V4L/DVB: dvb-usb/opera1: misplaced parenthesis

The parenthesis was misplaced, tmp is set to 0 or break occurs,
while debugging opera1_usb_i2c_msgxfer() retval was not shown.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
CC: Marco Gittler <g.marco@freenet.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tuner-xc2028: Fix demod breakage for XC3028L
Mauro Carvalho Chehab [Fri, 19 Feb 2010 22:08:06 +0000 (20:08 -0200)]
V4L/DVB: tuner-xc2028: Fix demod breakage for XC3028L

A small mistake on the last patch broke demod s-code setup for
XC3028L (firmware 3.2 and upper). Fix it.

Thanks-to: Stefan Ringel <stefan.ringel@arcor.de>

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tuner-xc2028: fix tuning logic to solve a regression in Australia
Mauro Carvalho Chehab [Fri, 19 Feb 2010 04:45:00 +0000 (02:45 -0200)]
V4L/DVB: tuner-xc2028: fix tuning logic to solve a regression in Australia

There's one reported regression in Australia (DTV7) and some
reported troubles with newer firmwares found on xc3028l chips.
Rework the logic to improve tuner on those cases.

Thanks-to: Robert Lowery <rglowery@exemail.com.au>
Thanks-to: Stefan Ringel <stefan.ringel@arcor.de>
Tested-by: Robert Lowery <rglowery@exemail.com.au>
CC: stable.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: bttv: Let the user disable IR support
Jean Delvare [Tue, 16 Feb 2010 17:22:37 +0000 (14:22 -0300)]
V4L/DVB: bttv: Let the user disable IR support

Add a new module parameter "disable_ir" to disable IR support. Several
other drivers do that already, and this can be very handy for
debugging purposes.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: em28xx : Terratec Cinergy Hybrid T USB XS FR is working
Catimimi [Thu, 18 Feb 2010 21:06:32 +0000 (18:06 -0300)]
V4L/DVB: em28xx : Terratec Cinergy Hybrid T USB XS FR is working

I succeeded in running Cinergy Hybrid T USB XS FR in both modes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: dvb: fix sparse warnings
Randy Dunlap [Mon, 15 Feb 2010 02:39:32 +0000 (23:39 -0300)]
V4L/DVB: dvb: fix sparse warnings

Fix sparse warnings in media/dvb/frontends:

drivers/media/dvb/frontends/dibx000_common.c:177:13: warning: non-ANSI function declaration of function 'systime'
drivers/media/dvb/frontends/tda665x.c:136:55: warning: right shift by bigger than source value

[mchehab@redhat.com: removed the change at dib0090 since it got fixed by a previous patch]
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: V4L: dvb-usb, add extra sync to down-up input events
Jiri Slaby [Sun, 14 Feb 2010 20:36:25 +0000 (17:36 -0300)]
V4L/DVB: V4L: dvb-usb, add extra sync to down-up input events

Userspace is allowed to coalesce events between SYNCs. And since the code
emits UP right after DOWN for the same key, it may be missed
(up+down=nothing). Add an extra sync in between UP and DOWN events to disable
the coalesce.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Patrick Boettcher <pboettcher@kernellabs.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: add missing 'p' at card name 'Hauppauge HD PVR'
Lars Hanisch [Sun, 14 Feb 2010 11:57:39 +0000 (08:57 -0300)]
V4L/DVB: add missing 'p' at card name 'Hauppauge HD PVR'

I don't know if there are applications which rely on this name,
but after all it's a spelling mistake.

Signed-off-by: Lars Hanisch <dvb@cinnamon-sage.de>
CC: Janne Granau <j@jannau.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Add an entry for Kworld 315U remote
Franklin Meng [Sat, 13 Feb 2010 05:37:15 +0000 (02:37 -0300)]
V4L/DVB: Add an entry for Kworld 315U remote

Signed-off-by: Franklin Meng <fmeng2002@yahoo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: radio_timberdale: depends on I2c
Randy Dunlap [Fri, 12 Feb 2010 21:02:35 +0000 (18:02 -0300)]
V4L/DVB: radio_timberdale: depends on I2c

RADIO_TIMBERDALE selects RADIO_SAA7706H, but RADIO_SAA7706H
depends on I2C, so make RADIO_TIMBERDALE depend on I2C also;
otherwise there are build errors:

drivers/media/radio/saa7706h.c:139: error: implicit declaration of function 'i2c_master_send'
drivers/media/radio/saa7706h.c:148: error: implicit declaration of function 'i2c_transfer'
drivers/media/radio/saa7706h.c:372: error: implicit declaration of function 'i2c_check_functionality'
drivers/media/radio/saa7706h.c:375: error: implicit declaration of function 'i2c_adapter_id'
drivers/media/radio/saa7706h.c:438: error: implicit declaration of function 'i2c_add_driver'
drivers/media/radio/saa7706h.c:443: error: implicit declaration of function 'i2c_del_driver'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Mocean Laboratories <info@mocean-labs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: media/video/tlg2300: fix build when CONFIG_PM=n
Randy Dunlap [Fri, 12 Feb 2010 21:02:29 +0000 (18:02 -0300)]
V4L/DVB: media/video/tlg2300: fix build when CONFIG_PM=n

When CONFIG_PM is not enabled, tlg2300 has build errors,
so handle that case, mostly via stubs.

drivers/media/video/tlg2300/pd-alsa.c:237: error: 'struct poseidon' has no member named 'msg'
drivers/media/video/tlg2300/pd-main.c:412: error: implicit declaration of function 'find_old_poseidon'
drivers/media/video/tlg2300/pd-main.c:418: error: implicit declaration of function 'set_map_flags'
drivers/media/video/tlg2300/pd-main.c:462: error: implicit declaration of function 'get_pd'

Cc: linux-next@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>, linux-media@vger.kernel.org
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Huang Shijie <shijie8@gmail.com>
Cc: Kang Yong <kangyong@telegent.com>
Cc: Zhang Xiaobing <xbzhang@telegent.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: timberdale: fix mfd build
Randy Dunlap [Fri, 12 Feb 2010 15:30:55 +0000 (12:30 -0300)]
V4L/DVB: timberdale: fix mfd build

Fix mfd/timberdale build error -- add depends GPIOLIB.

include/linux/spi/max7301.h:14: error: field 'chip' has incomplete type
build-r7353.out:make[3]: *** [drivers/mfd/timberdale.o] Error 1

Repairs

commit ff7a26e08a16bb31158d830dbf60db2ff47019ab
Author:     Richard R<C3><B6>jfors <richard.rojfors@pelagicore.com>
AuthorDate: Thu Feb 4 08:18:52 2010 -0300
Commit:     Mauro Carvalho Chehab <mchehab@redhat.com>
CommitDate: Fri Feb 5 12:25:37 2010 -0200

    V4L/DVB: mfd: Add support for the timberdale FPGA

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Richard Rojfors <richard.rojfors@pelagicore.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Kbuild addition for TVP7002 driver
Santiago Nunez-Corrales [Fri, 18 Dec 2009 17:07:57 +0000 (14:07 -0300)]
V4L/DVB: Kbuild addition for TVP7002 driver

This patch provides menu configuration options for the TVP7002
decoder driver in DM365. Includes only TVP7002.

Signed-off-by: Santiago Nunez-Corrales <santiago.nunez@ridgerun.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tvp7002: fix compilation breakage when advanced debug is enabled
Hans Verkuil [Thu, 25 Feb 2010 20:34:09 +0000 (17:34 -0300)]
V4L/DVB: tvp7002: fix compilation breakage when advanced debug is enabled

> On Mon, 22 Feb 2010 08:21:44 -0800 Randy Dunlap wrote:
> drivers/media/video/tvp7002.c:896: error: 'struct tvp7002' has no member named 'registers'
>
> so where are these registers??

Hmm, that code is a remnant from older revisions of this driver. Unfortunately,
when I compiled this driver before creating my pull request I forgot to turn on
the CONFIG_VIDEO_ADV_DEBUG option and so I never saw it.

Also fixed the g_register function: it never returned a register
value in the original code.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: TVP7002 driver for DM365
Santiago Nunez-Corrales [Mon, 21 Dec 2009 19:14:04 +0000 (16:14 -0300)]
V4L/DVB: TVP7002 driver for DM365

This patch provides the implementation of the TVP7002 decoder
driver for DM365. Implemented using the V4L2 DV presets API.
Removed shadow register values. Testing shows that the device
needs not to be powered down and up for correct behaviour.
Improved readability. Uses helper function for preset information.

[mchehab@redhat.com: Fix bad Whitespacing]
Signed-off-by: Santiago Nunez-Corrales <santiago.nunez@ridgerun.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Definitions for TVP7002 in DM365
Santiago Nunez-Corrales [Fri, 18 Dec 2009 17:07:39 +0000 (14:07 -0300)]
V4L/DVB: Definitions for TVP7002 in DM365

This patch provides the required definitions for the TVP7002 driver
in DM365.

Signed-off-by: Santiago Nunez-Corrales <santiago.nunez@ridgerun.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Support for TVP7002 in v4l2 definitions
Santiago Nunez-Corrales [Fri, 18 Dec 2009 17:07:29 +0000 (14:07 -0300)]
V4L/DVB: Support for TVP7002 in v4l2 definitions

This patch provides required chip identification definitions
within v4l2. Included only definitions for TVP7002.

Signed-off-by: Santiago Nunez-Corrales <santiago.nunez@ridgerun.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: AZ6027: Fix build warnings
Manu Abraham [Sun, 14 Feb 2010 20:07:28 +0000 (17:07 -0300)]
V4L/DVB: AZ6027: Fix build warnings

drivers/media/dvb/dvb-usb/az6027.c:390: warning: excess elements in struct initializer
drivers/media/dvb/dvb-usb/az6027.c:390: warning: (near initialization for ‘az6027_rc_keys[0]’)
drivers/media/dvb/dvb-usb/az6027.c:391: warning: excess elements in struct initializer
drivers/media/dvb/dvb-usb/az6027.c:391: warning: (near initialization for ‘az6027_rc_keys[1]’)
drivers/media/dvb/dvb-usb/az6027.c:759: warning: ‘az6027_read_mac_addr’ defined but not used

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoRevert "V4L/DVB: az6027: az6027_read_mac_addr is currently unused"
Mauro Carvalho Chehab [Thu, 18 Feb 2010 01:54:07 +0000 (23:54 -0200)]
Revert "V4L/DVB: az6027: az6027_read_mac_addr is currently unused"

This reverts commit 1e08370814e8902074d59cc57f2b4c1a62f00ee8.

Patch were wrongly applied.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoRevert "V4L/DVB: az6027: IR RC keys are using the old struct with 3 parameters, inste...
Mauro Carvalho Chehab [Thu, 18 Feb 2010 01:53:04 +0000 (23:53 -0200)]
Revert "V4L/DVB: az6027: IR RC keys are using the old struct with 3 parameters, instead of 2"

This reverts commit 234497b022c464532976b8a12614819bcf67f41b.

Patch were wrongly applied.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agosh_mobile_ceu_camera: pass .set_parm and .get_parm down to subdevices
Guennadi Liakhovetski [Tue, 9 Feb 2010 17:00:38 +0000 (18:00 +0100)]
sh_mobile_ceu_camera: pass .set_parm and .get_parm down to subdevices

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agosoc-camera: add support for VIDIOC_S_PARM and VIDIOC_G_PARM ioctls
Guennadi Liakhovetski [Tue, 9 Feb 2010 17:00:30 +0000 (18:00 +0100)]
soc-camera: add support for VIDIOC_S_PARM and VIDIOC_G_PARM ioctls

Just pass VIDIOC_S_PARM and VIDIOC_G_PARM down to host drivers. So far no
special handling in soc-camera core.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agosoc-camera: return -ENODEV if sensor is missing
Magnus Damm [Tue, 9 Feb 2010 08:40:40 +0000 (17:40 +0900)]
soc-camera: return -ENODEV if sensor is missing

Update the soc-camera i2c code to return -ENODEV if
a camera sensor is missing instead of -ENOMEM.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agopxa_camera: remove init() callback
Antonio Ospite [Tue, 17 Nov 2009 22:04:23 +0000 (23:04 +0100)]
pxa_camera: remove init() callback

pxa_camera init() callback is sometimes abused to setup MFP for PXA CIF, or
even to request GPIOs to be used by the camera *sensor*. These initializations
can be performed statically in machine init functions.

The current semantics for this init() callback is ambiguous anyways, it is
invoked in pxa_camera_activate(), hence at device node open, but its users use
it like a generic initialization to be done at module init time (configure
MFP, request GPIOs for *sensor* control).

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agosoc-camera: adjust coding style to match V4L preferences
Guennadi Liakhovetski [Thu, 24 Dec 2009 13:12:15 +0000 (14:12 +0100)]
soc-camera: adjust coding style to match V4L preferences

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agosoc-camera: ov772x: Modify buswidth control
Kuninori Morimoto [Wed, 6 Jan 2010 09:42:16 +0000 (18:42 +0900)]
soc-camera: ov772x: Modify buswidth control

This patch removes "buswidth" struct member, and sets the default buswidth
to the natively supported 10 bit. You can select 8 bit buswidth by new flag.
This patch also modify ap325rxa/migor setup.c

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agotw9910: use TABs for indentation
Guennadi Liakhovetski [Thu, 4 Feb 2010 10:24:00 +0000 (11:24 +0100)]
tw9910: use TABs for indentation

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agosoc-camera: update mt9v022 to take into account board signal routing
Guennadi Liakhovetski [Thu, 4 Feb 2010 10:17:48 +0000 (11:17 +0100)]
soc-camera: update mt9v022 to take into account board signal routing

Use soc_camera_apply_sensor_flags() in mt9v022 to account for any inverters in
video signal paths.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: az6027: az6027_read_mac_addr is currently unused
Mauro Carvalho Chehab [Wed, 17 Feb 2010 23:13:19 +0000 (21:13 -0200)]
V4L/DVB: az6027: az6027_read_mac_addr is currently unused

drivers/media/dvb/dvb-usb/az6027.c:759: warning: ‘az6027_read_mac_addr’ defined but not used

While there's some code that uses it, it is currently commented. So, comment also
the function itself.

CC: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: az6027: IR RC keys are using the old struct with 3 parameters, instead of 2
Mauro Carvalho Chehab [Wed, 17 Feb 2010 23:11:06 +0000 (21:11 -0200)]
V4L/DVB: az6027: IR RC keys are using the old struct with 3 parameters, instead of 2

drivers/media/dvb/dvb-usb/az6027.c:390: warning: excess elements in struct initializer
drivers/media/dvb/dvb-usb/az6027.c:390: warning: (near initialization for ‘az6027_rc_keys[0]’)
drivers/media/dvb/dvb-usb/az6027.c:391: warning: excess elements in struct initializer
drivers/media/dvb/dvb-usb/az6027.c:391: warning: (near initialization for ‘az6027_rc_keys[1]’)

CC: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: AZ6027: Fix checkpatch violations
Manu Abraham [Sun, 14 Feb 2010 19:58:10 +0000 (16:58 -0300)]
V4L/DVB: AZ6027: Fix checkpatch violations

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: AZ6027: Add driver supported ID's
Manu Abraham [Sun, 14 Feb 2010 18:10:54 +0000 (15:10 -0300)]
V4L/DVB: AZ6027: Add driver supported ID's

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: AZ6027: Update Build
Manu Abraham [Sun, 14 Feb 2010 18:03:39 +0000 (15:03 -0300)]
V4L/DVB: AZ6027: Update Build

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: AZ6027: Add driver supported ID's
Manu Abraham [Sun, 14 Feb 2010 17:59:39 +0000 (14:59 -0300)]
V4L/DVB: AZ6027: Add driver supported ID's

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: AZ6027: Initial import of the driver
Adams Xu [Sun, 14 Feb 2010 17:34:07 +0000 (14:34 -0300)]
V4L/DVB: AZ6027: Initial import of the driver

Signed-off-by: Manu Abaraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tlg2300: remove the country code for analog tv and radio
Huang Shijie [Thu, 11 Feb 2010 06:53:51 +0000 (03:53 -0300)]
V4L/DVB: tlg2300: remove the country code for analog tv and radio

video :
use the V4L2_STD macros to select the proper audio setting.

radio :
add preemphasis ctr.
test it by the command:
v4l2-ctl -d /dev/radio0 --set-ctrl=pre_emphasis_settings=1

[mchehab@redhat.com: folded documentation patch]
Signed-off-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Add driver for Telegent tlg2300
Huang Shijie [Tue, 2 Feb 2010 07:07:47 +0000 (04:07 -0300)]
V4L/DVB: Add driver for Telegent tlg2300

pd-common.h contains the common data structures, while
vendorcmds.h contains the vendor commands for firmware.

[mchehab@redhat.com: Folded the 10 patches with the driver]
Signed-off-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Kworld 315U remote support
Franklin Meng [Thu, 11 Feb 2010 05:50:56 +0000 (02:50 -0300)]
V4L/DVB: Kworld 315U remote support

Adds remote support for the Kworld 315U device

I have added the change for the IR_TYPE_NEC that Mauro suggested.

Note: I believe I got most of the mappings correct.  Though the
source and shutdown button probably could be mapped to something
better.

[mchehab@redhat.com: Fix CodingStyle]
Signed-off-by: Franklin Meng <fmeng2002@yahoo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: drivers/media/radio/si470x/radio-si470x-usb.c fix use after free
Darren Jenkins [Thu, 11 Feb 2010 11:07:53 +0000 (08:07 -0300)]
V4L/DVB: drivers/media/radio/si470x/radio-si470x-usb.c fix use after free

In si470x_usb_driver_disconnect() radio->disconnect_lock is accessed
after it is freed. This fixes the problem.

Coverity CID: 2530

Signed-off-by: Darren Jenkins <darrenrjenkins@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: af901x: inform NXP TDA18218 tuner as know but not supported
Antti Palosaari [Thu, 11 Feb 2010 00:33:12 +0000 (21:33 -0300)]
V4L/DVB: af901x: inform NXP TDA18218 tuner as know but not supported

There is no driver for new NXP TDA18218 tuner which is used by few recent
af9015 designs. af9015 uses number 179 as ID for that tuner. Inform this
tuner is not supported when device using that tuner is meet.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: af9015: MYGICTV U718 remote autodetection
Antti Palosaari [Wed, 10 Feb 2010 23:44:12 +0000 (20:44 -0300)]
V4L/DVB: af9015: MYGICTV U718 remote autodetection

Autodetect MYGICTV U718 from eeprom hash and select remote automatically.
Remove old iManufacturer string compare based remote selection logic.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: af9015: A-Link DTU(m) remote autodetection
Antti Palosaari [Wed, 10 Feb 2010 23:20:41 +0000 (20:20 -0300)]
V4L/DVB: af9015: A-Link DTU(m) remote autodetection

Autodetect A-Link DTU(m) based eeprom hash and select correct remote.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: af9015: support for Leadtek WinFast DTV2000DS
Antti Palosaari [Wed, 10 Feb 2010 23:07:30 +0000 (20:07 -0300)]
V4L/DVB: af9015: support for Leadtek WinFast DTV2000DS

Add USB ID 0413:6a04 for Leadtek WinFast DTV2000DS.

Thanks to Gavin Ramm <gavin_ramm@hotmail.com> for reporting this.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: af9015: support for DigitalNow TinyTwin v2
Antti Palosaari [Wed, 10 Feb 2010 23:05:48 +0000 (20:05 -0300)]
V4L/DVB: af9015: support for DigitalNow TinyTwin v2

Add USB ID 1b80:e402 for DigitalNow TinyTwin version 2.

Thanks to Trevor Phillips <trevor.phillips@gmail.com> for reporting this.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: DVB: ngene, fix memset parameters
Jiri Slaby [Wed, 10 Feb 2010 23:32:42 +0000 (20:32 -0300)]
V4L/DVB: DVB: ngene, fix memset parameters

Switch second and third memset parameter to stamp the length buffer bytes
by 0xff's, not 255 bytes by low 8 bits of Length.

Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, jirislaby@gmail.com, Matthias Benesch <twoof7@freenet.de>, Ralph Metzler <rjkm@metzlerbros.de>, Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Matthias Benesch <twoof7@freenet.de>
Cc: Ralph Metzler <rjkm@metzlerbros.de>
Cc: Oliver Endriss <o.endriss@gmx.de>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: em28xx: add Dikom DK300 hybrid USB tuner
Andrea.Amorosi76@gmail.com [Tue, 9 Feb 2010 20:53:38 +0000 (17:53 -0300)]
V4L/DVB: em28xx: add Dikom DK300 hybrid USB tuner

Adds digital and analogue tv support for Dikom DK300 hybrid usb card.

Not working: remote controller

To be done: it seems that with the proposed patch the digital demodulator
remains activated if the tuner is switched from digital to analogue mode.

Workaround is to unplug and replug the device when switching from digital to
analogue. If someone can explain how to verify the gpio settings using the
usbsnoop, the above issue perhaps can be resolved.

Signed-off-by: Andrea Amorosi <Andrea.Amorosi76@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: drivers/media: Correct NULL test
Julia Lawall [Sat, 6 Feb 2010 08:43:58 +0000 (05:43 -0300)]
V4L/DVB: drivers/media: Correct NULL test

In each case, the NULL test has been performed already.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
expression *x;
expression e;
identifier l;
@@

if (x == NULL || ...) {
    ... when forall
    return ...; }
... when != goto l;
    when != x = e
    when != &x
*x == NULL
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: dst: fixes for DVB-C Twinhan VP2031
Klaas de Waal [Sun, 7 Feb 2010 17:09:16 +0000 (14:09 -0300)]
V4L/DVB: dst: fixes for DVB-C Twinhan VP2031

Remove check  "state->dst_type == DST_DTYPE_IS_CABLE"  in function
dst_get_tuna (around line 1352) to select the correct checksum
computation

Fill in the .caps field in struct dst_dvbc_ops (around line 1824) with
all the supported QAM modulation methods to match the capabilities of
the card as implemented in function dst_set_modulation (around line
502). Note that beginning with linux kernel version 2.6.32 the
modulation method is checked (by function
dvb_frontend_check_parameters in file
drivers/media/dvb/dvb-core/dvb_frontend.c) and thus tuning fails if
you use a modulation method that is not present in the .caps field.

This patch has been tested on a Twinhan VP2031A DVB-C card with the
2.6.32.2 kernel.

Signed-off-by: Klaas de Waal <klaas.de.waal@gmail.com>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: saa7134 can capture 720x480 when capturing NTSC
Sean Young [Sat, 6 Feb 2010 13:58:41 +0000 (10:58 -0300)]
V4L/DVB: saa7134 can capture 720x480 when capturing NTSC

When capturing NTSC, the saa7134 can capture 720x480.

While doing Laserdisc captures using this card, I noticed that right side
was truncated/cropped. The highest geometry the driver allows is 704x480,
even though in Windows XP it is 720x480. This results in no cropping
and the same results as in Windows.

Tested on an AverMedia GO 007 FM Plus.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: STV0900 Cut 3.0 AGC2 fix for NetUP Dual DVB-S2-CI card
Abylay Ospan [Sat, 6 Feb 2010 08:55:47 +0000 (05:55 -0300)]
V4L/DVB: STV0900 Cut 3.0 AGC2 fix for NetUP Dual DVB-S2-CI card

if the AGC2 > 1400 then no signal on this frequency for STV0900 Cut 3.0. For
Cut 2.0 this value is 700.

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Fix logic for Leadtek winfast tv usbii deluxe
Douglas Schilling Landgraf [Fri, 5 Feb 2010 16:33:38 +0000 (14:33 -0200)]
V4L/DVB: Fix logic for Leadtek winfast tv usbii deluxe

As pointed by Magnus Alm <magnus.alm@gmail.com>, commit 99dbd128bb applied
a hunk at the wrong place. This patch moves the code to the right place.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: get_dvb_firmware: Fix typo, sort list of components
Oliver Endriss [Fri, 5 Feb 2010 10:57:58 +0000 (07:57 -0300)]
V4L/DVB: get_dvb_firmware: Fix typo, sort list of components

Commiter: Oliver Endriss <o.endriss@gmx.de>

Fix typo. Sort list of components for better readability.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: get_dvb_firmware: Add function to retrieve nGene firmwares
Oliver Endriss [Fri, 5 Feb 2010 10:52:44 +0000 (07:52 -0300)]
V4L/DVB: get_dvb_firmware: Add function to retrieve nGene firmwares

Commiter: Oliver Endriss <o.endriss@gmx.de>

Use 'get_dvb_firmware ngene' to download 'ngene_15.fw' and 'ngene_17.fw'.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: using vmalloc requires include linux/vmalloc.h
Stephen Rothwell [Fri, 5 Feb 2010 05:46:47 +0000 (02:46 -0300)]
V4L/DVB: using vmalloc requires include linux/vmalloc.h

After merging the scsi-post-merge tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/media/dvb/ngene/ngene-core.c: In function 'ngene_release_buffers':
drivers/media/dvb/ngene/ngene-core.c:1443: error: implicit declaration of function 'vfree'
drivers/media/dvb/ngene/ngene-core.c: In function 'ngene_get_buffers':
drivers/media/dvb/ngene/ngene-core.c:1454: error: implicit declaration of function 'vmalloc'
drivers/media/dvb/ngene/ngene-core.c:1454: warning: assignment makes pointer from integer without a cast
drivers/media/dvb/ngene/ngene-core.c:1461: warning: assignment makes pointer from integer without a cast
drivers/media/dvb/ngene/ngene-core.c:1467: warning: assignment makes pointer from integer without a cast
drivers/media/dvb/ngene/ngene-core.c: In function 'ngene_probe':
drivers/media/dvb/ngene/ngene-core.c:1836: warning: assignment makes pointer from integer without a cast

Caused by commit b54c755d6263efe376f3dfc8c72c8e7b4fb4f4c1 ("V4L/DVB: ngene: Initial check-in").

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: mfd: Add support for the timberdale FPGA
Richard Röjfors [Thu, 4 Feb 2010 11:18:52 +0000 (08:18 -0300)]
V4L/DVB: mfd: Add support for the timberdale FPGA

The timberdale FPGA is found on the Intel in-Vehicle Infotainment reference board
russelville.

The driver is a PCI driver which chunks up the I/O memory and distributes interrupts
to a number of platform devices for each IP inside the FPGA.

Signed-off-by: Richard Röjfors <richard.rojfors@pelagicore.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: radio: Add radio-timb
Richard Röjfors [Wed, 3 Feb 2010 15:59:39 +0000 (12:59 -0300)]
V4L/DVB: radio: Add radio-timb

This patch add supports for the radio system on the Intel Russellville board.

It's a In-Vehicle Infotainment board with a radio tuner and DSP.

This umbrella driver has the DSP and tuner as V4L2 subdevs and calls them
when needed.

Signed-off-by: Richard Röjfors <richard.rojfors@pelagicore.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ngene: Fix I2C initialisation
Oliver Endriss [Thu, 4 Feb 2010 01:06:15 +0000 (22:06 -0300)]
V4L/DVB: ngene: Fix I2C initialisation

Use I2C_CLASS_TV_DIGITAL, not I2C_ADAP_CLASS_TV_DIGITAL.
Remove initialisation of bus_lock mutex.
Thanks to Mauro for pointing out.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Thanks-to: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ngene: Make checkpatch.pl happy
Oliver Endriss [Wed, 3 Feb 2010 21:59:20 +0000 (18:59 -0300)]
V4L/DVB: ngene: Make checkpatch.pl happy

Make checkpatch.pl happy.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ngene: Use correct name for cineS2 cards
Oliver Endriss [Wed, 3 Feb 2010 16:57:58 +0000 (13:57 -0300)]
V4L/DVB: ngene: Use correct name for cineS2 cards

Cards 18c3:abc3/18c3:abc4 should be displayed as 'Linux4Media cineS2'.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ngene: Take care of late interrupts
Oliver Endriss [Wed, 20 Jan 2010 22:03:22 +0000 (19:03 -0300)]
V4L/DVB: ngene: Take care of late interrupts

Request might already have been processed when the interrupt arrives.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ngene: Workaround for command timeout
Oliver Endriss [Wed, 20 Jan 2010 21:06:51 +0000 (18:06 -0300)]
V4L/DVB: ngene: Workaround for command timeout

Implement workaround for comamnd timeout.
Use FW15 and avoid switching DMA on and off.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ngene: Set ADC ranges to 1Vpp
Oliver Endriss [Wed, 20 Jan 2010 20:53:06 +0000 (17:53 -0300)]
V4L/DVB: ngene: Set ADC ranges to 1Vpp

Set ADC1 and ADC2 range of the stv0900 to 1Vpp.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ngene: Adapt to current frontend drivers
Oliver Endriss [Tue, 2 Feb 2010 01:01:31 +0000 (22:01 -0300)]
V4L/DVB: ngene: Adapt to current frontend drivers

Adapt to current stv090x + stv6110 drivers.

[mchehab@redhat.com: removed compilation hack added by me on a prev patch]
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ngene: Mystique SaTiX-S2 Dual
Matthias Benesch [Fri, 8 Jan 2010 20:38:03 +0000 (17:38 -0300)]
V4L/DVB: ngene: Mystique SaTiX-S2 Dual

Identify card 18c3:db01 as 'Mystique SaTiX-S2 Dual'.

Signed-off-by: Matthias Benesch <twoof7@freenet.de>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: [nGene] Trivial I2C related fixes/cleanups
Manu Abraham [Sat, 26 Dec 2009 19:56:26 +0000 (16:56 -0300)]
V4L/DVB: [nGene] Trivial I2C related fixes/cleanups

Trivial I2C related fixes/cleanups
 - Remove Unused I2C ID
 - point the I2C device to the physical device

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Acked-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ngene: Code cleanup
Oliver Endriss [Wed, 23 Dec 2009 19:26:17 +0000 (16:26 -0300)]
V4L/DVB: ngene: Code cleanup

Remove/comment-out unused code, make some functions/declarations static.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ngene: Added module parameter "one_adapter"
Matthias Benesch [Wed, 23 Dec 2009 08:55:02 +0000 (05:55 -0300)]
V4L/DVB: ngene: Added module parameter "one_adapter"

If parameter "one_adapter" is set, only one adapter per device will be attached.
Otherwise an adapter for every frontend will be attached.

Signed-off-by: Matthias Benesch <twoof7@freenet.de>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: DVB: Export dvb_ringbuffer_flush() again
Oliver Endriss [Tue, 22 Dec 2009 07:37:53 +0000 (04:37 -0300)]
V4L/DVB: DVB: Export dvb_ringbuffer_flush() again

Add EXPORT_SYMBOL(dvb_ringbuffer_flush) again,
replace my_dvb_ringbuffer_flush() in ngene driver.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ngene: Remove kernel version check for dvb_[un]register_adapter
Oliver Endriss [Tue, 22 Dec 2009 06:34:29 +0000 (03:34 -0300)]
V4L/DVB: ngene: Remove kernel version check for dvb_[un]register_adapter

Remove kernel version check for dvb_[un]register_adapter.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ngene: Change severity of some diagnostic messages
Oliver Endriss [Sun, 20 Dec 2009 05:30:52 +0000 (02:30 -0300)]
V4L/DVB: ngene: Change severity of some diagnostic messages

Changed severity of some diagnostic messages.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ngene: Speed-up tuning
Oliver Endriss [Sun, 20 Dec 2009 01:55:59 +0000 (22:55 -0300)]
V4L/DVB: ngene: Speed-up tuning

Remove stray mleep() which prevented fast tuning.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ngene: Fix unloading of module
Roland Praml [Sun, 20 Dec 2009 01:48:14 +0000 (22:48 -0300)]
V4L/DVB: ngene: Fix unloading of module

Fixed unloading of module ngene.

Signed-off-by: Roland Praml <pram@gmx.de>
Signed-off-by: Matthias Benesch <twoof7@freenet.de>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ngene: Remove firmware debugging
Matthias Benesch [Sat, 19 Dec 2009 15:57:16 +0000 (12:57 -0300)]
V4L/DVB: ngene: Remove firmware debugging

Remove firmware debugging, because setting ngene_fw_debug and requesting
firmware from file causes a kernel error.

Signed-off-by: Matthias Benesch <twoof7@freenet.de>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ngene: Added Media-Pointer MP-S2/CineS2 DVB-S2 Twin Tuner
Matthias Benesch [Sat, 19 Dec 2009 15:48:22 +0000 (12:48 -0300)]
V4L/DVB: ngene: Added Media-Pointer MP-S2/CineS2 DVB-S2 Twin Tuner

Added support for nGene based Media-Pointer DVB-S2 twin tuner cards.

[mchehab@redhat.com: Fix compilation error: unknown field ‘ref_clk’]

Signed-off-by: Matthias Benesch <twoof7@freenet.de>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ngene: Additional clean-up
Matthias Benesch [Sun, 20 Dec 2009 01:18:53 +0000 (22:18 -0300)]
V4L/DVB: ngene: Additional clean-up

Remove and disable unnecessary code. Disable define ONE_ADAPTER.

Signed-off-by: Matthias Benesch <twoof7@freenet.de>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ngene: Always use firmware loader
Oliver Endriss [Sat, 19 Dec 2009 09:38:05 +0000 (06:38 -0300)]
V4L/DVB: ngene: Always use firmware loader

Always use firmware loader.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ngene: Driver compiles now
Oliver Endriss [Sat, 19 Dec 2009 07:54:44 +0000 (04:54 -0300)]
V4L/DVB: ngene: Driver compiles now

Remove LNBH21 routines, disable code which broke compilation.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ngene: Initial check-in
Matthias Benesch [Sat, 19 Dec 2009 01:13:26 +0000 (22:13 -0300)]
V4L/DVB: ngene: Initial check-in

Add Micronas nGene PCIe bridge driver.

The source code was provided by Micronas / Ralph Metzler,
and has been reformatted to comply with Linux Codingstyle.

Signed-off-by: Matthias Benesch <twoof7@freenet.de>
Signed-off-by: Ralph Metzler <rjkm@metzlerbros.de>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: hdpvr: add new USB product id
Janne Grunau [Wed, 3 Feb 2010 14:51:23 +0000 (15:51 +0100)]
V4L/DVB: hdpvr: add new USB product id

Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: hdpvr-video: cleanup signedness
Márton Németh [Sat, 23 Jan 2010 13:44:34 +0000 (14:44 +0100)]
V4L/DVB: hdpvr-video: cleanup signedness

The fifth parameter of usb_bulk_msg() is a pointer to signed
(see <linux/usb.h>) so also call this function with pointer to signed.

This will remove the following sparse warning (see "make C=1"):
 * warning: incorrect type in argument 5 (different signedness)
       expected int *actual_length
       got unsigned int *<noident>

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: media: dvb/af9015, add hashes support
Jiri Slaby [Fri, 22 Jan 2010 15:10:55 +0000 (12:10 -0300)]
V4L/DVB: media: dvb/af9015, add hashes support

So as a final patch, add support for hash and one hash entry
for MSI digi vox mini II:
iManufacturer 1 Afatech
iProduct      2 DVB-T 2
iSerial       3 010101010600001

It is now handled with proper IR and key map tables.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: media: dvb/af9015, refactor remote setting
Jiri Slaby [Fri, 22 Jan 2010 15:10:54 +0000 (12:10 -0300)]
V4L/DVB: media: dvb/af9015, refactor remote setting

Add af9015_setup structure to hold (right now only remote) setup
of distinct receivers.

Add af9015_setup_match for matching ids against tables.

This is for easier matching different kind of ids against tables
to obtain setups. Currently module parameters and usb vendor ids
are switched into and matched against tables. Hashes will follow.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: media: dvb/af9015, factor out remote setting
Jiri Slaby [Fri, 22 Jan 2010 15:10:53 +0000 (12:10 -0300)]
V4L/DVB: media: dvb/af9015, factor out remote setting

This is just a code shuffle without functional changes. For easier
review of later changes, i.e. preparation.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: media: dvb/af9015, implement eeprom hashing
Jiri Slaby [Fri, 22 Jan 2010 15:10:52 +0000 (12:10 -0300)]
V4L/DVB: media: dvb/af9015, implement eeprom hashing

This will be useful for matching of IR tables later.

We read the eeprom anyway for dumping. Switch the dumping to
print_hex_dump_bytes and compute hash above that by
hash = 0;
for (u32 VAL) in (eeprom):
  hash *= GOLDEN_RATIO_PRIME_32
  hash += VAL; // while preserving endinaness

The computation is moved earlier to the flow, namely from
af9015_af9013_frontend_attach to af9015_read_config, so that
we can access the sum in af9015_read_config already.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>