Add support for design which has an em2863/tvp5150 and uses the standard
empia USB ID. In Sander's case, it was branded as an "Eminent model EM3705"
Thanks to Sander Van Ginkel for testing and help debugging the support.
[mchehab@redhat.com: move it to a vague card number slot (card=29)] Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
V4L/DVB: videodev2: introduce a common control for chroma gain
Introduce a new control for modifying the chroma gain. This allows for user
intervention in abnormal signal conditions cases where the decoder's chroma
AGC cannot compensate and the value needs to be adjusted manually.
This patch enables the anti-alias filter, which was originally enabled for
the saa7113, but the saa7115_init_misc was trampling the value. Without this
patch, there would be visible vertical bands in the chroma.
Thanks to Andy Walls for helping test this change against other ivtv products.
V4L/DVB: em28xx: rework buffer pointer tracking for offset to start of video
Rework the logic for tracking the amount of data copied to the VBI buffer, to
address problem found where the video lines are several bytes shifted to the
right (and the leading pixels in the first line rendered are garbage). This
would occur because the copy function would advance the pointer when detecting
headers, but the caller would not adjust the length actually copied.
It turns up we can reduce the starting line for the active area, which results
in more data being captured when under PAL (while the full VBI capture window
still stays properly encoded).
Increase the packets per URB count from 40 to 64. I suspect that whoever was
looking at the usbsnoop captures saw "0x40" packets and mistook it for "40".
As a result of this change, I can see a 25% reduction in the number of
interrupts generated via powertop.
Hans de Goede [Thu, 11 Mar 2010 09:12:39 +0000 (06:12 -0300)]
V4L/DVB: sn9c102: Make hv7131d sensor code also recognize the HV7131E
The hv7131d sensor code also works for the hv7131e, this patch changes
it to also recognize the hv7131e sensor id.
Tested-by: Frank Danapfel <fdanapfe@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Vladimir Ermakov [Wed, 10 Mar 2010 15:44:57 +0000 (12:44 -0300)]
V4L/DVB: saa7134: add capture boards Hawell HW-404M7 and HW-808M7
Adds new capture boards Hawell HW-404M7 and HW-808M7. Those cards have 4
or 8 SAA7130 chips and for the work it only needs initialize registers.
The value of those registers were dumped under Windows using flytest.
But board haven't EEPROM.
Olimpiu Pascariu [Sun, 14 Mar 2010 15:44:37 +0000 (12:44 -0300)]
V4L/DVB: Staging: cx25821: fix coding style issues in cx25821-alsa.c
>From 9473816c446a6ca91905fc49a73732f70b5223b4 Mon Sep 17 00:00:00 2001
This is a patch to the cx25821-alsa.c file that fixes up errors and warnings found by the checkpatch.pl tool
[mchehab@redhat.com: a few adjustments on the comments to improve readability] Signed-off-by: Olimpiu Pascariu <olimpiu.pascariu@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Julia Lawall [Fri, 12 Mar 2010 09:15:32 +0000 (06:15 -0300)]
V4L/DVB: drivers/media/video: move dereference after NULL test
In quickcam_messenger.c, if the NULL test on uvd is needed, then the
dereference should be after the NULL test.
In vpif_display.c, std_info is initialized to the address of a structure
field. This seems unlikely to be NULL. Test std_info->stdid instead.
In saa7134-alsa.c, the function is only called from one place, where the
chip argument has already been dereferenced. On the other hand, if it
should be kept, then card should be initialized after it.
A simplified version of the semantic match that detects this problem is as
follows (http://coccinelle.lip6.fr/):
Ian Armstrong [Sat, 13 Mar 2010 23:22:34 +0000 (20:22 -0300)]
V4L/DVB: ivtv: Avoid hard system lock on decoder output mode change
Changing the decoder video standard just prior to, or during, the output of
the lower field may result in a hard system lock. To avoid this, try to ensure
the firmware call occurs only during the first 100 lines of the top field.
(Minor comment addition and a line break added Andy Walls <awalls@radix.net>.)
Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean Delvare [Mon, 15 Mar 2010 01:57:56 +0000 (22:57 -0300)]
V4L/DVB: saa7134: Fix IR support of some ASUS TV-FM 7135 variants
Some variants of the ASUS TV-FM 7135 are handled as the ASUSTeK P7131
Analog (card=146). However, by the time we find out, some
card-specific initialization is missed. In particular, the fact that
the IR is GPIO-based. Set it when we change the card type, and run
saa7134_input_init1().
Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
V4L/DVB: tm6000: replace occurences of req05 magic by a naming alias
Yet another naming replace magic thanks to perl scripts. This time, it
is done with:
cat tm6000-regs.h |perl -ne 'if (m/(TM6010_REQ[^\s]+)\s+0x([a-f0-9]+)\,
0x([a-f0-9]+)/) { $name="$1"; $req=$2; $val=$3; printf
"s/REQ_${req}_SET_GET_USBREG, 0x[0]*$3,/$1,/\n" }' >a; for i in tm*.c;
do sed -f a $i >b && mv b $i; done
V4L/DVB: tm6000: Replace all magic values by a register alias
Instead of using magic pairs of req/reg, replace them by the defined
values.
This patch were generated by the following script:
cat tm6000-regs.h |perl -ne 'if (m/(TM6010_REQ[^\s]+)\s+0x([a-f0-9]+)\,
0x([a-f0-9]+)/) { $name="$1"; $req=$2; $val=$3; printf
"s/REQ_${req}_SET_GET_AVREG[_BIT]*, 0x[0]*$3,/$1,/\n" }' >a; for i in
tm*.c; do sed -f a $i >b && mv b $i; done
V4L/DVB: tm6000: Add request at Req07/Req08 register definitions
Use a pair Req/Reg for all registers at req07 and req08 groups. This
makes easier to replace them at the code with a script and helps to
avoid using the wrong req with some register.
V4L/DVB: tm6000: Replace all Req 8 group of regs with another naming convention
According with the original patch that added the register names, those
are related to tm6010, so name it properly as such. Also, clearly
indicates when a register belongs to Request 0x08 and add its register
value at the name. This makes easier to double check if the proper
register is used along the driver.
This patch were made with the help of this simple perl script, applied
over the definitions of the last register groups:
V4L/DVB: tm6000: Replace all Req 7 group of regs with another naming convention
According with the original patch that added the register names, those
are related to tm6010, so name it properly as such. Also, clearly
indicates when a register belongs to Request 0x07 and add its register
value at the name. This makes easier to double check if the proper
register is used along the driver.
This patch were made with the help of this simple perl script:
Michael Krufky [Mon, 1 Feb 2010 00:06:10 +0000 (21:06 -0300)]
V4L/DVB: dvb-usb: enable specifying a separate generic bulk ctrl response endpoint
Some DVB USB devices use a separate endpoint for responses to control
messages sent with bulk transfers via the generic_bulk_ctrl_endpoint.
When generic_bulk_ctrl_endpoint_response is set, it will be used instead
of the generic_bulk_ctrl_endpoint when reading usb responses in the
dvb_usb_generic_rw helper function.
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Reviewed-by: Patrick Boettcher <pboettcher@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
V4L/DVB: ir: use a real device instead of a virtual class
Change the ir-sysfs approach to create irrcv0 as a device, instead of
using class_dev. Also, change the way input is registered, in order
to make its parent to be the irrcv device.
Due to this change, now the event device is created under
/sys/class/ir/irrcv class:
Antonio Ospite [Mon, 1 Mar 2010 11:53:34 +0000 (08:53 -0300)]
V4L/DVB: gspca - ov534: Fix and document setting manual exposure
Document that even if the state is a u8 value, both MSB and LSB are set
as sd->exposure represents half of the value we are going to set into
registers.
Max Thrun [Sat, 27 Feb 2010 20:20:20 +0000 (17:20 -0300)]
V4L/DVB: gspca - ov534: Fix autogain control, enable it by default
* Use 'agc' instead of 'autogain' in the code so to align the naming
as in AEC/AWB.
* Tweak brightness and contrast default values.
* Fix setting/resetting registers values for AGC.
* Set actual gain back when disabling AGC.
* Skip setting GAIN register when AGC is enabled.
* Enable AGC by default.
Note that as Auto Gain Control is now enabled by default, if you are
using the driver for visual computing applications you might need to
disable it explicitly in your software.
Signed-off-by: Max Thrun <bear24rw@gmail.com> Signed-off-by: Antonio Ospite <ospite@studenti.unina.it> Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andreas Regel [Sat, 13 Feb 2010 19:48:07 +0000 (16:48 -0300)]
V4L/DVB: Budget/STV090x/STV6110x: Initialize the demodulator immediately after the tuner is attached
Signed-off-by: Andreas Regel <andreas.regel@gmx.de> Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Ian Armstrong [Sun, 7 Mar 2010 00:43:04 +0000 (21:43 -0300)]
V4L/DVB: cx2341x: Remove temporal filter control restriction
Since the change that stops the CX23415/6 firmware-intiiated secondary stream
appears to fix the temporal filter, it's now fully re-enabled for all capture
resolutions.
Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Ian Armstrong [Sun, 7 Mar 2010 00:37:04 +0000 (21:37 -0300)]
V4L/DVB: ivtv: Really stop capture on device close
When a capture is started, the firmware also appears to start a secondary
stream. Unless this secondary stream is also stopped, the encoder will remain
active and not reinitialise for the next capture. Unfortunately, setting up
the video source can glitch the encoder and result in undesirable effects that
this initialisation will clear.
Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andy Walls [Sun, 7 Mar 2010 00:08:35 +0000 (21:08 -0300)]
V4L/DVB: ivtv: Combine capture start delays into a single delay
Combine the two 150 ms delays into a single 300 ms delay. Ian Armstrong has
noted that the delay between CX2341X_ENC_INITIALIZE_INPUT and
CX2341X_ENC_START_CAPTURE can cause problems if the temporal filter is allowed
to be enabled.
Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Márton Németh [Sun, 7 Mar 2010 06:33:45 +0000 (03:33 -0300)]
V4L/DVB: gspca cpia1: make local functions static
Make the local functions static. Note that the function command_setlights() is
currently not called from anywhere.
This will remove the following sparse warnings (see "make C=1"):
* symbol 'command_setformat' was not declared. Should it be static?
* symbol 'command_setcolourparams' was not declared. Should it be static?
* symbol 'command_setapcor' was not declared. Should it be static?
* symbol 'command_setvloffset' was not declared. Should it be static?
* symbol 'command_setexposure' was not declared. Should it be static?
* symbol 'command_setcolourbalance' was not declared. Should it be static?
* symbol 'command_setcompressiontarget' was not declared. Should it be static?
* symbol 'command_setyuvtresh' was not declared. Should it be static?
* symbol 'command_setcompressionparams' was not declared. Should it be static?
* symbol 'command_setcompression' was not declared. Should it be static?
* symbol 'command_setsensorfps' was not declared. Should it be static?
* symbol 'command_setflickerctrl' was not declared. Should it be static?
* symbol 'command_setecptiming' was not declared. Should it be static?
* symbol 'command_pause' was not declared. Should it be static?
* symbol 'command_resume' was not declared. Should it be static?
* symbol 'command_setlights' was not declared. Should it be static?
Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antonio Larrosa [Fri, 5 Mar 2010 01:19:48 +0000 (22:19 -0300)]
V4L/DVB: em28xx: Support for Kworld VS-DVB-T 323UR
This patch adapts the changes submitted by Dainius Ridzevicius to the
linux-media mailing list on 8/14/09, to the current sources in order
to make the Kworld VS-DVB-T 323UR usb device work.
I also removed the "not validated" flag since I own the device and validated
that it works fine after the patch is applied.
Thanks to Devin Heitmueller for his guidance with the code.
Dmitri Belimov [Tue, 2 Mar 2010 00:24:12 +0000 (21:24 -0300)]
V4L/DVB: tm6000 register defines
Add defines for all registers of the tm6000 module.
This defines made by doc for TM6010, need look docs for TM6000 and TM5600
Some registers can be different.
Abylay Ospan [Sat, 6 Mar 2010 17:58:01 +0000 (14:58 -0300)]
V4L/DVB: Allow to enable TS continuity and TEI check on loaded module
Current dvb_demux_tscheck processing doesn't allow to enable check on loaded
module. dvb_demux_tscheck can be enabled only when loading module (
dvb_dmx_init should be called to enable dvb_demux_tscheck ). This patch fix
this issue.
Henrik Kurelid [Tue, 21 Jul 2009 16:45:50 +0000 (13:45 -0300)]
V4L/DVB: firedtv: correct version number and current/next in CA_PMT
The version number in the CA_PMT message sent to the hardware was
alwaysed set to zero. This could cause problems if the PMT would
change during decryption of a channel since the new CA_PMT would have
the same version number as the old. The version number is now copied
from the original PMT.
Signed-off-by: Henrik Kurelid <henrik@kurelid.se> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Márton Németh [Mon, 1 Mar 2010 07:10:52 +0000 (04:10 -0300)]
V4L/DVB: az6027: remove redundant condition check
The condition (msg[i].addr == 0xd0) is checked twice the second one
is not necessary.
This will remove the following compiler warning:
az6027.c: In function 'az6027_i2c_xfer':
az6027.c:942: warning: 'index' may be used uninitialized in this function
az6027.c:943: warning: 'value' may be used uninitialized in this function
az6027.c:944: warning: 'length' may be used uninitialized in this function
az6027.c:945: warning: 'req' may be used uninitialized in this function
Signed-off-by: Márton Németh <nm127@freemail.hu> Cc: Manu Abraham <abraham.manu@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Márton Németh [Mon, 1 Mar 2010 06:31:02 +0000 (03:31 -0300)]
V4L/DVB: tlg2300: make local variables and functions static
Make the local variables and functions static. Some of them are not exported by their
symbol name but used trough other means. For example a pointer of the operation
structure is passed through a function call.
This will remove the following sparse warnings (see "make C=1"):
* pd-video.c:20:5: warning: symbol 'usb_transfer_mode' was not declared. Should it be static?
* pd-video.c:621:5: warning: symbol 'fire_all_urb' was not declared. Should it be static?
* pd-video.c:881:5: warning: symbol 'vidioc_s_std' was not declared. Should it be static?
* pd-video.c:1024:5: warning: symbol 'vidioc_g_audio' was not declared. Should it be static?
* pd-video.c:1033:5: warning: symbol 'vidioc_s_audio' was not declared. Should it be static?
* pd-video.c:1193:5: warning: symbol 'usb_transfer_stop' was not declared. Should it be static?
* pd-video.c:1522:14: warning: symbol 'pd_video_poll' was not declared. Should it be static?
* pd-video.c:1528:9: warning: symbol 'pd_video_read' was not declared. Should it be static?
* pd-radio.c:164:5: warning: symbol 'tlg_fm_vidioc_g_tuner' was not declared. Should it be static?
* pd-radio.c:206:5: warning: symbol 'fm_get_freq' was not declared. Should it be static?
* pd-radio.c:249:5: warning: symbol 'fm_set_freq' was not declared. Should it be static?
* pd-radio.c:261:5: warning: symbol 'tlg_fm_vidioc_g_ctrl' was not declared. Should it be static?
* pd-radio.c:267:5: warning: symbol 'tlg_fm_vidioc_g_exts_ctrl' was not declared. Should it be static?
* pd-radio.c:288:5: warning: symbol 'tlg_fm_vidioc_s_exts_ctrl' was not declared. Should it be static?
* pd-radio.c:315:5: warning: symbol 'tlg_fm_vidioc_s_ctrl' was not declared. Should it be static?
* pd-radio.c:321:5: warning: symbol 'tlg_fm_vidioc_queryctrl' was not declared. Should it be static?
* pd-radio.c:340:5: warning: symbol 'tlg_fm_vidioc_querymenu' was not declared. Should it be static?
* pd-main.c:58:12: warning: symbol 'firmware_name' was not declared. Should it be static?
* pd-main.c:59:19: warning: symbol 'poseidon_driver' was not declared. Should it be static?
Márton Németh [Sun, 28 Feb 2010 14:34:35 +0000 (11:34 -0300)]
V4L/DVB: nGene: use NULL when pointer is needed
Use NULL when calling a function with pointer parameter, initializing a
pointer and returning a pointer. This will remove the following sparse
warning at different locations (see "make C=1"):
* warning: Using plain integer as NULL pointer
Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Márton Németh [Sun, 28 Feb 2010 14:19:47 +0000 (11:19 -0300)]
V4L/DVB: tlg2300: cleanups when power management is not configured
When power management is not configured (CONFIG_PM) then some code is no longer
necessary.
This patch will remove the following compiler warnings:
* pd-dvb.c: In function 'poseidon_fe_release':
* pd-dvb.c:101: warning: unused variable 'pd'
* pd-video.c:14: warning: 'pm_video_suspend' declared 'static' but never defined
* pd-video.c:15: warning: 'pm_video_resume' declared 'static' but never defined