Commit Graph

5091 Commits

Author SHA1 Message Date
Steven Toth
13c97bf567 V4L/DVB (8988): S2API: Allow the properties to call legacy ioctls
SET_TONE and SET_VOLTAGE were not previously implemented. Two options
existed. Either cut/paste from the previous ioctl handler into the
process_properties function, which is code duplication. Or, split
the current ioctl handler into it's two major pieces.

Piece 1, responsible for input validation and semaphore acquiring
Piece 2 the processing of the previous ioctls

and finally, a new third pieces where the array of properties
is processed, and can freely call the legacy ioctl handler without
having to re-acquire the fepriv->sem semaphore. This is a clean approach
and ensures the existing legacy ioctls are processed as they were previously
(but with an extra function call) and allows the new API to share code
without duplication.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:03 -02:00
Steven Toth
5bd1b66359 V4L/DVB (8987): cx88: Add support for the Hauppauge HVR4000 and HVR4000-LITE (S2) boards
Adding support for Hauppauge's cx88 S2 based products, based on the
cx24116 DVB-S2 demodulator.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:03 -02:00
Steven Toth
0d46748c3f V4L/DVB (8986): cx24116: Adding DVB-S2 demodulator support
Adds support for the COnexant cx24116 DVB-S2 demodulator.

TODO: checkpatch cleanup.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:03 -02:00
Steven Toth
6b73eeafbc V4L/DVB (8985): S2API: Added dvb frontend changes to support a newer tuning API
This is an experimental patch to add a new tuning mechanism for
dvb frontends. Rather than passing fixed structures across the
user/kernel boundary, which need to be revised for each new modulation
type (or feature the kernel developers want to add), this implements
a simpler message based approach, allowing fe commands to be broken
down into a series of small fixed size transactions, presented
in an array.

The goal is to avoid changing the user/kernel ABI in the future, by
simply creating new frontend commands (and sequencies of commands) that
help us add support for brand new demodulator, delivery system or
statistics related commmands.

known issues:
checkpatch voilations
feedback from various developers yet to be implemented, relating
to namespace conventions, variable length array passing conventions,
and generally some optimization.

This patch should support all existing tuning mechanisms through the
new API, as well as adding 8PSK, DVB-S2 NBC-QPSK and ISDB-T API support.

For testing and exercise purposes, see the latest tune.c tool
available from http://www.steventoth.net/linux/s2

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:03 -02:00
Antti Palosaari
05c1cab55c V4L/DVB (8976): af9015: Add USB ID for AVerMedia A309
- AVerMedia A309 Mini Card (07ca:a309)

Thanks-to: Dirk Vornheder <dirk_vornheder@yahoo.de>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:03 -02:00
Antti Palosaari
a3765888a7 V4L/DVB (8975): af9015: cleanup
- cleanup Telestar Starstick 2 patch

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:03 -02:00
Mikko Ohtamaa
111f9ecf17 V4L/DVB (8974): af9015: Add USB ID for Telestar Starstick 2
- Add USB ID for Telestar Starstick 2 (10b9:8000)

Signed-off-by: Mikko Ohtamaa <mikko@redinnovation.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:03 -02:00
Antti Palosaari
28f947a953 V4L/DVB (8973): af9013: fix compile error coming from u64 div
- fix compile error coming from u64 div

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:03 -02:00
Antti Palosaari
80619de811 V4L/DVB (8972): initial driver for af9015 chipset
- initial driver for the Afatech AF9015 chipset

Thanks-to: Mark Spieth <mark@digivation.com.au>
Thanks-to: Lee Essen <lee.essen@nowonline.co.uk>
Thanks-to: Luca Olivetti <luca@ventoso.org>
Thanks-to: Andrew Leech <andrew@floppyspongeonline.com>
Thanks-to: Nick Andrew <nick-linuxtv@nick-andrew.net>
Thanks-to: Rafael Antoniello <rafael.antoniello@gmail.com>
Thanks-to: Jarryd Beck <jarro.2783@gmail.com>
Thanks-to: Jose Alberto Reguero <jareguero@telefonica.net>
Thanks-to: Benjamin Larsson <banan@ludd.ltu.se>
Thanks-to: Wolfgang Breyha <wbreyha@gmx.net>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:03 -02:00
Antti Palosaari
825b967080 V4L/DVB (8971): initial driver for af9013 demodulator
- initial driver for the Afatech AF9013 demodulator

Signed-off-by: Antti Palosaari <crope@iki.fi>
[mchehab.redhat.com: having a global var called 'debug' is not a good idea. rename it to af9013_debug]
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:02 -02:00
Antti Palosaari
6e623433f7 V4L/DVB (8970): mt2060: implement I2C-gate control
- implement I2C-gate control

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:02 -02:00
Michael Krufky
ef80bfeb30 V4L/DVB (8968): replace xc3028 firmware filenames with defined default firmware names
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:02 -02:00
roel kluin
de3e3b82a6 V4L/DVB: pxa-camera: Unsigned dma_chans[] cannot be negative
Unsigned dma_chans[] cannot be negative

Also the third time dma_chans[0] < 0 was tested instead of dma_chans[2]

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:02 -02:00
Janne Grunau
26dc4d0487 V4L/DVB (8964): dvb/budget: push adapter_nr mod option down to individual drivers
adapter_nr mod option does not make sense for budget-core since it is only
common code shared by all budget drivers

Signed-off-by: Janne Grunau <janne-dvb@grunau.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:02 -02:00
Jean Delvare
8ca4dae3e6 V4L/DVB (8962): zr36067: VIDIOC_S_FMT returns the colorspace value
Ioctl VIDIOC_S_FMT is supposed to fill the colorspace value in the
returned buffer.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:02 -02:00
Jean Delvare
176c2f3415 V4L/DVB (8956): bttv: Turn video_nr, vbi_nr and radio_nr into arrays
With video_nr, vbi_nr and radio_nr being simple integers, it is not
possible to use these parameters on a system with multiple bttv
adapters (which happens to be my case.) video_register_device() will
always fail on the second and later adapters. Turn these parameters
into arrays, as many other V4L drivers are already doing, so that they
can be used on such systems.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:01 -02:00
Julia Lawall
c87994db01 V4L/DVB (8954): common/tuners: Drop code after return or goto
The break after the return or goto serves no purpose.

Signed-off-by: Julia Lawall <julia@diku.dk>
Reviewed-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:01 -02:00
Huang Weiyi
c9166977ef V4L/DVB: remove unused #include <version.h>
The file(s) below do not use LINUX_VERSION_CODE nor KERNEL_VERSION.
  drivers/media/video/pwc/pwc-ctrl.c

This patch removes the said #include <version.h>.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:01 -02:00
Michael Krufky
3065096190 V4L/DVB (8951): xc5000: dont pass devptr in xc5000_attach()
Dont pass devptr in xc5000_attach, dont store it in xc5000_priv.
This pointer is passed into the tuner_callback function, which always
expects a pointer to fe->dvb->priv or i2c_adapter->algo_data.

This prevents future possible bugs in new drivers, such as using a "devptr"
other that the standard fe->dvb->priv in a DVB driver.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:01 -02:00
Michael Krufky
2a6003c207 V4L/DVB (8950): xc5000: prevent an OOPS if analog driver is unloaded while digital is in use
Prevent an OOPS if xc5000_attach was called by tuner.ko before being called by
the DVB adapter driver. The OOPS occurs when a digital tune request is made
after tuner.ko is unloaded.

When tuner.ko is unloaded, it takes the xc5000_config structure with it.

Rather than storing a pointer to the xc5000_config structure, just store the
if_khz and tuner_callback inside the xc5000_priv internal state structure.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:01 -02:00
Michael Krufky
89fd28545c V4L/DVB (8949): xc5000: allow multiple driver instances for the same hardware to share state
Convert xc5000 to use the hybrid_tuner_request_state and
hybrid_tuner_release_state macros to manage state sharing between
hybrid tuner instances.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:01 -02:00
Michael Krufky
ffb412346b V4L/DVB (8948): xc5000: kill xc5000_priv.h
move struct xc5000_priv into xc5000.c and delete xc5000_priv.h

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:00 -02:00
Hans Verkuil
942648af36 V4L/DVB (8946): dib7000m: fix powerpc build error
The dib7000m_i2c_enumeration() function is not used by any public drivers,
however some prototype board use it. So '#if 0' for now, but don't remove it.

Thanks to Patrick Boettcher for clarifying this.

Cc: Patrick Boettcher <patrick.boettcher@desy.de>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:00 -02:00
Hans Verkuil
9ebeae5641 V4L/DVB (8945): mxb: use unique i2c adapter name
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:00 -02:00
Hans Verkuil
96af9880c0 V4L/DVB (8944): saa5249: convert i2c driver for new i2c API
- Convert to use v4l2-i2c-drv-legacy.h to be able to handle the new i2c API
- Cleanups
- Use v4l_dbg/v4l_info to have uniform kernel messages

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:00 -02:00
Hans Verkuil
71ef85c7e0 V4L/DVB (8943): saa5246a: convert i2c driver for new i2c API
- Convert to use v4l2-i2c-drv-legacy.h to be able to handle the new i2c API
- Cleanups
- Use v4l_dbg/v4l_info to have uniform kernel messages

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:00 -02:00
Hans Verkuil
2633812f89 V4L/DVB (8942): mxb: coding style cleanups
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:00 -02:00
Hans Verkuil
707ecf4603 V4L/DVB (8941): mxb/tda9840: cleanups, use module saa7115 instead of saa7111.
Cleanup tda9840 and use a v4l2 API to get the tuner subchannels.
Do some cleanups in mxb and switch to saa7115 instead of the saa7111
module.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:00 -02:00
Hans Verkuil
6bd6dff631 V4L/DVB (8940): saa7115: fix saa7111(a) support
The saa7111 support in saa7115.c was missing some features and did not
properly take some of the differences into account. With this patch
saa7115 can be used in the mxb driver instead of saa7111.c.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:00 -02:00
Hans Verkuil
2796073a3d V4L/DVB (8939): cx18: fix sparse warnings
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:00 -02:00
Douglas Schilling Landgraf
f2a01a0027 V4L/DVB (8937): em28xx: Fix and add some validations
Fixed and Added some validations

Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:00 -02:00
Douglas Schilling Landgraf
a50f4a444a V4L/DVB (8936): em28xx-cards: Add vendor/product id for EM2820_BOARD_PROLINK_PLAYTV_USB2
Added vendor/product id for EM2820_BOARD_PROLINK_PLAYTV_USB2

Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:59 -02:00
Jean-Francois Moine
6c86274fcd V4L/DVB (8931): gspca: Vflip added for sonixj - ov7630.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:59 -02:00
Jean-Francois Moine
51977a8daa V4L/DVB (8930): gspca: The image transfer by bulk is started by the subdrivers.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:59 -02:00
Jean-Francois Moine
7b537391dd V4L/DVB (8929): gspca: sonixj webcam 0458:702e added.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:59 -02:00
Jean-Francois Moine
3371bcc328 V4L/DVB (8928): gspca: Version change to 2.3.0.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:59 -02:00
Jean-Francois Moine
d654dca7bc V4L/DVB (8927): gspca: PAC 207 webcam 093a:2476 added.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:59 -02:00
Andy Walls
446f245977 V4L/DVB (8924): cx18: Set mmio throttling delay default to 0 nsec.
cx18: Set mmio throttling delay default to 0 nsec.  Not doing so makes analog
tuner audio not work on some mahcines.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:59 -02:00
Hans Verkuil
854ad9abcc V4L/DVB (8921): ivtv: fix incorrect capability and assorted sliced vbi and video out fmt fixes
- V4L2_CAP_VBI_OUTPUT is not supported by ivtv, remove it.
- ivtv_try_fmt_vid_out also needed to constrain the width/height of MPEG decoder
  window sizes.
- allow empty sliced services.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:59 -02:00
Hans Verkuil
effc3466d3 V4L/DVB (8920): cx18/ivtv: fix check of window boundaries for VIDIOC_S_FMT
It was possible to set out-of-bounds windows sizes, this is now
fixed.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:59 -02:00
Hans Verkuil
ff5f26b40a V4L/DVB (8918): saa6752hs: simplify writing to registers
Add some utility functions to set registers.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:59 -02:00
Hans Verkuil
9afb7377ef V4L/DVB (8917): saa7134-empress: fix changing the capture standard for non-tuner inputs
When changing the standard the saa6752hs was not updated unless the input
was the TV tuner. The saa6752hs should be updated regardless of the input.

In addition the S_STD and G_STD ioctls for the mpeg video device didn't do
anything. This is now fixed: they behave just like S_STD and G_STD on the
video0 device.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:58 -02:00
Andy Walls
ac2b97b13e V4L/DVB (8915): cx18: Increment u8 pointers not void pointers.
cx18: Increment u8 pointers not void pointers.  Incrementing void pointers
is dubious and the real intent in cx18_memcpy_fromio() and cx18_memset_io() is
to increment by bytes, so use u8 pointers instead.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:58 -02:00
Andy Walls
c641d09c60 V4L/DVB (8914): cx18: Throttle mmio to/from the CX23418 so boards work in older systems
cx18: Throttle mmio to/from the CX23418 so boards work in older systems.  The
CX23418 couldn't reliably handle mmio at the rate at which the cx18 driver was
attempting to access the chip.  The PCI bridge arrangements and settings on
modern motherboards still allowed the CX23418 to work OK, but it didn't work
well on many older motherboards: mysterious I2C errors, firmware loading errors,
etc.  This patch adds a throttle to *all* mmio access to the CX23418.  It
defaults to a delay of 31 ns, but is adjustable by the mmio_ndelay module parm.
My HVR-1600 and Raptor PAL/SECAM card now function for analog capture on a
motherboard with an Intel 82810E Northbridge and 82801AA Southbridge.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:58 -02:00
Andy Walls
b1526421ea V4L/DVB (8913): cx18: Create cx18_ specific wrappers for all pci mmio accessesors.
cx18: Create cx18_ specific wrappers for all pci mmio accessesors.  This is a
first step in instrumenting all CX23418 PCI bus IO, to debug problems with
accessing the CX23418's PCI memory mapped IO.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:58 -02:00
Andy Walls
4519064c1c V4L/DVB (8912): cx18: Correct CX23418 PCI configuration settings.
cx18: Correct CX23418 PCI configuration settings.  The CX23418 doesn't have
I/O space registers, so there was no need to try and turn them on (the card
ignores the attempt to set the bit anyway).  Also removed incorrect config
space register setting that was errantly borrowed from ivtv.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:58 -02:00
Jean-Francois Moine
0be01004dd V4L/DVB (8910): gspca: Add support of image transfer by bulk and minor change.
- image transfer by bulk
- set the max number of transfer URS's to 4 (was 16)

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:58 -02:00
Hans Verkuil
d45b9b8ab4 V4L/DVB (8906): v4l-dvb: fix assorted sparse warnings
Fix sparse warnings. None are serious, but cutting down on these helps find
future serious sparse warnings/errors.

Redid the av7710.c patch based on a suggestion by Oliver Endriss.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:58 -02:00
Mike Isely
2bb87c24d7 V4L/DVB (8902): pvrusb2: Remove comment lines which refer to checkpatch's behavior
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:58 -02:00
Mike Isely
0cc1186712 V4L/DVB (8901): pvrusb2: Disable virtual IR device when not needed.
Disable "virtual" IR receiver on for 24xxx devices that have an
internal IR blaster.  In that case there's another another IR
receiver present and to leave the virtual receiver available
just causes confusion.  This means that 24xxx users will no
longer see a phantom IR chip.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:57 -02:00