Commit Graph

9113 Commits

Author SHA1 Message Date
Devin Heitmueller
fea551fae9 V4L/DVB: saa7115: enable anti-alias filter
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.

This work was sponsored by EyeMagnet Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:50:15 -03:00
Devin Heitmueller
5fee334039 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.

This work was sponsored by EyeMagnet Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:50:14 -03:00
Devin Heitmueller
1744feab9a V4L/DVB: em28xx: reduce cropping for VBI area
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).

This work was sponsored by EyeMagnet Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:50:13 -03:00
Devin Heitmueller
33c02facb5 V4L/DVB: em28xx: adjust number of packets per URB
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.

This work was sponsored by EyeMagnet Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:50:13 -03:00
Hans de Goede
f0dbf82bf1 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>
2010-05-18 00:50:12 -03:00
Hans de Goede
436c2c533a V4L/DVB: gspca_spca561: Add support for camera button
gspca_spca561: Add support for camera button

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:50:11 -03:00
Hans de Goede
6b33e5e7fe V4L/DVB: gspca_spca561: Fix LED on rev12a cameras
Fix LED control on rev12a cameras and remove the unneeded
sd_stop0 callback function.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:50:10 -03:00
Brian Johnson
cc2a833590 V4L/DVB: gspca - sn9c20x: Fix bug with OV9655 code
Fixed buggy init sequence for the OV9655 sensor.
Tested with a 0c45:6288 and 0c45:62b3.

Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:50:09 -03:00
Brian Johnson
e99ac54da6 V4L/DVB: gspca - sn9c20x: Add support for cameras using the MT9M112 sensor
Adds the following models:
	- 0c45:624c
	- 0c45:628c
	- 0458:704a
	- 0458:704c

Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:50:09 -03:00
Brian Johnson
7ddaac7fcb V4L/DVB: gspca - sn9c20x: Add upside down detection
Add support for detecting webcams that are mounted
upside down in laptops. Currently the only two known
are two MSI modesl using the 0c45:624f.

Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:50:08 -03:00
Brian Johnson
0c045eb752 V4L/DVB: gspca - sn9c20x: Add support for camera LEDs
Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:50:07 -03:00
Mauro Carvalho Chehab
a39db27a08 V4L/DVB: gspca - sn9c20x: use gspca's input device handling
Drop custom code for handling the input button in
favor of using gspca's input hanlding mechinism.

Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:49:44 -03:00
Jean-François Moine
ad98c0f674 V4L/DVB: gspca - sonixj: Add webcam 0c45:6142 with sensors gc0307 and po2030n
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:23 -03:00
Jean-François Moine
9c33afc610 V4L/DVB: gspca - sonixj: More static const and better array initialization
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:22 -03:00
Hans Verkuil
771075bb46 V4L/DVB: videobuf-core: fix spelling mistake in debug message
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:20 -03:00
Vladimir Ermakov
8f27fd9605 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.

For the first chip:

 SAA7130 (0x7130, SubVenID:1131, SubDevID:0000, Rev: 01)

 I2C slave devices found:
 No devices

 GPIO pins:
 Mode : 0x00389C00
 Value: 0x00016C00

 Video input: 3
 Audio input: Analog Line1

For other chips:

 SAA7130 (0x7130, SubVenID:1131, SubDevID:0000, Rev: 01)

 I2C slave devices found:
 No devices

 GPIO pins:
 Mode : 0x00389200
 Value: 0x00010000

 Video input: 3
 Audio input: Analog Line1

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:19 -03:00
Frank Schaefer
a3415c15e1 V4L/DVB: v4l2_ctrl_get_name(): add missing control names, and make title for V4L2_CID_BG_COLOR consistent
v4l2_ctrl_get_name(): add missing control names, and make title for
V4L2_CID_BG_COLOR consistent

V4L2_CID_AUTOBRIGHTNESS   was introduced with kernel 2.6.31
V4L2_CID_BAND_STOP_FILTER was introduced with kernel 2.6.32

Signed-off-by: Frank Schaefer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:19 -03:00
Huang Weiyi
4d36ec7fbf V4L/DVB: tlg2300: remove unused #include <linux/version.h>
Remove unused #include <linux/version.h>('s) in
  drivers/media/video/tlg2300/pd-main.c

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:17 -03:00
Julia Lawall
728385c4d3 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/):

// <smpl>
@match exists@
expression x, E;
identifier fld;
@@

* x->fld
  ... when != \(x = E\|&x\)
* x == NULL
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:16 -03:00
Andy Walls
4e1af31aaa V4L/DVB: ivtv, ivtvfb: Use a define for the output line and field register address
Get rid of the magic number 0x28c0 used in several places in the ivtv and
ivtvfb driver and define the register address to a meaningful name.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:15 -03:00
Ian Armstrong
2443baeaa0 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>
2010-05-18 00:47:15 -03:00
Andy Walls
f978ac90b2 V4L/DVB: cx18: Add a component video input to the PVR2100 and DVR3200H card entries
This is a guess at the proper configuration for component video on the Leadtek
PVR2100 and DVR3100 H.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:14 -03:00
Andy Walls
d9a325a865 V4L/DVB: cx18: Add support for component video inputs
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:13 -03:00
Jean Delvare
c6ebc6c4ac 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>
2010-05-18 00:47:12 -03:00
Michael Krufky
4605664bd9 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>
2010-05-18 00:47:06 -03:00
Mauro Carvalho Chehab
727e625cc2 V4L/DVB: ir-core: export driver name used by IR via uevent
Now, both driver and keytable names are exported to userspace. This
will help userspace to decide when a table need to be replaced
by another one.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:05 -03:00
Mauro Carvalho Chehab
9c89a181a0 V4L/DVB: ir-core: Export IR name via uevent
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:05 -03:00
Mauro Carvalho Chehab
2915e5ef35 V4L/DVB: ir-core: Add a macro to properly create IR tables
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:04 -03:00
Mauro Carvalho Chehab
945cdfa2c9 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:

/sys/class/irrcv/irrcv0/
|-- current_protocol
|-- device -> ../../../1-3
|-- input9
|   |-- capabilities
|   |   |-- abs
...

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:03 -03:00
Mauro Carvalho Chehab
000f64efc7 V4L/DVB: Fix bad whitespacing
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:01 -03:00
Max Thrun
6721b51ece V4L/DVB: gspca - ov534: Update copyright info
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>
2010-05-18 00:47:01 -03:00
Mosalam Ebrahimi
4b7875407b V4L/DVB: gspca - ov534: Add Powerline Frequency control
Note that setting this options to 50Hz can reduce the framerate, so it is
still disabled (60Hz) by default.

Signed-off-by: Mosalam Ebrahimi <m.ebrahimi@ieee.org>
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>
2010-05-18 00:47:00 -03:00
Antonio Ospite
7f9e9e8dc2 V4L/DVB: gspca - ov534: Cosmetics: fix indentation and hex digits
* Indent with tabs, not with spaces, nor with mixed style.
  * Less indentation for controls index comments.
  * Use lowercase hex digits.

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>
2010-05-18 00:46:59 -03:00
Max Thrun
eb171073b6 V4L/DVB: gspca - ov534: Fix unsetting hflip and vflip bits
Also set default values unconditionally, for readability.

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>
2010-05-18 00:46:58 -03:00
Max Thrun
3149cfbfac V4L/DVB: gspca - ov534: Fixes for sharpness control
* Adjust comments for sharpness control
  * Set default value unconditionally, for readability

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>
2010-05-18 00:46:58 -03:00
Max Thrun
8fef9d9622 V4L/DVB: gspca - ov534: Fix Auto White Balance control
Set only the needed bits for AWB, and enable it by default.

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>
2010-05-18 00:46:57 -03:00
Antonio Ospite
18cf8c91ad 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.

Skip setting exposure when AEC is enabled.

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>
2010-05-18 00:46:56 -03:00
Max Thrun
f293882252 V4L/DVB: gspca - ov534: Add Auto Exposure
This also makes manual exposure actually work: it never worked before
because AEC was always enabled.

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>
2010-05-18 00:46:55 -03:00
Max Thrun
8b7fbda484 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>
2010-05-18 00:46:54 -03:00
Antonio Ospite
0c41acf158 V4L/DVB: gspca - ov534: Remove hue control
Hue control doesn't work and the sensor datasheet is not clear about how
to set hue properly.

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>
2010-05-18 00:46:54 -03:00
Max Thrun
c3f52f630d V4L/DVB: gspca- ov534: Remove ambiguous controls
Remove Blue/Red Channel Target Value, they are meant for Black Level
Calibration but it is not completely clear how to use them.

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>
2010-05-18 00:46:53 -03:00
Oliver Endriss
c4ea13b40b V4L/DVB: ngene: Add support for cineS2 v5 and SaTiX-S2 Dual v2
Add support for
- Linux4Media cineS2 DVB-S2 Twin Tuner (v5)
- Mystique SaTiX-S2 Dual (v2)

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:52 -03:00
Julia Lawall
5ce005002c V4L/DVB: drivers/media: drop redundant memset
The region set by the call to memset is immediately overwritten by the
subsequent call to memcpy.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e1,e2,e3,e4;
@@

- memset(e1,e2,e3);
  memcpy(e1,e4,e3);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:51 -03:00
Manu Abraham
c8382c8e32 V4L/DVB: stv090x: Add some notes about the internal tuner I/O control
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:51 -03:00
Andreas Regel
5817ea0c83 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>
2010-05-18 00:46:49 -03:00
Manu Abraham
85532d1454 V4L/DVB: [STV090x] Use gate control, while tuner is being accessed
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:48 -03:00
Manu Abraham
c5b74b0f5e V4L/DVB: [STV090x, STV6110x] Use tuner sleep within the demodulator control
Oliver Endriss <o.endriss@gmx.de> pointed out:
Imho not a good idea, as the frontend thread calls
- fe->ops.tuner_ops.init
- fe->ops.tuner_ops.sleep

If you remove fe->ops.i2c_gate_ctrl, init and sleep will fail,
because gate_ctrl was never called...

--

Signed-off-by: Manu Abraham <manu@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:47 -03:00
Manu Abraham
19c4ee5832 V4L/DVB: [STV090x] Code simplification
- Remove a redundant exported gate control function

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:47 -03:00
Oleg Roitburd
20d2c56de8 V4L/DVB: AZ6027: Fix initialization for some cards
Also add in some more device ID's

Signed-off-by: Oleg Roitburd <oroitburd@gmail.com>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:46 -03:00
Oleg Roitburd
823b63b49e V4L/DVB: AZ6027: Add support for Technisat V1 device
Signed-off-by: Oleg Roitburd <oroitburd@gmail.com>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:45 -03:00