Commit Graph

8639 Commits (83905c134571642d7e8a1e51ae9f26bd3a3ad82a)

Author SHA1 Message Date
Mike Isely e67e376b1e V4L/DVB (13228): pvrusb2: Cosmetic kernel log tweak
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:00 -02:00
Mike Isely 515ebf79e5 V4L/DVB (13227): pvrusb2: Fix redundant message on driver initialization failure (missing break)
After detecting failure due to module initialization error, get out.
Don't report jammed hardware.  Problem due to a missing break statement.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:00 -02:00
Mike Isely aa976ca1df V4L/DVB (13226): pvrusb2: Add hardware description to debuginfo output
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:59 -02:00
Mike Isely 00970beb9b V4L/DVB (13225): pvrusb2: Report hardware description to kernel log upon initialization
The driver also contains a piece of configuration data that produces a
one line description of the specific hardware being driver
(e.g. "Hauppauge 24xxx", "OnAir", etc).  This change generates an
informational message to the kernel log reporting the hardware type
being driven.  This is a very useful thing to know when diagnosing
problems.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:59 -02:00
Mike Isely 2710814754 V4L/DVB (13224): pvrusb2: Improve diagnostic info on driver initialization failure
It used to be that the only real detectable reason for the driver to
fail during initialization would be that if the hardware is simply
jammed.  However with the advent of the sub-device mechanism in V4L it
is possible now to detect if a sub-device module fails to load
successfully.  The pvrusb2 driver does in fact react to this by also
(correctly) failing, however the original diagnostic message "hardware
is jammed" was still being reported.  This misleads the user because
in fact it might not actually be a hardware failure.  This change adds
logic to tell the difference and then report a more appropriate
message to the kernel log.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:59 -02:00
Mike Isely 1b33185f5d V4L/DVB (13223): pvrusb2: Soften encoder warning message
pvrusb2: Encoder failures are mostly recoverable by the driver.  While
it would sure be nice not to have the failure happen in the first
place, this has been going on for years and I doubt that a real
solution will ever present itself.  I think that part's firmware is
just slightly flakey and we have to deal with it.  The driver does
deal with it just fine, but the warning message going into the kernel
log is probably a little more alarming than it should be.  So try to
soften up the warning somewhat.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:58 -02:00
Mike Isely 4a89baa2e1 V4L/DVB (13222): pvrusb2: Make more info available to udev
pvrusb2: Associate V4L device node in sysfs with the underlying USB
device.  This opens the door to device information tracking in udev

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:58 -02:00
Michael Krufky 5abaa530bf V4L/DVB (13220): tda18271: increment module version minor
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:57 -02:00
Michael Krufky 712bc0b30f V4L/DVB (13219): tda18271: remove unneeded braces in switch..case block
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:57 -02:00
Michael Krufky 5881ecfca0 V4L/DVB (13218): tda18271: consolidate common code for calibration on startup determination
consolidate common code used to determine if calibration on startup is needed

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:57 -02:00
Michael Krufky 188ea058ff V4L/DVB (13217): tda18271: handle rf_cal_on_startup properly during attach
If rf_cal_on_startup is enabled in the structure passed into
tda18271_attach, and the cal module option isn't disabled, then we
should run the initialization and calibration procedures during the
tda18271_attach function call, regardless of how many instances of the
driver have been attached.  If the device is already calibrated, the
driver will detect that and will only calibrate again if necessary.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:56 -02:00
Michael Krufky c54e1dde58 V4L/DVB (13216): tda18271: initialize tuner during set_config if rf_cal_on_startup is set
If rf_cal_on_startup is enabled in the structure passed into
tda18271_set_config, and the cal module option isn't disabled,
then we should run the initialization and calibration procedures
during the tda18271_set_config function call.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:56 -02:00
Michael Krufky 42f9a03ed3 V4L/DVB (13215): tda18271: add support for the set_config method
Add the set_config method to allow drivers to configure the
tda18271 driver options after attach.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:55 -02:00
Michael Krufky 1724c8fa7e V4L/DVB (13214): tda18271: allow for i2c buses that cant send 16 bytes at once
There is already an option for sending 16 byte chunks rather that writing
39 bytes all at once during the tuner's initialization.  Some i2c buses
can't send 16 bytes at once, so create an option for sending 8 byte chunks.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:55 -02:00
David T.L. Wong e29cd96715 V4L/DVB (13212): fix gcc-4.3.3 compilation error at dib7000p_pid_filter(): missing parameter name
Signed-off-by: David T.L. Wong <davidtlwong@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:55 -02:00
David T.L. Wong 6f0d8c020e V4L/DVB (13211): cx23885: card Mygica X8506 analog TV support
Signed-off-by: David T.L. Wong <davidtlwong@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:54 -02:00
David T.L. Wong 8e069bb9ae V4L/DVB (13210): cx23885: card Mygica X8506 better GPIO setup
Signed-off-by: David T.L. Wong <davidtlwong@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:54 -02:00
David T.L. Wong bc1548adbe V4L/DVB (13209): cx23885: card mygica x8506 add analog video input support
Signed-off-by: David T. L. Wong <davidtlwong@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:53 -02:00
David T.L. Wong fd705e7cd8 V4L/DVB (13208): cx23885: fix uninitialized member bug
Signed-off-by: David T. L. Wong <davidtlwong@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:53 -02:00
David T.L. Wong dac65fa169 V4L/DVB (13207): cx23885: add component input type
Signed-off-by: David T. L. Wong <davidtlwong@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:53 -02:00
David T.L. Wong fb29ab9698 V4L/DVB (13206): cx25840: add component support
Signed-off-by: David T.L. Wong <davidtlwong@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:52 -02:00
Michael Krufky 184e769f93 V4L/DVB (13204): saa7134: add support for the Leadtek DTV1000S
Thanks to Terry Wu for finding the GPIOs required for svideo / composite input

Cc: Terry Wu <terrywu2009@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:52 -02:00
Michael Krufky bc809ab37e V4L/DVB (13201): saa7164: disable tda18271 slave tuner output on slave in standby mode
Enable the standby mode optimization to disable the tda18271
slave tuner output / loop thru options when in low power mode
on the slave tuner, only.  The master tuner must always leave
slave tuner output / loop thru enabled.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:51 -02:00
Jean-Francois Moine 5f78a9f96b V4L/DVB (13198): gspca - ov519: Bad frame pointer in ovfx2 packet scan.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:51 -02:00
Amauri Magagna 46b4f2ab58 V4L/DVB (13197): gspca - sonixj: Adjust colors and autogain for sensor om6802.
- set correct colors at startup time
- autogain was too slow (4-5 mn - now 15-30 s))

Signed-off-by: Amauri Magagna <amaurimagagna@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:51 -02:00
Olivier Lorin fdd1dd1d24 V4L/DVB (13196): gspca - gl860: add flip/mirror for OV2640
- add flip/mirror support for OV2640
- fix for backlight value range
- fix for red-blue inversion hue mode with V4L1 applications

Signed-off-by: Olivier Lorin <o.lorin@laposte.net>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:50 -02:00
Olivier Lorin be9904bdde V4L/DVB (13195): gspca - gl860: comment changes and naming scheme egalization
- small changes in comments
- unified naming scheme for subdriver variables

Signed-off-by: Olivier Lorin <o.lorin@laposte.net>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:50 -02:00
Olivier Lorin 216f05aa2a V4L/DVB (13194): gspca - gl860: improvement of the main driver part
- fix for warning compilation about sd_ctrls
- trace improvement while probing the sensor

Signed-off-by: Olivier Lorin <o.lorin@laposte.net>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:49 -02:00
Jean-Francois Moine 013db7575b V4L/DVB (13193): gspca - zc3xx.c: Change init sequences of sensor tas5130c.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:49 -02:00
Marton Nemeth e0d49e2d3a V4L/DVB (13192): gspca - pac_common: redesign function for finding Start Of Frame
The original implementation of pac_find_sof() does not always find
the Start Of Frame (SOF) marker. Replace it with a state machine
based design.

Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Marton Nemeth <nm127@freemail.hu>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:49 -02:00
Devin Heitmueller 760c466c66 V4L/DVB (13188): xc5000: return an error on tuning attempts if firmware not loaded
Xc5000 tuning attempts shouldn't return zero in the case where the firmware
did not load successfully.

Thanks to Michael Krufky for pointing out this issue.

Cc: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:48 -02:00
Devin Heitmueller 36a91879d8 V4L/DVB (13187): au8522: add support for saturation and hue controls
Add support for saturation/hue controls, prompted by errors showing up in
the mythbackend log.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:48 -02:00
Hans de Goede 6a540bdf01 V4L/DVB (13185): gspca: Don't resubmit error status URB's when suspending
gspca: Don't resubmit error status URB's when suspending

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:47 -02:00
Hans de Goede bf926adfbb V4L/DVB (13184): gspca: Don't forget to resubmit URB's in case of an error
The gscpa core was not resubmitting URB's when the URB status was an error,
this means we will loose URB's (potentially all stopping the stream) in
case of sporadic USB issues. I've seen this with an Aiptek stv0680 based
PenCam connected through an USB 2.0 hub.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:47 -02:00
Hans de Goede 21f1b932db V4L/DVB (13183): gspca: add stv0680 subdriver
This patch adds a new subdriver to gspca supporting cams with the stv0680
bridge (replacing the old in kernel v4l1 driver).

Many thanks to Hans Verkuil for providing me with one of the 2 cams used in
testing this new sub driver.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:47 -02:00
Hans de Goede 73997870c6 V4L/DVB (13182): gspca w9968cf: slight tweak to vstart and hstart
gspca w9968cf: slight tweak to vstart and hstart to get rid of black borders
in 640x480 mode.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:46 -02:00
Hans de Goede 79b359025d V4L/DVB (13181): gspca w9968cf: Add support for JPEG compression
gspca w9968cf: Add support for JPEG compression, this enables much higher
framerates at 320x240 / 352x288 and also allows for 640x480 mode for
cams which can do this. The w9968cf uses planar JPEG, which libv4l until
now did not support, so this requires atleast version 0.6.3 of libv4l.

And something important I forgot to mention in my earlier w9968cf commits:
Many thanks to Hans Verkuil for giving me a w9968cf based cam, which has
allowed me to develop the gspca w9968cf support.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:46 -02:00
Hans de Goede 8394bcf3fc V4L/DVB (13180): gspca-w9968cf: Don't add an extra packet to the buffer after the EOF
gspca-w9968cf: Don't add an extra packet to the buffer after the EOF,
this makes the frame data size bigger then it should be which makes
gstreamer discard it.

This patch also fixes an unrelated compiler warning.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:45 -02:00
Hans de Goede fb1f902060 V4L/DVB (13179): gspca_ov519: cache sensor regs to avoid unnecessary slow i2c reads / writes
Cache sensor regs to avoid unnecessary slow i2c reads / writes, this speeds
up sd_start a bit with most bridges and a lot (from 5 seconds down to 0.3
seconds) with W996xCF cams, as this avoids very slow bit bang IO over
USB i2c reads.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:45 -02:00
Hans de Goede a511ba9476 V4L/DVB (13178): gspca: Add support for Winbond W9967CF and W9968CF camera's
This patch adds support to gspca for the Winbond W9967CF and W9968CF
camera's. This is mostly a port of the existing v4l1 driver to gspca
(making it v4l2). But this also features fixes to the bitbanging i2c code
(send a nack not an ack after reading the last byte of a transfer), which
gets rid of the weird errors which were being seen there, and of
the smbus_refresh() hack to get around these errors.

Also the vstart settings have been tweaked to work with different
frequency filter settings.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:44 -02:00
Richard Röjfors eea85b0a62 V4L/DVB (13177): radio: Add support for TEF6862 tuner
This patch adds support for TEF6862 Car Radio Enhanced Selectivity Tuner.

It's implemented as a subdev, supporting checking signal strength
and setting and getting frequency.

Signed-off-by: Richard Röjfors <richard.rojfors@mocean-labs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:43 -02:00
Richard Röjfors 42752f7a3f V4L/DVB (13176): adv7180: Support checking standard via interrupts
If the I2C device provides an interrupt it is registered and the
standard
is updated via interrupts rather than polling.

Since I2C communication is needed, the interrupt handler fires off a
work which will check the new standard, and store it in the internal
structure.

To handle mutual exclusion a mutex is introduced.

Signed-off-by: Richard Röjfors <richard.rojfors@mocean-labs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:43 -02:00
Richard Röjfors 527aebf29c V4L/DVB (13175): adv7180: Use __devinit and __devexit macros
This patch defines the probe and remove function as __devinit and __devexit.

Signed-off-by: Richard Röjfors <richard.rojfors@mocean-labs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:42 -02:00
Richard Röjfors c277b60a08 V4L/DVB (13174): adv7180: Support for setting input status
Support for settings the input standard of the ADV7180.

When the input standard is set there is no use to ask the
chip for standard, therefore it is cached in the driver.

Signed-off-by: Richard Röjfors <richard.rojfors@mocean-labs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:42 -02:00
Richard Röjfors d31242943a V4L/DVB (13173): adv7180: Support for getting input status
This patch adds support to the ADV7180 driver to check the input
status.

Since the status is held in the same register as the input standard
a small restructuring of the code is done to reuse the code for
reading the register

Signed-off-by: Richard Röjfors <richard.rojfors@mocean-labs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:41 -02:00
Danny Wood e3c6e1aaa5 V4L/DVB (13168): Add support for Asus Europa Hybrid DVB-T card (SAA7134 SubVendor ID: 0x1043 Device ID: 0x4847)
Adds the device IDs and driver linking to allow the Asus Europa DVB-T
card to operate with these drivers.
The device has a SAA7134 chipset with a TD1316 Hybrid Tuner.
All inputs work on the card including switching between DVB-T and
Analogue TV, there is also no IR with this card.

[mchehab@redhat.com: CodingStyle fixes]

Signed-off-by: Danny Wood <danwood76@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:41 -02:00
Julia Lawall e6a1a08f00 V4L/DVB (13166): remove duplicate structure field initialization
The definition of tvaudio_tuner_ops initializes the s_tuner field twice.
It appears that the second case should initialize the g_tuner field.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier I, s, fld;
position p0,p;
expression E;
@@

struct I s =@p0 { ... .fld@p = E, ...};

@s@
identifier I, s, r.fld;
position r.p0,p;
expression E;
@@

struct I s =@p0 { ... .fld@p = E, ...};

@script:python@
p0 << r.p0;
fld << r.fld;
ps << s.p;
pr << r.p;
@@

if int(ps[0].line)!=int(pr[0].line) or int(ps[0].column)!=int(pr[0].column):
  cocci.print_main(fld,p0)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:40 -02:00
Tuukka Toivonen 7cbefad085 V4L/DVB (13165): videobuf do not force buffer size to be multiple of PAGE_SIZE
When the image size (bytesperline*height) is not multiple
of PAGE_SIZE, v4l2 rounded the required buffer size to
be multiple of PAGE_SIZE. This prevented user space
to store images directly into userptr buffers which were
not multiple of PAGE_SIZE. This constraint is removed.

The start address is still assumed to be required
page-aligned, ie., when v4l2 allocates mmap buffers,
the offset between different buffers is page-aligned.

Signed-off-by: Tuukka Toivonen <tuukka.o.toivonen@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:40 -02:00
Mauro Carvalho Chehab 06d3a396b2 V4L/DVB (13157): dvb_frontend: represent all DVBS2API commands via macro
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:37 -02:00
Laurent Pinchart b232a012ad V4L/DVB (13155): uvcvideo: Add a module parameter to set the streaming control timeout
The default streaming control timeout was found by Ondrej Zary to be too low
for some Logitech webcams. With kernel 2.6.22 and newer they would timeout
during initialization unles the audio function was initialized before the
video function.

Add a module parameter to set the streaming control timeout and increase the
default value from 1000ms to 3000ms to fix the above problem.

Thanks to Ondrej Zary for investigating the issue and providing an initial
patch.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:37 -02:00
Laurent Pinchart c4ed8c66d7 V4L/DVB (13154): uvcvideo: Handle garbage at the end of streaming interface descriptors
At least one 5986:0241 webcam model includes vendor-specific descriptors
at the end of its streaming interface descriptors. Print an information
UVC_TRACE_DESCR message and try to continue parsing the descriptors
rather than bailing out with an error.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:36 -02:00
Ming Lei fd1b6bbb4a V4L/DVB (13153): uvcvideo: Fix uvc_alloc_urb_buffers()
This patch sets stream->urb_size as psize*npackets
before calling uvc_alloc_urb_buffers, which may fix
a possible failure of usb_buffer_free in case usb_buffer_alloc
returns NULL. The patch is based on the ideas below:

1,If usb_buffer_alloc can't allocate a buffer sucessfully,
uvc_free_urb_buffers will be called to free the allocated
buffers, and stream->urb_size is required to be passed to
usb_buffer_free;

2,uvc_free_urb_buffers can reset stream->urb_size.

This patch is against linux-v2.6.31-next-20090926.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:36 -02:00
Laurent Pinchart 716fdee110 V4L/DVB (13152): uvcvideo: Rely on videodev to reference-count the device
The uvcvideo driver has a driver-wide lock and a reference count to protect
against a disconnect/open race. Now that videodev handles the race itself,
reference-counting in the driver can be removed.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:36 -02:00
Laurent Pinchart 1a969d9863 V4L/DVB (13151): uvcvideo: Dismiss privileges when freeing video buffers
Dismiss privileges on the file handle when calling VIDIOC_REQBUFS with a
buffer count of 0. This allows applications to release the streaming
permissions on the file handle without closing it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:35 -02:00
Laurent Pinchart 4e7387858f V4L/DVB (13150): uvcvideo: Don't acquire privileges in VIDIOC_TRY_FMT
The VIDIOC_TRY_FMT ioctl doesn't interfere with video streaming and thus
should succeed on an unprivileged file handle.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:35 -02:00
Laurent Pinchart 663a419203 V4L/DVB (13149): uvcvideo: Add a new UVC_TRACE_VIDEO trace level
Use the trace level for messages related to video URB buffers allocation and
alternate setting selection.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:34 -02:00
Laurent Pinchart f4eabafeb3 V4L/DVB (13148): uvcvideo: Handle V4L2_CTRL_TYPE_BUTTON control type in VIDIOC_QUERYCTRL
Return minimum, maximum and step set to 0 without querying the hardware.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:34 -02:00
Hans de Goede ebbb5c3e0e V4L/DVB (13146): gspca_ov519: cleanup sensor handling
There were various "if (sensor == foo)" pieces of code inside ov519.c,
move these bits to the sensor specific init functions, where they
belong.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:34 -02:00
Hans de Goede b46aaa0264 V4L/DVB (13145): gscpa_ov519: add support for the ovfx2 bridge
gscpa_ov519: add support for the ovfx2 bridge

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:33 -02:00
Hans de Goede 635118d5b1 V4L/DVB (13144): gspca_ov519: Add support for OV2610 and OV3610 sensors
This patch adds support for the OV2610 and OV3610 sensors to the gspca
ov519 subdriver. This is a preparation patch for adding ovfx2 bridge
support.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:32 -02:00
Hans de Goede 229bb7dc51 V4L/DVB (13143): gspca_ov519 cleanup sensor detection
gspca_ov519 cleanup sensor detection

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:32 -02:00
Hans de Goede d76f975c57 V4L/DVB (13142): gspca_mr97310a: small tweak to CIF sensor type 1 exposure setting
The CIF sensor type 1 exposure setting got clamped at 300, as settings below
300 do not work well (and do work for the other sensors). This patch
scales the 0-4095 range to 300-4095 instead of ignoring changes between
300, avoiding have a part of the control range where nothing happens.

This is esp. important for software autogain as done by libv4l.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:32 -02:00
Hans de Goede 205260102c V4L/DVB (13141): gspca_sq905c: once one frame is discarded it keeps discarding all frames
While checking all gspca sub drivers pkt_scan functions for a bug I found in
1 of them (and after checking also in another), I noticed a bug in the
gspca_sq905c work queue function, once it has decided to start discarding a
frame because the application is not reading fast enough (and thus returning
buffers to fill fast enough), it never stops discarding.

This patch fixes this by simply completely removing the "discarding"
variable, if we need to discard the current frame because there is no buffer
to store it, the "frame" pointer will be NULL, so that is all we need to
check.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:31 -02:00
Hans de Goede 6ca3f255f7 V4L/DVB (13140): gspca_jeilinj: once one frame is discarded it keeps discarding all frames
While checking all gspca sub drivers pkt_scan functions for a bug I found in
1 of them (and after checking also in another), I noticed a bug in the
gspca_jeilinj work queue function, once it has decided to start discard a
frame because the application is not reading fast enough (and thus returning
buffers to fill fast enough), it never stops discarding.

This patch fixes this by simply completely removing the "discarding"
variable, if we need to discard the current frame because there is no buffer
to store it, the "frame" pointer will be NULL, so that is all we need to
check.

I've also moved the gspca_get_i_frame() call and the writing of the jpg
header to the buffer to after the first usb_bulk_msg() call, as we don't
need it before that, and that will give the app slightly more time to
queue a buffer for us to fill.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:31 -02:00
Theodore Kilgore b3e440eef8 V4L/DVB (13139): gspca_mr97310a: Improve VGA sensor type detection
Improve (and also simplify :) gspca_mr97310a: VGA sensor type detection.
As it was still failing on some machines (not with some cams, but on
some machines interesting enough).

Signed-off-by: Theodore Kilgore <kilgota@banach.math.auburn.edu>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:30 -02:00
Hans de Goede 8519110040 V4L/DVB (13138): gspca_sq905: cleanup sq905_dostream
-Remove use of unneeded discarding variable
-Cleanup locking to only take usb_lock around access to the control
 endpoint, by no longer taking the lock around the bulk transfer
 (which takes most of the time) we can remove the msleep(1) which was
 needed to give the gspca core a chance to grab the usb_lock to signal
 us to stop.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:30 -02:00
Theodore Kilgore 930bf78c20 V4L/DVB (13137): gspca_mr97310a: Add controls for vga cams with sensor type 0
This patch adds controls for vga cams with sensor type 0, in order to
correctly report the present controls, the probing of the sensor type
has been moved from sd_start to sd_config, since this made the sensor
type probing unreliable the detection method was changed.

Note this requires the camera to enter streaming mode, so sd_config now
briefly makes the camera stream.

Signed-off-by: Theodore Kilgore <kilgota@banach.math.auburn.edu>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:30 -02:00
Igor M. Liplianin 9d2ba7ad80 V4L/DVB (13135): Add support for TeVii remotes
The patch brings infrared remote support for some cx88 based cards.
Such as TeVii S460,S420.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:29 -02:00
Igor M. Liplianin d8d8622552 V4L/DVB (13134): Add support for TBS-likes remotes
The patch brings infrared remote support for some cx88 based cards.
Such as:
TeVii S460,S420; Omicom SS4; SatTrade ST4200;
TBS 8920,8910; Prof 7300,6200.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:29 -02:00
Guennadi Liakhovetski 8f37cf25ba V4L/DVB (13130): soc-camera: add a new driver for the RJ54N1CB0C camera sensor from Sharp
This adds an soc-camera / v4l2-subdev driver for the RJ54N1CB0C CMOS camera
sensor from Sharp. The sensor is very picky about initialisation and
configuration sequences. The driver limits artificially maximum window size by
800x600, although the sensor supports 1600x1200. Sizes above 800x600 don't seem
to work correctly, besides, examples from the system integrator use sizes above
640x480 only for still photography. Unfortunately, I had to use "magic"
register-value pairs for undocumented and "reserved" registers. This version of
the driver also omits some functionality, like cropping, which hasn't been
sufficiently tested yet and will be added later.

 create mode 100644 drivers/media/video/rj54n1cb0c.c

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:28 -02:00
Kuninori Morimoto 5cf93f1dca V4L/DVB (13128): sh_mobile_ceu_camera: add VBP error support
If CEU driver can not receive data from camera,
CETCR has VBP error state.
Then, CEU is stopped and cure operation is needed.
This patch add VBP error cure operation.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:28 -02:00
Kuninori Morimoto b1de7aeba1 V4L/DVB (13127): sh_mobile_ceu: add soft reset function
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:27 -02:00
Marton Nemeth 56f6f5582f V4L/DVB (13121): gspca - pac7311: add comment about JPEG header
Add comment about the meaning of the fixed JPEG header bytes used to
create each image.

Signed-off-by: Marton Nemeth <nm127@freemail.hu>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:27 -02:00
Marton Nemeth 4fc8b64823 V4L/DVB (13120): gspca - pac7311: remove redundant register page switching
Remove redundant register page switching to page 0 when changing the
color control.

Signed-off-by: Marton Nemeth <nm127@freemail.hu>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:27 -02:00
Marton Nemeth 24067bb552 V4L/DVB (13119): gspca - pac7311: remove magic value for USB_BUF_SZ
The length check in reg_w_var() function is because the buffer contents
is copied to gspca_dev->usb_buf which has the size of USB_BUF_SZ bytes as
defined in drivers/media/video/gspca/gspca.h. Replace the number with
symbol for better readability and maintainability.

Signed-off-by: Marton Nemeth <nm127@freemail.hu>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:26 -02:00
Marton Nemeth 5a2e8d9fc1 V4L/DVB (13118): gspca - pac7311: remove magic values for END_OF_SEQUENCE and LOAD_PAGE.
Change the magic values 0, 254 and 255 to END_OF_SEQUENCE, LOAD_PAGE4 and
LOAD_PAGE3 respectively for better source code readability.

Signed-off-by: Marton Nemeth <nm127@freemail.hu>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:26 -02:00
Marton Nemeth ff75e99c62 V4L/DVB (13117): gspca - pac7311: remove magic value for SKIP.
Change the magic value 0xaa to SKIP for better understandability.

Signed-off-by: Marton Nemeth <nm127@freemail.hu>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:25 -02:00
Rafal Milecki 518c8df77c V4L/DVB (13116): gspca - ov519: Webcam 041e:4067 added.
Signed-off-by: Rafal Milecki <zajec5@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:25 -02:00
Jean-Francois Moine 0d07e240c5 V4L/DVB (13115): gspca - main: More information messages.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:25 -02:00
Jean-Francois Moine 1d76331ddb V4L/DVB (13114): gspca - zc3xx.c: Bad init sequences of sensor cs2102.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:24 -02:00
Michael Krufky c0faeee5a3 V4L/DVB (13112): tda18271: display some state information in debug output
Display i2c adapter id, address and master / slave role in debug output.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:24 -02:00
Michael Krufky 3a6b49fef6 V4L/DVB (13111): tda18271: more signedness fixes
Convert tda18271_rf_tracking_filter_cal.rf_[ab][12] from int to s32.
Convert tda18271_priv.tm_rfcal from unsigned int to u8.
Cast subtractions between u32 values as s32.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:23 -02:00
Michael Krufky 3986bd116f V4L/DVB (13110): tda18271: use temporary variables in tda18271_rf_tracking_filters_init
Use temporary variables for signed calulations between unsigned values

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:23 -02:00
Henk Vergonet b450b92e16 V4L/DVB (13108): tda8290: enable deemphasis_50 module parameter
This adds a forgotten module_param macro needed to set a deemphasis of 50us.
It is the standard setting for commercial FM radio broadcasts outside the US.

Signed-off-by: Henk Vergonet <Henk.Vergonet@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:23 -02:00
Michael Krufky 94d983143e V4L/DVB (13105): dvb-usb: add fe_ioctl_override callback to dvb_usb_adapter_properties
Allow dvb-usb adapter drivers to specify a fe_ioctl_override callback
to enable device-specific handling of DVB frontend operations.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:22 -02:00
Michael Krufky 5bdd39621e V4L/DVB (13104): cx23885: define a dvb frontend ioctl override function
override set_frontend to allow rf input path switching on the HVR1275

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:22 -02:00
Michael Krufky 9133aee09e V4L/DVB (13103): create a standard method for dvb adapter drivers to override frontend ioctls
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:21 -02:00
Andy Walls dbda8f701a V4L/DVB (13100): cx23885: Add IR input keypress handling and enable for the HVR-1850
This changes adds IR Rx keypress input event handling to the CX23885 module.
This change specifically only adds input handling for IR devices implemented as
v4l2_subdevices, using only the pulse width mode (for now), and only with
RC-5 remotes.  The V4L-DVB infrastructure is missing too much to support RC-6
mode 6A as used in many media center remotes.   The grey Hauppauge RC-5 remote
and HVR-1850 IR receiver work now.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:21 -02:00
Andy Walls 1d23a00243 V4L/DVB (13099): ir-functions: Export ir_rc5_decode() for use by the cx23885 module
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:21 -02:00
Andy Walls f59ad611ac V4L/DVB (13098): cx23885: Add integrated IR subdevice interrupt and notification handling
Add integrated IR subdevice interrupt and notification handling.  This is in
preparation of input keypress handling changes for the cx23885 module.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:20 -02:00
Andy Walls 1a0b9d89c6 V4L/DVB (13097): cx23885: Complete CX23888 IR subdev implementation for Rx & almost for Tx
This change completes the v4l2_subdev implementation for IR receive for the
IR controller built into the CX23888.

This changes almost completes the IR transmit side also, but doesn't.  Instead
notes in the comments describe what needs to be done for IR Tx to work in the
subdevice implementation.

The current Tx behavior is skeletal and benign.  If left alone, it does nothing.
It will only ever generate a Tx interrupt on Tx init by a caller or when the
tx_write() method is called.  The ISR, when called, will then disable the Tx
FIFO service interrupt.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:20 -02:00
Steven Toth 8c2d7821d4 V4L/DVB (13092): cx25840: Improvements to the cx23885/7/8 chip detection mechanism.
The prior mechanism wasn't reliable with the cx23887. This new mechanism
tests correctly against cx23885, 7 and 8 based products.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:19 -02:00
Andy Walls c6b7053bbc V4L/DVB (13091): cx23885: Enable HVR-1850 CX23888 A/V core to get VID_CLK running for IR
For the IR controller on the CX23888 to work for the HVR-1850 and in
general, the A/V core must be initialized to get the VID_CLK going.
The VID_CLK is the timing reference for the CX23888's integrated
IR controller.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:18 -02:00
Andy Walls e283d78083 V4L/DVB (13090): cx25840: Init PLLs properly for CX2388[578] A/V cores
The SYS and AUX PLLs need to be initialized to different values based on
the chip: CX23885, CX23887, CX23888, as each uses a different crystal
frequency: 28.6363 MHz, 25.0 MHz, 50.0 MHz.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:18 -02:00
Andy Walls 9eef550a9a V4L/DVB (13089): cx25840: Separate set_audclk_freq functionality for the different chips
Separate out the set_audclk_freq() function into separate functions for the
four families of cores.  These cores all use slightly different sample clock
schemes and may be assuming slightly (+/- 3 Hz) different reference frequencies.
The code resuse was not worth the maintenance and testing headache of have all
chips use the same function peppered with conditional logic.

Added comments on how PLL and SRC parameters values are computed.  Fixed a few
bugs related to the shared code having a large number of conditional statements.
Noted inconsistencies with FIXME in the comments.

This is done in preparation for getting the CX2388[578] PLL/clock setting logic
cleaned up for CX23888 analog video and IR (which need the VID PLL set right).

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:18 -02:00
Andy Walls 2a03f03471 V4L/DVB (13088): cx25840: Convert chip/core family checks to static inline functions
Change logic to check for various chip or core families to inline functions.
Checks for specific chips should be made against the state->id field now.  This
is in preparation for chip/core specific code for setting up PLLs for the
CX2388[578] family of cores, that all run with different crystal frequencies.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:17 -02:00
Andy Walls c7dd1ecdc0 V4L/DVB (13087): cx25840: Improve detection of CX2388[578] A/V cores
Add improved logic to detect the exact CX2388[578] A/V core that is being
probed.  Also cleaned up detection and logging for CX2310[12], CX2583[67],
and CX2584[0123] cores and chips.

Also added code to identify a CX2388[578] A/V decoder core that is not
responding properly.  Typical symptoms include registers 0x00-0xff
responding properly but all other registers returning the same value
(0x13 and 0x5 have been observed).  This state will cause proper detection of
'885 vs. '887 vs. '888 to fail and the chip won't respond to get configured
properly anyway.  I have no method of reseting the core to a working state at
this time; but I didn't try too hard to work one out either.  The problem
likely only occurs in development.  I suspect configuring the SYS PLL VCO to
oscillate too slowly (286.3 MHz?) before post divide may be the root cause,
when encountered.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:17 -02:00
Andy Walls 29f8a0a50a V4L/DVB (13086): cx23885: Add skeleton v4l2_subdev for the CX23888 integrated IR controller
This change adds a skeletal implementation of a v4l2_subdevice to provide
encapsulation and abstraction of the CX23888's integrated consumer infrared
controller.  This change also instantiates the cx23888_ir subdev for the
HVR-1850 which has IR hardware physically wired up to a CX23888.

The cx23888_ir subdev code is being written with long-term objectives to:
1. port it to the cx25840 module for the CX2584x, CX2583x, CX23885, & CX231xx
   IR controllers
2. possibly port it to the cx18 module for the CX23418 IR controller
3. have the IR subdevice accessed abstractly in the cx23885 module, so the
   driver can ignore the difference between the CX23885 and CX23888.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:16 -02:00
Andy Walls 7461824400 V4L/DVB (13085): cx23885: Fix support for v4l2-dbg access to CX2388[578] and CX23417 regs
This changes corrects the ioctl() operations for both the CX2388[578] analog
video and MPEG video device nodes to properly and consistently support
VIDIOC_G_CHIP_IDENT, VIDIOC_DBG_G_REGISTER and VIDIOC_DBG_S_REGISTER ioctl()s.

This caused some ioctl() support routines to be broken out into a separate
source file.

Now v4l2-dbg can be used to manipulate CX2388[578] and CX23417 registers
including the CX2388[57] functions handled by the cx25840 module.

This was done in anticipation of developing a new v4l2_subdev for the
integrated IR controller of the CX23888.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:16 -02:00
Devin Heitmueller 2e3c4723d5 V4L/DVB (13082): em28xx: remove "not validated" status from Terratec Cinergy T XS (005e)
The board support has been validated by the user, so get rid of the warning
that shows up on board load.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:15 -02:00
Devin Heitmueller 2a0d056015 V4L/DVB (13081): saa7134: use the #define for the xc5000 radio_input field
Dmitri's patch for the Behold X7 didn't use the #define I had setup for
XC5000_RADIO_FM1, so cut over to using that instead of "1".

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:15 -02:00
Beholder Intl. Ltd. Dmitry Belimov 2930992c40 V4L/DVB (13080): saa7134: add support for the digital side of the Behold X7
Add support for the digital side of the Behold X7

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:14 -02:00
Uroš Vampl ec994d0505 V4L/DVB (13078): em28xx: fix support for Terratec Cinergy T XS (005e)
Make analog audio, dvb and the remote work on a Terratec Cinergy Hybrid
XS (em2882).

Note by djh: Thanks go out fo Andrej Suligoi for his contribution in providing
and testing pretty much the exact same patch as provided by Uros.  Between
the two of them, they got all the core functionality working for the device.

Cc: Andrej Suligoi <suligoi@gmail.com>
Signed-off-by: Uroš Vampl <mobile.leecher@gmail.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:14 -02:00
Devin Heitmueller f91cb65b94 V4L/DVB (13077): em28xx: Add support for new variant of KWorld 2800d
Seems that the reference design used for the KWorld 2800d switched from the
em2860 to em2862, so we need to add the new USB id (and the i2c hash remains
so all we need is the default em2862 id.

Thanks to Ian Young for reporting the issue and testing the fix.

Cc: Ian Young <ian@duffrecords.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:14 -02:00
Devin Heitmueller 496e9057ad V4L/DVB (13076): xc5000: make the definition of the FM input part of the xc5000 config struct
Remove hard-coded definition of the xc5000 FM radio input, making it a
parameter passed in when doing the attach call.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:13 -02:00
Beholder Intl. Ltd. Dmitry Belimov d7009cdc28 V4L/DVB (13075): xc5000: add FM radio support
Add FM radio for the xc5000 silicon tuner chip.

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:13 -02:00
David Ellingsworth 798166dbec V4L/DVB (13073): radio-mr800: set radio frequency only upon success
Set radio frequency only upon success.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:12 -02:00
David Ellingsworth 16a72f41bb V4L/DVB (13072): radio-mr800: simplify device warnings
Simplify device warnings.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:12 -02:00
David Ellingsworth d8970e5fd9 V4L/DVB (13071): radio-mr800: preserve radio state during suspend/resume
Preserve radio state during suspend/resume.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:11 -02:00
David Ellingsworth 30dd4508b9 V4L/DVB (13070): radio-mr800: fix behavior of set_stereo function
Fix behavior of set_stereo function.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:11 -02:00
David Ellingsworth 502d50166c V4L/DVB (13069): radio-mr800: ensure the radio is initialized to a consistent state
Ensure the radio is initialized to a consistent state.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:11 -02:00
David Ellingsworth 8a7cd16f1f V4L/DVB (13068): radio-mr800: remove device initialization from open/close
Remove device initialization from open/close.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:10 -02:00
David Ellingsworth 4e3616576e V4L/DVB (13067): radio-mr800: fix potential use after free
Fix portential use after free.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:10 -02:00
David Ellingsworth 26452bfef4 V4L/DVB (13066): radio-mr800: remove device removed indicator
Remove device removed indicator

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:09 -02:00
David Ellingsworth eac000a90e V4L/DVB (13065): radio-mr800: simplify locking in ioctl callbacks
Simplify locking in ioctl callbacks.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:09 -02:00
David Ellingsworth ceb99e1b5a V4L/DVB (13064): radio-mr800: simplify access to amradio_device
Simplify access to amradio_device.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:09 -02:00
David Ellingsworth d1939e4c5f V4L/DVB (13063): radio-mr800: remove unnecessary local variable
Remove unnecessary local variable.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:08 -02:00
David Ellingsworth 1b8bbb3c0a V4L/DVB (13062): radio-mr800: simplify error paths in usb probe callback
Simplify error paths in usb probe callback.

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:08 -02:00
David Ellingsworth 7a7d92e061 V4L/DVB (13061): radio-mr800: simplify video_device allocation
simplify video_device allocation

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:07 -02:00
David Ellingsworth 4aebc2893e V4L/DVB (13060): radio-mr800: implement proper locking
Implement proper locking

Signed-off-by: David Ellingsworth <david@identd.dyndns.org>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:07 -02:00
Antti Palosaari 0f01721256 V4L/DVB (13058): af9015: enable remote polling when eeprom contains 0x04
Looks like eeprom IR mode byte value 0x04 means there is remote
which should be polled. Patch enables polling also in case of 0x04.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:06 -02:00
Antti Palosaari e1a7ff84a4 V4L/DVB (13057): af9015: add MSI DIGIVOX mini III remote
Support for MSI DIGIVOX mini III remote.
Thanks to Aleksandr V. Piskunov <aleksandr.v.piskunov@gmail.com>
Thanks to Roman <lists@hasnoname.de>

Cc: Aleksandr V. Piskunov <aleksandr.v.piskunov@gmail.com>
Cc: Roman <lists@hasnoname.de>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:06 -02:00
Antti Palosaari 641342dde7 V4L/DVB (13056): af9015: add LeadTek Y04G0051 remote buttons
Add missing LeadTek Y04G0051 remote buttons.
Thanks to Matthew Skinner <matt@pcmus.com>

Cc: Matthew Skinner <matt@pcmus.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:06 -02:00
Antti Palosaari 0254294f37 V4L/DVB (13055): af9015: fix few typos
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:05 -02:00
Antti Palosaari 486ba12b7a V4L/DVB (13054): af9015: add USB ID for KWorld PlusTV DVB-T PCI Pro Card (DVB-T PC160-T)
Add USB ID 1b80:c161 for KWorld PlusTV DVB-T PCI Pro Card (DVB-T PC160-T).
Thanks to Andrew Cruickshank <atcrank@gmail.com> for reporting this.

Cc: Andrew Cruickshank <atcrank@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:05 -02:00
S?rgio Fortier 8a378e8543 V4L/DVB (13052): DiB0700: EvolutePC TvWay+ USB ISDB-Tb fullseg device support
Patch for EvolutePC TvWay+ USB ISDB-Tb fullseg device support.

Signed-off-by: S?rgio C Fortier <sergiofortier@yahoo.com.br>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:04 -02:00
Olivier Grenie eac1fe1050 V4L/DVB (13051): DiB7000P: improve rebostness of HAS_LOCK indicator
Update the dib7000p:
The status is HAS_LOCK only if the demod is able to decode the TPS. Sometimes, there is a TPS data lock, even if the demod is not able to decode it (ex: no RF signal).
For the STK7770P: correct value for the charge pump

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:04 -02:00
Olivier Grenie f8731f4dde V4L/DVB (13049): dib8000: SNR in 10th of dB
dib7000p/dib8000: added pid filtering

dib8000: the SNR is in 10th of dB (not in dB)
dib7000p and dib8000: added the pid filtering. This feature is enabled by module option (dvb-usb module).

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:03 -02:00
Igor M. Liplianin 8171c2059c V4L/DVB (13045): Fix debug messaging for stv0900 demod.
Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:03 -02:00
Mauro Carvalho Chehab 61b1e58f0e V4L/DVB (13044): dib0700: Be less verbose when an IR key is pressed
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:03 -02:00
Mauro Carvalho Chehab 4c5128b30d V4L/DVB (13043): Add support for Pixelview SBTVD IR
This IR uses NEC protocol. In order to use, dvb_usb_dib0700_ir_proto=0
should be used.

Cc: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:02 -02:00
Mauro Carvalho Chehab aa15c0a347 V4L/DVB (13042): Add NEC protocol to firmware v1.2 handler
Currently, dvb_usb_dib0700_ir_proto is supported only with firmwares
older than 1.2. Adds support for it also with the newer firmware.

This is needed in order to support PixelView SBTVD IR.

Cc: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:02 -02:00
Marek Vasut 8d64827172 V4L/DVB (13040): V4L2: Add a v4l2-subdev (soc-camera) driver for OmniVision OV9640 sensor
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:01 -02:00
Adam Buchbinder 6070d81eb5 tree-wide: fix misspelling of "definition" in comments
"Definition" is misspelled "defintion" in several comments; this
patch fixes them. No code changes.

Signed-off-by: Adam Buchbinder <adam.buchbinder@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-12-04 23:41:47 +01:00
Takashi Iwai 57648cd52b Merge branch 'topic/misc' into for-linus 2009-12-04 16:22:37 +01:00
André Goddard Rosa af901ca181 tree-wide: fix assorted typos all over the place
That is "success", "unknown", "through", "performance", "[re|un]mapping"
, "access", "default", "reasonable", "[con]currently", "temperature"
, "channel", "[un]used", "application", "example","hierarchy", "therefore"
, "[over|under]flow", "contiguous", "threshold", "enough" and others.

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-12-04 15:39:55 +01:00
Andrew Morton 4c4cb1b160 drivers/media/dvb/dvb-core/dvb_frontend.c: needs semaphore.h
Fixes:

  v4l/dvb_frontend.c: In function 'dvb_frontend_stop':
  v4l/dvb_frontend.c:707: error: implicit declaration of function 'init_MUTEX'

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=14609

Reported-by: <tstrelar@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-01 16:32:19 -08:00
Alan Cox 361c95119a V4L/DVB (13530): Fix wrong parameter order in memset
Edwin Török found the following:

In function ‘memset’,
inlined from ‘ir_input_init’ at drivers/media/common/ir-functions.c:67:
/home/edwin/builds/linux-2.6/arch/x86/include/asm/string_64.h:61:
warning: call to ‘__warn_memset_zero_len’ declared with attribute
warning: memset used with constant zero length parameter; this could be
due to transposed parameters
memset(ir->ir_codes, sizeof(ir->ir_codes), 0);

In actual practice the only caller I can find happens to already have cleared
the buffer before calling ir_input_init.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-27 18:50:43 -02:00
Hans Verkuil 9807362e47 V4L/DVB (13481): sh_mobile_ceu_camera: fix compile warning
Trivial fix for this compile warning:

v4l/sh_mobile_ceu_camera.c:1789: warning: label 'exit_free_irq' defined but not used

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-27 18:27:49 -02:00
Robert Lowery 0bc3518019 V4L/DVB (13436): cxusb: Fix hang on DViCO FusionHDTV DVB-T Dual Digital 4 (rev 1)
Address yet another regression introduced by the introduction of the zl10353
disable_i2c_gate field.

djh - I unmangled the patch which apparently got screwed up in the user's
email client.

Signed-off-by: Robert Lowery <rglowery@exemail.com.au>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
CC: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-27 18:27:48 -02:00
Geert Uytterhoeven d02b217a71 V4L/DVB (13412): SMS_SIANO_MDTV should depend on HAS_DMA
When building for Sun 3:

drivers/built-in.o: In function `smscore_unregister_device':
drivers/media/dvb/siano/smscoreapi.c:723: undefined reference to `dma_free_coherent'
drivers/built-in.o: In function `smscore_register_device':
drivers/media/dvb/siano/smscoreapi.c:365: undefined reference to `dma_alloc_coherent'

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-27 18:27:46 -02:00
Krzysztof Helt 8366fc3908 media/radio: New driver for the radio FM module on Miro PCM20 sound card
This is recreated driver for the FM module found on Miro
PCM20 sound cards. This driver was removed around the 2.6.2x
kernels because it relied on the removed OSS module. Now, it
uses a current ALSA module (snd-miro) and is adapted to v4l2
layer.

It provides only basic functionality: frequency changing and
FM module muting.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-27 13:26:23 +01:00
Hans Verkuil 934949d816 V4L/DVB (13371): davinci: remove stray duplicate config pointer
The vpif_config struct was renamed to vpif_display_config, but there
is still a stray vpif_config *config pointer in vpif_display.c, preventing
it from compiling.

Remove this old duplicate pointer.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-26 19:38:04 -02:00
Antti Palosaari 28f4ddd1e8 V4L/DVB (13366): em28xx: fix Reddo DVB-C USB TV Box GPIO
Set device GPIOs only once. There is no need for .dvb_gpio to select
between analog and digital because device is digital only.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-26 19:38:03 -02:00
Kuninori Morimoto 055e05a08b V4L/DVB (13345): soc-camera: sh_mobile_ceu_camera: call pm_runtime_disable
pm_runtime_disable is needed if it failed or removed

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-26 19:38:03 -02:00
Guennadi Liakhovetski 64ff9ba5f1 V4L/DVB (13344): soc-camera: properly initialise the device object when reusing
Commit ef373189f62413803b7b816c972fc154c488cdc0 "fix use-after-free Oops,
resulting from a driver-core API change" fixed the Oops, but didn't correct
missing device object initialisation. This patch makes unloading and reloading
of soc-camera host- and client-drivers possible again.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-26 19:38:02 -02:00
Guennadi Liakhovetski f39c1ab3c3 V4L/DVB (13343): v4l: add more missing linux/sched.h includes
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-26 19:38:02 -02:00
Hans Verkuil 3addbb8075 V4L/DVB (13321): radio-gemtek-pci: fix double mutex_lock
Double mutexlock found by the Linux Driver Verification project and
reported by Alexander Strakh.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
CC: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-26 19:38:01 -02:00
Peter Huewe 9d440a087b media/video: add __init/__exit macros to various drivers
Trivial patch which adds the __init/__exit macros to the module_init/
module_exit functions of the following drivers in media video:
    drivers/media/video/ivtv/ivtv-driver.c
    drivers/media/video/cx18/cx18-driver.c
    drivers/media/video/davinci/dm355_ccdc.c
    drivers/media/video/davinci/dm644x_ccdc.c
    drivers/media/video/saa7164/saa7164-core.c
    drivers/media/video/saa7134/saa7134-core.c
    drivers/media/video/cx23885/cx23885-core.c

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Acked-by: Andy Walls <awalls@radix.net>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Acked-By: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-11-09 09:40:58 +01:00
Uwe Kleine-König 21ae2956ce tree-wide: fix typos "aquire" -> "acquire", "cumsumed" -> "consumed"
This patch was generated by

	git grep -E -i -l '[Aa]quire' | xargs -r perl -p -i -e 's/([Aa])quire/$1cquire/'

and the cumsumed was found by checking the diff for aquire.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-11-09 09:40:57 +01:00
Uwe Kleine-König b71a8eb0fa tree-wide: fix typos "selct" + "slect" -> "select"
This patch was generated by

	git grep -E -i -l 's(le|el)ct' | xargs -r perl -p -i -e 's/([Ss])(le|el)ct/$1elect/

with only skipping net/netfilter/xt_SECMARK.c and
include/linux/netfilter/xt_SECMARK.h which have a struct member called
selctx.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-11-09 09:40:56 +01:00
Dirk Hohndel 06fe9fb418 tree-wide: fix a very frequent spelling mistake
something-bility is spelled as something-blity
so a grep for 'blit' would find these lines

this is so trivial that I didn't split it by subsystem / copy
additional maintainers - all changes are to comments
The only purpose is to get fewer false positives when grepping
around the kernel sources.

Signed-off-by: Dirk Hohndel <hohndel@infradead.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-11-09 09:40:54 +01:00
Michael Krufky 22370ef503 V4L/DVB (13314): saa7134: set ts_force_val for the Hauppauge WinTV HVR-1150
The Hauppauge WinTV HVR-1150 retail boards require the FORCE_TS_VALID bit
to be set in order to function properly. This change will work on the early
revisions on the board as well, but the final revision will not function
without this change.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:15 -02:00
Michael Krufky 4007a672ab V4L/DVB (13313): saa7134: add support for FORCE_TS_VALID mode for mpeg ts input
When FORCE_TS_VALID mode is enabled, the saa713x will accept MPEG TS input
without requiring TS_VALID set high.  This is required for some new boards
to function properly, due to the hardware design implementation.

The configuration is toggled within the board setup configuration.  Boards
that do not have this bit set will function as before with no change.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:15 -02:00
Laurent Pinchart 2e8961330e V4L/DVB (13311): uvcvideo: Fix compilation warning with 2.6.32 due to type mismatch with abs()
The abs() macro has changed in 2.6.32 and returns a long instead of an
int. Fix the driver to avoid compilation warnings.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:14 -02:00
Laurent Pinchart a2e35af6c7 V4L/DVB (13309): uvcvideo: Ignore the FIX_BANDWIDTH for compressed video
The FIX_BANDWIDTH quirk tries to work around cameras requesting the
maximum bandwidth regardless of the image size by computing a bandwidth
estimate. This works only for uncompressed frames.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:14 -02:00
Jean Delvare 7157fbd0ed V4L/DVB (13287): ce6230 - saa7164-cmd: Fix wrong sizeof
Which is why I have always preferred sizeof(struct foo) over
sizeof(var).

Cc: Antti Palosaari <crope@iki.fi>
Acked-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:13 -02:00
Jonathan Cameron d514edac5d V4L/DVB (13286): pxa-camera: Fix missing sched.h
Required for wakeup call.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:13 -02:00
Theodore Kilgore 32345b0596 V4L/DVB (13264): gspca_mr97310a: Change vstart for CIF sensor type 1 cams
gspca_mr97310a: Change vstart for CIF sensor type 1 cams

This fixes the distortion at the end of the frame, and avoids the bad frame
dropping done because of this distortion, trippling the framerate!

Signed-off-by: Theodore Kilgore <kilgota@banach.math.auburn.edu>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:12 -02:00
Erik Andrén 81191f694c V4L/DVB (13257): gspca - m5602-s5k4aa: Add vflip for Fujitsu Amilo Xi 2528
Adds a vflip quirk for the Fujitsu Amilo Xi 2528. Thanks to Evgeny for the report.

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:12 -02:00
Erik Andrén 2339a1887d V4L/DVB (13256): gspca - m5602-s5k4aa: Add another MSI GX700 vflip quirk
Adds another vflip quirk for the MSI GX700.
Thanks to John Katzmaier for reporting.

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:11 -02:00
Erik Andrén b6ef8836c1 V4L/DVB (13255): gspca - m5602-s5k4aa: Add vflip quirk for the Bruneinit laptop
Adds a vflip quirk for the Bruneinit laptop. Thanks to Jörg for the report

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:11 -02:00
Stefan Richter dcff9cfe43 V4L/DVB (13240): firedtv: fix regression: tuning fails due to bogus error return
Since 2.6.32(-rc1), DVB core checks the return value of
dvb_frontend_ops.set_frontend.  Now it becomes apparent that firedtv
always returned a bogus value from its set_frontend method.

CC: stable@kernel.org
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:11 -02:00
Henrik Kurelid c94115ffc4 V4L/DVB (13237): firedtv: length field corrupt in ca2host if length>127
This solves a problem in firedtv that has become major for Swedish DVB-T
users the last month or so.  It will most likely solve issues seen by
other users as well.

If the length of an AVC message is greater than 127, the length field
should be encoded in LV mode instead of V mode. V mode can only be used
if the length is 127 or less. This patch ensures that the CA_PMT
message is always encoded in LV mode so PMT message of greater lengths
can be supported.

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>
2009-11-07 12:55:10 -02:00
Mike Isely 1f95725755 V4L/DVB (13230): s2255drv: Don't conditionalize video buffer completion on waiting processes
The s2255 driver had logic which aborted processing of a video frame
if there was no process waiting on the video buffer in question.  That
simply doesn't work when the application is doing things in an
asynchronous manner.  If the application went to the trouble to queue
the buffer in the first place, then the driver should always attempt
to complete it - even if the application at that moment has its
attention turned elsewhere.  Applications which always blocked waiting
for I/O on the capture device would not have been affected by this.
Applications which *mostly* blocked waiting for I/O on the capture
device probably only would have been somewhat affected (frame lossage,
at a rate which goes up as the application blocks less).  Applications
which never blocked on the capture device (e.g. polling only) however
would never have been able to receive any video frames, since in that
case this "is anyone waiting on this?" check on the buffer never would
have evalutated true.  This patch just deletes that harmful check
against the buffer's wait queue.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
CC: stable@kernel.org
2009-11-07 12:55:10 -02:00
Michael Krufky 78c948ab0c V4L/DVB (13202): smsusb: add autodetection support for three additional Hauppauge USB IDs
Add support for three new Hauppauge Device USB IDs:

2040:b900
2040:b910
2040:c000

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:09 -02:00
Devin Heitmueller 96fbf771d8 V4L/DVB (13190): em28xx: fix panic that can occur when starting audio streaming
Because the counters were not reset when starting up streaming, they would
be reused from the previous run.  This can result in cases such that when the
second instance of streaming starts up, the "cnt" variable in
em28xx_audio_isocirq() can end up being negative, resulting in attempting to
write to memory before the start of runtime->dma_area (as well as having a
negative number of bytes to copy).

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
CC: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:08 -02:00
Mike Isely 2de26c0a4a V4L/DVB (13170): bttv: Fix reversed polarity error when switching video standard
The bttv driver function which handles switching of the video standard
(set_tvnorm() in bttv-driver.c) includes a check which can optionally
also reset the cropping configuration to a default value.  It is
"optional" based on a comparison of the cropcap parameters of the
previous vs the newly requested video standard.  The comparison is
being done with a memcmp(), a function which only returns a true value
if the comparison actually fails.

This if-statement appears to have been written to assume wrong
memcmp() semantics.  That is, it was re-initializing the cropping
configuration only if the new video standard did NOT have different
cropcap values.  That doesn't make any sense.  One definitely should
reset things if the cropcap parameters are different - if there's any
comparison to made at all.

The effect of this problem was that a transition from, say, PAL to
NTSC would leave in place old cropping setup that made sense for the
PAL geometry but not for NTSC.  If the application doesn't care about
cropping it also won't try to reset the cropping configuration,
resulting in an improperly cropped video frame.  In the case I was
testing this actually caused black video frames to be displayed.

Another interesting effect of this bug is that if one does something
which does NOT change the video standard and this function is run,
then the cropping setup gets reset anyway - again because of the
backwards comparison.  It turns out that just running anything which
merely opens and closes the video device node (e.g. v4l-info) will
cause this to happen.  One can argue that simply opening the device
node and not doing anything to it should not mess with any of its
state - but because of this behavior, any TV app which does such
things (e.g. xawtv) probably therefore doesn't see the problem.

The solution is to fix the sense of the if-statement.  It's easy to
see how this mistake could have been made given how memcmp() works.
The patch is therefore removal of a single "!" character from the
if-statement in set_tvnorm in bttv-driver.c.

Signed-off-by: Mike Isely <isely@pobox.com>
CC: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:08 -02:00
Mike Isely 66349b4e7a V4L/DVB (13169): bttv: Fix potential out-of-order field processing
There is a subtle interaction in the bttv driver which can result in
fields being repeatedly processed out of order.  This is a problem
specifically when running in V4L2_FIELD_ALTERNATE mode (probably the
most common case).

1. The determination of which fields are associated with which buffers
happens in videobuf, before the bttv driver gets a chance to queue the
corresponding DMA.  Thus by the point when the DMA is queued for a
given buffer, the algorithm has to do the queuing based on the
buffer's already assigned field type - not based on which field is
"next" in the video stream.

2. The driver normally tries to queue both the top and bottom fields
at the same time (see bttv_irq_next_video()).  It tries to sort out
top vs bottom by looking at the field type for the next 2 available
buffers and assigning them appropriately.

3. However the bttv driver *always* actually processes the top field
first.  There's even an interrupt set aside for specifically
recognizing when the top field has been processed so that it can be
marked done even while the bottom field is still being DMAed.

Given all of the above, if one gets into a situation where
bttv_irq_next_video() gets entered when the first available buffer has
been pre-associated as a bottom field, then the function is going to
process the buffers out of order.  That first available buffer will be
put into the bottom field slot and the buffer after that will be put
into the top field slot.  Problem is, since the top field is always
processed first by the driver, then that second buffer (the one after
the first available buffer) will be the first one to be finished.
Because of the strict fifo handling of all video buffers, then that
top field won't be seen by the app until after the bottom field is
also processed.  Worse still, the app will get back the
chronologically later bottom field first, *before* the top field is
received.  The buffer's timestamps will even be backwards.

While not fatal to most TV apps, this behavior can subtlely degrade
userspace deinterlacing (probably will cause jitter).  That's probably
why it has gone unnoticed.  But it will also cause serious problems if
the app in question discards all but the latest received buffer (a
latency minimizing tactic) - causing one field to only ever be
displayed since the other is now always late.  Unfortunately once you
get into this state, you're stuck this way - because having consumed
two buffers, now the next time around the "first" available buffer
will again be a bottom field and the same thing happens.

How can we get into this state?  In a perfect world, where there's
always a few free buffers queued to the driver, it should be
impossible.  However if something disrupts streaming, e.g. if the
userspace app can't queue free buffers fast enough for a moment due
perhaps to a CPU scheduling glitch, then the driver can get
momentarily starved and some number of fields will be dropped.  That's
OK.  But if an odd number of fields get dropped, then that "first"
available buffer might be the bottom field and now we're stuck...

This patch fixes that problem by deliberately only setting up a single
field for one frame if we don't get a top field as the first available
buffer.  By purposely skipping the other field, then we only handle a
single buffer thus bringing things back into proper sync (i.e. top
field first) for the next frame.  To do this we just drop the few
lines in bttv_irq_next_video() that attempt to set up the second
buffer when that second buffer isn't for the bottom field.

This is definitely a problem in when in V4L2_FIELD_ALTERNATE mode.  In
the other modes this change either has no effect or doesn't harm
things any further anyway.

Signed-off-by: Mike Isely <isely@pobox.com>
CC: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:07 -02:00
HIRANO Takahito e0a7e8a621 V4L/DVB (13167): pt1: Fix a compile error on arm
The lack of #include <linux/vmalloc.h> caused a compile error on some
architectures.

Signed-off-by: HIRANO Takahito <hiranotaka@zng.info>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:07 -02:00
Guennadi Liakhovetski 76823b791d V4L/DVB (13132): fix use-after-free Oops, resulting from a driver-core API change
Commit b402843787 has broken again re-use of
device objects across device_register() / device_unregister() cycles. Fix
soc-camera by nullifying the struct after device_unregister().

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:07 -02:00
Guennadi Liakhovetski 07bc46e667 V4L/DVB (13131): pxa_camera: fix camera pixel format configuration
A missed conversion prevents correct pixel format negotiation with client
drivers.

Reported-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:06 -02:00
Guennadi Liakhovetski 8cf1fec877 V4L/DVB (13129): sh_mobile_ceu_camera: fix cropping for scaling clients
Fix a bug in cropping calculation, when the client is also scaling the image.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:06 -02:00
Hans de Goede 1381dfd515 V4L/DVB (13122): gscpa - stv06xx + ov518: dont discard every other frame
When we call gspca_frame_add, it returns a pointer to the frame passed in,
unless we call it with LAST_PACKET, when it will return a pointer to a
new frame in which to store the frame data for the next frame.

The frame pointer was not updated in stv06xx and ov518.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:05 -02:00
Seth Barry a57c1dcb93 V4L/DVB (13109): tda18271: fix signedness issue in tda18271_rf_tracking_filters_init
While having tda18271 module set with debug=17 (cal & info prints) and
cal=0 (delay calibration process until first use) - I discovered that
during the calibration process, if the frequency test for 69750000
returned a bcal of 0 (see tda18721-fe.c in tda18271_powerscan func) that
the tuner wouldn't be able to pickup any of the frequencies in the range
(all the other frequencies bands returned bcal=1).  I spent some time
going over the code and the NXP's tda18271 spec (ver.4 of it i think) and
adding a lot of debug prints and walking/stepping through the calibration
process.  I found that when the powerscan fails to find a frequency, the
rf calibration is not run and the default value is supposed to be used in
its place (pulled from the RF_CAL_map table) - but something was getting
goofed up there.

Now, my c coding skills are very rusty, but i think root of the problem is
a signedness issue with the math operation for calculating the rf_a1 and
rf_a2 values in tda18271_rf_tracking_filters_init func, which results in
values like 20648 for rf_a1 (when it should probably have a value like 0,
or so slightly negative that it should be zero - this bad value for rf_a1
would in turn makes the approx calc within
tda18271c2_rf_tracking_filters_correction go out of whack).  The simplest
solution i found was to explicitly convert the signedness of the
denominator to avoid the implicit conversion.  The values placed into the
u32 rf_freq array should never exceed about 900mhz, so i think the s32 max
value shouldn't be an issue in this case.

I've tested it out a little, and even when i get a bcal=0 with the
modified code, the default calibration value gets used, rf_a1 is zero, and
the tuner seems to lock on the stream and mythtv seems to play it fine.

Signed-off-by: Seth Barry <seth@cyberseth.com>
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
CC: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:04 -02:00
Michael Krufky 4d8317876d V4L/DVB (13107): tda18271: fix overflow in FM radio frequency calculation
Multiplication by 62500 causes an overflow in the 32 bit freq variable,
which is later divided by 1000 when using FM radio.

This patch prevents the overflow by scaling the frequency value correctly
upfront.  Thanks to Henk Vergonet for spotting the problem and providing
a preliminary patch, which this changeset was based upon.

Cc: Henk Vergonet <Henk.Vergonet@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
CC: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:04 -02:00
Martin Samek 7646b9de26 V4L/DVB (13079): dib0700: fixed xc2028 firmware loading kernel oops
Fixing kernel oops when driver attemps to load xc2028 firmware.

Note by djh: the patch contribute by Martin is a port of a fix I made during
the PCTV 340e development.  It's a temporary workaround that fixes a regression
(an OOPS condition) and the real fix should be in the code that manages the
i2c master on the dib7000p.  But this fix does address the immmediate
regression and should be merged upstream until we do a cleaner fix.

Signed-off-by: Martin Samek <martin@marsark.sytes.net>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
CC: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:03 -02:00
Patrick Boettcher 1e13c8f0c9 V4L/DVB (13050): DIB0700: fix-up USB device ID for Terratec/Leadtek
git commit db48138f6b changed by accident the
assignment of certain USB IDs to their device-specific-handlers.

Thanks to Edward Sheldrake for finding this regression

Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:03 -02:00
Michael Krufky 2b5d9946bc V4L/DVB (13048): dib0070: fix build dependency when driver is disabled
Fix build dependency on function, dib0070_ctrl_agc_filter

[mchehab@redhat.com: reverted the quick workaround 3f48258e50]

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:02 -02:00
Alexey Dobriyan d43c36dc6b headers: remove sched.h from interrupt.h
After m68k's task_thread_info() doesn't refer to current,
it's possible to remove sched.h from interrupt.h and not break m68k!
Many thanks to Heiko Carstens for allowing this.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
2009-10-11 11:20:58 -07:00
Alexey Dobriyan a99bbaf5ee headers: remove sched.h from poll.h
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-04 15:05:10 -07:00
Alexey Dobriyan 828c09509b const: constify remaining file_operations
[akpm@linux-foundation.org: fix KVM]
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-01 16:11:11 -07:00
Alexey Dobriyan f0f37e2f77 const: mark struct vm_struct_operations
* mark struct vm_area_struct::vm_ops as const
* mark vm_ops in AGP code

But leave TTM code alone, something is fishy there with global vm_ops
being used.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-27 11:39:25 -07:00
Guennadi Liakhovetski a79aebfca1 sh_mobile_ceu_camera: fix compile breakage, caused by a bad merge
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-09-25 13:36:51 +09:00
Linus Torvalds 9f6ac7850a Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
  V4L/DVB (13039): dib0700: not building CONFIG_DVB_TUNER_DIB0070 breaks compilation
  V4L/DVB (13038): dvbdev: Remove an anoying/uneeded warning
  V4L/DVB (13037): go7007: Revert compatibility code added at the wrong place
  media: video: Fix build in saa7164
2009-09-24 07:54:16 -07:00
Alexey Dobriyan 2bcd57ab61 headers: utsname.h redux
* remove asm/atomic.h inclusion from linux/utsname.h --
   not needed after kref conversion
 * remove linux/utsname.h inclusion from files which do not need it

NOTE: it looks like fs/binfmt_elf.c do not need utsname.h, however
due to some personality stuff it _is_ needed -- cowardly leave ELF-related
headers and files alone.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-23 18:13:10 -07:00
Mauro Carvalho Chehab 3f48258e50 V4L/DVB (13039): dib0700: not building CONFIG_DVB_TUNER_DIB0070 breaks compilation
As reported by Ingo Molnar:
 Here's another new build breakage that triggers in -tip testing:

 drivers/built-in.o:(.data+0xb1f40): undefined reference to `dib0070_ctrl_agc_filter'
 drivers/built-in.o:(.data+0xb1f80): undefined reference to `dib0070_ctrl_agc_filter'

triggers due to:

CONFIG_DVB_USB_DIB0700=y
CONFIG_DVB_TUNER_DIB0070 is not set

While working on a better approach, for now, let's just select tuner
dib0070 anytime we compile dib0700.

Cc: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-22 21:54:06 -03:00
Mauro Carvalho Chehab d4c02ef91b V4L/DVB (13038): dvbdev: Remove an anoying/uneeded warning
As pointed by Marcin Slusarz <marcin.slusarz@gmail.com>, the warns happens
because CONFIG_DVB_MAX_ADAPTERS depends on CONFIG_DVB_CORE, and there are
valid configs where DVB_CORE is not selected.

This causes such warnings, for every V4L and common drivers that may or
may not be compiled with DVB support:

drivers/media/dvb/dvb-core/dvbdev.h:36:2: warning: #warning invalid CONFIG_DVB_MAX_ADAPTERS value

We can safely remove the warning.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-22 21:54:00 -03:00
Ingo Molnar b1912a85b5 media: video: Fix build in saa7164
-tip testing found that the x86 build (64-bit allyesconfig) fails due to:

  LD      vmlinux.o
  drivers/built-in.o:(.bss+0x4b648): multiple definition of `debug'
  arch/x86/built-in.o:(.kprobes.text+0x88): first defined here
  ld: Warning: size of symbol `debug' changed from 90 in
arch/x86/built-in.o to 4 in drivers/built-in.o
 make: *** [vmlinux.o] Error 1

This is because recent saa7164 changes introduced a global symbol
named 'debug'. The x86 platform code already defines a 'debug'
symbol. (which is named in a too generic way as well - but it
can be used nicely to weed out too generic symbols in drivers ;-)

Rename it to saa_debug.

[mchehab@redhat.com: use module_param_named to preserve old name]

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-22 18:58:17 -03:00
Linus Torvalds 342ff1a1b5 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (34 commits)
  trivial: fix typo in aic7xxx comment
  trivial: fix comment typo in drivers/ata/pata_hpt37x.c
  trivial: typo in kernel-parameters.txt
  trivial: fix typo in tracing documentation
  trivial: add __init/__exit macros in drivers/gpio/bt8xxgpio.c
  trivial: add __init macro/ fix of __exit macro location in ipmi_poweroff.c
  trivial: remove unnecessary semicolons
  trivial: Fix duplicated word "options" in comment
  trivial: kbuild: remove extraneous blank line after declaration of usage()
  trivial: improve help text for mm debug config options
  trivial: doc: hpfall: accept disk device to unload as argument
  trivial: doc: hpfall: reduce risk that hpfall can do harm
  trivial: SubmittingPatches: Fix reference to renumbered step
  trivial: fix typos "man[ae]g?ment" -> "management"
  trivial: media/video/cx88: add __init/__exit macros to cx88 drivers
  trivial: fix typo in CONFIG_DEBUG_FS in gcov doc
  trivial: fix missing printk space in amd_k7_smp_check
  trivial: fix typo s/ketymap/keymap/ in comment
  trivial: fix typo "to to" in multiple files
  trivial: fix typos in comments s/DGBU/DBGU/
  ...
2009-09-22 07:51:45 -07:00
Andrew Morton 2a20b05f81 drivers/media/dvb/pt1/pt1.c needs vmalloc.h
alpha:

drivers/media/dvb/pt1/pt1.c: In function 'pt1_cleanup_tables':
drivers/media/dvb/pt1/pt1.c:422: error: implicit declaration of function 'vfree'
drivers/media/dvb/pt1/pt1.c: In function 'pt1_init_tables':
drivers/media/dvb/pt1/pt1.c:431: error: implicit declaration of function 'vmalloc'
drivers/media/dvb/pt1/pt1.c:431: warning: assignment makes pointer from integer without a cast

Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-22 07:17:23 -07:00
Linus Torvalds c720f5655d Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (222 commits)
  V4L/DVB (13033): pt1: Don't use a deprecated DMA_BIT_MASK macro
  V4L/DVB (13029): radio-si4713: remove #include <linux/version.h>
  V4L/DVB (13027): go7007: convert printks to v4l2_info
  V4L/DVB (13026): s2250-board: Implement brightness and contrast controls
  V4L/DVB (13025): s2250-board: Fix memory leaks
  V4L/DVB (13024): go7007: Implement vidioc_g_std and vidioc_querystd
  V4L/DVB (13023): go7007: Merge struct gofh and go declarations
  V4L/DVB (13022): go7007: Fix mpeg controls
  V4L/DVB (13021): go7007: Fix whitespace and line lengths
  V4L/DVB (13020): go7007: Updates to Kconfig and Makefile
  V4L/DVB (13019): video: initial support for ADV7180
  V4L/DVB (13018): kzalloc failure ignored in au8522_probe()
  V4L/DVB (13017): gspca: kmalloc failure ignored in sd_start()
  V4L/DVB (13016): kmalloc failure ignored in lgdt3304_attach() and s921_attach()
  V4L/DVB (13015): kmalloc failure ignored in m920x_firmware_download()
  V4L/DVB (13014): Add support for Compro VideoMate E800 (DVB-T part only)
  V4L/DVB (13013): FM TX: si4713: Kconfig: Fixed two typos.
  V4L/DVB (13012): uvc: introduce missing kfree
  V4L/DVB (13011): Change tuner type of BeholdTV cards
  V4L/DVB (13009): gspca - stv06xx-hdcs: Reduce exposure range
  ...
2009-09-21 09:03:10 -07:00
Ingo Molnar 388dba3047 Driver-Core: fix devnode callbacks for dabusb and industrialio
The build of the dabusb driver broke:

  drivers/media/video/dabusb.c:758: error: unknown field 'nodename' specified in initializer
  drivers/media/video/dabusb.c:758: warning: initialization from incompatible pointer type
  make[3]: *** wait: No child processes.  Stop.

Due to this commit:

  e454cea: Driver-Core: extend devnode callbacks to provide permissions

Missing the dabusb driver's dabusb_nodename() callback.

Similar issues with the iio/industrialio driver in staging, pointed out
and patched by Jean Delvare.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Industrialio-parts-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-21 07:36:33 -07:00
Uwe Kleine-Koenig 3dbda77e6f trivial: fix typos "man[ae]g?ment" -> "management"
Signed-off-by: Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-09-21 15:14:56 +02:00
Peter Huewe 31d0f84591 trivial: media/video/cx88: add __init/__exit macros to cx88 drivers
Trivial patch which adds the __init and __exit macros to the module_init /
module_exit functions to several files in drivers/media/video/cx88/

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-09-21 15:14:56 +02:00
Anand Gadiyar fd589a8f0a trivial: fix typo "to to" in multiple files
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-09-21 15:14:55 +02:00
Kay Sievers e454cea20b Driver-Core: extend devnode callbacks to provide permissions
This allows subsytems to provide devtmpfs with non-default permissions
for the device node. Instead of the default mode of 0600, null, zero,
random, urandom, full, tty, ptmx now have a mode of 0666, which allows
non-privileged processes to access standard device nodes in case no
other userspace process applies the expected permissions.

This also fixes a wrong assignment in pktcdvd and a checkpatch.pl complain.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-19 12:50:38 -07:00
Mauro Carvalho Chehab 84d6ae431f V4L/DVB (13033): pt1: Don't use a deprecated DMA_BIT_MASK macro
drivers/media/dvb/pt1/pt1.c: In function ‘pt1_probe’:
drivers/media/dvb/pt1/pt1.c:915: warning: ‘DMA_nnBIT_MASK’ is deprecated

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 01:08:20 -03:00
Huang Weiyi 2ff88bc343 V4L/DVB (13029): radio-si4713: remove #include <linux/version.h>
Remove #include <linux/version.h>

Cc: Eduardo Valentin <eduardo.valentin@nokia.com>
Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:54:15 -03:00
Richard Röjfors 6789cb5230 V4L/DVB (13019): video: initial support for ADV7180
This is an initial driver for Analog Devices ADV7180 Video Decoder.
So far it only supports query standard.

[akpm@linux-foundation.org: remove unneeded cast]
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Richard Röjfors <richard.rojfors.ext@mocean-labs.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:53:39 -03:00
Roel Kluin 40d2951758 V4L/DVB (13018): kzalloc failure ignored in au8522_probe()
Prevent NULL dereference if kzalloc() fails.

Cc: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:53:35 -03:00
Roel Kluin d8370f7eff V4L/DVB (13017): gspca: kmalloc failure ignored in sd_start()
Prevent NULL dereference if kmalloc() fails.

Cc: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:53:30 -03:00
Roel Kluin 8d04df4997 V4L/DVB (13016): kmalloc failure ignored in lgdt3304_attach() and s921_attach()
Prevent NULL dereference if kmalloc() fails.

Cc: Markus Rechberger <mrechberger@sundtek.de>
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:53:16 -03:00
Roel Kluin 1601fb1498 V4L/DVB (13015): kmalloc failure ignored in m920x_firmware_download()
Prevent NULL dereference if kmalloc() fails.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:53:10 -03:00
Vladimir Geroy 34e383dd13 V4L/DVB (13014): Add support for Compro VideoMate E800 (DVB-T part only)
Adding Compro VideoMate E800 (DVB-T part only)

Cc: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Vladimir Geroy <geroin22@yandex.ru>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:53:06 -03:00
Matti J. Aaltonen 7a254f468f V4L/DVB (13013): FM TX: si4713: Kconfig: Fixed two typos.
Fixed two typos.

Signed-off-by: Matti J. Aaltonen <matti.j.aaltonen@nokia.com>
Acked-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:53:01 -03:00
Julia Lawall d2be76437c V4L/DVB (13012): uvc: introduce missing kfree
Move the kzalloc and associated test after the stream/query test, to avoid
the need to free the allocated if the stream/query test fails.

The semantic match that finds the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
statement S;
expression E;
identifier f,f1,l;
position p1,p2;
expression *ptr != NULL;
@@

x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
<... when != x
     when != if (...) { <+...x...+> }
(
x->f1 = E
|
 (x->f1 == NULL || ...)
|
 f(...,x->f1,...)
)
...>
(
 return \(0\|<+...x...+>\|ptr\);
|
 return@p2 ...;
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:52:54 -03:00
Dmitry Belimov c6e56cd344 V4L/DVB (13011): Change tuner type of BeholdTV cards
Change tuner type to correct for BeholdTV cards with FM1216MK5.

Cc: Hermann Pitton <hermann-pitton@arcor.de>
Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:52:50 -03:00
James Blanford 35ccf8f8ea V4L/DVB (13009): gspca - stv06xx-hdcs: Reduce exposure range
Due to rounding and clipping, exposure and gain settings do not map to
unique register values.  Rather than read the registers and report gain
and exposure that may be different than the values that were set, just
cache the latest values that were set and report them.  Reduce exposure
range from 0-65535 to 0-255 so libv4l's autogain doesn't take forever.
Remove vestiges of driver signal processing that is now handled by
libv4l.

Signed-off-by: James Blanford <jhblanford@gmail.com>
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:52:46 -03:00
James Blanford 4711ca823b V4L/DVB (13008): gspca - stv06xx-hdcs: Fixup exposure
Initialize image size before it's used to initialize exposure.
Work around lack of exposure set hardware latch with a sequence of
register writes in a single I2C command packet.

Signed-off-by: James Blanford <jhblanford@gmail.com>
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:52:43 -03:00
Erik Andrén 4fac17b4e7 V4L/DVB (13007): gspca - stv06xx-hdcs: Add exposure and gain ctrls to hdcs_1020
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:52:39 -03:00
Erik Andrén a8ca20b209 V4L/DVB (13006): gspca - stv06xx: Fix a misindentation
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:52:35 -03:00
Erik Andrén bf5c562a3e V4L/DVB (13005): gspca - stv06xx: Translate swedish comments to english
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:52:28 -03:00
Erik Andrén be3bdfb6e0 V4L/DVB (13004): gspca - stv06xx: Harmonize the debug macros when tracing writes and reads
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:52:22 -03:00
Andreas Mohr 607cfab6e7 V4L/DVB (13003): Correct dangerous and inefficient msecs_to_jiffies() calculation in some V4L2 drivers
Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:52:18 -03:00
Henk Vergonet 6c119ff493 V4L/DVB (13002): Adds support for Zolid Hybrid PCI card:
http://linuxtv.org/wiki/index.php/Zolid_Hybrid_TV_Tuner

test status analog (PAL-B):
- Sometimes picture is noisy, but it becomes crystal clear after
  switching between channels. (happens for example at 687.25 Mhz)
- On a lower frequency (511.25 Mhz) the picture is always sharp, but
  lacks colour.
- No sound problems.
- radio untested.

Digital:
- DVB-T/H stream reception works.
- Would expect to see some more channels in the higher frequency region.

Overall is the impression that sensitivity still needs improvement
both in analog and digital modes.

Signed-off-by: Henk Vergonet <Henk.Vergonet@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:52:12 -03:00
Dmitri Belimov 2d21ffe05a V4L/DVB (13001): Key filter for BeholdTV cards.
When fast push-pull button of remote control we can received incorrect
key code 0x00. Key information from IR decoder has ID of remote control 2 bytes,
byte of key code and byte of mirror key code.
Correct data
0x86 0x6B 0x00 0xFF

Wrong data
0x86 0x6B 0x00 0x00

This patch added additional test of mirror byte for filtering.

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:52:05 -03:00
Akihiro Tsukada 5eca4823ea V4L/DVB (13000): add driver for 774 Friio White USB ISDB-T receiver
This patch adds driver for 774 Friio White, ISDB-T USB receiver

Friio White is an USB 2.0 ISDB-T receiver. (http://www.friio.com/)
The device has a GL861 chip and a Comtech JDVBT90502 canned tuner module.
This driver ignores all the frontend_parameters except frequency,
as ISDB-T shares the same parameter configuration across the country
and thus the device can work like an intelligent one.

As this device does not include a CAM nor hardware descrambling feature,
the driver passes through scrambled TS streams.

There is Friio Black, a variant for ISDB-S, which shares the same USB
Vendor/Product ID with White, but it is not supported in this driver.
They should be identified in the initialization sequence,
but this feature is not tested.

Signed-off-by: Akihiro Tsukada <tskd2@yahoo.co.jp>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:51:48 -03:00
Mauro Carvalho Chehab 3d17fb1be9 V4L/DVB (12999): Add a driver for Earthsoft PT1
Add a driver for Earthsoft PT1

Eearthsoft PT1 is a PCI card for Japanese broadcasting with two ISDB-S
and ISDB-T demodulators.

This card has neither MPEG decoder nor conditional access module
onboard. It transmits only compressed and possibly encrypted MPEG data
over the PCI bus, so you need an external software decoder and a
decrypter to watch TV on your computer.

This driver is originally developed by Tomoaki Ishikawa
<tomy@users.sourceforge.jp> by reverse engineering.

[mchehab@redhat.com: renamed isdb_ts to isdbs_ts to use the current standard]
Signed-off-by: HIRANO Takahito <hiranotaka@zng.info>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:51:41 -03:00
HIRANO Takahito 98293ef3e5 V4L/DVB (12997): Add the DTV_ISDB_TS_ID property for ISDB_S
In ISDB-S, time-devision duplex is used to multiplexing several waves
in the same frequency. Each wave is identified by its own transport
stream ID, or TS ID. We need to provide some way to specify this ID
from user applications to handle ISDB-S frontends.

This code has been tested with the Earthsoft PT1 driver.

[mchehab@infradead.org: Fix merge conflicts with isdbt and rename the new parameter to DTV_ISDBS_TS_ID]
Signed-off-by: HIRANO Takahito <hiranotaka@zng.info>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:51:34 -03:00
Mauro Carvalho Chehab 0030ec38ce V4L/DVB(12993b): gl860: Prevent a potential risk of zeroing a floating pointer
drivers/media/video/gspca/gl860/gl860.c: In function ‘gl860_build_control_table’:
drivers/media/video/gspca/gl860/gl860.c:119: warning: ‘sd_ctrls’ may be used uninitialized in this function

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:49:11 -03:00
Mauro Carvalho Chehab ab2058571d V4L/DVB (12993a): saa7164: Fix compilation warning on i386
drivers/media/video/saa7164/saa7164-buffer.c: In function ‘saa7164_buffer_alloc’:
drivers/media/video/saa7164/saa7164-buffer.c:110: warning: cast to pointer from integer of different size
drivers/media/video/saa7164/saa7164-buffer.c:112: warning: cast to pointer from integer of different size

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:44:31 -03:00
Muralidharan Karicheri d28a6df608 V4L/DVB (12906d): V4L : vpif updates for DM6467 vpif capture driver
Following changes done for vpif driver to support vpif capture:-
	1) Current version of display driver defined vpif register
	   space as part for vpif display platform driver resource
	   This is not correct since vpif is common across capture
	   and display drivers. So the resource iomap function is
	   moved to this module
	2) Since there are common registers, a spinlock is added for
	   mutual exclusion.

This has incorporated comments against version v0 of the patch series

Resending to merge to V4L linux-next

Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:40 -03:00
Muralidharan Karicheri 6ffefff5a9 V4L/DVB (12906c): V4L : vpif capture driver for DM6467
This is the vpif capture bridge driver for DM6467.  This video
supports two video channels each having a tvp5147 device at
the input. This allows simultaneous capture of NTSC/PAL video
in each of this channel. Both MMAP and USERPTR io mechanism
are supported. Currently buffer allocation happens at REQBUF
ioctl request. Since USERPTR IO is supported, this is not an
issue since user applications can allocate buffers and pass
the user space address to the driver. Following are TODOs :-
	1) Adding support for allocation of buffers at init
	2) VBI/HBI data service

This has incorporated comments received against version v0
of the patch series.

Resending to merge V4l linux-next
 create mode 100644 drivers/media/video/davinci/vpif_capture.c
 create mode 100644 drivers/media/video/davinci/vpif_capture.h

Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:39 -03:00
Muralidharan Karicheri 89803d83b6 V4L/DVB (12906b): V4L : vpif capture - Kconfig and Makefile changes
Adds Kconfig and Makefile changes required for vpif capture driver

Resending to merge to V4L linux-next

Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:37 -03:00
Muralidharan Karicheri 317b2e2f4b V4L/DVB (12906a): V4L : vpif display updates to support vpif capture
The structure name for vpif display driver changed since it was not unique. So this
update is done to reflect the same. Also removed the code related to register
address space iomap. Uses v4l2_i2c_new_subdev_board() instead of
v4l2_i2c_new_probed_subdev() so that platform data can be added for subdevice
configuration for polarities.

This has incorporated comments against version v0 of the patch series.

Resending the original patch for merge to V4L linux-next

Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:36 -03:00
Hans Verkuil 6b5270d212 V4L/DVB (12725): v4l: warn when desired devnodenr is in use & add _no_warn function
Warn when the desired device node number is already in use, except when
the new video_register_device_no_warn function is called since in some
use-cases that warning is not relevant.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:34 -03:00
Hans Verkuil 5062cb70c8 V4L/DVB (12724): v4l2-dev: add simple wrapper functions around the devnode numbers
There are some subtle differences in the way the devnode numbers are
handled depending on whether the FIXED_MINOR_RANGES config option is
set. Add some simple wrapper functions to handle that correctly.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:31 -03:00
Hans Verkuil 581644d9c9 V4L/DVB (12723): ivtv/cx18: replace 'kernel number' with 'device node number'.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:29 -03:00
Hans Verkuil 22e221258b V4L/DVB (12722): v4l2-dev: replace 'kernel number' by 'device node number'.
The term 'kernel number' is very vague, so replace it with the somewhat more
descriptive term 'device node number'.

In one place the local variable 'nr' was used to create the device node number
of the new device name. This has been replaced with the vdev->num field to
more clearly mark this as being the device node number and not the minor
number.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:27 -03:00
Hans Verkuil 7ae0cd9bc7 V4L/DVB (12541): v4l: remove video_register_device_index
video_register_device_index is never actually called, instead the
stream index number is always calculated automatically.

This patch removes this function and simplifies the internal get_index
function since that can now always just return the first free index.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:26 -03:00
Hans Verkuil 53dacb1570 V4L/DVB (12540): v4l: simplify v4l2_i2c_new_subdev and friends
Rewrite v4l2_i2c_new_subdev as a simplified version of v4l2_i2c_new_subdev_cfg
and remove v4l2_i2c_new_probed_subdev and v4l2_i2c_new_probed_subdev_addr.

This simplifies this API substantially.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:24 -03:00
Guennadi Liakhovetski 0da2808ca2 V4L/DVB (12580): soc-camera: remove now unneeded subdevice group ID assignments
Since we are not using v4l2_device_call_* calls any more, we don't need to
initialise subdevice .grp_id any more. This also fixes compiler warnings on
64-bit platforms.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:22 -03:00
Guennadi Liakhovetski 96c7539954 V4L/DVB (12536): soc-camera: remove .gain and .exposure struct soc_camera_device members
This makes the soc-camera interface for V4L2 subdevices thinner yet. Handle
gain and exposure internally in each driver just like all other controls.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:20 -03:00
Guennadi Liakhovetski a4c56fd889 V4L/DVB (12535): soc-camera: remove .init() and .release() methods from struct soc_camera_ops
Remove unneeded soc-camera operations, this also makes the soc-camera API to
v4l2 subdevices thinner.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:18 -03:00
Guennadi Liakhovetski 6a6c878672 V4L/DVB (12534): soc-camera: V4L2 API compliant scaling (S_FMT) and cropping (S_CROP)
The initial soc-camera scaling and cropping implementation turned out to be
incompliant with the V4L2 API, e.g., it expected the user to specify cropping
in output window pixels, instead of input window pixels. This patch converts
the soc-camera core and all drivers to comply with the standard.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:17 -03:00
Guennadi Liakhovetski 0166b74374 V4L/DVB (12533): soc-camera: Use video device object for output in host drivers
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:15 -03:00
Guennadi Liakhovetski 2aa58db47f V4L/DVB (12532): soc-camera: Use camera device object for core output
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:13 -03:00
Guennadi Liakhovetski 85f8be6812 V4L/DVB (12531): soc-camera: Use I2C device for dev_{dbg,info,...} output in all clients
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:09 -03:00
Guennadi Liakhovetski c9c1f1c0db V4L/DVB (12530): soc-camera: switch to using v4l2_subdev_call()
Use v4l2_subdev_call() instead of v4l2_device_call_until_err() in all host
drivers and in soc-camera core.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:07 -03:00
Guennadi Liakhovetski 08590b9613 V4L/DVB (12529): soc-camera: switch to s_crop v4l2-subdev video operation
Remove set_crop soc-camera device method and switch to s_crop from v4l2-subdev
video operations. Also extend non-i2c drivers to also hold a pointer to their
v4l2-subdev instance in control device driver-data, i.e., in
dev_get_drvdata((struct device *)to_soc_camera_control(icd))

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:06 -03:00
Guennadi Liakhovetski 961801bbb3 V4L/DVB (12528): sh_mobile_ceu_camera: implement host-side image scaling
Use host-side image scaling when the client fails to set the requested format.
We also have to take scaling into account when performing host-side cropping.
Similar to cropping we try to use client-side scaling as much as possible to
preserve bus bandwidth and optimise the frame-rate.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:04 -03:00
Guennadi Liakhovetski 4a5a5b2d62 V4L/DVB (12527): tw9910: do not lie about cropping abilities
The current tw9910 driver does not implement cropping correctly. Therefore, and
also because various rectangles in struct soc_camera_device are in user scale,
we cannot and shall not use rect_current as window location.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:02 -03:00
Guennadi Liakhovetski 94896298be V4L/DVB (12526): ov772x: do not use scaling for cropping
OV772x sensors cannot crop, they only support two fixed formats: VGA and QVGA.
We should not change the format when requested to crop, only S_FMT can do this.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:01 -03:00
Guennadi Liakhovetski b897a91afb V4L/DVB (12525): soc-camera: prohibit geometry change with initialised buffers
Prohibit S_FMT and S_CROP with a different window width or height after video
buffer initialisation. This simplifies the work to be done in specific host and
client drivers, and it doesn't seem to make much sense to allow these changes.
We do however allow S_CROP with equal width and height to just move the window,
this doesn't affect video buffer management and is usually easy enough to
implement.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:59 -03:00
Guennadi Liakhovetski 68a54f0e53 V4L/DVB (12524): soc-camera: S_CROP V4L2 API compliance fix
V4L2 API mandates, that drivers do not update the argument of the S_CROP
ioctl() with the actual geometry. Comply.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:58 -03:00
Guennadi Liakhovetski 123ab622c0 V4L/DVB (12523): tw9910: return updated geometry on successful S_FMT and S_CROP
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:56 -03:00
Guennadi Liakhovetski 904078f16f V4L/DVB (12522): sh-mobile-ceu-camera: implement host-side cropping
Not all video capture devices can configure arbitrary cropping, whereas the
CEU module on SuperH CPUs can crop with pixel precision. However, we want to
use camera cropping if possible to save bandwidth and increase the frame-rate.
This patch verifies whether the camera managed to crop exactly the requested
rectangle, and if not, uses host-side cropping. To be able to crop on CEU we
have to preserve camera rectangle too, for which the host_priv member in
struct soc_camera_device is used. We now allocate memory dynamically, thus we
have to use the .put_formats() method from struct soc_camera_host_ops to free
it.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:55 -03:00
Guennadi Liakhovetski a12222a73e V4L/DVB (12521): soc-camera: use .s_std() from struct v4l2_subdev_core_ops
Remove .set_std() method from struct soc_camera_ops, use .s_std() from
struct v4l2_subdev_core_ops instead.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:53 -03:00
Guennadi Liakhovetski cca0e54905 V4L/DVB (12520): sh-mobile-ceu-camera: do not wait for interrupt when releasing buffers
Patch

[PATCH] video: use videobuf_waiton() in sh_mobile_ceu free_buffer()

was not quite correct. It closed a race, but introduced a potential
lock-up, if for some reason an interrupt does not come. This has been
observed in tests with tw9910. This patch safely dequeues buffers without
waiting for their completion. It also moves a buffer state assignment
under a spinlock to make it atomic with queuing of the buffer.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:51 -03:00
Guennadi Liakhovetski fa48984e36 V4L/DVB (12519): soc-camera: put pixel format initialisation back in probe, add .put_formats()
The move of format translation initialisation into soc_camera_open() was
temporary for the soc-camera as platform driver intermediate step, put it back
into soc_camera_probe(). Also add a .put_formats() method to
soc_camera_host_ops to free any resources host driver might have allocated in
.get_formats().

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:49 -03:00
Guennadi Liakhovetski 0d205b6a09 V4L/DVB (12518): ov772x: S_CROP must return actually configured geometry
V4L2 drivers are allowed to configure a geometry different than what has been
requested by the user with S_CROP, but then they have to adjust the input
rectangle accordingly. Fix ov772x to comply with this requirement.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:48 -03:00
Guennadi Liakhovetski e330919a21 V4L/DVB (12517): mt9t031: improve rectangle placement in invalid S_CROP
1. soc-camera always requests a valid rectangle, when calling .s_fmt(), no need
to check and adjust
2. in .s_crop(), if the rectangle exceeds sensor limits, push it to the
respective border instead of centering
3. take into account left and top borders when checking

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:46 -03:00
Guennadi Liakhovetski bf62e1da6a V4L/DVB (12516): ov772x: successful S_FMT and S_CROP must update user-provided rectangle
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:44 -03:00
Guennadi Liakhovetski a0705b07f1 V4L/DVB (12515): soc-camera: use struct v4l2_rect in struct soc_camera_device
Switch to using struct v4l2_rect in struct soc_camera_device for uniformity and
simplicity.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:43 -03:00
Guennadi Liakhovetski 4a6110bc50 V4L/DVB (12514): sh_mobile_ceu_camera: add a control for the camera low-pass filter
Use the V4L2_CID_SHARPNESS control to switch SH-mobile camera low-pass filter.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:41 -03:00
Guennadi Liakhovetski 2840d2497b V4L/DVB (12513): soc-camera: add support for camera-host controls
Until now soc-camera only supported client (sensor) controls. This patch
enables camera-host drivers to implement their own controls too.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:39 -03:00
Guennadi Liakhovetski a813d01f82 V4L/DVB (12512): ov772x: implement a band-stop filter support
The V4L2_CID_BAND_STOP_FILTER control is used to switch the "Banding Filter" on
OV772x cameras on and off and to set the minimum AEC value in BDBASE register.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:38 -03:00
Guennadi Liakhovetski 979ea1ddf8 V4L/DVB (12510): soc-camera: (partially) convert to v4l2-(sub)dev API
Convert the soc-camera framework to use the v4l2-(sub)dev API. Start using
v4l2-subdev operations. Only a part of the interface between the
soc_camera core, soc_camera host drivers on one side and soc_camera device
drivers on the other side is replaced so far. The rest of the interface
will be replaced in incremental steps, and will require extensions and,
possibly, modifications to the v4l2-subdev code.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:35 -03:00
Guennadi Liakhovetski 40e2e09270 V4L/DVB (12506): soc-camera: convert to platform device
Convert soc-camera core and all drivers to platform device API. We already
converted platforms to register a platform device for each soc-camera client,
now we remove the compatibility code and switch completely to the new scheme.
This is a preparatory step for the v4l2-subdev conversion.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:27 -03:00
Guennadi Liakhovetski c41debafc6 V4L/DVB (12504): soc-camera: prepare soc_camera_platform.c and its users for conversion
soc_camera_platform.c is only used by y SuperH ap325rxa board. This patch
converts soc_camera_platform.c and its users for the soc-camera platform-
device conversion and also extends soc-camera core to handle non-I2C cameras.

Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:24 -03:00
Muralidharan Karicheri 2639ead140 V4L/DVB (12254): v4l: Makefile and config files for vpfe capture driver
This adds Makefile and Kconfig changes to build vpfe capture driver.

Reviewed by: Laurent Pinchart <laurent.pinchart@skynet.be>

Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:22 -03:00
Chaithrika U S 210fa70d3a V4L/DVB (12453a): DaVinci: DM646x: Update the structure name as per header file changes
In the platform header file, the subdev_info structure name has been changed
to vpif_subdev_info. Update this change in the driver too.

Applies to v4l-dvb repository.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:21 -03:00
Muralidharan Karicheri 7b140b8930 V4L/DVB (12253): v4l: common vpss module for video drivers
This is a new module added for vpss library functions that are
used for configuring vpss system module. All video drivers will
include vpss.h header file and call functions defined in this
module to configure vpss system module.

Reviewed by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed by: Laurent Pinchart <laurent.pinchart@skynet.be>
Reviewed by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:19 -03:00
Muralidharan Karicheri 5f15fbb68f V4L/DVB (12251): v4l: dm644x ccdc module for vpfe capture driver
This is the hw module for DM644x CCDC. This registers with the
vpfe capture driver and provides a set of hw_ops to configure
CCDC for a specific decoder device connected to the VPFE.

Reviewed by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed by: Laurent Pinchart <laurent.pinchart@skynet.be>

Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:16 -03:00
Muralidharan Karicheri dd2ceb1a40 V4L/DVB (12250): v4l: dm355 ccdc module for vpfe capture driver
Adds ccdc hw module for DM355 CCDC. This registers with the bridge
driver a set of hw_ops for configuring the CCDC for a specific
decoder device connected to vpfe.

Reviewed by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed by: Laurent Pinchart <laurent.pinchart@skynet.be>
Reviewed by: Mauro Carvalho Chehab <mchehab@infradead.org>

Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:15 -03:00
Muralidharan Karicheri 638c974008 V4L/DVB (12249): v4l: ccdc hw device header file for vpfe capture
Adds ccdc hw device header for vpfe capture driver

Reviewed by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed by: Laurent Pinchart <laurent.pinchart@skynet.be>

Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:13 -03:00
Muralidharan Karicheri 7da8a6cb3e V4L/DVB (12248): v4l: vpfe capture bridge driver for DM355 and DM6446
This the vpfe capture bridge driver for doing video
capture on DM355 and DM6446 evms. The ccdc hw modules register with the
driver and are used for configuring the CCD Controller for a specific
decoder interface. The driver also registers the sub devices required
for a specific evm. More than one sub devices can be registered.
This allows driver to switch dynamically to capture video from
any sub device that is registered. Currently only one sub device
(tvp5146) is supported. But in future this driver is expected
to do capture from sensor devices such as Micron's MT9T001, MT9T031
and MT9P031 etc. The driver currently supports MMAP based IO.

Reviewed by: Laurent Pinchart <laurent.pinchart@skynet.be>
Reviewed by: Alexey Klimov <klimov.linux@gmail.com>

Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:12 -03:00
Muralidharan Karicheri c1c9d09cd3 V4L/DVB (12247): tvp514x: formatting comments as per kernel documentation
Fix documentation style based on comments from Mauro.

Reviewed by: Hans Verkuil <hverkuil@xs4all.nl>

Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:11 -03:00
Muralidharan Karicheri 62ef80a1f3 V4L/DVB (12246): tvp514x: Migration to sub-device framework
This patch converts TVP514x driver to sub-device framework
from V4L2-int framework.

[hverkuil@xs4all.nl: remove inline from the dump_reg function]
Signed-off-by: Brijesh Jadav <brijesh.j@ti.com>
Signed-off-by: Hardik Shah <hardik.shah@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:09 -03:00
Huang Weiyi 6bcbc08faa V4L/DVB (12201): adv7343: remove unused #include <linux/version.h>
Remove unused #include <linux/version.h>'s in drivers/media/video/adv7343.c.

Cc: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:07 -03:00
Chaithrika U S 13df4f6a36 V4L/DVB (12178): vpif_display: Fix compile time warnings for mutex locking
mutex_lock_interruptible return value has to be handled properly to indicate
the status to the higher layers of the kernel.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:06 -03:00
Chaithrika U S e9f4bb559c V4L/DVB (12177): dm646x: Add an entry for dm646x EVM card at building system
Makefile and Kconfig changes for DM646x Video Display device, using
davinci/vpif, adv7343 and ths7303 drivers.

Signed-off-by: Manjunath Hadli <mrh@ti.com>
Signed-off-by: Brijesh Jadav <brijesh.j@ti.com>
Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:05 -03:00
Chaithrika U S e7332e3a55 V4L/DVB (12176): davinci/vpif_display: Add VPIF display driver
Adds the VPIF display driver and the associated header file.

Signed-off-by: Manjunath Hadli <mrh@ti.com>
Signed-off-by: Brijesh Jadav <brijesh.j@ti.com>
Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:03 -03:00
Chaithrika U S 63a8e71c44 V4L/DVB (12175): davinci/vpif: Add Video Port Interface (VPIF) driver
This code be used by the display and capture drivers.

Signed-off-by: Manjunath Hadli <mrh@ti.com>
Signed-off-by: Brijesh Jadav <brijesh.j@ti.com>
Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:01 -03:00
Erik Andrén bb3baf89d1 V4L/DVB (12992): gspca - m5602-ov7660: Disable red and blue gain for now
Red and blue gain isn't handled in conformance with the v4l2 specification. Disable them for now.

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:00 -03:00
Erik Andrén e1e7e677a4 V4L/DVB (12991): gspca - m5602-ov7660: Remove redundant init writes
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:17:58 -03:00
Erik Andrén 87fad38e6e V4L/DVB (12990): gspca - m5602-ov7660: Don't set blue and red gain during init
Don't set blue and red gain during init as we manuall set it later

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:17:55 -03:00
Erik Andrén b5b93844ac V4L/DVB (12989): gspca - m5602-ov7660: Don't set gain during init
We manually set the gain later, no need to do it during init

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:17:47 -03:00
Erik Andrén eb3678fbe5 V4L/DVB (12988): gspca - m5602-ov7660: Remove old init
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:17:46 -03:00
Erik Andrén 2ec92c28d7 V4L/DVB (12987): gspca - m5602-ov7660: Set the hsync correctly
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:17:44 -03:00
Erik Andrén a66887d2ba V4L/DVB (12986): gspca - m5602-ov7660: Add hflip, vflip controls
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:17:42 -03:00
Erik Andrén 41532b91da V4L/DVB (12985): gspca - m5602-ov7660: Replace magic constants with defines
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:17:41 -03:00
Erik Andrén bf40b382f6 V4L/DVB (12984): gspca - m5602-ov7660: Use a new raw init
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:17:40 -03:00
Erik Andrén 7c7ddf1638 V4L/DVB (12983): gspca - m5602-ov7660: Add auto exposure ctrl
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:17:38 -03:00
Erik Andrén 456ebe4e92 V4L/DVB (12982): gspca - m5602-ov7660: Add auto gain ctrl
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:17:28 -03:00
Erik Andrén 36e64d5cec V4L/DVB (12981): gspca - m5602-ov7660: Set blue and red gain at init
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:16:58 -03:00
Erik Andrén f1f59fe60e V4L/DVB (12980): gspca - m5602-ov7660: Create auto white balance ctrl
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:16:53 -03:00
Erik Andrén a94e2f2cb9 V4L/DVB (12979): gspca - m5602-ov7660: Ensure that the default exposure is set
Ensure that the default exposure value is set at startup

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:16:47 -03:00
Erik Andrén 68fdb7a5b5 V4L/DVB (12978): gspca - m5602-ov7660: Add red gain control
Hook up the red gain controller

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:16:29 -03:00
Erik Andrén cbd1f7fb70 V4L/DVB (12977): gspca - m5602-ov7660: Create blue gain control
Hook up a blue gain v4l2 controller

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:16:21 -03:00
Steven Toth b8298e7e58 V4L/DVB (12976): SAA7164: Removed bus registration messages from driver startup
SAA7164: Removed bus registration messages from driver startup

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:16:17 -03:00
Steven Toth efac8aaa8e V4L/DVB (12975): SAA7164: Remove the i2c client_attach/detach support, no longer required.
SAA7164: Remove the i2c client_attach/detach support, no longer required.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:16:16 -03:00
Steven Toth c9230457a9 V4L/DVB (12974): SAA7164: Remove the SAA7164 bus id, no longer required.
SAA7164: Remove the SAA7164 bus id, no longer required.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:16:14 -03:00
Michael Krufky 6df84ea86e V4L/DVB (12970): saa7164: fix 64bit build warning
Fix the following build warning:

  CC [M]  saa7164-core.o
saa7164-core.c: In function 'saa7164_buffer_deliver':
saa7164-core.c:113: warning: passing argument 2 of 'dvb_dmx_swfilter_packets'
		    from incompatible pointer type

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:16:10 -03:00
Michael Krufky 66cb930e95 V4L/DVB (12968): saa7164: fix Kconfig: remove HOTPLUG dependency
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:16:09 -03:00
Michael Krufky 6d052dda59 V4L/DVB (12967): saa7164: fix Kconfig: rename DVB_FE_CUSTOMIZE to MEDIA_TUNER_CUSTOMISE
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:16:05 -03:00
Michael Krufky 93463895ae V4L/DVB (12964): tuner-core: add support for NXP TDA18271 without TDA829X demod
Add support for NXP TDA18271 as a standalone tuner, allowing the use of
analog demodulators other than the Philips/NXP TDA829x.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:16:01 -03:00
Antti Palosaari eb3b2d89bc V4L/DVB (12962): ce6230: increase BULK transfer size from 512 to 8192
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:15:54 -03:00
Antti Palosaari ae3745f63a V4L/DVB (12960): anysee: coding style fix
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:15:52 -03:00
Antti Palosaari ab69333690 V4L/DVB (12959): anysee: increase BULK transfer size from 512 to 8192
increase BULK transfer size from 512 to 8192 to increase wakeups

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:15:51 -03:00
Abylay Ospan 2034188a0b V4L/DVB (12957): Fix MAC address reading from EEPROM in NetUP Dual DVB-S2 CI card.
Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:15:49 -03:00
Abylay Ospan 8386c27f47 V4L/DVB (12956): Fix gpio mutex in NetUP Dual DVB-S2 CI card.
The card uses the same cx23885 gpio lines for two adapters.
In case of there is several cards in system we must implement
gpio mutex per cx23885 chip.

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:15:48 -03:00
Olivier Lorin 4f7cb8837c V4L/DVB (12954): gspca - gl860: Addition of GL860 based webcams
- add the Genesys Logic 05e3:0503 and 05e3:f191 webcam

Signed-off-by: Olivier Lorin <o.lorin@laposte.net>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:15:36 -03:00
Jean-Francois Moine ba624ce4ad V4L/DVB (12953): gspca - vc032x: Bad GPIO of the Samsung Q1 on start/stop streaming.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:15:34 -03:00
Antti Palosaari 285eb1a402 V4L/DVB (12951): em28xx: add Reddo DVB-C USB TV Box
Support for Reddo DVB-C USB TV Box device. Remote is not working yet.
Thanks to Benjamin Larsson <banan@ludd.ltu.se>

Cc: Benjamin Larsson <banan@ludd.ltu.se>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:15:32 -03:00
Antti Palosaari e558170a91 V4L/DVB (12950): tuner-simple: add Philips CU1216L
add Philips CU1216L NIM

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:15:27 -03:00
Hans Verkuil 707ca1e30f V4L/DVB (12948): v4l1-compat: fix VIDIOC_G_STD handling
The VIDIOC_G_STD ioctl may not be present in the case of radio receivers.
In that case G_STD will return an error. The v4l1-compat layer should not
attempt to propagate that error to the caller, instead it should be
ignored.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:15:25 -03:00
Steven Toth 3a360ced7b V4L/DVB (12946): SAA7164: Add support for a new HVR-2250 hardware revision
SAA7164: Add support for a new HVR-2250 hardware revision

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:15:24 -03:00
Steven Toth 151ec0d9ed V4L/DVB (12945): SAA7164: Ensure the HVR-2200 second tuner is configured in slave mode.
SAA7164: Ensure the HVR-2200 second tuner is configured in slave mode.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:15:22 -03:00
Steven Toth 8bfd4b290a V4L/DVB (12944): SAA7164: Minor i2c assignment cleanup
SAA7164: Minor i2c assignment cleanup

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:15:19 -03:00
Steven Toth 1f8c40b441 V4L/DVB (12943): SAA7164: Add a warning about addr usage
SAA7164: Remove meaningless if'0 code

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:15:12 -03:00
Steven Toth 90e801acb2 V4L/DVB (12942): SAA7164: HVR2250 changes related to attach time tuner configuration
Ensure that by default all tuners are set correctly to master/slave mode.
For all HVR2250's, ensure slave based tuners are caliberated during attach
to avoid locking problems on tuner# above channel 91.

HVR2200 tuner attach time to be reviewed in a future patch.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:15:11 -03:00
Steven Toth c64b2f78b7 V4L/DVB (12941): SAA7164: Removed spurious debug
SAA7164: Removed spurious debug

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:15:09 -03:00
Steven Toth 39e469ab6d V4L/DVB (12940): SAA7164: IRQ / message timeout related change
In some cases we're seeing large timeouts on commands. I'm changing the
implementation so that the deferred worker checks the PCI bus for
any messages and signals the waiting caller accordingly. The previous
mechanism was too unreliable.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:15:08 -03:00
Steven Toth 068ed40b8f V4L/DVB (12939): SAA7164: Removed a duplicate call to address any PCI quirks.
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:15:07 -03:00
Steven Toth bbf504c37d V4L/DVB (12938): SAA7164: Increase the firmware command timeout to avoid firmware errors.
The firmware typically responds in < 50ms and, via the interrupts and
deferred work queue the caller (blocked in the driver) is signalled very
efficiently. In a highly stressed system this can take many multiples
of seconds. So, we need a larger maximum timeout for busy systems.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:15:06 -03:00
Steven Toth 2ceae8fdfa V4L/DVB (12937): SAA7164: Cleanup a printk
Cleanup a printk and output two helpful driver params in debug mode.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:15:04 -03:00
Steven Toth dd1ee4442d V4L/DVB (12936): SAA7164: Added waitsecs module parameter
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:15:03 -03:00
Steven Toth 3224401e4c V4L/DVB (12935): SAA7164: Ensure we specify I/F's for all bandwidths
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:15:01 -03:00
Steven Toth 30015c1ed7 V4L/DVB (12934): SAA7164: Fix i2c eeprom read errors during load (some boards).
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:15:00 -03:00
Steven Toth 50bcb4aefe V4L/DVB (12933): SAA7164: Fix IRQ related system hang when firmware is not found.
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:14:59 -03:00
Steven Toth c303e3e10a V4L/DVB (12932): SAA7164: Fixed the missing eeprom parse on a specific board.
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:14:57 -03:00
Steven Toth e333522225 V4L/DVB (12931): SAA7164: Fix the 88021 definition to work with production boards.
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:14:56 -03:00
Steven Toth 78d155693a V4L/DVB (12930): SAA7164: Removed spurious I2C errors during driver load with DVB-T boards.
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:14:55 -03:00
Steven Toth d888ea03a0 V4L/DVB (12929): SAA7164: OOPS avoidance during interrupt handling
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:14:53 -03:00
Steven Toth f4a6adf1e5 V4L/DVB (12928): SAA7164: Increase firmware load tolerance
It's timing out and aborting firmware load too quickly on some
platforms, this increases the upper limit.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:14:52 -03:00
Steven Toth 1a6450d4d4 V4L/DVB (12927): SAA7164: Remove volatiles for PCI writes (coding style violation)
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:14:51 -03:00
Steven Toth 9d119c3314 V4L/DVB (12926): SAA7164: Email address change
SAA7164: Email address change

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:14:49 -03:00
Steven Toth 7aa2e795f2 V4L/DVB (12925): SAA7164: Adjust I/F's to the TDA10048 enabling DVB-T lock
SAA7164: Adjust I/F's to the TDA10048 enabling DVB-T lock

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:14:48 -03:00
Steven Toth 207b42c492 V4L/DVB (12924): SAA7164: Fix some 32/64bit compile time warnings
SAA7164: Fix some 32/64bit compile time warnings

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:14:47 -03:00
Steven Toth 443c1228d5 V4L/DVB (12923): SAA7164: Add support for the NXP SAA7164 silicon
This patch adds support for all of the known shipping Hauppauge HVR-2200
and HVR-2250 boards. Digital TV ATSC/QAM and DVB-T is enabled at this
time. Both tuners are supported.

Volatiles and typedefs need rework, the rest is coding style compliant.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:14:43 -03:00
Mauro Carvalho Chehab aaeab30f75 V4L/DVB (12906): dib0700: Add support for Prolink SBTVD
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:14:35 -03:00
Patrick Boettcher 78f3bc631f V4L/DVB (12903): DiB8000: fix channel search parameter initialization
This patch is fixing the initialization of the channel search parameters.

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <pboettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:14:34 -03:00
Patrick Boettcher ba3fe3a963 V4L/DVB (12901): DiB0700: add support for STK807XP and STK807XPVR
This patchs adds support for the DiB8000 based devices STK807xP and
STK807xPVR to the dib0700-device-tree.

[mchehab@redhat.com: Fix merge conflicts]

Signed-off-by: Olivier Grenie <Olivier.Grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <pboettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:14:31 -03:00
Patrick Boettcher 77e2c0f5d4 V4L/DVB (12900): DiB8000: added support for DiBcom ISDB-T/ISDB-Tsb demodulator DiB8000
This commit adds support for the DiB8000 ISDB-T demodulator made by DiBcom.

Signed-off-by: Olivier Grenie <Olivier.Grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <pboettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:14:30 -03:00
Patrick Boettcher 2a6a30e05c V4L/DVB (12899): DiB0070: Indenting driver with indent -linux
In order to follow a little bit the kernel coding style from now on
after the generation of that driver file and indent -linux call is
emitted.

Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:14:29 -03:00
Patrick Boettcher 7e5ce6515d V4L/DVB (12898): DiB0070: Update to latest internal release
General update of the dib0070-driver based on DiBcom's latest release.

New driver features can enable better performance in some reception situations.

Signed-off-by: Patrick Boettcher <Patrick.Boettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:14:27 -03:00
Patrick Boettcher e7b7949a95 V4L/DVB (12896): ISDB-T: add mapping of LAYER_ENABLED to frontend-cache
It was forgotten to map the LAYER_ENABLED ioctl to the frontend-cache and back.

Signed-off-by: Patrick Boettcher <pboettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:14:25 -03:00
Patrick Boettcher b6e760f309 V4L/DVB (12892): DVB-API: add support for ISDB-T and ISDB-Tsb (version 5.1)
This patch increments the DVB-API to version 5.1 in order to reflect the addition of ISDB-T and ISDB-Tsb on Linux' DVB-API.

Changes in detail:
- added a small document to describe how to use the API to tune to an ISDB-T or ISDB-Tsb channel
- added necessary fields to dtv_frontend_cache
- added a smarter clear-cache function which resets all fields of the dtv_frontend_cache
- added a TRANSMISSION_MODE_4K to fe_transmit_mode_t

Signed-off-by: Olivier Grenie <olgrenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <pboettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:14:24 -03:00
Patrick Boettcher db48138f6b V4L/DVB (12889): DIB0700: added USB IDs for a Terratec DVB-T XXS
Since there is now correct support for the DiB7770 the support for the
'Terratec Cinergy T USB XXS (HD)' can be added.

One USB-ID has been moved, another one has been added.

Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:14:13 -03:00
Olivier Grenie d300bd6914 V4L/DVB (12888): STK7770P: Add support for STK7770P
Added support for the dib7770P and the STK7770P

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:14:11 -03:00
Olivier Grenie ef80196490 V4L/DVB (12887): DIB7000P: SNR calcuation forr DiB7000P
Add the SNR monitoring for the dib7000p. The result is in dB.

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:14:10 -03:00
Olivier Grenie 74b76f2136 V4L/DVB (12886): Added new Pinnacle USB devices
Added Pinnacle PCTV USB devices based on PCTV 73e.

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:14:09 -03:00
Andy Walls 958411bc48 V4L/DVB (12884): cx18: Eliminate warning about discarding 'const' is assignment for IR init
i2c-kbd-i2c allows a bridge driver to pass information about IR configuration,
but uses a "void *" to pass along what is essentially constant data.  This
change casts a const * to a void * to remove the warning.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:14:07 -03:00
Devin Heitmueller 0e12e1536c V4L/DVB (12882): em28xx: remove text editor tags from em28xx-vbi.c
Remove some emacs tags from em28xx-vbi.c, which were copied from cx88-vbi.c,
per Mauro Carvalho Chehab's request.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:14:06 -03:00
Devin Heitmueller e3ba4d34d0 V4L/DVB (12881): em28xx: fix codingstyle issues in em28xx-video.c
Fix some codingstyle issues introduced during the addition of em28xx VBI
support.  The patch makes no functional changes other than converting a few
debug printk() statements to em28xx_isocdbg.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:14:05 -03:00
Devin Heitmueller cb0409ffb7 V4L/DVB (12880): em28xx: fix codingstyle issues introduced with VBI support
Fix a few codingstyle issues introduced when I was adding the VBI support to
the em28xx driver.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:14:03 -03:00
Brian Kloppenborg 95e6dcd1bb V4L/DVB (12878): gspca - m5602-s5k4aa: Add vflip quirk for the GX700
The MSI GX700 is a tricky machine to support. Some revisions do need the sensor flipped, but not all.
Add another quirk, distinguished by its BIOS date.

Signed-off-by: Brian Kloppenborg <bkloppenborg@gmail.com>
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:14:02 -03:00
Erik Andrén 9760677417 V4L/DVB (12877): gspca - m5602-s5k4aa: Add vflip quirk for the Amilo Pa 2548
Add vflip quirk for the Fujitsu Siemens Amilo Pa 2548

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:14:00 -03:00
Michael Krufky 04a68baa20 V4L/DVB (12875): cx23885: disable tda18271 slave tuner output / loop thru in standby mode
Enable the standby mode optimization to disable the tda18271
slave tuner output / loop thru options when in low power mode

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:13:59 -03:00
Michael Krufky a18eaf02c8 V4L/DVB (12874): pvrusb2: disable tda18271 slave tuner output / loop thru in standby mode
Enable the standby mode optimization to disable the tda18271
slave tuner output / loop thru options when in low power mode

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:13:57 -03:00
Michael Krufky 542cb05736 V4L/DVB (12873): saa7134: disable tda18271 slave tuner output / loop thru in standby mode
Enable the standby mode optimization to disable the tda18271
slave tuner output / loop thru options when in low power mode

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:13:55 -03:00
Henk Vergonet d1f7510b91 V4L/DVB (12871): tda18271: fix bad data in tda18271_cid_target table
Fixed one value and removed a duplicate in tda18271_cid_target[],
based on table 54 "CID_Target_map" in Rev.04 of the TDA18271HD datasheet.

Signed-off-by: Henk Vergonet <Henk.Vergonet@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:13:52 -03:00
Henk Vergonet b5d189702b V4L/DVB (12870): tda18271: update temperature compensation calculatation formula
Update the tda18271c2_rf_tracking_filters_correction function to include
the modified temperature compensation calculatation formula as described
in Rev.04 of the TDA18271HD datasheet.

Signed-off-by: Henk Vergonet <Henk.Vergonet@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:13:50 -03:00
Michael Krufky ecda427340 V4L/DVB (12869): tda18271: fix comments and make tda18271_agc debug less verbose
Don't display "no agc configuration provided" unless DBG_ADV is set.

Fix comments in function, tda18271_agc.  This config variable is not
for LNA configuration -- it is for external AGC configuration.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:13:49 -03:00
Michael Krufky 650901c0b6 V4L/DVB (12868): tda18271: improve error log in function tda18271_write_regs
Display function parameters, idx and len, in error log.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:13:48 -03:00
Michael Krufky d5abef6be1 V4L/DVB (12867): tda18271: ensure that configuration options are set for multiple instances
For the case of multiple tuner instances, ensure that non-default
configuration options are saved into the driver's state.

This resolves an issue where a configuration option may not be
carried into the driver if the analog side of a hybrid driver
initializes before the digital side.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:13:47 -03:00
Michael Krufky 1216531a1f V4L/DVB (12866): tda18271: move small_i2c assignment to the state config block
minor cleanup: move small_i2c assignment to the state config block

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:13:45 -03:00
Michael Krufky cc7e26d47f V4L/DVB (12865): tda18271: move tda18271_sleep directly below tda18271_init
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:13:44 -03:00
Michael Krufky 4240b460f0 V4L/DVB (12864): tda18271: change output feature configuration to a bitmask
For better readability, treat the low power standby mode configuration
as an output option feature configuration, and change it to a bitmask.

If left unconfigured, all features will remain enabled, just as the
default configuration was before these changes were introduced.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:13:43 -03:00
Michael Krufky 2dfca76303 V4L/DVB (12863): tda18271: add new standby mode: slave tuner output / loop thru on
Add new standby mode:
TDA18271_STANDBY_LT_ON = slave tuner output loop thru on w/ xtal osc off

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:13:41 -03:00
Michael Krufky 72c8364a66 V4L/DVB (12862): tda18271: add debug to show which standby mode is in use
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:13:40 -03:00
Michael Krufky 81259f210e V4L/DVB (12861): tda18271: add support for additional low-power standby modes
By default, the driver enters standby mode with slave tuner output
loop thru enabled and xtal oscillator on.

Not all designs require that slave tuner output loop thru and
xtal oscillator remain active while in standby mode, so two
additional standby modes have been added:

- standby mode with xtal oscillator on (loop thru off)

- total power off

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:13:39 -03:00
Antti Palosaari f4e96deb45 V4L/DVB (12756): af9015: fix typo in register compare
And mask should be 0xff00 instead of 0xae00.

Thanks to Jochen Friedrich <jochen@scram.de> for pointing this.

Cc: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-18 23:47:54 -03:00
Antti Palosaari 06565d7a42 V4L/DVB (12755): af9015: improve usb control message function slightly
* define names for few values
* decrease buffer len by one byte which was not used
* add check for buffer overflow for sure
* indentation fixes
* remove useless 0 len check from memcpy
It should not happen and if it happens memcpy should not do anything.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-18 23:47:53 -03:00
Antti Palosaari 9c86327809 V4L/DVB (12754): af9015: [2/2] fix USB TS configuration
Fix wrongly configured USB1.1 TS EP.

Patch serie also increases USB URB size to reduce wakeups.
USB1.1 URB size from 64 to 940 bytes
USB2.0 URB size from 512 to 16356 bytes

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-18 23:47:53 -03:00
Jose Alberto Reguero 353330c3eb V4L/DVB (12753): af9015: [1/2] fix USB TS configuration
Fix wrongly configured USB2.0 TS EP.

Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-18 23:47:52 -03:00
Devin Heitmueller 891114a413 V4L/DVB (12750): em28xx: fix unused variable warning
Remove unused variable from when I introduced the g_std() function.

This work was sponsored by EyeMagnet Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-18 23:47:49 -03:00
Devin Heitmueller 10e0125502 V4L/DVB (12749): em28xx: remove unneeded code that set VINCTRL register
Remove redundant call to set the vinctrl register.  This eliminates any
ambiguity as to how the register is configured (since it is now always set in
em28xx_set_outfmt).

This work was sponsored by EyeMagnet Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-18 23:47:45 -03:00
Devin Heitmueller 19bf00384a V4L/DVB (12748): em28xx: implement g_std v4l call
We need to implement the g_std call, or else the default norm always gets
returned, which breaks VBI capturing if you had changed the standard to NTSC
using s_std.

I had temporarily changed the default norm to NTSC so that zvbi-ntsc-cc
wouldn't choke, so now that we are returning the correct value, switch it back
to PAL as the default.

This work was sponsored by EyeMagnet Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-18 23:47:45 -03:00
Devin Heitmueller 0414614aab V4L/DVB (12747): em28xx: only advertise VBI capability if supported
Change the code so we only claim to support VBI if the underlying chipset
actually has the support.

This work was sponsored by EyeMagnet Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-18 23:47:44 -03:00
Devin Heitmueller 290c0cfac9 V4L/DVB (12746): em28xx: do not create /dev/vbiX device if VBI not supported
Do not create the VBI device in cases where VBI is not supported on the target
em28xx chip.

This work was sponsored by EyeMagnet Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-18 23:47:43 -03:00
Devin Heitmueller 365adee851 V4L/DVB (12745): em28xx: remove unreferenced variable
Remove an unreferenced variable introduced during the VBI introduction.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-18 23:47:42 -03:00
Devin Heitmueller 8c873d31af V4L/DVB (12744): em28xx: restructure fh/dev locking to handle both video and vbi
The current locking infrastructure didn't support having multiple fds accessing
the device (such as video and vbi).  Rework the locking infrastructure,
borrowing the design from cx88.

This work was sponsored by EyeMagnet Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-18 23:47:42 -03:00
Devin Heitmueller 91f6dcec92 V4L/DVB (12743): em28xx: fix mmap_mapper with vbi
When adding support for both video and VBI, I missed the mmap ioctl.  Add
the missing call.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-18 23:47:42 -03:00
Devin Heitmueller 28abf083d3 V4L/DVB (12742): em28xx: add raw VBI support for NTSC
Add support for raw VBI capture for the em28xx bridge, currently only for
NTSC.  Support for PAL capture to follow shortly (including the removal of
numerous hard-coded NTSC-specific sizes for capture buffers, etc).

Note that the code currently changes the default current norm from PAL to
NTSC (so that zvbi-ntsc-cc works properly).  The default norm really should
be moved into a board-level parameter.

This work was sponsored by EyeMagnet Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-18 23:47:41 -03:00
Devin Heitmueller da52a55cff V4L/DVB (12741): em28xx: make video isoc stream work when VBI is enabled
Add code enabling the VBI registers for variants of the em28xx chip that
support VBI, and make sure the isoc streaming code continues to work for
the video component of the stream (note the video and vbi data arrive
intermixed on the same isoc pipe).

Note that this version just drops the actual VBI data onto the floor as
opposed to processing it.  The "#ifdef 0" tags are for the videobuf code that
appears in the next patch in this series.

We created a separate version of the isoc_copy version for parsing the version
of the stream that includes VBI data.  In theory, they might be able to be
merged at some point in the future, but the initial goal is to ensure that we
do not cause any regressions with devices that do not have VBI support.

This work was sponsored by EyeMagnet Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-18 23:47:40 -03:00
Devin Heitmueller 206313db83 V4L/DVB (12740): em28xx: better describe vinctrl registers
Properly document the video input control register, in preparation for the
addition of VBI support.  Note this patch makes no functional changes.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-18 23:47:40 -03:00
Paul Mundt ea88023b34 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
	arch/sh/kernel/vmlinux.lds.S
2009-09-16 13:48:32 +09:00
Linus Torvalds 043fe50f80 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (213 commits)
  V4L/DVB (12720): em28xx-cards: Add vendor/product id for Kworld DVD Maker 2
  V4L/DVB (12713): em28xx: Cleanups at ir_i2c handler
  V4L/DVB (12712): em28xx: properly load ir-kbd-i2c when needed
  V4L/DVB (12701): saa7134: ir-kbd-i2c init data needs a persistent object
  V4L/DVB (12699): cx18: ir-kbd-i2c initialization data should point to a persistent object
  V4L/DVB (12698): em28xx: ir-kbd-i2c init data needs a persistent object
  V4L/DVB (12707): gspca - sn9c20x: Add SXGA support to MT9M111
  V4L/DVB (12706): gspca - sn9c20x: disable exposure/gain controls for MT9M111 sensors.
  V4L/DVB (12705): gspca - sn9c20x: Add SXGA support to SOI968
  V4L/DVB (12703): gspca - sn9c20x: Reduces size of object
  V4L/DVB (12704): gspca - sn9c20x: Fix exposure on SOI968 sensors
  V4L/DVB (12696): gspca - sonixj / sn9c102: Two drivers for 0c45:60fc and 0c45:613e.
  V4L/DVB (12695): gspca - vc032x: Do the LED work with the sensor hv7131r.
  V4L/DVB (12694): gspca - vc032x: Change the start exchanges of the sensor hv7131r.
  V4L/DVB (12693): gspca - sunplus: The brightness is signed.
  V4L/DVB (12692): gspca - sunplus: Optimize code.
  V4L/DVB (12691): gspca - sonixj: Don't use mdelay().
  V4L/DVB (12690): gspca - pac7311: Webcam 06f8:3009 added.
  V4L/DVB (12686): dvb-core: check supported QAM modulations
  V4L/DVB (12685): dvb-core: check fe->ops.set_frontend return value
  ...
2009-09-15 09:22:18 -07:00
Douglas Schilling Landgraf ea47689e74 V4L/DVB (12720): em28xx-cards: Add vendor/product id for Kworld DVD Maker 2
Added Kworld DVD Maker 2
Thanks to C Western <l@c-m-w.me.uk> for reporting this board.

Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-14 22:39:19 -03:00
Linus Torvalds d7e9660ad9 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1623 commits)
  netxen: update copyright
  netxen: fix tx timeout recovery
  netxen: fix file firmware leak
  netxen: improve pci memory access
  netxen: change firmware write size
  tg3: Fix return ring size breakage
  netxen: build fix for INET=n
  cdc-phonet: autoconfigure Phonet address
  Phonet: back-end for autoconfigured addresses
  Phonet: fix netlink address dump error handling
  ipv6: Add IFA_F_DADFAILED flag
  net: Add DEVTYPE support for Ethernet based devices
  mv643xx_eth.c: remove unused txq_set_wrr()
  ucc_geth: Fix hangs after switching from full to half duplex
  ucc_geth: Rearrange some code to avoid forward declarations
  phy/marvell: Make non-aneg speed/duplex forcing work for 88E1111 PHYs
  drivers/net/phy: introduce missing kfree
  drivers/net/wan: introduce missing kfree
  net: force bridge module(s) to be GPL
  Subject: [PATCH] appletalk: Fix skb leak when ipddp interface is not loaded
  ...

Fixed up trivial conflicts:

 - arch/x86/include/asm/socket.h

   converted to <asm-generic/socket.h> in the x86 tree.  The generic
   header has the same new #define's, so that works out fine.

 - drivers/net/tun.c

   fix conflict between 89f56d1e9 ("tun: reuse struct sock fields") that
   switched over to using 'tun->socket.sk' instead of the redundantly
   available (and thus removed) 'tun->sk', and 2b980dbd ("lsm: Add hooks
   to the TUN driver") which added a new 'tun->sk' use.

   Noted in 'next' by Stephen Rothwell.
2009-09-14 10:37:28 -07:00
Mauro Carvalho Chehab 7e8e16ca39 V4L/DVB (12713): em28xx: Cleanups at ir_i2c handler
There are some extra parenthesis at the clauses, and some switch() tests
for boards that don't have i2c ir. Remove those extra code.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 13:47:44 -03:00
Mauro Carvalho Chehab ac07bb73fe V4L/DVB (12712): em28xx: properly load ir-kbd-i2c when needed
Currently, the logic to load ir i2c ancillary module is broken. It is
associated to Hauppauge devices with IR flag on their eeprom, no matter
if the device uses i2c or em28xx direct IR support. That's wrong.

Instead, add a flag to the boards that use i2c IR chips and load the
module only for those devices and if ir is not disabled.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 13:47:34 -03:00
Mauro Carvalho Chehab 7aedd5ec87 V4L/DVB (12701): saa7134: ir-kbd-i2c init data needs a persistent object
ir-kbd-i2c's ir_probe() function can be called much later (i.e. at
ir-kbd-i2c module load), than the lifetime of a struct IR_i2c_init_data
allocated off of the stack in cx18_i2c_new_ir() at registration time.
Make sure we pass a pointer to a persistent IR_i2c_init_data object at
i2c registration time.

Thanks to Brian Rogers, Dustin Mitchell, Andy Walls and Jean Delvare to
rise this question.

Before this patch, if ir-kbd-i2c were probed after SAA7134, trash data
were used.

Compile tested only, but the patch is identical to em28xx one. So, it
should work properly.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:20:17 -03:00
Andy Walls 78f2e672b3 V4L/DVB (12699): cx18: ir-kbd-i2c initialization data should point to a persistent object
ir-kbd-i2c's ir_probe() function can be called much later (i.e. at ir-kbd-i2c
module load), than the lifetime of a struct IR_i2c_init_data allocated off of
the stack in cx18_i2c_new_ir() at registration time.  Make sure we pass
a pointer to a persistent IR_i2c_init_data object at i2c registration time.

Thanks to Brian Rogers for pointing out a solution, and Dustin Mitchell for
testing against a 2.6.30 kernel.

Reported-by: Dustin Mitchell <soxslayer@gmail.com>
Reported-by: Brian Rogers <brian@xyzw.org>
Tested-by: Dustin Mitchell <soxslayer@gmail.com>
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:20:15 -03:00
Mauro Carvalho Chehab d2ebd0f806 V4L/DVB (12698): em28xx: ir-kbd-i2c init data needs a persistent object
ir-kbd-i2c's ir_probe() function can be called much later (i.e. at
ir-kbd-i2c module load), than the lifetime of a struct IR_i2c_init_data
allocated off of the stack in cx18_i2c_new_ir() at registration time.
Make sure we pass a pointer to a persistent IR_i2c_init_data object at
i2c registration time.

Thanks to Brian Rogers, Dustin Mitchell, Andy Walls and Jean Delvare to
rise this question.

Before this patch, if ir-kbd-i2c were probed after em28xx, trash data
were used. After the patch, no matter what order, it is properly
reported as tested by me:

input: i2c IR (i2c IR (EM2840 Hauppaug as /class/input/input10
ir-kbd-i2c: i2c IR (i2c IR (EM2840 Hauppaug detected at i2c-4/4-0030/ir0 [em28xx #0]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:20:15 -03:00
Brian Johnson 4d708a5e9e V4L/DVB (12707): gspca - sn9c20x: Add SXGA support to MT9M111
Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:20:14 -03:00
Brian Johnson 13a84fa4de V4L/DVB (12706): gspca - sn9c20x: disable exposure/gain controls for MT9M111 sensors.
Using the MT9M111's IFP to handle exposure/gain gives better results.

Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:20:14 -03:00
Brian Johnson e8b7acc180 V4L/DVB (12705): gspca - sn9c20x: Add SXGA support to SOI968
Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:20:13 -03:00
Joe Perches 58aa68c2fb V4L/DVB (12703): gspca - sn9c20x: Reduces size of object
Use s16 instead of int where possible.
Use struct instead of arrays

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:20:12 -03:00
Brian Johnson e143047129 V4L/DVB (12704): gspca - sn9c20x: Fix exposure on SOI968 sensors
Fixes broken exposure on SOI968 webcams that was causing
the camera to display a black screen

Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:20:11 -03:00
Jean-Francois Moine f077b0a648 V4L/DVB (12696): gspca - sonixj / sn9c102: Two drivers for 0c45:60fc and 0c45:613e.
Let 0c45:60fc in sn9c102 and 0c45:613e in gspca-sonixj (sensor not supported).

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:20:10 -03:00
Jean-Francois Moine ae310ee109 V4L/DVB (12695): gspca - vc032x: Do the LED work with the sensor hv7131r.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:20:09 -03:00
Jean-Francois Moine 0ee7e4d6d4 V4L/DVB (12694): gspca - vc032x: Change the start exchanges of the sensor hv7131r.
The new exchanges are taken from the information file of the ms-win driver
(usbvm326.inf - webcam 15b8:6002).

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:20:09 -03:00
Jean-Francois Moine 760f2713cb V4L/DVB (12693): gspca - sunplus: The brightness is signed.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:20:08 -03:00
Jean-Francois Moine 2e1794b51b V4L/DVB (12692): gspca - sunplus: Optimize code.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:20:07 -03:00
Jean-Francois Moine 1f78a976ce V4L/DVB (12691): gspca - sonixj: Don't use mdelay().
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:20:05 -03:00
Stephane Marguet (Stemp) b5948bee13 V4L/DVB (12690): gspca - pac7311: Webcam 06f8:3009 added.
Signed-off-by: Stephane Marguet (Stemp) <smarguet@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:20:04 -03:00
Janne Grunau f51fad85af V4L/DVB (12686): dvb-core: check supported QAM modulations
Check the modulation in dvb_frontend_check_parameters against
frontend's capabilties for FE_QAM devices.

Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:20:04 -03:00
Janne Grunau 01886255dd V4L/DVB (12685): dvb-core: check fe->ops.set_frontend return value
Various frontend driver have parameter checks in their set_frontend
functions and return an error if the parameters are not supported,
tda10021 and cx24116 to name two.

The tuning ioctls FE_SET_FRONTEND/FE_SET_PROPERTY only change values
in the property cache and return before set_frontend is called. If a
set_frontend call in software zigzag algorithm fails and the card was
previously locked it will report a lock and the new parameters but is
still tuned to the old transport. This is not detectable from
userspace.

This change checks the return values of fe->ops.set_frontend and
changes the state to the added FESTATE_ERROR for software zigzag.
No lock will be reported to userspace if the State is FESTATE_ERROR.

Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:20:03 -03:00
Janne Grunau 4457ef1d61 V4L/DVB (12684): DVB: make DVB_MAX_ADAPTERS configurable
Support for more than 8 DVB devices is requested regularly so make it
a kconfig variable instead of a header define. Values in the range 4-32
are tested.

Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:20:03 -03:00
Hans de Goede f9089b0f9e V4L/DVB (12627): gspca_mr97310a: Add one more vivitar mini cam to the list of CIF cams
gspca_mr97310a: Add one more vivitar mini cam to the list of CIF cams

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:20:02 -03:00
Hans de Goede 780287061b V4L/DVB (12626): gspca_mr97310a: Allow overriding of detected sensor type
gspca_mr97310a: Allow overriding of detected sensor type

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:20:00 -03:00
Hans de Goede 823902defe V4L/DVB (12624): gspca_mr97310a: Use correct register for CIF type 1 sensor gain settings
gspca_mr97310a: Use correct register for CIF type 1 sensor gain settings

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:59 -03:00
Hans de Goede a2e081b64e V4L/DVB (12623): gspca_mr97310a: Add controls for CIF type 0 sensor cams
gspca_mr97310a: Add controls for CIF type 0 sensor cams

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:58 -03:00
Hans de Goede 5494378911 V4L/DVB (12622): gspca_mr97310a: make the probing a bit less chatty
gspca_mr97310a: make the probing a bit less chatty

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:58 -03:00
Hans de Goede 5f5e26b1e6 V4L/DVB (12621): gspca_mr97310a: Move detection of CIF sensor type to probe() function
gspca_mr97310a: Move detection of CIF sensor type to probe() function,
so that the right controls are set to disabled from the start, rather then
having them disappear all of a sudden when the stream is started.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:57 -03:00
Hans de Goede 9ac6978a10 V4L/DVB (12620): gspca_mr97310a: cleanup/fixup control handling
gspca_mr97310a: cleanup/fixup control handling

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:55 -03:00
Hans de Goede 58d0b2f66e V4L/DVB (12619): gspca: mr97310a fix detection of sensortype for vivicam with id byte of 0x53
gspca: mr97310a fix detection of sensortype for vivicam with id byte of 0x53

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:54 -03:00
Theodore Kilgore 89f0863c42 V4L/DVB (12618): gspca: mr97310a add support for CIF and more VGA camera's
This patch adds supports for mr97310a camera's with CIF sensors (2 different
types) and for VGA mr97310a camera with a different sensor then supported
until now.

This patch also add support for controls for one of the 2 CIF sensors, this
was written by Thomas Kaiser <thomas@kaiser-linux.li>

Signed-off-by: Theodore Kilgore <kilgota@auburn.edu>
Signed-off-by: Thomas Kaiser <thomas@kaiser-linux.li>
Signed-off-by: Hans de Goede <hdgoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:54 -03:00
Hans de Goede 0e4a90993d V4L/DVB (12617): gspca_pac207: enable higher framerates / lower exposure settings
Now that we've figured out the higher compression settings (supported in
libv4l-0.6.0 and later, so after this patch the driver should be used with
libv4l-0.6.0 or higher only!), we can enable higher framerates. Which
means lower exposure times, which is important for the use of the pac207
in full daylight.

This patch also tweakes the brightness default and the per color gain
balances to use the values which are adviced by Pixart in the pac207
application note.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:53 -03:00
Hans de Goede c529e556f6 V4L/DVB (12616): gspca_pac207: remove a number of unneeded (repeated) register writes
gspca_pac207: remove a number of unneeded (repeated) register writes

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:53 -03:00
Hans Verkuil 8d81ae2431 V4L/DVB (12613): cx25840: fix determining the firmware name
Depending on the model there are three different firmwares to choose from.
Unfortunately if a cx23885 is loaded first, then the global firmware name
is overwritten with that firmware and if ivtv is loaded next, then it
tries to load the wrong firmware. In addition, the original approach would
also overwrite any firmware that the user specified explicitly.

Cc: Jarod Wilson <jarod@wilsonet.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:52 -03:00
Hans Verkuil a65f315924 V4L/DVB (12612): si4713: simplify the code to remove a compiler warning.
The compiler warned about an uninitialized stereo variable. By simplifying
the code it 1) improved readability and 2) fixed the compiler warning.

Acked-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:50 -03:00
Mauro Carvalho Chehab a4c1cbc781 V4L/DVB (12600): dvb-usb-remote: return KEY_RESERVED if there's free space for new keys
The input subsystem checks if get_keycode works for a scan code. Due to that,
we need to return a valid value when there's some space at the table that
can be used by a scancode.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:49 -03:00
Mauro Carvalho Chehab b77f0a7630 V4L/DVB (12599): dvb-usb-remote: Allow dynamically replacing the IR keycodes
Implements handler for EVIOCGKEYCODE/EVIOCSKEYCODE via adding two new callbacks
to the input device.

Since on dvb-usb a scan code has 16 bits, to fulfill rc5 standard codes, the default
getkeycode/setkeycode input methods would require the driver to spend up to 64 Kb of
a sparse table. Instead, add two new callbacks to the event device.

With this, it is now possible to replace the keycode tables. There are, however, a few
implementation details at the current patch:

1) It will replace the existing device keytable, instead of creating an instance
of the data. This works. However, if two devices pointing to the same table
were connected, changing the IR table of one will also change the IR table for
the other (the solution for this one is simple: just kmalloc some memory);

2) In order to change the scan code, you need first to change the key to
KEY_RESERVED or KEY_UNKNOWN to free some space at the table (solution: allocate
some additional space for newer scan codes or allow dynamic table grow);

3) The table size cannot be extended. It would be easy to allow the table to
grow dynamically: just calling kmalloc(size+1); kfree(old). Yet, maybe we can
just create a bigger table with a fixed size, like for example a table with 128
entries. This should be enough even for a very big IR.

The current issues should be addressed on a later patch.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:48 -03:00
Mauro Carvalho Chehab 2e3658836e V4L/DVB (12598): dvb-usb: store rc5 custom and data at the same field
In order to be closer to V4L IR implementation, it is needed to replace
	u8 custom, data
to:
	u16 scan

This allows using non-rc5 mappings, like the 8 bit keycodes used on older
protocols. It will also allow future implementations of rc6 keystrokes
when needed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:48 -03:00
Mauro Carvalho Chehab 715a223323 V4L/DVB (12595): common/ir: use a struct for keycode tables
Currently, V4L uses a scancode table whose index is the scancode and
the value is the keycode. While this works, it has some drawbacks:

1) It requires that the scancode to be at the range 00-7f;

2) keycodes should be masked on 7 bits in order for it to work;

3) due to the 7 bits approach, sometimes it is not possible to replace
the default keyboard to another one with a different encoding rule;

4) it is different than what is done with dvb-usb approach;

5) it requires a typedef for it to work. This is not a recommended
Linux CodingStyle.

This patch is part of a larger series of IR changes. It basically
replaces the IR_KEYTAB_TYPE tables by a structured table:
struct ir_scancode {
       u16     scancode;
       u32     keycode;
};

This is very close to what dvb does. So, a further integration with DVB
code will be easy.

While we've changed the tables, for now, the IR keycode handling is still
based on the old approach.

The only notable effect is the redution of about 35% of the ir-common
module size:

   text    data     bss     dec     hex filename
   6721   29208       4   35933    8c5d old/ir-common.ko
   5756   18040       4   23800    5cf8 new/ir-common.ko

In thesis, we could be using above u8 for scancode, reducing even more the size
of the module, but defining it as u16 is more convenient, since, on dvb, each
scancode has up to 16 bits, and we currently have a few troubles with rc5, as their
scancodes are defined with more than 8 bits.

This patch itself shouldn't be doing any functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:47 -03:00
Jean-Francois Moine 47f7f6fb79 V4L/DVB (12501): gspca - sonixj: Do the ov7660 sensor work again.
- bad sensor power
- bad edge gain/threshold
- set back the auto gain
- light frequency filter inverted

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:46 -03:00
Mauro Carvalho Chehab 5706934967 V4L/DVB (12469): fix bad whitespaces at cx88_geniatech_x8000_mt
It were using 7 spaces instead of tab for indent.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:45 -03:00
Mauro Carvalho Chehab 6d888a66be V4L/DVB (12591): em28xx: Add entry for GADMEI UTV330+ and related IR keymap
[mchehab@redhat.com: Fix a few wrong IR keymaps]
Signed-off-by: Shine Liu <shinel@foxmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:44 -03:00
Eugene Yudin 23389b8852 V4L/DVB (12589): Add support for RoverMedia TV Link Pro FM
This patch add support for RoverMedia TV Link Pro FM (LR138 REV:I) card
based on saa7134.

Signed-off-by: Eugene Yudin <Eugene.Yudin@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:43 -03:00
Dmitri Belimov 2012c87f83 V4L/DVB (12587): Add support BeholdTV X7 card
Add support our new TV card based on xc5000 and saa7134.
Analog TV works well.

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:42 -03:00
OldÅ™ich JedliÄka 736dadaa17 V4L/DVB (12586): Update ALSA capture controls according to selected source.
The patch introduces new snd_saa7134_capsrc_set (code taken from
snd_saa7134_capsrc_put) that updates also the ALSA capture controls during
snd_card_saa7134_capture_prepare and snd_saa7134_capsrc_put.

There can be much more work done in order to unify the control of the card
(now the card's capture source is tuned/switched in saa7134-video.c too), but
I don't have enough time. This work could be a starting point, but it can be
applied as-is too (it doesn't need any further work to make it working).

Signed-off-by: OldÅ™ich JedliÄka <oldium.pro@seznam.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:41 -03:00
Mauro Carvalho Chehab ed44f66e40 V4L/DVB (12585): Add remote support to cph03x bttv card
Hello kernel developers.
I found a bug report from an user in launchpad. I just copy it here. It
includes patch.

I don't own the necessary hardware to test it but the patch looks
trivial.

I'm not subscribed to this list, so please CC me. Thanks!

Here is the text:

"""
remote control for my tv card doesnt work

I have Askey CPH03x TV Capturer.
When I load bttv module with "card=59" option which is proper for this
tv card,
I can watch tv with sound but my remote control doesnt work. There is no
ir
event in /proc/bus/input/device .
When bttv module is loaded with "card=137" option remote control works
very
well.

$ cat /proc/bus/input/devices
.......
........
: Bus=0001 Vendor=109e Product=0350 Version=0001
N: Name="bttv IR (card=137)"
P: Phys=pci-0000:00:0d.0/ir0
S: Sysfs=/devices/pci0000:00/0000:00:0d.0/input/input144
U: Uniq=
H: Handlers=kbd event6
B: EV=100003
B: KEY=2c0814 100004 0 0 0 4 2008000 2090 2001 1e0000 4400 0 ffc

Unfortunately there is no sound.
"""

https://bugs.launchpad.net/ubuntu/+bug/239733
http://bugzilla.kernel.org/show_bug.cgi?id=11995

--

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:39 -03:00
James A Webb 200e861c51 V4L/DVB (12584): Support for Kaiser Baas ExpressCard Dual HD Tuner
The card is reported as YUAN High-Tech Development Co., Ltd STK7700D

[mchehab@redhat.com: fix merge conflicts and properly name USB PID]
Cc: Patrick Boettcher <patrick.boettcher@desy.de>
Signed-off-by: James A Webb <jamesawebb@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:39 -03:00
Stefan Richter 96e242a594 V4L/DVB (12583): firedtv: combine some debug logging code
Shrinks source and kernel object size a bit.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:38 -03:00
Henrik Kurelid 15344779b2 V4L/DVB (12582): The current AVC debugging can clog the log down a lot since many
applications tend to check the signal strength very often.  This patch
enables users to select which AVC messages to log using a bitmask.  In
addition, it also enables the possibility to debug application PMTs sent
to the driver.  This will be usable since the CA support is still poorly
tested for lots of CAMs and CA systems.

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>
2009-09-12 12:19:38 -03:00
Michael Krufky 81016b496e V4L/DVB (12578): tda18271: allow drivers to request RF tracking filter calibration during attach
On certain master / slave dual tuner configurations, tuning performance
improves when the RF tracking filter calibration is performed sequentially.

This patch allows for the bridge driver to specify this behavior in the
configuration structure at attach-time.

The "cal" module option will continue to override this attach-time
configuration: set cal=0 to prevent RF tracking filter calibration
on startup, and set cal=1 to force it.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Reviewed-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:37 -03:00
Michael Krufky ee8145d563 V4L/DVB (12577): tda18271: remove excess whitespace from tda_foo printk macros
remove excess spacing from the tda_foo printk macros & line things up better

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:35 -03:00
Michael Krufky 1b6b73336d V4L/DVB (12576): tda18271: simplify debug printk macros
Rename dprintk to tda_dprintk to be consistent with the other tda_foo macros.

Move KERN_DEBUG facility level to tda_dprintk.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:34 -03:00
Roel Kluin 8e30ddcf2f V4L/DVB (12575): Fix test of bandwidth range in cx22700_set_tps()
For the bandwidth to be less than 8 MHZ and greater than 6 MHZ is logically
impossible.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:34 -03:00
Vasiliy Temnikov 5a5e1da579 V4L/DVB (12574): support AverMedia Studio 505
Added support to AverMedia Studio 505

[dougsland@redhat.com: fixed rejects and removed the change to add dk as default secam variant]
[mchehab@redhat.com: fix a few CodingStyle issues]
Signed-off-by: Vasiliy Temnikov <vaka@newmail.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:33 -03:00
Dmitri Belimov 5bc53a9f91 V4L/DVB (12573): FM1216MK5 FM radio
Implement Philips FM1216MK5.

1. Implement get_stereo function.
2. Add correct data byte for FM radio mode

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:33 -03:00
Mauro Carvalho Chehab 092315a76c V4L/DVB (12567): ir-keymaps: use KEY_CAMERA for snapshots
KEY_CAMERA is already used for a long time with webcam drivers to take a picture.
On other media drivers, due to the lack of a snapshot button, random KEY codes
were sent, being KEY_SHUFFLE the most used one, probably due to cut-and-paste
from other remotes, since one of them uses the same key for snapshot and shuffle.

The better is to use KEY_CAMERA on all drivers solving this issue. This
follows the IR standard map as defined at:
	http://linuxtv.org/wiki/index.php/Remote_Controllers

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:32 -03:00
Mauro Carvalho Chehab cd748871fe V4L/DVB (12566): ir-keymaps: Fix IR mappings for channel and volume +/- keys
Use standard definitions for channel controls, as defined at:
	http://linuxtv.org/wiki/index.php/Remote_Controllers

While here, fix a few broken up/down/left/right mappings

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:31 -03:00
Mauro Carvalho Chehab f545cb4394 V4L/DVB (12565): ir-keymaps: standardize timeshift key
Each remote were using a different keycode for timeshift. Use the same
keycode for all of them, using the map as defined at:
	http://linuxtv.org/wiki/index.php/Remote_Controllers

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:29 -03:00
Mauro Carvalho Chehab 62f1aa9f98 V4L/DVB (12564): ir-keymaps: Replace most KEY_[A-Z] to the proper definitions
There are several IR's that were using IR to type a letter that it is
known by some random application. Instead, the better is to use
the standard definitions found at:
	http://linuxtv.org/wiki/index.php/Remote_Controllers

And, if needed, submit a patch for the application to understand the
media keys.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:29 -03:00
Mauro Carvalho Chehab 7f9d691361 V4L/DVB (12563): ir-keymaps: add a link to the IR standard layout page
While we're still discussing it, let's point to the wiki page. In
the future, this should be added at V4L2 API spec DocBooks.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:28 -03:00
Mauro Carvalho Chehab 88d25a1ee4 V4L/DVB (12562): ir-keymaps: replace KEY_KP[0-9] to KEY_[0-9]
This is needed to match the standard mapping defined at:
	http://linuxtv.org/wiki/index.php/Remote_Controllers#Remote_Controllers

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:27 -03:00
Mauro Carvalho Chehab a83520f432 V4L/DVB (12560): Fix a number of EXPORT_SYMBOL warnings
Make Checkpatch tool happy:

-:2349: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable

On all cases, it were just a blank line at the wrong place. Yet, fixing it is trivial

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:27 -03:00
Mauro Carvalho Chehab 5d35364e31 V4L/DVB (12559): Properly indent comments with tabs
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:26 -03:00
Mauro Carvalho Chehab 3b82bddb15 V4L/DVB (12558): CodingStyle: Use [0x0f] instead of [ 0x0f ]
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:24 -03:00
Mauro Carvalho Chehab 97fd4f7fb6 V4L/DVB (12557): Use C99 comment CodingStyle
The ir-keymaps.c has frequent additions. As people tend to copy an old
keyboard entry, a bad CodingStyle at an ancient entry may result on a
freshly bad CodingStyle patch.

So, better to fix the CodingStyle for the entire file.

This patch is the first of a series of patches fixing it, generated by
some perl magic plus manual handling.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:24 -03:00
Hans Verkuil 9c9dbedf39 V4L/DVB (12553): FM TX: si4713: Add Kconfig and Makefile entries
Simply add Makefile and Kconfig entries.

[hverkuil@xs4all.nl: auto-select I2C_SI4713]
Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:22 -03:00
Eduardo Valentin 02bee89e79 V4L/DVB (12552): FM TX: si4713: Add files to handle si4713 i2c device
This patch adds files to control si4713 devices.
Internal functions to control device properties
and initialization procedures are into these files.
Also, a v4l2 subdev interface is also exported.
This way other drivers can use this as v4l2 i2c subdevice.

Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:20 -03:00
Eduardo Valentin 1fd2121c08 V4L/DVB (12551): FM TX: si4713: Add files to add radio interface for si4713
This patch adds files which creates the radio interface
for si4713 FM transmitter (modulator) devices.

In order to do the real access to device registers, this
driver uses the v4l2 subdev interface exported by si4713 i2c driver.

Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:19 -03:00
Eduardo Valentin fdf82dc2e2 V4L/DVB (12549): v4l2: video device: Add FM TX controls default configurations
This patch adds basic configurations for FM TX extended controls.
That includes controls names, menu strings, pointer identification,
type classification and flags configuration.

Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:19 -03:00
Hans Verkuil 6b5a9492ca V4L/DVB (12543): v4l: introduce string control support.
The upcoming RDS encoder needs support for string controls. This patch
implements the core implementation.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:17 -03:00
hermann pitton a138ebcf82 V4L/DVB (12492): saa7134-input: don't probe for the Pinnacle remotes anymore
With the recent improvements we don't need to probe anymore, if we know
the i2c address of the receiver.

The address of the receiver for the remote with the gray buttons is not
confirmed anywhere, but it is very unlikely to see it on something else.

We want to have that information anyway.

BTW, those remaining still probing, please join.

Signed-off-by: hermann pitton <hermann-pitton@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:15 -03:00
Oliver Neukum 821c777080 V4L/DVB (12491): remove unnecessary power management primitive in stk-webcam
This patch removes an unneeded power management primitive.
Power management is automatically enabled as probe ends.

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:14 -03:00
OldÅ™ich JedliÄka 7b54360293 V4L/DVB (12490): Report only 32kHz for ALSA
There are several reasons:

 - SAA7133/35 uses DDEP (DemDec Easy Programming mode), which works in 32kHz
   only
 - SAA7134 for TV mode uses DemDec mode (32kHz)
 - Radio works in 32kHz only
 - When recording 48kHz from Line1/Line2, switching of capture source to TV
   means switching to 32kHz without any frequency translation

Signed-off-by: OldÅ™ich JedliÄka <oldium.pro@seznam.cz>
Acked-by: hermann pitton <hermann-pitton@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:13 -03:00
Dmitry Torokhov 89dec01b7e V4L/DVB (12489): pwc - fix few use-after-free and memory leaks
I just happen to peek inside the PWC driver and did not like what I saw
there. Please consider applying the patch below.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:13 -03:00
Dmitri Belimov 35c3057bb7 V4L/DVB (12488): Add RDS config for BeholdTV cards
Add config of RDS part for the BeholdTV tuners.

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:12 -03:00
Dmitri Belimov 7ae2688963 V4L/DVB (12487): Fix control AC-3 of the 6752HS
Fix error for AC-3 control of the 6752HS MPEG-2 coder.

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:11 -03:00
Igor M. Liplianin ad5f74c0ad V4L/DVB (12486): cx88: fix TBS 8920 card support
It does matter to set explicitly gpio0 value in
cx88_board structure for TBS 8920 card.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:09 -03:00
Aleksandr V. Piskunov decee2e8a9 V4L/DVB (12485): zl10353: correct implementation of FE_READ_UNCORRECTED_BLOCKS
Makes zl10353 a bit more DVB API compliant:
FE_READ_UNCORRECTED_BLOCKS - keep a counter of UNC blocks
FE_GET_FRONTEND - return last set frequency instead of zero

Signed-off-by: Aleksandr V. Piskunov <alexandr.v.piskunov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:09 -03:00
Julia Lawall 75b697f747 V4L/DVB (12483): Use DIV_ROUND_CLOSEST
The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d
but is perhaps more readable.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@haskernel@
@@

@depends on haskernel@
expression x,__divisor;
@@

- (((x) + ((__divisor) / 2)) / (__divisor))
+ DIV_ROUND_CLOSEST(x,__divisor)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:08 -03:00
Henrik Kurelid 166987c698 V4L/DVB (12482): firedtv: add PID filtering for SW zigzag retune
The AVC protocol uses the same command for tuning and PID filtering and
since dvb-core uses a software zigzagging to do automatic retuning this
could cause all PID filters to be cleared.  PID filter information is
now included in all DSD commands to the card.

Background:

There is a problem in the firedtv driver that causes recordings to stop
if the SW zigzag algorithm in dvb-core kicks in with a retune after the
application has set up the PID filters.  Since tuning and setting PID
filters uses the same AVC command (DSD) and only the replace subfunction
is supported by the card, it is not possible to do a retune without
setting the PID filters.  This means that the PID filtering has to be
sent in each tune.

This problem applies to C and T cards since S and S2 cards tune using a
vendor specific command.  The patch corrects the problem by sending the
PID list in each tune.  I have tested it on my T card with a good
result.

How to trigger problem:  Zap to a channel and output AV to a file, e.g.
"tzap -c channels.conf SVT1 -r -o SVT1.ts".  After a short while, pull
the antenna cable from the card.  The lock on the channel will disappear
and the TS file will stop increasing in size. Wait a couple of seconds.
Replug the cable again.  You will get a lock on the channel again, but
the TS file will never increase in size agains sinze no PIDS are
filtered.

Tested with kaffeine with DVB-T and DVB-C:  Fixes retuning after antenna
was plugged out and back in with DVB-T.  Does not fix this with DVB-C,
but also doesn't regress on DVB-C.

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>
2009-09-12 12:19:08 -03:00
Julian Scheel 114323ede9 V4L/DVB (12481): Fix lowband tuning with tda8261
Attached is a patch which fixes tuning to low frequency channels with
stb0899+tda8261 cards like the KNC TV-Station DVB-S2.
The cause of the issue was a broken if construct, which should have been
an if/else if, so that the setting for the lowest matching frequency is
applied.

Without this patch for example tuning to "arte" on Astra 19.2, 10744MHz
SR22000 failed most times and when it failed the communication between
driver and tda8261 was completely broken.
This problem disappears with the attached patch.

Signed-off-by: Julian Scheel <julian@jusst.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:07 -03:00
Mart Raudsepp c92f056308 V4L/DVB: af9015: add new USB ID for KWorld PlusTV Dual DVB-T Stick (DVB-T 399U)
Add new USB ID (1b80:e400) for KWorld PlusTV Dual DVB-T Stick (DVB-T 399U).
The model number on the devices sticker label is "KW-DVB-T 399UR".

Signed-off-by: Mart Raudsepp <mart.raudsepp@artecdesign.ee>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:06 -03:00
Mauro Carvalho Chehab d6f76b979c V4L/DVB (12478): ARRAY_SIZE changes
These changes were a direct result of using a semantic patch
More information can be found at http://www.emn.fr/x-info/coccinelle/

[mchehab@redhat.com: fix a merge conflict]
Signed-off-by: Stoyan Gaydarov <sgayda2@uiuc.edu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:05 -03:00
Julia Lawall 3227c860b6 V4L/DVB (12477): Use dst_type field instead of type_flags
It seems from other code that it is the dst_type field rather than the
type_flags field that contains values of the form DST_TYPE_IS...
The type_flags field contains values of the form DST_TYPE_HAS...

The semantic match that finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@ struct dst_state E; @@

(
*E.type_flags ==
  \( DST_TYPE_IS_SAT\|DST_TYPE_IS_TERR\|DST_TYPE_IS_CABLE\|DST_TYPE_IS_ATSC \)
|
*E.type_flags !=
  \( DST_TYPE_IS_SAT\|DST_TYPE_IS_TERR\|DST_TYPE_IS_CABLE\|DST_TYPE_IS_ATSC \)
)
// </smpl>

Cc: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:03 -03:00
Nam Phạm ThĂ nh ce212f052f V4L/DVB (12475): Add support for Humax/Coex DVB-T USB Stick 2.0 High Speed
This patch adds support for Humax/Coex DVB-T USB Stick 2.0 High Speed
which is a very popular tuner sold in Vietnam.
Tested with at least 3 tuners.

Cc: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Pham Thanh Nam <phamthanhnam.ptn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:03 -03:00
Mauro Carvalho Chehab 1c2ca35294 V4L/DVB (12472): hdpvr-control: fix bad whitespaces
It were using 7 spaces instead of tab for indent.

Cc: Janne Grunau <j@jannau.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:02 -03:00
Mauro Carvalho Chehab 272ece5e79 V4L/DVB (12471): stv06xx: fix bad whitespaces
It were using 7 spaces instead of tab for indent.

Cc: Erik Andren <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:01 -03:00
Mauro Carvalho Chehab 8ccd4cd07e V4L/DVB (12470): cx231xx/cx231xx-conf-reg.h: fix bad whitespaces
It were using 7 spaces instead of tab for indent.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:01 -03:00
Mauro Carvalho Chehab dfb4ba1e13 V4L/DVB (12468): saa7134: Fix bad whitespacing
The changeset 0b17d0ed that aded ASUSTeK P7131 Analog were using
7 spaces instead of tab, probably due to some bad cut-and-paste.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:00 -03:00
Mauro Carvalho Chehab b24ed7b662 V4L/DVB (12466): Kconfig files: Fix improper use of whitespaces
On VIDEO_M52790 and USB_GSPCA_SN9C20X, instead of tab, it were
using 7 whitespaces at the beginning, probably due to some
cut-and-paste trouble.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:59 -03:00
Andrzej Hajda 3c1c48bbcf V4L/DVB (12465): cx88: High resolution timer for Remote Controls
Patch solves problem of missed keystrokes on some remote controls,
as reported on http://bugzilla.kernel.org/show_bug.cgi?id=9637 .

Signed-off-by: Andrzej Hajda <andrzej.hajda@wp.pl>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:58 -03:00
Igor M. Liplianin ecfcfec804 V4L/DVB (12463): Add support for Compro VideoMate S350 DVB-S PCI card.
Add Compro VideoMate S350 DVB-S driver.
The card uses zl10313, zl10039, saa7130 integrated circuits.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:57 -03:00
Igor M. Liplianin d0a1ddad1c V4L/DVB (12462): Add TeVii S630 USB DVB-S card support.
The card includes Intel ce5039(Zarlink zl10039) tuner
and Intel ce6313 (Zarlink zl10313) demod.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:56 -03:00
Igor M. Liplianin 2ccf5a9906 V4L/DVB (12461): Add ce5039(zl10039) tuner support.
The code from Jan D. Louw with some minor changes.
http://article.gmane.org/gmane.linux.drivers.dvb/38163
Tested with TeVii S630 DVB-S USB card by me (Igor)

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:55 -03:00
Theodore Kilgore 3040b04342 V4L/DVB (12459): gspca - jeilinj: New subdriver for Jeilin chip.
Signed-off-by: Theodore Kilgore <kilgota@auburn.edu>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:54 -03:00
Hans Verkuil 9d7530d53d V4L/DVB (12455): radio-typhoon: remove obsolete RADIO_TYPHOON_PROC_FS config option
Thanks to Robert P.J. Day for finding this.

Thanks-to: Robert P.J. Day <rpjday@crashcourse.ca>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:53 -03:00
Mauro Carvalho Chehab 17d8dfe8c8 V4L/DVB (12452): gspca/Kconfig: Fix bad identation for USB_GSPCA_SN9C20X_EVDEV
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:53 -03:00
Devin Heitmueller 8cd9aaefad V4L/DVB (12444): em28xx: add support for Terratec Cinergy Hybrid T USB XS remote control
Add support for the remote control that comes with the Cinergy Hybrid T USB XS

Thanks to Jelle de Jong for providing sample hardware to test with.

Cc: Jelle de Jong <jelledejong@powercraft.nl>
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:52 -03:00
Vlastimil Labsky 4d14c833c0 V4L/DVB (12439): cx88: add support for WinFast DTV2000H rev. J
I updated and simplyfied patch from Zbynek Hrabovsky for recent kernel.
It enables autodetection of card, sound in analog TV , sound in FM radio
and switching between antenna and cable RF input.  Radio tuner still
doesn't work, I don't even know how it works.  Some guys wrote me that FM
radio works with TV tuner used instead of radio part (symlink video0 ->
radio0).

Cc: Gerd Knorr <kraxel@bytesex.org>
Signed-off-by: Vlastimil Labsky <vlasta.labsky@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:50 -03:00
Roel Kluin bd0eb12f61 V4L/DVB (12435): strlcpy() will always null terminate the string.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:50 -03:00
Douglas Schilling Landgraf a35c87c708 V4L/DVB (12434): em28xx: fix empire auto-detect
Fixed eeprom hash table

Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:49 -03:00
Hans Verkuil eb2de30b31 V4L/DVB (12427): cx24113: fix mips compiler warning
do_div requires an u64 as the first argument, not a s64.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:49 -03:00
Hans Verkuil f19b56a8eb V4L/DVB (12426): pvrusb2: fix compile warning
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:49 -03:00
David T.L. Wong 6bf1a997ed V4L/DVB (12423): cxusb, d680 dmbth use unified lgs8gxx code instead of lgs8gl5
Use unified lgs8gxx frontend instead of reverse engineered lgs8gl5 frontend.
After this patch, lgs8gl5 frontend could be mark as deprecated.
Future development should base on unified lgs8gxx frontend.

Signed-off-by: David T.L. Wong <davidtlwong@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:47 -03:00
Julia Lawall b807d17555 V4L/DVB (12421): drivers/media/video/gspca: introduce missing kfree
Error handling code following a kmalloc should free the allocated data.

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:46 -03:00
hermann pitton 46058128ff V4L/DVB (12420): saa7134: fix the radio on Avermedia GO 007 FM
We have support for radio on saa7133/35/31e cards with tda8290/8275(a)
and 5.5MHz ceramic filter on the bridge chips since a while.

It was previously not tested, if this card supports it too, but the old
"ghost" radio with wrong filters doesn't work anymore.

Thanks go to Pham Thanh Nam and Laszlo Kustan for reporting it working
on that input.

Signed-off-by: hermann pitton <hermann-pitton@arcor.de>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:45 -03:00
Beholder Intl. Ltd. Dmitry Belimov 4786dd65fc V4L/DVB (12419): Fix incorrect type of tuner for the BeholdTV H6 card
Define correct tuner in config. Radio now works fine

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:44 -03:00
Tobias Lorenz 9dcb79c2ee V4L/DVB (12417): I2C cleanups and version checks
The structure and comments of the I2C part have been adopted to fit to the
USB part.

Some additional cleanups and precisements have been made to the version
detection and checking functionality to clearly separate HW/SW/FW version.

Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:43 -03:00
Joonyoung Shim cc35bbddfe V4L/DVB (12416): radio-si470x: add i2c driver for si470x
This patch supports i2c interface of si470x. The i2c specific part
exists in radio-si470x-i2c.c file and the common part uses
radio-si470x-common.c file. The '#if defined' is inserted inevitably
because of parts used only si470x usb in the common file.

The current driver version doesn't support the RDS.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:43 -03:00
Joonyoung Shim 3c7cc8d52c V4L/DVB (12415): radio-si470x: add disconnect check function
The si470x_disconnect_check is function to check disconnect state of
radio in common file. The function is implemented in each interface
file.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:42 -03:00
Joonyoung Shim a9d6fd5e31 V4L/DVB (12414): radio-si470x: change to dev_* macro from printk
This patch is for using dev_* macro instead of printk.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:40 -03:00
Joonyoung Shim b09cd16354 V4L/DVB (12413): radio-si470x: separate common and usb code
This patch is a preceding work to add the i2c interface of si470x.
The si470x directory includes a common file and usb specific file and
header file.
The part unrelated with usb interface and i2c interface exists in
radio-si470x-common.c file, and The usb specific part exists in
radio-si470x-usb.c file.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
[tobias.lorenz@gmx.net: Small changes, due to new include "linux/smp_lock.h"]
Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:40 -03:00
Mauro Carvalho Chehab 4efa2d75d4 V4L/DVB (12408): em28xx: Implement g/s_register via address match
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:37 -03:00
Pete Hildebrandt c53d83ccc8 V4L/DVB (12396): [patch] Added Support for STK7700D (DVB)
This patch adds support for the STK7700D USB-DVB-Device.

lsusb identifies it as:
idVendor           0x1164 YUAN High-Tech Development Co., Ltd
idProduct          0x1efc
 iProduct                2 STK7700D

The device is build into a Samsung R55-T5500 notebook.

Signed-off-by: Pete Hildebrandt <send2ph@googlemail.com>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:36 -03:00
Eberhard Mattes 0b0157398e V4L/DVB (12388): dvb-usb: fix tuning with Cinergy T2
cinergyInitialize param.flags.

Signed-off-by: Eberhard Mattes <eberhard.mattes@web.de>
Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:35 -03:00
Jean-Francois Moine bb2c818fae V4L/DVB (12383): gspca - vc032x: Bad h/v flip controls when inverted by default.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:34 -03:00
Marton Nemeth d40a1da2b4 V4L/DVB (12382): gspca - main: Remove vidioc_s_std().
The vidioc_s_std() is not necessary when vdev->tvnorms == 0.

Signed-off-by: Marton Nemeth <nm127@freemail.hu>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:34 -03:00
Laurent Pinchart 8e113595ed V4L/DVB (12379): uvcvideo: Multiple streaming interfaces support
Restructure the UVC descriptors parsing code to handle multiple streaming
interfaces. The driver now creates a uvc_video_chain instance for each chain
detected in the UVC control interface descriptors, and tries to register one
video device per streaming endpoint.

Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:33 -03:00
Laurent Pinchart 35f02a681b V4L/DVB (12378): uvcvideo: Restructure the driver to support multiple simultaneous streams.
As a first step towards multiple streaming interfaces support, reorganize the
driver's data structures to cleanly separate video control and video streaming
data.

Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:32 -03:00