Commit graph

138166 commits

Author SHA1 Message Date
Devin Heitmueller 083a17317b V4L/DVB (11062): au8522: fix register read/write high bits
For the i2c messages to read and write registers, the two high order bits
of the first byte dictates whether it is a read or a write operation.

Thanks to Michael Krufky <mkrufky@linuxtv.org> and Steven Toth
<stoth@linuxtv.org> for providing sample hardware, engineering level support,
and testing.

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:24 -03:00
Devin Heitmueller 0c44bf362f V4L/DVB (11061): au8522: move shared state and common functions into a separate header files
Move the au8522 state structure, as well as exposing functions needed by the
analog side of the demodulator into a common header file.

Thanks to Michael Krufky <mkrufky@linuxtv.org> and Steven Toth
<stoth@linuxtv.org> for providing sample hardware, engineering level support,
and testing.

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:24 -03:00
Devin Heitmueller f56738cd81 V4L/DVB (11060): au8522: rename the au8522.c source file
Rename the au8522.c file to au8522_dig.c so that more source files can be
added to the driver while preserving the original name of au8522.ko

Thanks to Michael Krufky <mkrufky@linuxtv.org> and Steven Toth
<stoth@linuxtv.org> for providing sample hardware, engineering level support,
and testing.

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:24 -03:00
Devin Heitmueller ea2278633a V4L/DVB (11059): xc5000: fix bug for hybrid xc5000 devices with IF other than 5380
The xc5000 driver has a bug where the IF is always set to whatever the first
caller to dvb_attach() provides.  This fails when the device requires an IF
other than 5380 and the analog driver is loaded first through tuner-core
(which always supplies the hard-coded value of 5380).

Thanks to Michael Krufky <mkrufky@linuxtv.org> and Steven Toth
<stoth@linuxtv.org> for providing sample hardware, engineering level support,
and testing.

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:24 -03:00
Abylay Ospan e9d4a6d5ef V4L/DVB (11057): Fix CiMax stability in Netup Dual DVB-S2 CI
It appears TS discontinuity about one per 10 hrs if CAM used.
Patch to fix it.

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:24 -03:00
Abylay Ospan f1bee69944 V4L/DVB (11056): Bug fix in NetUP: restore high address lines in CI
CI high address lines disappears due to wrong data type used.
Patch to fix it.

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:24 -03:00
Igor M. Liplianin 5765348cd4 V4L/DVB (11055): Fix typo in stv0900
Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:24 -03:00
Igor M. Liplianin 11a84143b2 V4L/DVB (11054): Shorten some lines in stv0900 to less then 81 characters
Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:23 -03:00
Hans Verkuil b8ced13462 V4L/DVB (11053): saa7134: set v4l2_dev field of video_device
The v4l2_dev field of video_device wasn't initialized. The parent field
is derived from v4l2_dev, so that doesn't need to be set anymore.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:23 -03:00
Hans Verkuil 1efd5261ff V4L/DVB (11052): bt819: remove an unused header
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:23 -03:00
Hans Verkuil 15965f063d V4L/DVB (11051): v4l-dvb: replace remaining references to the old mailinglist.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:23 -03:00
Hans Verkuil 33470423ab V4L/DVB (11048): zoran: fix incorrect return type of notify function.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:23 -03:00
Hans Verkuil 9467fe1264 V4L/DVB (11047): cx88: convert to v4l2_device.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:23 -03:00
Hans Verkuil 74fc7bd9ce V4L/DVB (11046): bttv: convert to v4l2_device.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:23 -03:00
Hans Verkuil f1ba28c3a6 V4L/DVB (11045): v4l2: call v4l2_device_disconnect in USB drivers.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:23 -03:00
Hans Verkuil ae6cfaace1 V4L/DVB (11044): v4l2-device: add v4l2_device_disconnect
Call v4l2_device_disconnect when the parent of a hotpluggable device
disconnects. This ensures that you do not have a pointer to a device that
is no longer present.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:22 -03:00
Andy Walls 6273fda6e3 V4L/DVB (11042): v4l2-api: Add definitions for V4L2_MPEG_STREAM_VBI_FMT_IVTV payloads
This addition to the v4l2-api add definitions for the constants and
data structures used for sliced VBI data insertion into MPEG streams triggered
by V4L2_MPEG_STREAM_VBI_FMT_IVTV.  This simply declares what the ivtv and
cx18 drivers and MythTV have already been doing and provides a proper data
structure definition to user space.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:22 -03:00
Jean-Francois Moine 77ac0baf24 V4L/DVB (11040): gspca - most jpeg subdrivers: Have the JPEG quality settable.
The JPEG quality of the images (quantization tables) is now settable by the
VIDIOC_S_JPEGCOMP ioctl.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:22 -03:00
Jean-Francois Moine 71cb2764fc V4L/DVB (11039): gspca - most jpeg subdrivers: Change the JPEG header creation.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:22 -03:00
Philippe Rétornaz c98afbfc20 V4L/DVB (11035): mt9t031 bugfix
- The video device is not allocated when mt9t031_init() is called, don't use
it in debug printk.

- The clock polarity is inverted in mt9t031_set_bus_param(), use the correct
one.

Signed-off-by: Philippe Rétornaz <philippe.retornaz@epfl.ch>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:22 -03:00
Sascha Hauer d42574d1d2 V4L/DVB (11034): soc-camera: remove now unused gpio member of struct soc_camera_link
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:22 -03:00
Sascha Hauer e958e27ade V4L/DVB (11033): mt9v022: allow setting of bus width from board code
This patch removes the phytec specific setting of the bus width
and switches to the more generic query_bus_param/set_bus_param
hooks

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:22 -03:00
Sascha Hauer 36034dc325 V4L/DVB (11032): mt9m001: allow setting of bus width from board code
This patch removes the phytec specific setting of the bus width
and switches to the more generic query_bus_param/set_bus_param
hooks

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:22 -03:00
Sascha Hauer d75b1dcc84 V4L/DVB (11031): pcm990 baseboard: add camera bus width switch setting
Some Phytec cameras have a I2C GPIO expander which allows it to
switch between different sensor bus widths. This was previously
handled in the camera driver. Since handling of this switch
varies on several boards the cameras are used on, the board
support seems a better place to handle the switch

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:21 -03:00
Sascha Hauer 28f59339f7 V4L/DVB (11030): soc-camera: add board hook to specify the buswidth for camera sensors
Camera sensors have a native bus width say support, but on some
boards not all sensor data lines are connected to the image
interface and thus support a different bus width than the sensors
native one. Some boards even have a bus driver which dynamically
switches between different bus widths with a GPIO.

This patch adds a hook which board code can use to support different
bus widths.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:21 -03:00
Magnus Damm 97215cbd1b V4L/DVB (11029): video: use videobuf_waiton() in sh_mobile_ceu free_buffer()
Make sure videobuf_waiton() is used before freeing a buffer.
Without this fix we may return the buffer to the allocator
before the bus mastering operation is finished.

Reported-by: Matthieu CASTET <matthieu.castet@parrot.com>
Tested-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:21 -03:00
Kuninori Morimoto f340e3f6f1 V4L/DVB (11028): ov772x: use soft sleep mode in stop_capture
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-03-30 12:43:21 -03:00
Guennadi Liakhovetski 025c18a19d V4L/DVB (11027): soc-camera: configure drivers with a default format at probe time
Currently soc-camera doesn't set up any image format without an explicit
S_FMT. According to the API this should be supported, for example,
capture-example.c from v4l2-apps by default doesn't issue an S_FMT. This
patch moves negotiating of available host-camera format translations to
probe() time, and restores the state from the last close() on the next
open(). This is needed for some drivers, which power down or reset
hardware after the last user closes the interface. This patch also has a
nice side-effect of avoiding multiple allocation anf freeing of format
translation tables.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:21 -03:00
Guennadi Liakhovetski e802967c70 V4L/DVB (11026): sh-mobile-ceu-camera: set field to the value, configured at open()
For the case, that we have to capture with a default format, i.e., when the
user doesn't call S_FMT, we have to use the field value according to the
default, configured at open() time.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:21 -03:00
Guennadi Liakhovetski df2ed07025 V4L/DVB (11025): soc-camera: configure drivers with a default format on open
Currently soc-camera doesn't set up any image format without an explicit S_FMT.
It seems this should be supported, since, for example, capture-example.c from
v4l2-apps by default doesn't issue an S_FMT. This patch configures a default
image format on open().

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:21 -03:00
Guennadi Liakhovetski 09e231b351 V4L/DVB (11024): soc-camera: separate S_FMT and S_CROP operations
As host and camera drivers become more complex, differences between S_FMT and
S_CROP functionality grow, this patch separates them.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:21 -03:00
Hans Verkuil 1cd3c0fa92 V4L/DVB (11022): zoran/bt819: use new notify functionality.
Bt819 needs the parent driver to drive a GPIO pin low and high in order to
reset its fifo. Use the new notify callback for this.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:21 -03:00
Hans Verkuil 98ec633972 V4L/DVB (11021): v4l2-device: add a notify callback.
Add a notify callback to v4l2_device to let sub-devices notify their
parent of special events.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:20 -03:00
Hans Verkuil 005759613b V4L/DVB (10988): v4l2-dev: use parent field if the v4l2_device has no parent set.
Normally the parent device of v4l2_device is used as the video device
node's parent. But if it was not set, then use the parent field in the
video_device struct.

This is needed in the cx88 driver, which has one core v4l2_device but
creates multiple pci devices (one each for raw and mpeg video).

So you cannot associate the core v4l2_device with a particular PCI device,
but you can do that for each video_device.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:20 -03:00
Hans Verkuil afd96668d8 V4L/DVB (10987): cx23885: fix crash on non-netup cards
The new support for the CX23885_BOARD_NETUP_DUAL_DVBS2_CI board broke the
existing boards. Interrupts for the netup part were enabled and handled
without testing whether the current board actually had a netup -> instant
and fatal crash.

I've added tests to do this only for the CX23885_BOARD_NETUP_DUAL_DVBS2_CI
board.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:20 -03:00
Theodore Kilgore 9832d765f8 V4L/DVB (10986): mr97310a: don't discard frame headers on stream output
Fix a bug where all frame headers were being discarded, instead of being part of the
stream output, on MR97310A cameras.

The frame headers contain information which may be useful in processing
the video output and therefore should be kept and not discarded.

A corresponding patch to the decompression algorithm in
libv4lconvert/mr97310a.c corrects the change in frame offset.

Signed-off-by: Theodore Kilgore <kilgota@auburn.edu>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:20 -03:00
Michael Krufky 9f9cd8f18c V4L/DVB (10984): lgdt3305: avoid OOPS in error path of lgdt3305_attach
Setting state->frontend.demodulator_priv to NULL in the event of
a kzalloc error will result in an OOPS.  Just remove that line.

Thanks to Matthias Schwarzott for pointing this out.

Cc: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:20 -03:00
Hans Verkuil 7c026c3511 V4L/DVB (10983): v4l2-common: add missing i2c_unregister_device.
If the i2c sub-device cannot be found, then we must unregister the i2c_client.
Otherwise this will prevent a possible probe for a different device on that same
address.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:20 -03:00
Hans Verkuil 2c79252326 V4L/DVB (10980): doc: improve the v4l2-framework documentation.
Emphasize the need to call i2c_set_adapdata and clarify the use of the
chipid in v4l2_i2c_new_(probed_)device().

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:19 -03:00
Mauro Carvalho Chehab 5e585ef15b V4L/DVB (10908): videobuf-core: also needs a minimal subset of V4L1 header
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:19 -03:00
Michael Krufky 0290152c0f V4L/DVB (10970): lgdt3305: add MODULE_VERSION
We'll start off with MODULE_VERSION("0.1")

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:19 -03:00
Michael Krufky 60ce3c471f V4L/DVB (10969): lgdt3305: add missing space in comment
small whitespace cleanup - space missing after the *

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:19 -03:00
Michael Krufky 1c12148bdc V4L/DVB (10968): lgdt3305: add email address to MODULE_AUTHOR
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:19 -03:00
Hans Verkuil c019f90ae9 V4L/DVB (10965): ivtv: bump version
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:19 -03:00
Hans Verkuil 34aecd2851 V4L/DVB (10962): fired-avc: fix printk formatting warning.
size_t should be printed with %zu.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:19 -03:00
Alexey Klimov 4b766d3c15 V4L/DVB (10961): radio-terratec: remove linux/delay.h which hadn't been used.
Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:19 -03:00
Hans Verkuil d8cd5e6c24 V4L/DVB (10960): omap24xxcam: don't set vfl_type.
The vfl_type field is set by the core, so anything you fill in here will
be overwritten. And it will be set to a VFL_TYPE_ value, not a VID_TYPE_
value which is an obsolete V4L1 type.

Since these V4L1 types have been made unavailable for V4L2 drivers, this
driver stopped compiling.

In this case the fix is just removing this assignment.

Cc: Sakari Ailus <sakari.ailus@nokia.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:18 -03:00
Hans Verkuil ab84f57360 V4L/DVB (10959): radio: remove uaccess include
This include isn't needed and so can be removed.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:18 -03:00
Mauro Carvalho Chehab 1fab14ed1a V4L/DVB (10951): xc5000: Fix CodingStyle errors introduced by the last patch
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:18 -03:00
Sri Deevi 0356baad85 V4L/DVB (10950): xc5000: prepare it to be used by cx231xx module
Signed-off-by: Srinivasa Deevi <srinivasa.deevi@conexant.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:18 -03:00