Commit graph

1166 commits

Author SHA1 Message Date
Hans Verkuil
de98cdaf7e V4L/DVB (4688): Fix msp343xG handling (regression from 2.6.16)
The msp3430G and msp3435G models cannot do Automatic Standard Detection.
So these should be forced to BTSC. These chips are early production versions
for the msp34xxG series and are quite rare.
The workaround for kernel 2.6.18 is to use 'standard=32' as msp3400
module option. Due to broken handling of the 'standard' option in 2.6.17 there is
no workaround possible for that kernel.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-10-03 15:14:55 -03:00
Sujoy Gupta
6eb32a792e V4L/DVB (4685): Fix compiler warning in drivers/media/video/video-buf.c
Using a double cast to avoid compiler warnings when building for PAE. 
Compiler doesn't like direct casting of a 32 bit ptr to 64 bit integer.

Signed-off-by: Martin J. Bligh <mbligh@google.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-10-03 15:14:48 -03:00
Richard Knutsson
f1db955acb V4L/DVB (4684): Drivers/media/video/cx88: Remove unused defined FALSE/TRUE
Remove defines of FALSE/TRUE because they are not used.

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-10-03 15:14:43 -03:00
Mauro Carvalho Chehab
ccbf64b1d4 V4L/DVB (4683): Norm_notchfilter is used on just one point and argument is bogus
Removed norm_notchfilter function. All the code is bound to 4 x FSC, so, any
other filter won't work fine.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-10-03 15:14:38 -03:00
Lars Gjesse Kjellberg
4f43ac0cb2 V4L/DVB (4681): Cx88: fix analog capture notch filter
This patch changes the setting of the cx2388x notch filter to match that of
the video capture sample frequency, removing some annoying interference
lines THAT would appear when capturing composite video. This has been tested
in PAL and NTSC TV norms.
It sets the Y/C separation luma notch filter, which removes the chroma signal
from the luma signal when using a composite input.
The luma notch filter operates at the video decoder's frequency, not the ADC's
frequency or at the frequency of the scaled video. Y/C separation happens after
the sample rate converter, before video scaling.
The datasheet provides plots of the filter response for three _video decoder_
frequencies, 4x Fsc, square pixel, and ccir601.  These are the same three
frequencies for the notch filter control.  It seems pretty clear that this
filter should be set based on the video decoder frequency. The cx88 driver
always uses a video decoder frequency of 4xFsc. 

Signed-off-by: Lars Gjesse Kjellberg <lars.g.kjellberg@get2net.dk>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-10-03 15:14:33 -03:00
Steven Toth
76ac5dd6c0 V4L/DVB (4679): Fix for NULL pointer dereference oops during boot.
A fix for intermittent oops's during boot which occurs
in cx88_call_i2c_clients when dvb_attach is bringing up
the frontend.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-10-03 15:14:28 -03:00
Mike Isely
6d98816fbe V4L/DVB (4675): Pvrusb2: Fix VIDIOC_INT_[G|S]_REGISTER so that it actually works now
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-10-03 15:14:26 -03:00
Randy Dunlap
ab9caf9e22 V4L/DVB (4674): Use NULL instead of 0 for ptrs
Use NULL instead of 0 for pointer value, eliminate sparse warnings.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-10-03 15:14:20 -03:00
Petr Baudis
515c208db8 V4L/DVB (4671): Support for SAA7134-based AVerTV Hybrid A16AR
This adds support for a hybrid PAL/DVB/FM card.  Unfortunately I tested
only the DVB since I don't have any proper antenna available and I can
receive even the DVB just barely so; I can hear noise in the FM part but I
couldn't catch any station, then again I don't have an FM antenna either.
The PAL/FM and IR control data are based on what I harvested on the 'net.
Perhaps I or someone else will fix them if they turn out to be wrong.

Signed-off-by: Petr Baudis <pasky@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-10-03 15:14:11 -03:00
David Hardeman
cc7093df3c V4L/DVB (4670): Allow RC5 codes 64 - 127 in ir-kbd-i2c.c
The RC5 coding has for a long time supported commands 64-127 in addition
to 0-63.  This is controlled by the second bit of the RC5 packet (see
The attached patch modifies ir-kbd-i2c.c to allow for commands 64-127,
tested with a PVR350 card in combination with a programmable remote.

Signed-off-by: David Hardeman <david@hardeman.nu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-10-03 15:14:04 -03:00
Michael Krufky
4508f59826 V4L/DVB (4669): Cx88: autodetect Club3D Zap TV2100 by subsystem id 12ab:2300
The Club3D Zap TV2100 has been reported to be a clone of the Yuan PG300 and
KWorld/VStream XPert DVB-T with cx22702

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-10-03 15:14:03 -03:00
Michael Krufky
48d5e8031e V4L/DVB (4668): Cx88: rename mpeg capability flags from CX88_BOARD_FOO to CX88_MPEG_FOO
The flags for mpeg capabilities are sub-optimally named as
CX88_BOARD_DVB and CX88_BOARD_BLACKBIRD, which creates some confusion.
This patch renames the above to CX88_MPEG_DVB and CX88_MPEG_BLACKBIRD.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-10-03 15:13:56 -03:00
Steven Toth
3a5ba52a1a V4L/DVB (4667): Changed cx88_board .dvb and .register to an enum.
Some basic cleanup in preperation for a future patch where
the cx88-mpeg functions have to deal with the port being
used by multiple frontends in (mpeg2 hw encoder and dvb demod).

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-10-03 15:13:54 -03:00
Steven Toth
3057906df5 V4L/DVB (4666): Ensure the WM8775 driver is loaded generically for any board.
A generic change to cards to allow any board to specify whether
it needs the wm8775 module loaded (by the core) or not.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-10-03 15:13:48 -03:00
Mike Isely
43e0602222 V4L/DVB (4664): Pvrusb2: Don't use videodev.h; use v4l2-dev.h in its place
The function prototype needed in pvrusb2-v4l2.c has been moved to
v4l2-dev.h.  Track that change.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-10-03 15:13:42 -03:00
Mike Isely
759100531d V4L/DVB (4663): Pvrusb2: Get rid of private global context array brain damage
A previous attempt to deal with the upcoming loss of
video_set_drvdata() and video_get_drvdata() resulted in logic which
causes a circular locking dependency - also known as a deadlock.  This
changeset attacks the problem in a different manner, using a technique
that no longer requires the problematic mutex (or that private global
array either).

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-10-03 15:13:38 -03:00
Mike Isely
32ffa9ae03 V4L/DVB (4662): Pvrusb2: Implement VIDIOC_INT_[G|S]_REGISTER
Implement VIDIOC_INT_SET_REGISTER and VIDIOC_INT_GET_REGISTER for the
pvrusb2 driver.  This is a debugging aid which will not be enabled
unless CONFIG_VIDEO_ADV_DEBUG has been enabled.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-10-03 15:13:34 -03:00
Mike Isely
59753950a6 V4L/DVB (4661): Pvrusb2: improve 24XXX config option description
The CONFIG_VIDEO_PVRUSB2_24XXX is not nearly as "experimental" as the
description suggests.  So refine the description to better match reality.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-10-03 15:13:31 -03:00
Mauro Carvalho Chehab
06afc0ffe0 V4L/DVB (4660): Some cleanups at helper chips menu
Rearranged itens, so that decoders came first;
cx25840 is, in fact, an audio and video decoder;
Fixed some incorrect upercases;
Removed the word "chip" for some audio processors at item name;
Removed the word "driver" for some item names;

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-10-03 15:13:24 -03:00
Richard Knutsson
6e21828743 [PATCH] Generic boolean
This patch defines:
* a generic boolean-type, named 'bool'
* aliases to 0 and 1, named 'false' and 'true'

Removing colliding definitions of 'bool', 'false' and 'true'.

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01 00:39:18 -07:00
Linus Torvalds
5ffd1a6aaa Merge master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (180 commits)
  V4L/DVB (4641): Trivial: use lowercase letters in hex subsystem ids
  V4L/DVB (4639): Cx88: add autodetection for alternate revision of Leadtek PVR
  V4L/DVB (4638): Basic DVB-T and analog TV support for the HVR1300.
  V4L/DVB (4637): Add a default method for VIDIOC_G_PARM
  V4L/DVB (4635): Extend bttv and saa7134 to check for both AGP and PCI PCI failure case
  V4L/DVB (4634): Zr36120: implement pcipci checks
  V4L/DVB (4632): Zoran: Implement pcipci failure check
  V4L/DVB (4631): Av7110: remove V4L2_CAP_VBI_CAPTURE flag
  V4L/DVB (4630): Av7110: FW_LOADER depemdency fixed
  V4L/DVB (4629): Saa7134: add card support for Proteus Pro 2309
  V4L/DVB (4628): Fix VIDIOC_ENUMSTD ioctl in videodev.c
  V4L/DVB (4627): Vivi crashes with mplayer
  V4L/DVB (4626): On saa7111/7113, LUMA_CTRL need a different value
  V4L/DVB (4624): Tvaudio: Replaced kernel_thread() with kthread_run()
  V4L/DVB (4622): Copy-paste bug in videodev.c
  V4L/DVB (4620): Fix AGC configuration for MOD3000P-based boards
  V4L/DVB (4619): Fixes some I2C dependencies on V4L devices
  V4L/DVB (4617): Problem with dibusb-mb.c USB IDs
  V4L/DVB (4616): [PATCH] Nebula DigiTV USB RC support
  V4L/DVB (4614): Export symbol saa7134_tvaudio_setmute from saa7134 for saa7134-alsa
  ...
2006-09-30 09:39:15 -07:00
Pete Zaitcev
38e2bfc94e USB: Dealias -110 code (more complete)
The purpose of this patch is to split off the case when a device does
not reply on the lower level (which is reported by HC hardware), and
a case when the device accepted the request, but does not reply at
upper level. This redefinition allows to diagnose issues easier,
without asking the user if the -110 happened "immediately".

The usbmon splits such cases already thanks to its timestamp, but
it's not always available.

I adjusted all drivers which I found affected (by searching for "urb").
Out of tree drivers may suffer a little bit, but I do not expect much
breakage. At worst they may print a few messages.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:59:00 -07:00
Jean Delvare
a0d9c63d36 i2c-algo-bit: Discard the mdelay data struct member
i2c-algo-bit: Discard the mdelay data struct member

The i2c_algo_bit_data structure has an mdelay member, which is not
used by the algorithm code (the code has always been ifdef'd out.)
Let's discard it to save some code and memory.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Cc: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-26 15:38:51 -07:00
Michael Krufky
8dd86eebc5 V4L/DVB (4641): Trivial: use lowercase letters in hex subsystem ids
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:36 -03:00
Michael Krufky
dab489df2a V4L/DVB (4639): Cx88: add autodetection for alternate revision of Leadtek PVR
Add autodetection for PCI subsystem ID 107d:6632, to detect as
a Leadtek PVR 2000

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:36 -03:00
Steven Toth
aa481a6547 V4L/DVB (4638): Basic DVB-T and analog TV support for the HVR1300.
This is the first in a series of patches to add full WinTV-HVR1300
support to Linux. This first patch will enable analog TV support
and DVB-T support. Later patches will add the hardware MPEG encoder
support.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:36 -03:00
Mauro Carvalho Chehab
1c2d034e3c V4L/DVB (4637): Add a default method for VIDIOC_G_PARM
For most drivers, VIDIOC_G_PARM will just return the current standard fps.
So, instead of failing, drivers based on video_ioctl2 will implement the
default method.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:36 -03:00
Alan Cox
3d265c96cc V4L/DVB (4635): Extend bttv and saa7134 to check for both AGP and PCI PCI failure case
We could go and work out if the target object is AGP or PCI but the
corner case of an Athlon 64 era box with PCI video is sufficiently
unusual it doesn't seem worth the extra work, at least until other cases
if any pop up.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:36 -03:00
Alan Cox
13f1371e8f V4L/DVB (4634): Zr36120: implement pcipci checks
Again depends on the PCIAGP_FAIL patch for a define. Someone with more
card knowledge should look at the ALIMAGIK case and whether latency can
be safely to set to 0xA or so.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:36 -03:00
Alan Cox
e355880b83 V4L/DVB (4632): Zoran: Implement pcipci failure check
We should be doing this on all devices doing PCI<->PCI DMA. We only set
the _FAIL ones when the DMA will fail or may cause crashes. This relies
on the PCIAGP_FAIL patch I sent to Andrew already

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:36 -03:00
Michal Majchrowicz
b04c1baf48 V4L/DVB (4629): Saa7134: add card support for Proteus Pro 2309
Add card support for Proteus Pro 2309, based on saa7130 bridge

Signed-off-by: Michal Majchrowicz <mmajchrowicz@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:36 -03:00
Sascha Hauer
666c73d9e1 V4L/DVB (4628): Fix VIDIOC_ENUMSTD ioctl in videodev.c
Do not return -EINVAL for index=0 in VIDIOC_ENUMSTD, because it is a
valid index

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:36 -03:00
Sascha Hauer
d7fbefe06d V4L/DVB (4627): Vivi crashes with mplayer
The vivi.current_norm field is not initialized in vivi.c, so a
VIDIOC_G_STD ioctl without a prior call to VIDIOC_S_STD gives
unpredictable results. mplayer does exactly this.

Signed-off-by Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:36 -03:00
Mauro Carvalho Chehab
183d896a03 V4L/DVB (4626): On saa7111/7113, LUMA_CTRL need a different value
Also sends the proper saa71111 init table.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:36 -03:00
Cedric Le Goater
bc28287979 V4L/DVB (4624): Tvaudio: Replaced kernel_thread() with kthread_run()
Replaced kernel_thread() with kthread_run() since kernel_thread() is
deprecated in drivers/modules.
Removed the completion and the wait queue which are now useless with
kthread. Also removed the allow_signal() call as signals don't apply
to kernel threads.
Fixed a small race condition when thread is stopped.
Please check if the timer vs. thread still works fine without the wait
queue.

Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:36 -03:00
Sascha Hauer
c93a5c3488 V4L/DVB (4622): Copy-paste bug in videodev.c
This patch fixes a copy-paste bug in videodev.c where the vidioc_qbuf()
function gets called for the dqbuf ioctl.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:36 -03:00
Mauro Carvalho Chehab
6386828cb1 V4L/DVB (4619): Fixes some I2C dependencies on V4L devices
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:36 -03:00
Ricardo Cerqueira
e9f964da79 V4L/DVB (4614): Export symbol saa7134_tvaudio_setmute from saa7134 for saa7134-alsa
saa7134-alsa now unmutes/mutes the line when opening/closing the capture
device, and needs this symbol

Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:35 -03:00
Ricardo Cerqueira
dafcaaf86a V4L/DVB (4613): Unmute/mute saa7134 when opening/closing the audio capture device.
This patch should enable unmuting the audio device when opening it (and
posterior muting when closing it), doing away with the need for unmute ioctls
or v4lctl usage.

Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:35 -03:00
Mauro Carvalho Chehab
141276b57e V4L/DVB (4609): Improved i2c performance on software bitbang algoritm
Software I2C were using a very conservative value of udelay=16, meaning about
20Kbps. According with Philips I2C datasheet, the i2c should answer well for
times at the order of 4.7 us. So, using udelay=5 should work for all devices.
After this patch, the speed should be close to 66,67 Kbps, with the current
kernel software bitbang, with 30/60 duty cycle.
Anyway, added a new parameter (i2c_udelay) that would allow using conservative
values, if eventually a hardware doesn't support the datasheet values.
Thanks to Jean Delvare <khali@linux-fr.org> for pointing this improvement.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:35 -03:00
Mike Isely
c4e4aac887 V4L/DVB (4604): Fix broken pvrusb2 build
Fix broken build when 24XXX support is not selected.  This is required
due to the requirement of removing 24XXX ifdef's from the driver
source.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:35 -03:00
Bas Bloemsaat
81409ed08a V4L/DVB (4599): Adds Compro PS39U USB ID to Vicam driver
Trivial patch to make Compro PS39U WebCam work with linux by using the
vicam driver.
The camera is just a vicam with another USB ID, so I added that ID to the
driver, and it works now.

Signed-off-by: Bas Bloemsaat <bas.bloemsaat@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:35 -03:00
Mauro Carvalho Chehab
97d9e80e75 V4L/DVB (4598): Fix a typo: VRES, instead o HRES
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:35 -03:00
Mike Isely
3ad9fc37ba V4L/DVB (4597): Improve resolution limit enforcements in pvrusb2
The pvrusb2 driver resolution limits are now programmed the following
way, based on empirical measurements of the hardware:
  Vertical   max: 480 for NTSC, 576 otherwise
  Vertical   min: 75 for 24xxx, 17 otherwise
  Horizontal max: 720
  Horizontal min: 720 for 24xxx, 19 otherwise

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:35 -03:00
Mike Isely
22ebb77dfa V4L/DVB (4596): Fix saa7115 miscalculation that breaks NTSC
This repairs a problem introduced by a commit earlier applied.
Thanks-to: Hans Verkuil <hverkuil@xs4all.nl>

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:35 -03:00
Mike Isely
7f19d0278c V4L/DVB (4595): Remove CONFIG_VIDEO_PVRUSB2_24XXX from pvrusb2 driver
Support for 24xxx devices was previously explicitly bracketed with
CONFIG_VIDEO_PVRUSB2_24XXX inside the code because we didn't trust the
stability of these changes.  We trust it now; so there's no reason to
leave this out of the driver anymore.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:35 -03:00
Mike Isely
4d31256f37 V4L/DVB (4594): Remove some dead data elements from pvrusb2 driver
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:35 -03:00
Mauro Carvalho Chehab
d9dce96fae V4L/DVB (4592): Fixes some troubles on saa7115
Scaling were not working fine;
Some reserved registers were wrong;
On some situations, saa7115 were not properly being initializated.
Removed some duplicated code.
Thanks-to: Hans Verkuil <hverkuil@xs4all.nl> for co-working on this
patch.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:35 -03:00
Mauro Carvalho Chehab
3e7d3e5735 V4L/DVB (4586): Code were preventing saa7111 and saa7118 to work
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:35 -03:00
Hans Verkuil
b31e341be0 V4L/DVB (4584): Fix VIDIOC_S_FMT min/max check in pvrusb2
Acked-by: Mike Isely <isely@pobox.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:35 -03:00
Mauro Carvalho Chehab
d87edf264a V4L/DVB (4573): Fix: There were some missing breaks at register check routine
Without the breaks, saa7115 were not initializing PLL2.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:34 -03:00
Mauro Carvalho Chehab
66440ccbf2 V4L/DVB (4565): Fix scaling calculus
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:34 -03:00
Mauro Carvalho Chehab
58f56cbe29 V4L/DVB (4556): Fix a typo.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:34 -03:00
Mauro Carvalho Chehab
59ba915495 V4L/DVB (4555): Cleanup: removed hardcoded tables
saa7115 module is capable of calculating the proper FIR tables.
However, there were 4 hardcoded tables for the standard resolution.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:34 -03:00
Mauro Carvalho Chehab
66ec1193ba V4L/DVB (4554): Renamed several common structs/functions to saa711x instead of saa7115
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:34 -03:00
Mauro Carvalho Chehab
89f75ffc7e V4L/DVB (4553): Add support for saa7111 and partial support for saa7118
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:34 -03:00
Mauro Carvalho Chehab
96ecfc4edf V4L/DVB (4551): Added register aliases for saa711x registers, instead of using reg numbers
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:34 -03:00
Mauro Carvalho Chehab
236f16d241 V4L/DVB (4550): Make saa7115 to report the complete chipset name
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:34 -03:00
Hans Verkuil
44b579d636 V4L/DVB (4548): Better temporal filter handling.
Adjust temporal filter if necessary. The problem with the temporal
filter is that it works well with full resolution capturing, but
not when the capture window is scaled (the filter introduces
a ghosting effect). So if the capture window changed, and there is
no updated filter value, then the filter is set depending on whether
the new window is full resolution or not.
For full resolution a setting of 8 really improves the video
quality, especially if the original video quality is suboptimal. 
Also report VBI Format in VIDIOC_LOG_STATUS, it was missing.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:34 -03:00
Hans Verkuil
784e8fe417 V4L/DVB (4546): Add u32 argument to VIDIOC_INT_RESET.
The extra argument makes it possible to reset subsystems of a chip if
that is supported.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:34 -03:00
Trent Piepho
d7304dee3b V4L/DVB (4533): Tda9887: add configuration setting for L standard PLL gating
Add a tuner config parameter for TDA9887, default_pll_gating_18, that
changes the L standard PLL gating value from 36% to 0% (datasheet says
0%, tda9887 code says 18%).
Turn this on for Microtune 4049FM5, as recomended by tuner datasheet.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:34 -03:00
Mauro Carvalho Chehab
1450e6bedc V4L/DVB (4519): Fixes Helper module dependencies against V4L APIs
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:34 -03:00
Mauro Carvalho Chehab
29adeee534 V4L/DVB (4568): Added missing KS0197 Kconfig item
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:34 -03:00
Mauro Carvalho Chehab
faa1cb2039 V4L/DVB (4518): Allow manually selecting the proper helper drivers
There are several boards on V4L that can work with several different
helper modules for audio/video encoding/decoding and similar stuff.
This patch adds the capability of choicing between autoselecting the
pertinent helper modules for each driver, or to manually selecting
them.
Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Mike Isely <isely@pobox.com>

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:33 -03:00
Mauro Carvalho Chehab
fe9b5bb5e5 V4L/DVB (4516): Split audio/video encoders/decoders from main drivers
Several audio/video encoders/decoders were just bound as if they were 
part of the core driver.
In fact, they are generic enough to be used by other drivers as well, 
since they use I2C event bus to communicate.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:33 -03:00
Mauro Carvalho Chehab
6e40773a9b V4L/DVB (4515): Fixed module name, since it is, in fact, a decoder.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:32 -03:00
Mauro Carvalho Chehab
b961b9c5a2 V4L/DVB (4514): Add some comments for Kconfig encoders/decoders itens
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:32 -03:00
Mauro Carvalho Chehab
897ea1307b V4L/DVB (4513): Split audio decoders from bttv
Several audio decoders were just bound as if they were part of
bttv driver. In fact, they are generic enough to be used by other
drivers as well, since they use I2C event bus to communicate.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:32 -03:00
Alexey Dobriyan
f70a7a918a V4L/DVB (4512): Ks0127: wire up i2c_add_driver() return value
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:32 -03:00
Eric Sesterhenn
d084aa7067 V4L/DVB (4510): Fix signedness error in drivers/media/video/vivi.c
when checking the -Wextra signedness warnings issued by gcc 4.1
I came across this one:
drivers/media/video/vivi.c:1001: warning: comparison of unsigned expression < 0 is always false
Since videobuf_reqbufs() returns negative values on errors the current
code does no real error checking since gcc removes the comparison.
This patch fixes this issue by making ret a normal, signed integer.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:32 -03:00
Mauro Carvalho Chehab
3153d0d05d V4L/DVB (4509): Added missing copyright
Several changes at register stuff were done since commit
b45009b028, but I've forgot
to add the copyright line for this. Those changes allowed
cx88 to have multiple tuners, allowing it to support hardware with
separated radio and video tuners. It also allows binding a tuner to an
specific i2c address.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:32 -03:00
Mauro Carvalho Chehab
0d0d871b3f V4L/DVB (4508): Fix an array overflow on bt866
The Coverity checker spotted the following two array overflows.
Registers 0xcc and 0xdc were cached on reg[] array, with only 128 elements, 
instead of 256.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:32 -03:00
Mauro Carvalho Chehab
eb42c42449 V4L/DVB (4507): Make tvp5150 an independent Kconfig item
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:32 -03:00
Mauro Carvalho Chehab
12500f07c6 V4L/DVB (4506): TVP5150 routing logic were broken.
As pointed by The Coverity checker, commit
c7c0b34c27 broked input selection.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:32 -03:00
Ricardo Cerqueira
e738e35d1e V4L/DVB (4504): Enable audio DMA restart on channel change even when cx88-alsa is compiled
cx88-alsa can be compiled in (in distro built kernels, for example), but
not used. In those cases, the audio DMA restart is needed for proper sound
on NICAM channels.
This patch enables the DMA restart even with ALSA, but the functions now
check if cx88-alsa is really active.

Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:32 -03:00
Alexey Dobriyan
17bc98a41a V4L/DVB (4499): CONFIG_PM=n slim: drivers/media/video/*
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:32 -03:00
Mauro Carvalho Chehab
4d98816be7 V4L/DVB (4498): Offset parameter permission were 0x666, instead of 0x664
Although not dangerous, it may allow a normal user with access to a machine
to untune a TV channel.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:32 -03:00
Chris Pascoe
d536e9c41f V4L/DVB (4497): Reset USB part of DViCO Dual Digital during PCI driver attach
If the FX2 does not reset properly during reboot, it can present an
invalid USB device ID and fail to attach.  Prevent this situation
from occuring by resetting the USB part of the card when the PCI part
probes.
Also fix the GPIO configurations so that analog capture will not
inadvertantly reset the USB part.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:32 -03:00
Trent Piepho
a2b9e3e74a V4L/DVB (4490): Whitespace cleanup
from whitespace cleaning script

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:31 -03:00
Trent Piepho
18795eb98d V4L/DVB (4488): Fix possible crash in Hauppauge eeprom reading
If an eeprom defined two tuners and they supported more than eight
standards combined (as opposed to each), it would overflow an array. 

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:31 -03:00
Mauro Carvalho Chehab
40346b290f V4L/DVB (4485): Fix a warning on PPC64
drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c: In function 'set_standard':
drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c:33: warning: format '%llx' expects type 'long long unsigned int', but argument 2 has type 'v4l2_std_id'

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:31 -03:00
Yeasah Pell
ef76856d26 V4L/DVB (4479): LNB voltage control was inverted for the benefit of geniatech cards on Kworld
1) It sets LNBDCPol differently based on the card type. Now it should
work properly for both the kworld and geniatech cards.
2) It stops returning an error for the SEC_VOLTAGE_OFF voltage command
(the cx88-dvb level handles the actual voltage on/off, but it still
passes the ioctl down to the cx24123 level, which previously rejected
the OFF as invalid so the ioctl would report failure)

Acked-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Yeasah Pell <yeasah@schwide.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:14 -03:00
Mauro Carvalho Chehab
8a36ecf0f4 V4L/DVB (4475): Fix most Compat32 stuff on V4L2
Tested on x64 with a bttv board. Most Get ioctls are fixed. The only
non-completely working one is VIDIOCGAUDIO. All other IOR ioctls give the
same results on x86_64 and i386 architectures.
Thanks to Alastair Poole <netstar@gatheringofgray.com> for part of this
patch and tests on ppc64.

Signed-off-by: Alastair Poole <netstar@gatheringofgray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 11:53:51 -03:00
Mauro Carvalho Chehab
3702627899 V4L/DVB (4474): On some cases, depth were not returned.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 11:53:49 -03:00
Michael Krufky
f7b54b1067 V4L/DVB (4439): Whitespace cleanups for cx88-dvb and saa7134-dvb
This patch cleans up some whitespace problems after the dvb_attach changes
in cx88-dvb.c and saa7134-dvb.c, and converts some capitalized i2c address
constants to lowercase.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 11:53:40 -03:00
Michael Krufky
4ad8eee5ac V4L/DVB (4438): Fix dvb_pll_attach for nxt2004-based cards
The test in dvb-pll to see if a tuner's PLL responds when attaching fails
on NXT2004 based boards before the firmware is loaded.
This patch allows us to avoid this test by not passing an I2C bus handle to
the dvb_pll_attach routine, just as Chris Pascoe has done for MT352 and
ZL10353 based boards when used in cx88-dvb.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 11:53:40 -03:00
Chris Pascoe
c162dff643 V4L/DVB (4436): Dvb-pll support for MT352/ZL10353 based tuners.
Typical wiring of MT352 and ZL10353 based tuners differs from dvb-pll's
expectation that the PLL is directly accessible.  On these boards, the
PLL is actually hidden behind the demodulator, and as such can only be
accessed via the demodulator's interface.  It was failing to communicate
with the PLL during an attach test and subsequently not connecting the
tuner ops.
By passing a NULL I2C bus handle to dvb_pll_attach, this accessibility
check can be bypassed.  Do this for the affected boards.  Also fix a
possible NULL dereference at sleep time, which would otherwise be
exposed by this change.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Acked-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Acked-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 11:53:38 -03:00
Mauro Carvalho Chehab
0518999c5f V4L/DVB (4422): Improved comment for AR device and fix some typos
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 11:53:36 -03:00
Mauro Carvalho Chehab
b23056ef37 V4L/DVB (4421): V4L2 Conversion: saa5246a, saa5249, vino, hexium_orion, hexium_gemini
Just a few adjustments were required on those drivers to be V4L2 compliant.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 11:53:36 -03:00
Hans Verkuil
704fd4a567 V4L/DVB (4417): Add support for PAL-Nc in cx24850.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 11:53:35 -03:00
Dmitry Torokhov
56b8df1134 V4L/DVB (4413): Konicawc - handle errors from input_register_device()
Compile-tested only (no hardware)

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 11:53:33 -03:00
Igor M. Liplianin
e2ac28fa15 V4L/DVB (4398): Add support for Acorp TV134DS + FlyDVB-S cards.
Add support for Acorp TV134DS and FlyDVB-S cards (both based on
tda10086+tda826x)

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 11:53:30 -03:00
Andrew de Quincey
f52a838b74 V4L/DVB (4391): Refactor dvb_detach calls into a single dvb_frontend_detach function.
Remove buggy dvb_detach() macro and replace with unified
dvb_frontend_detach() call.

Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Acked-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 11:53:29 -03:00
Andrew de Quincey
1f10c7afa1 V4L/DVB (4388): Remove frontend selection from cx88/saa7134 drivers
Replaced with dvb_attach()

Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 11:53:26 -03:00
Andrew de Quincey
102a342bb9 V4L/DVB (4387): Add Kconfig infrastructure for dvb_attach
Allow it to be en/disabled
Disable it in < 2.6.17 due to symbol_xxx() bug

Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 11:53:25 -03:00
Andrew de Quincey
2bfe031df6 V4L/DVB (4386): Convert DVB devices to use dvb_attach()
Only devices using > 1 frontend were ported; ones which did not are left
using static binding.

Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 11:53:25 -03:00
Mike Isely
094ddbe950 V4L/DVB (4377): Force horizontal resolution limits in the pvrusb2 driver
This change causes the pvrusb2 driver to limit horizontal resolution
to be only 720 if 24xxx device hardware is being used.  This is a
workaround for an unsolved problem in the driver where if the
resolution is set to something other than 720 the video quality will
be _seriously_ degraded.  It only happens on 24xxx devices (29xxx are
unaffected by the problem and unaffected by this change).  Once the
problem is finally solved, this small change can be removed.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 11:53:22 -03:00
Mike Isely
89ebd63fdd V4L/DVB (4376): Make it possible for run-time calculation of control min/max in pvrusb2
The internal control implementation in the pvrusb2 driver normally
encodes integer range limits using literal values in a const
structure.  This change adds two function pointers, which if not null
will be called through in order to determine integer min / max
values.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 11:53:20 -03:00
Mike Isely
e95a191566 V4L/DVB (4375): Eliminate hardcoded limits in VIDIOC_[S|TRY]_FMT for pvrusb2
The pvrusb2 implementation for VIDIOC_[S|TRY]_FMT was hardcoding
limits on the range for allowed resolution, but it would be much
better if we instead just queried the internal control for these
values.  This then opens the door for the driver to adjust these
limits based on the detected hardware.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 11:53:20 -03:00
Mike Isely
434449f4c8 V4L/DVB (4372): Clean up some post mpeg-controls issues in pvrusb2
Fix a few miscellaneous issues in the pvrusb2 driver related to use of
the new mpeg controls.  This also should fix problems involving
update of the saa7115 / cx25840 configuration as control changes are made.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 11:53:20 -03:00