GitHub/LineageOS/android_kernel_samsung_universal7580.git
17 years agoV4L/DVB (6152): cx23885: forward compatibility fixes for recent kernels
Michael Krufky [Sun, 11 Mar 2007 23:57:52 +0000 (20:57 -0300)]
V4L/DVB (6152): cx23885: forward compatibility fixes for recent kernels

- fix #include for <media/video-buf-dvb.h>
- fix cx23885_irq declaration for 2.6.19 and later

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6151): include drivers/media/video/cx23885/Kconfig
Michael Krufky [Sun, 11 Mar 2007 23:55:18 +0000 (20:55 -0300)]
V4L/DVB (6151): include drivers/media/video/cx23885/Kconfig

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6150): Add CX23885/CX23887 PCIe bridge driver
Steven Toth [Sun, 11 Mar 2007 23:44:05 +0000 (20:44 -0300)]
V4L/DVB (6150): Add CX23885/CX23887 PCIe bridge driver

This is a new framework to support boards based on the CX23885/7 PCIe
bridge. The framework supports digital (no analog yet)

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6149): Add I2C_HW_B_CX23885 for Conexant 23885/23887 PCIe bridge
Steven Toth [Sun, 11 Mar 2007 23:44:05 +0000 (20:44 -0300)]
V4L/DVB (6149): Add I2C_HW_B_CX23885 for Conexant 23885/23887 PCIe bridge

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6142): cx25840: fix build warning
Michael Krufky [Sat, 1 Sep 2007 05:02:51 +0000 (02:02 -0300)]
V4L/DVB (6142): cx25840: fix build warning

Fix the following build warning:

 CC [M]  cx25840-core.o

cx25840-core.c: In function 'init_dll1':
cx25840-core.c:147: warning: implicit declaration of function 'udelay'

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6141): tuner: use get_rf_strength instead of get_status to determine signal...
Michael Krufky [Fri, 31 Aug 2007 20:38:02 +0000 (17:38 -0300)]
V4L/DVB (6141): tuner: use get_rf_strength instead of get_status to determine signal strength

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6140): tda8290: add get_rf_strength and improve status reading efficiency
Michael Krufky [Fri, 31 Aug 2007 20:53:00 +0000 (17:53 -0300)]
V4L/DVB (6140): tda8290: add get_rf_strength and improve status reading efficiency

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6139): tea5767: add get_rf_strength and improve status reading efficiency
Michael Krufky [Fri, 31 Aug 2007 19:40:14 +0000 (16:40 -0300)]
V4L/DVB (6139): tea5767: add get_rf_strength and improve status reading efficiency

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6138): tea5761: add get_rf_strength and improve status reading efficiency
Michael Krufky [Fri, 31 Aug 2007 19:39:57 +0000 (16:39 -0300)]
V4L/DVB (6138): tea5761: add get_rf_strength and improve status reading efficiency

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6137): tuner-simple: add get_rf_strength and improve status reading efficiency
Michael Krufky [Fri, 31 Aug 2007 19:39:39 +0000 (16:39 -0300)]
V4L/DVB (6137): tuner-simple: add get_rf_strength and improve status reading efficiency

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6136): dvb_frontend: add get_rf_strength function pointer to dvb_tuner_ops
Michael Krufky [Fri, 31 Aug 2007 02:00:43 +0000 (23:00 -0300)]
V4L/DVB (6136): dvb_frontend: add get_rf_strength function pointer to dvb_tuner_ops

Add get_rf_strength function pointer to dvb_tuner_ops, so that rf signal
strength can be read directly from the tuner driver by the dvb demodulator
driver and / or the analog tuning system.

This is an internal api addition -- userspace is not affected.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6134): tuner: alter build to produce separate modules
Michael Krufky [Tue, 28 Aug 2007 00:59:35 +0000 (21:59 -0300)]
V4L/DVB (6134): tuner: alter build to produce separate modules

Break tuner.ko into separate modules. This was a quick change -
Tuner sub-drivers are still static-linked to tuner.ko, this will
change after using dvb_attach and removing the probing functions.

After this change, one can deselect undesired tuner sub-drivers via Kconfig.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Mike Isely <isely@pobox.com>
Acked-by: Steven Toth <stoth@hauppauge.com>
Acked-by: Patrick Boettcher <pb@linuxtv.org>
Acked-by: Jarod Wilson <jwilson@redhat.com>
Acked-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6133): tuner-simple: convert from tuner sub-driver into dvb_frontend module
Michael Krufky [Tue, 28 Aug 2007 00:59:08 +0000 (21:59 -0300)]
V4L/DVB (6133): tuner-simple: convert from tuner sub-driver into dvb_frontend module

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Mike Isely <isely@pobox.com>
Acked-by: Steven Toth <stoth@hauppauge.com>
Acked-by: Patrick Boettcher <pb@linuxtv.org>
Acked-by: Jarod Wilson <jwilson@redhat.com>
Acked-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6132): tea5767: convert from tuner sub-driver into dvb_frontend module
Michael Krufky [Tue, 28 Aug 2007 00:24:27 +0000 (21:24 -0300)]
V4L/DVB (6132): tea5767: convert from tuner sub-driver into dvb_frontend module

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Mike Isely <isely@pobox.com>
Acked-by: Steven Toth <stoth@hauppauge.com>
Acked-by: Patrick Boettcher <pb@linuxtv.org>
Acked-by: Jarod Wilson <jwilson@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6131): tea5761: convert from tuner sub-driver into dvb_frontend module
Michael Krufky [Tue, 28 Aug 2007 00:23:40 +0000 (21:23 -0300)]
V4L/DVB (6131): tea5761: convert from tuner sub-driver into dvb_frontend module

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Mike Isely <isely@pobox.com>
Acked-by: Steven Toth <stoth@hauppauge.com>
Acked-by: Patrick Boettcher <pb@linuxtv.org>
Acked-by: Jarod Wilson <jwilson@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6130): mt20xx: convert from tuner sub-driver into dvb_frontend module
Michael Krufky [Tue, 28 Aug 2007 00:23:08 +0000 (21:23 -0300)]
V4L/DVB (6130): mt20xx: convert from tuner sub-driver into dvb_frontend module

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Mike Isely <isely@pobox.com>
Acked-by: Steven Toth <stoth@hauppauge.com>
Acked-by: Patrick Boettcher <pb@linuxtv.org>
Acked-by: Jarod Wilson <jwilson@redhat.com>
Acked-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6129): tda8290: convert from tuner sub-driver into dvb_frontend module
Michael Krufky [Tue, 28 Aug 2007 00:22:20 +0000 (21:22 -0300)]
V4L/DVB (6129): tda8290: convert from tuner sub-driver into dvb_frontend module

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Mike Isely <isely@pobox.com>
Acked-by: Steven Toth <stoth@hauppauge.com>
Acked-by: Patrick Boettcher <pb@linuxtv.org>
Acked-by: Jarod Wilson <jwilson@redhat.com>
Acked-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6128): hybrid tuner refactoring core changes, phase 1
Michael Krufky [Tue, 21 Aug 2007 04:25:48 +0000 (01:25 -0300)]
V4L/DVB (6128): hybrid tuner refactoring core changes, phase 1

Prepare tuner-core for conversion of tuner sub-drivers into
dvb_frontend modules

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Mike Isely <isely@pobox.com>
Acked-by: Steven Toth <stoth@hauppauge.com>
Acked-by: Patrick Boettcher <pb@linuxtv.org>
Acked-by: Jarod Wilson <jwilson@redhat.com>
Acked-by: Oliver Endriss <o.endriss@gmx.de>
Acked-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6127): tuner: kill i2c_client interface to tuner sub-drivers
Michael Krufky [Tue, 21 Aug 2007 04:24:42 +0000 (01:24 -0300)]
V4L/DVB (6127): tuner: kill i2c_client interface to tuner sub-drivers

To ease the conversion of the analog tuner sub-drivers into dvb_frontend
style tuner modules, we must remove the i2c_client interface.

dvb_frontend style tuner modules use i2c_transfer directly on the i2c_adapter.

This change only alters the interface between tuner.ko and the tuner
sub-drivers. The v4l2 / i2c_client interface to tuner.ko remains intact.

This patch adds inline functions tuner_i2c_xfer_send, and tuner_i2c_xfer_recv,
to replace i2c_master_send and i2c_master_recv inside the tuner sub-drivers.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Mike Isely <isely@pobox.com>
Acked-by: Steven Toth <stoth@hauppauge.com>
Acked-by: Patrick Boettcher <pb@linuxtv.org>
Acked-by: Jarod Wilson <jwilson@redhat.com>
Acked-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6126): tuner: add warning for obsolete i2c address range 0x64 thru 0x6f
Michael Krufky [Tue, 28 Aug 2007 20:20:42 +0000 (17:20 -0300)]
V4L/DVB (6126): tuner: add warning for obsolete i2c address range 0x64 thru 0x6f

The tuner module has a rather aggressive range of possible i2c addresses.

As per the specs available, it appears as if there are no 4-byte tuners that
actually use i2c addresses in the range 0x64 thru 0x6f, yet, tuner-core claims
the address range 0x60 thru 0x6f.

Allowing tuner.ko to probe these addresses can cause potential damage to
certain IR receivers, RTC chips or any other IC's that might otherwise reside
on the i2c bus using one of these addresses.

The plan is to remove these i2c addresses from the i2c address range of the
tuner module. If any devices are discovered that actually do have tuners at
one of these addresses, the newer i2c probing methods will be used to handle
those cases.

In order to collect this information and avoid any potential regressions,
the following warning has been added upon successful detection of a tuner
using an i2c address in the range 0x64 thru 0x6f:

====================== WARNING! ======================
Support for tuners in i2c address range 0x64 thru 0x6f
will soon be dropped. This message indicates that your
hardware has a {tuner name} tuner at i2c address {addr}.
To ensure continued support for your device, please
send a copy of this message, along with full dmesg
output to v4l-dvb-maintainer@linuxtv.org
Please use subject line: "obsolete tuner i2c address."
====================== WARNING! ======================

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6125): whitespace cleanup: replace leading spaces with tabs
Michael Krufky [Mon, 27 Aug 2007 21:16:54 +0000 (18:16 -0300)]
V4L/DVB (6125): whitespace cleanup: replace leading spaces with tabs

There were many instances of 7-space indents spread throughout
the v4l-dvb tree.

This patch replaces the 7-space indents with tabs.  The whitespace cleaner
script doesn't catch these, because it assumes that all indents are 8-space.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6124): cx25840: add a few 10 microsecond delays
Tyler Trafford [Tue, 28 Aug 2007 20:56:47 +0000 (17:56 -0300)]
V4L/DVB (6124): cx25840: add a few 10 microsecond delays

There were a couple of places in the cx25840 initialization where the
datasheet called for a 10 microsecond delay, which we ignored because
of the 10 usec I2C delay. Put them in anyway now that the I2C delay
was decreased to 5 usec.

Signed-off-by: Tyler Trafford <ttrafford@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6123): ivtv: move ivtv.h public header to include/linux
Hans Verkuil [Sun, 26 Aug 2007 09:13:04 +0000 (06:13 -0300)]
V4L/DVB (6123): ivtv: move ivtv.h public header to include/linux

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6122): ivtvfb: fix an obvious bug in ivtvfb_release_buffers()
Adrian Bunk [Tue, 28 Aug 2007 06:28:04 +0000 (03:28 -0300)]
V4L/DVB (6122): ivtvfb: fix an obvious bug in ivtvfb_release_buffers()

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6121): ivtvfb: replace ivtv_fb prefix to ivtvfb
Hans Verkuil [Tue, 28 Aug 2007 06:24:31 +0000 (03:24 -0300)]
V4L/DVB (6121): ivtvfb: replace ivtv_fb prefix to ivtvfb

ivtvfb: replace ivtv_fb prefix to ivtvfb, change warning to info message

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6120): ivtvfb: rename some missed ivtv-fb references to ivtvfb
Hans Verkuil [Sun, 26 Aug 2007 09:11:07 +0000 (06:11 -0300)]
V4L/DVB (6120): ivtvfb: rename some missed ivtv-fb references to ivtvfb

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6119): ivtvfb: renamed ivtv-fb to ivtvfb, move header to include/linux
Hans Verkuil [Sun, 26 Aug 2007 09:04:10 +0000 (06:04 -0300)]
V4L/DVB (6119): ivtvfb: renamed ivtv-fb to ivtvfb, move header to include/linux

The convention for framebuffer devices is to call them xxxfb, not xxx-fb.
Conform to this. Also move the ivtvfb.h header to include/linux: it is a
public header. The FBIO_WAITFORVSYNC ioctl is now also defined in the
ivtvfb.h header, no more need to include matroxfb.h for just this ioctl.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6118): ivtv-fb: add missing FBIO_WAITFORVSYNC ioctl define
Hans Verkuil [Sun, 26 Aug 2007 08:45:48 +0000 (05:45 -0300)]
V4L/DVB (6118): ivtv-fb: add missing FBIO_WAITFORVSYNC ioctl define

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6117): ivtv: finish VBI related cleanup
Hans Verkuil [Sat, 25 Aug 2007 18:09:52 +0000 (15:09 -0300)]
V4L/DVB (6117): ivtv: finish VBI related cleanup

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6116): ivtv: VBI cleanups and fixes
Hans Verkuil [Sat, 25 Aug 2007 17:11:23 +0000 (14:11 -0300)]
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>
17 years agoV4L/DVB (6115): ivtv/ivtv-fb: improve locking to avoid initialization problems
Hans Verkuil [Sat, 25 Aug 2007 08:41:52 +0000 (05:41 -0300)]
V4L/DVB (6115): ivtv/ivtv-fb: improve locking to avoid initialization problems
ivtv/ivtv-fb: improve locking to prevent ivtv/ivtv-fb initialization problems

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6113): ivtv: udelay for the i2c bus was set too high
Hans Verkuil [Sun, 26 Aug 2007 13:54:14 +0000 (10:54 -0300)]
V4L/DVB (6113): ivtv: udelay for the i2c bus was set too high

An udelay of 5 is sufficient for standard speed i2c busses, 10 make it
too slow.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6112): cx25840: use a workqueue to load the firmware
Hans Verkuil [Sun, 26 Aug 2007 13:53:16 +0000 (10:53 -0300)]
V4L/DVB (6112): cx25840: use a workqueue to load the firmware

Loading the firmware using the i2c bit-banging code blocks the kernel.
Move the firmware load code into a workqueue so that it plays well with
other processes.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6111): Fix a warning when compiling on x86_64
Mauro Carvalho Chehab [Mon, 27 Aug 2007 15:05:18 +0000 (12:05 -0300)]
V4L/DVB (6111): Fix a warning when compiling on x86_64

tcm825x.c: In function 'ioctl_try_fmt_cap':
tcm825x.c:639: warning: format '%d' expects type 'int', but argument 4
                                        has type 'long unsigned int'

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6109): ivtv: use new videodev2.h pixel formats
Hans Verkuil [Sat, 25 Aug 2007 18:19:18 +0000 (15:19 -0300)]
V4L/DVB (6109): ivtv: use new videodev2.h pixel formats

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6108): videodev2.h: add new pixel formats for the cx23415 OSD
Hans Verkuil [Sat, 25 Aug 2007 18:16:37 +0000 (15:16 -0300)]
V4L/DVB (6108): videodev2.h: add new pixel formats for the cx23415 OSD

The Conexant cx23415 MPEG encoder/decoder supports some unusual pixelformats
for the On-Screen Display. Add new defines to videodev2.h for these formats.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6107): dvb_frontend: clean-up shutdown handling
Oliver Endriss [Sat, 25 Aug 2007 16:17:53 +0000 (13:17 -0300)]
V4L/DVB (6107): dvb_frontend: clean-up shutdown handling

Now dvb_powerdown_on_sleep controls whether
- whether LNB power is turned off
- whether the tuner/frontend enters sleep mode

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6106): dvb_frontend: Default for dvb_shutdown_timeout set to 0
Oliver Endriss [Sat, 25 Aug 2007 15:22:16 +0000 (12:22 -0300)]
V4L/DVB (6106): dvb_frontend: Default for dvb_shutdown_timeout set to 0

Default for dvb_shutdown_timeout set to 0.
dvb_shutdown_timeout > 0 is used for debugging only.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6105): dvb_frontend: ts_bus_ctrl() handling fixed
Oliver Endriss [Sat, 25 Aug 2007 15:00:23 +0000 (12:00 -0300)]
V4L/DVB (6105): dvb_frontend: ts_bus_ctrl() handling fixed

ts_bus_ctrl() should only be called by
- the first open
- the last release call.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6104): dvb_ca_en50221: decrement module use count on error
Marco Schluessler [Sat, 25 Aug 2007 14:46:07 +0000 (11:46 -0300)]
V4L/DVB (6104): dvb_ca_en50221: decrement module use count on error

decrement module use count on error

Signed-off-by: Marco Schluessler <marco@lordzodiac.de>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6103): dvb_ca_en50221: return correct error code value
Marco Schluessler [Sat, 25 Aug 2007 14:36:39 +0000 (11:36 -0300)]
V4L/DVB (6103): dvb_ca_en50221: return correct error code value

return correct error code value

Signed-off-by: Marco Schluessler <marco@lordzodiac.de>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6102): dvb: remove some unneeded vmalloc() return value casts from av7110
Jesper Juhl [Sat, 25 Aug 2007 14:23:54 +0000 (11:23 -0300)]
V4L/DVB (6102): dvb: remove some unneeded vmalloc() return value casts from av7110

vmalloc() returns void * - no need to cast it.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6100): dvb_net: whitespace cleanup
Michael Krufky [Fri, 24 Aug 2007 01:33:28 +0000 (22:33 -0300)]
V4L/DVB (6100): dvb_net: whitespace cleanup

Clean whitespace brain-damage caused by previous patch,
"Fix a warning at dvb_net"

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6098): ivtv: kzalloc() returns void pointer, no need to cast
Jesper Juhl [Fri, 24 Aug 2007 08:28:54 +0000 (05:28 -0300)]
V4L/DVB (6098): ivtv: kzalloc() returns void pointer, no need to cast

Since kzalloc() returns a void pointer, we don't need to cast the
return value in drivers/media/video/ivtv/ivtv-queue.c

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6097): ivtv: set correct pixel format and alpha properties
Hans Verkuil [Fri, 24 Aug 2007 00:15:24 +0000 (21:15 -0300)]
V4L/DVB (6097): ivtv: set correct pixel format and alpha properties

ivtv: set correct pixel format and alpha properties in VIDIOC_G_FBUF

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6096): ivtv: fix V4L2_ENC_CMD_STOP_AT_GOP_END support
Hans Verkuil [Thu, 23 Aug 2007 20:51:07 +0000 (17:51 -0300)]
V4L/DVB (6096): ivtv: fix V4L2_ENC_CMD_STOP_AT_GOP_END support

Support for V4L2_ENC_CMD_STOP_AT_GOP_END was broken. While the driver
correctly waited for the card to capture until the GOP was complete,
afterwards the driver buffers were just flushed instead of waiting
for the application to read all the pending data.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6094): ivtv: more ivtv-driver.h cleanups
Hans Verkuil [Thu, 23 Aug 2007 14:31:57 +0000 (11:31 -0300)]
V4L/DVB (6094): ivtv: more ivtv-driver.h cleanups

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6093): ivtv: reorganized and cleanup ivtv struct
Hans Verkuil [Thu, 23 Aug 2007 13:13:15 +0000 (10:13 -0300)]
V4L/DVB (6093): ivtv: reorganized and cleanup ivtv struct

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6092): ivtv: more cleanups, merged ivtv-audio.c and ivtv-video.c into ivtv...
Hans Verkuil [Thu, 23 Aug 2007 09:32:46 +0000 (06:32 -0300)]
V4L/DVB (6092): ivtv: more cleanups, merged ivtv-audio.c and ivtv-video.c into ivtv-routing.c

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6091): ivtv: header cleanup
Hans Verkuil [Thu, 23 Aug 2007 08:42:59 +0000 (05:42 -0300)]
V4L/DVB (6091): ivtv: header cleanup

- add guards
- remove unused header includes
- move card-specific stuff from ivtv-driver.h to ivtv-cards.h
- move YUV-specific stuff from ivtv-driver.h to ivtv-yuv.h

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6090): ivtv-fb: correct transparency bit reporting
Hans Verkuil [Wed, 22 Aug 2007 11:58:47 +0000 (08:58 -0300)]
V4L/DVB (6090): ivtv-fb: correct transparency bit reporting

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6089): ivtv: log in status if framebuffer uses YUV instead of RGB
Hans Verkuil [Wed, 22 Aug 2007 11:43:34 +0000 (08:43 -0300)]
V4L/DVB (6089): ivtv: log in status if framebuffer uses YUV instead of RGB

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6088): cx2341x: some controls can't be changed while the device is busy
Hans Verkuil [Tue, 21 Aug 2007 21:32:42 +0000 (18:32 -0300)]
V4L/DVB (6088): cx2341x: some controls can't be changed while the device is busy

The driver should now pass the 'busy' state of the device to the cx2341x
module whenever controls are set or tried. -EBUSY will be returned if
the device is busy and the user attempts to modify certain 'dangerous'
controls. It concerns controls that change the audio or video
compression mode and bitrates.

The cx88-blackbird and pvrusb2 drivers currently always pass '0' (not busy)
to the cx2341x, effectively keeping the old behavior for now.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6087): ivtv: prevent changing VBI format while capture is in progress
Hans Verkuil [Mon, 20 Aug 2007 19:26:40 +0000 (16:26 -0300)]
V4L/DVB (6087): ivtv: prevent changing VBI format while capture is in progress

Changing the VBI format requires a CX2341X_ENC_INITIALIZE_INPUT firmware
call. This can only be done if no capture is in progress. So return
-EBUSY if the encoder is busy.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6086): ivtv: fix output mode processing: UDMA_YUV wasn't cleared
Hans Verkuil [Mon, 20 Aug 2007 19:01:58 +0000 (16:01 -0300)]
V4L/DVB (6086): ivtv: fix output mode processing: UDMA_YUV wasn't cleared

- Always clear when stopping the decoder
- Clear if the filehandle that is being close was used for UDMA_YUV output.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6085): cx88-alsa: Fix mmap support
Trent Piepho [Fri, 24 Aug 2007 04:06:36 +0000 (01:06 -0300)]
V4L/DVB (6085): cx88-alsa: Fix mmap support

The driver has long claimed to support mmap, but it didn't work at all.  Some
of the dma buffer parameters weren't set, and since video_buf uses vmalloc to
allocate the buffer, a page callback is needed too.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6084): cx88-alsa: Eliminate snd_cx88_cards
Trent Piepho [Fri, 24 Aug 2007 04:06:35 +0000 (01:06 -0300)]
V4L/DVB (6084): cx88-alsa: Eliminate snd_cx88_cards

The driver kepts a static global array of snd_card pointers for each card
probed, which was never used.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6083): cx88-alsa: Rework buffer handling
Trent Piepho [Fri, 24 Aug 2007 04:06:34 +0000 (01:06 -0300)]
V4L/DVB (6083): cx88-alsa: Rework buffer handling

Rework the way the DMA buffer is handled and IRQs are generated.

ALSA uses a ring-buffer of multiple periods.  Each period is supposed to
corrispond to one IRQ.

The existing driver was generating one interrupt per ring-buffer, as opposed
to per period.  This meant that as soon as the IRQ was generated, the hardware
was already starting to re-write the beginning of the buffer.  Since the DMA
happens on a per-line basis, there was only a narrow window to copy the data
out before the buffer was overwritten.

The cx88 core RISC program generator is modified so that it can set the IRQ
and counter flags to count every X lines of DMA transfer.  This way we can
generate an interrupt every period instead of every full ring-buffer.  Right
now only period of one line are supported, but it should be possible to
support longer periods.  Note that a WRITE instruction generates an IRQ when
it starts, not when the transfer is finished.  Thus to generate an IRQ when
line X is done, one must set the IRQ flag on the instruction that starts line
X+1, not the one that ends line X.

Change the line size so that there are four lines in the SRAM FIFO.  If there
are not four lines, the analog output from the cx88's internal DACs is full of
clicks and pops.

Try to handle FIFO sync errors.  Sometimes the chip generates many of these
errors before audio data starts.  Up to 50 sync errors will be ignored and the
counter reset.

Have the IRQ handler save the RISC counter to the chip struct, and then have
the pointer callback use this to calculate the pointer position.  We could
read the counter from the pointer callback, but sometimes the sync errors on
start up cause the counter to go crazy.  ALSA sees this and thinks there has
been an overrun.  The IRQ hander can avoid saving the counter position on
sync errors.

The chip "opened" flag wasn't necessary.  ALSA won't try to open the same
substream multiple times.  Probably this code was cut&pasted from the bt87x
driver, which has multiple sub-streams for one chip.

Do error checking for the videobuf mapping functions.

snd_card_cx88_runtime_free() is useless and can be deleted.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6082): cx88: Improve risc instruction printing in sram channel dump
Trent Piepho [Tue, 21 Aug 2007 11:19:16 +0000 (08:19 -0300)]
V4L/DVB (6082): cx88: Improve risc instruction printing in sram channel dump

When the risc instrunctions from the CMDS were printed, instruction arguments
weren't taken into account.

This changes output like:
cx88[0]:   risc0: 0x1d010400 [ write sol eol irq1 cnt0 count=1024 ]
cx88[0]:   risc1: 0x0cac2800 [ INVALID sol eol 23 21 19 18 13 count=2048 ]
cx88[0]:   risc2: 0x1d010400 [ write sol eol irq1 cnt0 count=1024 ]
cx88[0]:   risc3: 0x0cac2c00 [ INVALID sol eol 23 21 19 18 13 count=3072 ]

cx88[0]:   risc0: 0x1d010400 [ write sol eol irq1 cnt0 count=1024 ]
cx88[0]:   risc1: 0x0cac2800 [ arg #1 ]
cx88[0]:   risc2: 0x1d010400 [ write sol eol irq1 cnt0 count=1024 ]
cx88[0]:   risc3: 0x0cac2c00 [ arg #1 ]

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6081): ivtv: Fix static structure initialization
Jean Delvare [Thu, 23 Aug 2007 18:45:41 +0000 (15:45 -0300)]
V4L/DVB (6081): ivtv: Fix static structure initialization

Convert the initialization of ivtv_i2c_algo_template to C99-style.
Otherwise a future change to struct i2c_algo_bit_data would break
this code.

Also declared that structure const - it's a template after all.

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>
17 years agoV4L/DVB (6079): Cleanup: remove linux/moduleparam.h from drivers/media files
Mauro Carvalho Chehab [Tue, 21 Aug 2007 15:38:39 +0000 (12:38 -0300)]
V4L/DVB (6079): Cleanup: remove linux/moduleparam.h from drivers/media files

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>
17 years agoV4L/DVB (6078): Coding style fix drivers/media/video/zr36016.c
Michal Piotrowski [Tue, 21 Aug 2007 15:36:51 +0000 (12:36 -0300)]
V4L/DVB (6078): Coding style fix drivers/media/video/zr36016.c

Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6077): Coding style fix drivers/media/video/zr36050.c
Michal Piotrowski [Tue, 21 Aug 2007 15:34:48 +0000 (12:34 -0300)]
V4L/DVB (6077): Coding style fix drivers/media/video/zr36050.c

Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6076): Coding style fix drivers/media/video/zr36060.c
Michal Piotrowski [Tue, 21 Aug 2007 15:34:36 +0000 (12:34 -0300)]
V4L/DVB (6076): Coding style fix drivers/media/video/zr36060.c

Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6075): tuner: kernel headers go above subsystem headers
Michael Krufky [Tue, 21 Aug 2007 04:14:12 +0000 (01:14 -0300)]
V4L/DVB (6075): tuner: kernel headers go above subsystem headers

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6074): tuner: fix ifdef tags to match actual file name
Michael Krufky [Tue, 21 Aug 2007 00:04:44 +0000 (21:04 -0300)]
V4L/DVB (6074): tuner: fix ifdef tags to match actual file name

The file, tuner-driver.h was originally named tuner-hw.h, but we decided to
rename it.  At the time, I had forgotten to change the #ifdef __TUNER_HW_H__
to #ifdef __TUNER_DRIVER_H__ .  This patch corrects that.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6072): saa7134: add DVB-T support for Avermedia Super 007
Edgar Simo [Mon, 20 Aug 2007 17:14:50 +0000 (14:14 -0300)]
V4L/DVB (6072): saa7134: add DVB-T support for Avermedia Super 007

Add DVB-T support for Avermedia Super 007

Analog television is untested.  The device lacks input adapters for radio,
svideo & composite -- seems to be a DVB-T ONLY device.

Signed-off-by: Edgar Simo <bobbens@gmail.com>
Acked-by: Hermann Pitton <hermann-pitton@arcor.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6071): saa7134-dvb: add missing newline
Edgar Simo [Mon, 20 Aug 2007 17:06:00 +0000 (14:06 -0300)]
V4L/DVB (6071): saa7134-dvb: add missing newline

This is a simple whitespace cleanup.

Signed-off-by: Edgar Simo <bobbens@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6068): cx88-alsa: Use pci_dev->revision
Trent Piepho [Sun, 19 Aug 2007 01:54:49 +0000 (22:54 -0300)]
V4L/DVB (6068): cx88-alsa: Use pci_dev->revision

The revision is part of the pci_dev struct, so there is no need to read it in.

Stop storing the revision and latency in the chip struct, since they're never
used after being printed out when the driver loads.

linux/pci.h wasn't included.  It was getting picked up something else,
probably cx88.h, but this file uses struct pci_dev so it should include pci.h.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6067): cx88-alsa: Hardware doesn't support mono audio
Trent Piepho [Sun, 19 Aug 2007 00:01:40 +0000 (21:01 -0300)]
V4L/DVB (6067): cx88-alsa: Hardware doesn't support mono audio

channels_min should be 2, not 1.  The hardware only supports stereo.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6066): cx88-alsa: Change order of interrupt enabling, fix spurious IRQs
Trent Piepho [Sun, 19 Aug 2007 01:09:42 +0000 (22:09 -0300)]
V4L/DVB (6066): cx88-alsa: Change order of interrupt enabling, fix spurious IRQs

Currently the driver turns on audio interrupts, then sets the audio interrupt
mask to select which interrupts to get.  One could received unwanted
interrupts since the mask is set _after_ interrupts have already been turned
on.  Change the order of the operations, and clear any audio interrupt status
bits that are already set for good measure.

Before changing the SRAM FIFO parameters, make sure the FIFO isn't being used.
This shouldn't happen with just the ALSA driver, as it should never try to
turn on FIFO/RISC/DMA while they are already on.  However, the V4L driver
needs to turn the audio FIFO on for analog audio output to work (undocumented
cx88 bug).  The FIFO parameters are in an inconsistent state while they are
updated, and this results in many FIFO sync error IRQs if the FIFO is in use
while it's in this inconsistent state.

Also create and use a bunch of symbolic constants for audio interrupt mask
bits.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6065): cx88-alsa: Call core irq handler when needed
Trent Piepho [Sat, 18 Aug 2007 10:02:26 +0000 (07:02 -0300)]
V4L/DVB (6065): cx88-alsa: Call core irq handler when needed

When an irq handled by the cx88 core driver (currently IR and errors) occurs
and the cx88-alsa irq handler is the first called, it will claim to have
handled the irq but it doesn't call cx88_core_irq() to handle it.

The means loading cx88-alsa can disable the IR remote.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6064): cx88: Add symbolic names for the PCI interrupt bits
Trent Piepho [Sat, 18 Aug 2007 09:57:55 +0000 (06:57 -0300)]
V4L/DVB (6064): cx88: Add symbolic names for the PCI interrupt bits

Used for the PCI_INTMSK and PCI_INT_STAT registers.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6061): ivtv: add VIDIOC_OVERLAY
Hans Verkuil [Sun, 19 Aug 2007 21:59:42 +0000 (18:59 -0300)]
V4L/DVB (6061): ivtv: add VIDIOC_OVERLAY

Add VIDIOC_OVERLAY to enable/disable the OSD. Also add the OSD state to the
log status report.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6060): ivtv: fix IVTV_IOC_DMA_FRAME bug introduced by highmem bugfix
Hans Verkuil [Sun, 19 Aug 2007 20:56:41 +0000 (17:56 -0300)]
V4L/DVB (6060): ivtv: fix IVTV_IOC_DMA_FRAME bug introduced by highmem bugfix

The return value of ivtv_udma_fill_sg_list() was changed by the
highmem bugfix, but that return value was still used in ivtv-yuv.c.

Revert to the old return value, but in addition return -1 in case of
a memory allocation error.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6059): ivtv: log stereo/bilingual audio modes
Hans Verkuil [Sun, 19 Aug 2007 18:03:05 +0000 (15:03 -0300)]
V4L/DVB (6059): ivtv: log stereo/bilingual audio modes

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6058): ivtv: add support for highmem udma
Hans Verkuil [Sun, 19 Aug 2007 15:25:39 +0000 (12:25 -0300)]
V4L/DVB (6058): ivtv: add support for highmem udma

When trying to DMA userspace buffers to the cx23415 you need to check
whether the page is in highmem. If this is the case, then bounce buffers
have to be used to allow DMA.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6057): ivtv-fb: remove unused header includes
Hans Verkuil [Sun, 19 Aug 2007 10:11:44 +0000 (07:11 -0300)]
V4L/DVB (6057): ivtv-fb: remove unused header includes

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6056): ivtv: move serialization to the fileops level
Hans Verkuil [Sun, 19 Aug 2007 10:10:55 +0000 (07:10 -0300)]
V4L/DVB (6056): ivtv: move serialization to the fileops level

Serialization is now done on the open/close/ioctl level and also when the
read/write/poll start an encoder/decoder stream.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6055): ivtv: improve debug messages
Hans Verkuil [Sun, 19 Aug 2007 09:08:58 +0000 (06:08 -0300)]
V4L/DVB (6055): ivtv: improve debug messages

- add FILE debug flag for open/close/read/write/poll.
- show cmd for encoder/decoder command ioctl.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6054): ivtv: specify some stream sizes in kB instead of MB
Hans Verkuil [Sun, 19 Aug 2007 08:32:33 +0000 (05:32 -0300)]
V4L/DVB (6054): ivtv: specify some stream sizes in kB instead of MB

Some streams (PCM, VBI decoding) do not need that much memory, so specify
the allocated memory in kB instead of MB to limit memory usage. E.g. 1 MB
is overkill for the VBI decoding stream, 64 kB is enough.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6053): ivtv: setup TV output standard on init to prevent flicker
Hans Verkuil [Sun, 19 Aug 2007 08:09:37 +0000 (05:09 -0300)]
V4L/DVB (6053): ivtv: setup TV output standard on init to prevent flicker

The TV output standard was set only on first use, which meant that the saa7127
was set to NTSC until then, leading to flickering on PAL systems.

Since the saa7127 has no firmware it is OK to initialize it immediately.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6051): cx25840: make proper use of SOFT_RESET
Hans Verkuil [Tue, 7 Aug 2007 10:16:07 +0000 (07:16 -0300)]
V4L/DVB (6051): cx25840: make proper use of SOFT_RESET

Whenever the 0x80b register is used the microcontroller should be reset.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6050): ivtv: retry/timer improvements
Hans Verkuil [Sat, 18 Aug 2007 18:48:42 +0000 (15:48 -0300)]
V4L/DVB (6050): ivtv: retry/timer improvements

- Give up frame after three retries.
- When the last capture/decode ends, make sure to delete the dma_timer.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6049): ivtv: fix VBI reinsertion decoding
Hans Verkuil [Sat, 18 Aug 2007 18:16:00 +0000 (15:16 -0300)]
V4L/DVB (6049): ivtv: fix VBI reinsertion decoding

- Invalid VBI packets should result in an empty VBI frame, not
  in an zero-sized frame that causes the reader to incorrectly
  return a 0 (EOF) value.
- PIO completion should not reset the sg_pending_size field.
- The DMA offset detection code should be ignored for PIO transfers:
  it somehow messes up the data on the card and is not needed anyway
  for PIO.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6048): ivtv: fix stop stream locking
Hans Verkuil [Sun, 29 Jul 2007 18:22:05 +0000 (15:22 -0300)]
V4L/DVB (6048): ivtv: fix stop stream locking

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6047): ivtv: Fix scatter/gather DMA timeouts
Hans Verkuil [Sat, 28 Jul 2007 22:45:50 +0000 (19:45 -0300)]
V4L/DVB (6047): ivtv: Fix scatter/gather DMA timeouts

It turns out that the cx23415/6 DMA engine cannot do scatter/gather DMA
reliably. Every so often depending on the phase of the moon and your
hardware configuration the cx2341x DMA engine simply chokes on it and
you have to reboot to get it working again.

This change replaced the scatter/gather DMA by single transfers at a time,
where the driver is now responsible for DMA-ing each buffer.

UDMA is still done using scatter/gather DMA, that will be fixed soon.

Many thanks to Mark Bryars <mark.bryars@etvinteractive.com> for discovering
the link between scatter/gather and the DMA timeouts.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6046): ivtv: always steal full frames if out of buffers.
Hans Verkuil [Sat, 28 Jul 2007 15:07:12 +0000 (12:07 -0300)]
V4L/DVB (6046): ivtv: always steal full frames if out of buffers.

When there are no more free buffers, then buffers are stolen from the
predma queue. Buffers should be stolen from the head of that queue (which
is where the most recently added buffers are) and all buffers belonging
to a frame should be stolen. Otherwise 'half-frames' would remain in the
queue, which leads to ugly playback and complete sync failure for YUV
buffers.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6045): ivtv: fix handling of INITIALIZE_INPUT fw call
Hans Verkuil [Sat, 18 Aug 2007 14:46:05 +0000 (11:46 -0300)]
V4L/DVB (6045): ivtv: fix handling of INITIALIZE_INPUT fw call

The CX2341X_ENC_INITIALIZE_INPUT firmware call requires careful handling,
otherwise the computer can freeze or the top-third of the screen can start
flickering. This patch ensures that CX2341X_ENC_INITIALIZE_INPUT is called
at the right time and in the right way.

In addition the stop capture handling was improved so that the last pending
DMA transfer is also processed. Otherwise this would be the first data that
arrived when a new capture was started which is not what you want.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6044): vp27smpx: clarify history of this source.
Kazuhiko Kawakami [Sat, 18 Aug 2007 14:39:28 +0000 (11:39 -0300)]
V4L/DVB (6044): vp27smpx: clarify history of this source.

Signed-off-by: Kazuhiko Kawakami <kazz-0@mail.goo.ne.jp>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6043): ivtv: fix incorrect round-robin implementation
Hans Verkuil [Sat, 18 Aug 2007 14:36:09 +0000 (11:36 -0300)]
V4L/DVB (6043): ivtv: fix incorrect round-robin implementation

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6040): Add IR support for Nova-T Stick
Darren Salt [Sat, 18 Aug 2007 21:05:31 +0000 (18:05 -0300)]
V4L/DVB (6040): Add IR support for Nova-T Stick

Working with Nova-T Stick (70001) with remote control model A415.
Untested with other dib0700m/dib0700p devices.

Signed-off-by: Darren Salt <linux@youmustbejoking.demon.co.uk>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6039): Typo fix in Nova-TD description
Darren Salt [Sat, 18 Aug 2007 21:04:00 +0000 (18:04 -0300)]
V4L/DVB (6039): Typo fix in Nova-TD description

Typo fix in Nova-TD description

Signed-off-by: Darren Salt <linux@youmustbejoking.demon.co.uk>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6038): Trivial: repair mixed parm descs in dvb-usb-init.c
Michael Mauch [Sat, 18 Aug 2007 21:02:31 +0000 (18:02 -0300)]
V4L/DVB (6038): Trivial: repair mixed parm descs in dvb-usb-init.c

Repair modinfo parameter descriptions for force_pid_filter_usage and
disable_rc_polling.

Signed-off-by: Michael Mauch <michael.mauch@gmx.de>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6037): Updated GenPix USB driver
Alan Nisota [Sat, 18 Aug 2007 20:52:35 +0000 (17:52 -0300)]
V4L/DVB (6037): Updated GenPix USB driver

There are now 4 different versions of the GENPIX USB adapter.  The
newest 'Skywalker' models are fully self-contained, and need no
additional hardware to be used.  A very reliable DVB-S card even without
using any of the alternate modulatations (which this kernel module does
not currently support)

The following patch adds support for all 4 versions of the genpix
adapter (www.genpix-electronics.com).

Signed-off-by: Alan Nisota alannisota@gmail.com
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6034): cx88: Add parameter to control radio deemphasis time constant
Trent Piepho [Fri, 17 Aug 2007 08:50:22 +0000 (05:50 -0300)]
V4L/DVB (6034): cx88: Add parameter to control radio deemphasis time constant

FM radio transmission use a preemphasis/deemphasis scheme to reduce
high-frequency noise.  The cx88 audio decoder is supposedly set to no
deemphasis by the current driver.

However, the "no deemphasis" setting doesn't work.  On my chip, cx23883, it
produces the same result as the 75 us time constant.  Maybe the default
settings on the cx23881 are for 50 us?

Since the deemphasis time constant varies by country, allow setting it via a
module parameter.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6031): Fix for bug 7819: fixed hotplugging for dvbnet
Trent Piepho [Fri, 17 Aug 2007 20:49:41 +0000 (17:49 -0300)]
V4L/DVB (6031): Fix for bug 7819: fixed hotplugging for dvbnet

The first part of dvb_net_close() is just a cut&paste from
dvb_generic_release(), so maybe it would be better to just call
dvb_generic_release() instead?

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Markus Rechberger <mrechberger@gmail.com>
Acked-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6025): Net_ule(): fix check-after-use
Adrian Bunk [Thu, 16 Aug 2007 13:03:18 +0000 (10:03 -0300)]
V4L/DVB (6025): Net_ule(): fix check-after-use

The Coverity checker spotted that we'd have already oops'ed if "dev"
was NULL.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6023): cx88: Clean up some ugly and inconsistent printk()s
Trent Piepho [Wed, 15 Aug 2007 17:41:59 +0000 (14:41 -0300)]
V4L/DVB (6023): cx88: Clean up some ugly and inconsistent printk()s

Get rid of the "CORE" prefix from cx88 printks.  It was only used a few times,
and it makes it look like they're coming from the kernel core or something.

Fix the message, "TV tuner 60 at 0x1fe, Radio tuner -1 at 0x1fe", by adding a
"cx88[0]" prefix to be consistent, and to keep people who grep their dmesg
output for cx88 from missing it.  Get rid of the addresses, which are always
wrong.  The addresses are always set to -1, but because it's an unsigned 8-bit
value, the left shift converts it to the nonsense address 0x1fe.

In the cx8802 driver, some cut and pasted code prefixed lines with "CORE
cx88[0]:", which has been changed to "cx88[0]/2:" like the other printks from
the cx8802 driver.

Also fix some ugly printks in the cx8802 driver that used __FUNCTION__ for
KERN_INFO and KERN_ERR messages.

The changed printks in cx88-mpeg.c also needed lots of whitespace and
80-column fixes.

A bunch of misc changes in cx88-dvb.c and cx88-video.c to add message levels
or a consistent "cx88[?]/2" or "cx88[?]/0" prefix.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (6022): cx88: Move card core creation from cx88-core.c to cx88-cards.c
Trent Piepho [Wed, 15 Aug 2007 17:41:58 +0000 (14:41 -0300)]
V4L/DVB (6022): cx88: Move card core creation from cx88-core.c to cx88-cards.c

A lot of code in cx88-cards.c was only used by cx88-core.c when the core state
is first allocated and initialized.  Moving that task to cx88-cards makes the
driver simpler and the files more self contained.

- Module parameters tuner, radio, card, and latency move to cx88-cards.c
- cx88_boards is made static
- cx88_subids is made static and const
- cx88_bcount is eliminated
- cx88_idcount is eliminated
- cx88_card_list() is made static
- cx88_card_setup_pre_i2c() is made static
- cx88_card_setup() is made static
- cx88_pci_quirks() is moved from cx88-core to cx88-cards
  The function argument "char *name" is made const too
- get_ressources() is moved from cx88-core to cx88-cards, and renamed to
  cx88_get_resources()
- The code to allocate and initialize the core state struct and the chip is
  moved out of cx88-core.c:cx88_get_core() and into a new function in
  cx88-cards.c, cx88_core_create().  This makes both functions simpler.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>