Commit Graph

137787 Commits

Author SHA1 Message Date
Mauro Carvalho Chehab 0bf4f6ce6d V4L/DVB (10514): em28xx: Add support for Kaiomy TVnPC U2 stick
Thanks to Peter Senna Tschudin <peter.senna@gmail.com> for borrow me one
of those devices.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:43 -03:00
Mauro Carvalho Chehab 517efa89ac V4L/DVB (10512): tda1004x: Fix eeprom firmware load on boards with 16MHz Xtal
For i2c normal work, we need to slow down the bus speed. However, the
slow down breaks the eeprom firmware load. So, use normal speed for
eeprom booting and then restore the i2c speed after that.

It should also be noticed that no other I2C transfer should be in course
while booting from eeprom, otherwise, tda10046 goes into an instable
state. So, proper locking are needed at the i2c bus master.

Tested with saa7134 MSI TV @nyware A/D board, that comes with an eeprom
with firmware version 29.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:43 -03:00
Mauro Carvalho Chehab befd6e645c V4L/DVB (10511): saa7134: get rid of KBL
KBL is not needed on saa7134, so, let's remove it.

However, we should take some care to avoid opening the module while
initializing it. This issue exists with newer udev's that opens a device
as soon as the driver is registered. So, a proper lock is needed on
open.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:43 -03:00
Mauro Carvalho Chehab 553d3c5067 V4L/DVB (10509): saa7134-video: two int controls lack a step
Fix two broken controls where a step weren't specified. Without a step,
userspace apps won't allow to adjust such controls.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:43 -03:00
Mauro Carvalho Chehab eb47b5f981 V4L/DVB (10508): saa7134: Cleanup: remove unused waitqueue from struct
The waitqueue is never used. So, let's just remove it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:43 -03:00
Mauro Carvalho Chehab b9348353a7 V4L/DVB (10507): saa7134: Fix analog mode on devices that need to open an i2c gate
Some saa7134 devices require to open an i2c gate before tuning. This
patch fix the initialization for those devices.

The nxt200x_gate_ctrl() logic were returned back to the old place, since
we don't know how to close the gate. A future pacth could revert that
change and provide the proper close gate control, to avoid keeping it
open forever.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:43 -03:00
Mauro Carvalho Chehab 18b1ae7dd8 V4L/DVB (10506): saa7134: move tuner init code to saa7134-cards
On certain devices, before opening a tuner, we need to open the tuner
gate via i2c.

This patch just moves the tuner probing code to the same place where
such i2c commands are handled, to make easier to fix this trouble on
later patches.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:42 -03:00
Mauro Carvalho Chehab 3106381440 V4L/DVB (10505): tda8290: Print an error if i2c_gate is not provided
While here, be sure that gate will be kept disabled if an error occurs.

Cc: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:42 -03:00
Mauro Carvalho Chehab 68d5ce7021 V4L/DVB (10504): tda827x: Be sure that gate will be open/closed at the proper time
The gate control logic is broken: several routines just keep it open;
other rotines close it properly; there are even other routines that
assumes that it is open without really checking or opening it.

Instead of having to manually handle the gate control and having such
troubles, let a sub-routine take care of the gate, opening it before
i2c_transfer and closing it after that. This avoids leaving the gate
into a random state.

Cc: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:42 -03:00
Hans Verkuil 230b65f994 V4L/DVB (10502): saa7146: move v4l2 device registration to saa7146_vv.
Doing the v4l2_device registration in the saa7146 core will make it
dependent on v4l2, even for DVB-only boards. This registration and
unregistration belongs in saa7146_vv instead.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:42 -03:00
Hans Verkuil eae4d69b6a V4L/DVB (10501): saa7146: prevent unnecessary loading of v4l2-common.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:42 -03:00
Hans Verkuil 5a5b9647af V4L/DVB (10500): saa7146: setting control while capturing should return EBUSY, not EINVAL.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:42 -03:00
Hans Verkuil 1b8dac150a V4L/DVB (10499): saa7146: convert saa7146 and mxb in particular to v4l2_subdev.
Modified mxb to load the i2c modules through v4l2_subdev. So no more probing.
Modified tea6415c and tea6420 to use the standard routing ops to do the
routing, rather than using private commands. Dropped the private commands
from tda9840 (they were never used except during initialization of the
module).

Added saa7146 support for VIDIOC_DBG_G_CHIP_IDENT.

Converted saa5246a and saa5249 to v4l2_subdev.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:42 -03:00
Hans Verkuil d30e21ddcd V4L/DVB (10498): saa7146: the adapter class will be NULL when v4l2_subdev is used.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:42 -03:00
Hans Verkuil 45d809431d V4L/DVB (10497): saa7146: i2c adapdata now points to v4l2_device.
Prepare for converting to v4l2_subdev.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:41 -03:00
Hans Verkuil ef77a26be1 V4L/DVB (10496): saa7146: implement v4l2_device support.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:41 -03:00
Hans Verkuil 80b36e0fcf V4L/DVB (10490): v4l2: prefill ident and revision from v4l2_dbg_chip_ident.
Drivers that implement this always have to set the ident and revision
to V4L2_IDENT_NONE and 0. Do this in the v4l2 core so drivers don't have
to do this.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:41 -03:00
Hans Verkuil 89aec3e1ba V4L/DVB (10489): doc: use consistent naming conventions for vdev and v4l2_dev.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:41 -03:00
Hans Verkuil 8ac05ae319 V4L/DVB (10488): ivtv: cleanup naming conventions
Use consistent naming for pci_dev, v4l2_device and video_device.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:41 -03:00
Hans Verkuil d7493e518f V4L/DVB (10487): doc: update hm12 documentation.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:41 -03:00
Hans Verkuil a4a787187b V4L/DVB (10486): ivtv/cx18: fix g_fmt and try_fmt for raw video
The raw video device didn't report the image size correctly.

When setting a new image the image height has to be a multiple of 32 lines.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:41 -03:00
Alexey Klimov fdf9c9979a V4L/DVB (10465): dsbr100: Add few lost mutex locks.
Patch adds two lost mutex locks.

Signed-off-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-03-30 12:42:41 -03:00
Alexey Klimov dc025d4a1a V4L/DVB (10464): radio-si470x: use usb_make_path in usb-radio drivers
Place usb_make_path in radio-si470x.c that used when reporting bus_info
information in vidioc_querycap.

Acked-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-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-03-30 12:42:41 -03:00
Alexey Klimov e57458dc70 V4L/DVB (10463): radio-mr800: fix checking of retval after usb_bulk_msg
Patch corrects checking of returned value after usb_bulk_msg. Now we
also check if number of transferred bytes equals to BUFFER_LENGTH.

Signed-off-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-03-30 12:42:40 -03:00
Alexey Klimov 71f07d94ce V4L/DVB (10462): radio-mr800: increase version and add comments
Increase driver version to 0.10, remove old and add new useful comments.

Signed-off-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-03-30 12:42:40 -03:00
Alexey Klimov 52433bbbef V4L/DVB (10461): radio-mr800: add few lost mutex locks
Patch adds two lost mutex locks.

Signed-off-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-03-30 12:42:40 -03:00
Alexey Klimov 1bb16d7156 V4L/DVB (10460): radio-mr800: add stereo support
Patch introduces new amradio_set_stereo function.
Driver calls this func to make stereo radio reception.
Corrects checking of returned value after usb_bulk_msg.

Signed-off-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-03-30 12:42:40 -03:00
Alexey Klimov f7c1a3809b V4L/DVB (10459): radio-mr800: fix amradio_set_freq
Fixing frequency adjustment to provide better diapason(band?) fit.
Also, add AMRADIO_SET_FREQ to the list of commands.

Signed-off-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-03-30 12:42:40 -03:00
Alexey Klimov db821804f4 V4L/DVB (10458): radio-mr800: move radio start and stop in one function
Patch introduces new amradio_set_mute function. Amradio_start and
amradio_stop removed. This makes driver more flexible and it's useful
for next changes.

Signed-off-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-03-30 12:42:40 -03:00
Alexey Klimov 8edafcc63d V4L/DVB (10457): radio-mr800: add more dev_err messages in probe
Patch adds 3 dev_err messages in usb_amradio_probe() function.

Signed-off-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-03-30 12:42:40 -03:00
Alexey Klimov 65c51dc978 V4L/DVB (10456): radio-mr800: place dev_err instead of dev_warn
There should be dev_err message if video_register_device() fails.
Correct this situation.

Signed-off-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-03-30 12:42:39 -03:00
Alexey Klimov a5d6947515 V4L/DVB (10455): radio-mr800: codingstyle cleanups
Cleanups of many if-check constructions.

Signed-off-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-03-30 12:42:39 -03:00
Jochen Friedrich d563399859 V4L/DVB (10453): af9015: add MC44S803 support
Add MC44S803 support to AF9015 driver.

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:39 -03:00
Jochen Friedrich b72dbaefbd V4L/DVB (10452): Add Freescale MC44S803 tuner driver
Add Freescale MC44S803 tuner driver.

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:39 -03:00
Andy Walls 812b1f9d54 V4L/DVB (10446): cx18: Finally get sliced VBI working - for 525 line 60 Hz systems at least
Sliced VBI, in the manner that ivtv implements it as a separate data stream,
now works for 525 line 60 Hz systems like NTSC-M.  It may work for 625 line
50 Hz systems, but I have more engineering work to do, to verify it is operating
properly.  Sliced data insertion into the MPEG PS should be working, but is
untested.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:39 -03:00
Andy Walls 466df46484 V4L/DVB (10445): cx18: Process Raw VBI on a whole frame basis; fix VBI buffer size
The cx23418 appears to send Raw VBI buffers with a PTS on a per frame
basis, not per field, so process Raw VBI on a whole frame basis and reduce
some complexity.  Fix VBI buffer size computation to handle a whole
frame of Raw VBI for a 625 line system, which is the worst case and will
work for 525 lines systems as well.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:39 -03:00
Andy Walls 01cbc214cf V4L/DVB (10444): cx18: Fix sliced VBI PTS and fix artifacts in last raw line of field
Fixed an endianess problem with the collection of the PTS from
the VBI buffer given to us by the encoder.  Also extrapolated the
last 12 bytes of the last line of each field, to remove artifacts
created by removing the first 12 bytes of each field for raw VBI.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:39 -03:00
Andy Walls f37aa51190 V4L/DVB (10443): cx18: Use correct line counts per field in firmware API call
The driver was incorrectly setting 0 line counts in a firmware
API call to set the maximum amount of lines per field.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:39 -03:00
Andy Walls dcc0ef8820 V4L/DVB (10442): cx18: Fixes for enforcing when Encoder Raw VBI params can be set
The Encoder will only allow the Raw VBI parameters, along with a number of
other API parameters, to take effect when no analog captures are in
progress.  These parameters must be set before the first analog capture starts,
be it MPEG, VBI, YUV, etc., and cannot be changed until the last one stops.  It
is not obvious to me what capture channel API parameters are shared and which
ones must be set per capture channel, so set them all for every analog
capture channel start up.  This fixes the driver so that VBI capture can be
started up after the MPEG capture is going.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:39 -03:00
Andy Walls c1994084d6 V4L/DVB (10441): cx18: Fix VBI ioctl() handling and Raw/Sliced VBI state management
More sliced VBI fixes to bring the cx18 driver closer to full V4L2 spec
compliance for VBI and to get sliced VBI working better.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:38 -03:00
Andy Walls 776fa86988 V4L/DVB (10440): cx18: Fix presentation timestamp (PTS) for VBI buffers
The old code from ivtv used a CX23415/6 PTS, which was simply left at 0 in the
cx18 driver.  Since the CX23418 gives us what I think is a PTS (or some other
90 kHz clock count) with each VBI buffer, this change has the cx18 driver use
that as a PTS.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:38 -03:00
Andy Walls 302df97021 V4L/DVB (10439): cx18: Clean-up and enable sliced VBI handling
Removed legacy ivtv state variables, added comments, and cleaned
up sliced VBI related code.  Enabled sliced VBI.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:38 -03:00
Andy Walls 4325dff220 V4L/DVB (10437): cx18: Remove an unused spinlock
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:38 -03:00
Andy Walls 0b089742c7 V4L/DVB (10436): cx18: Fix coding style of a switch statement per checkpatch.pl
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:38 -03:00
Andy Walls d5c02f6b27 V4L/DVB (10435): cx18: Normalize APU after second APU firmware load
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:38 -03:00
Andy Walls 072e6183c2 V4L/DVB (10434): cx18: Smarter verification of CX18_AUDIO_ENABLE register writes
The CX18_AUDIO_ENABLE register usually never reads back what was just written
under normal circumstances.  Perform better checking that a write went to the
register as expected with a specification of what bits to verify.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:38 -03:00
Andy Walls e474200d35 V4L/DVB (10433): cx18: Defer A/V core initialization until a valid cx18_av_cmd arrives
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:38 -03:00
Jean-Francois Moine 49796e4059 V4L/DVB (10432): gspca - vc032x: Cleanup source, optimize and check i2c_write.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:37 -03:00
Jean-Francois Moine 8d538699e7 V4L/DVB (10431): gspca - vc032x: Bad revision for the webcam 041e:405b.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:37 -03:00
Jean-Francois Moine 2687a2fb1c V4L/DVB (10430): gspca - sonixj: Adjust some exchanges with the sensor mt9v111.
This patch also enables the autogain for the mt9v111.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:37 -03:00