Guennadi Liakhovetski [Mon, 21 Feb 2011 10:14:01 +0000 (07:14 -0300)]
[media] V4L: mx3_camera: convert to videobuf2
Now that soc-camera supports videobuf API v1 and v2, camera-host drivers
can be converted to videobuf2 individually. This patch converts the
mx3_camera driver.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Fri, 18 Feb 2011 08:30:15 +0000 (05:30 -0300)]
[media] V4L: sh_mobile_ceu_camera: convert to videobuf2
Convert the sh_mobile_ceu_camera driver to the videobuf2 API.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Mon, 7 Feb 2011 21:09:30 +0000 (18:09 -0300)]
[media] V4L: soc-camera: add helper functions for videobuf queue handling
Add two helper inline functions to retrieve soc-camera device context
from videobuf and videobuf2 queue pointers.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Sat, 29 Jan 2011 15:44:51 +0000 (12:44 -0300)]
[media] V4L: soc-camera: extend to also support videobuf2
Extend soc-camera core to also support the videobuf2 API.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Sat, 29 Jan 2011 00:06:19 +0000 (21:06 -0300)]
[media] V4L: add missing EXPORT_SYMBOL* statements to vb2
videobuf2-memops and videobuf2-core can be compiled as modules, in which
case 3 more symbols from videobuf2-memops.c have to be exported.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Wed, 2 Feb 2011 20:38:22 +0000 (17:38 -0300)]
[media] V4L: omap1_camera: join split format lines
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Alberto Panizzo [Mon, 17 Jan 2011 09:52:10 +0000 (06:52 -0300)]
[media] V4L: mx3_camera: fix capture issues for non 8-bit per pixel formats
If the camera was set to output formats like RGB565 YUYV or SBGGR10,
the resulting image was scrambled due to erroneous interpretations of
horizontal parameter's units.
This patch in fourcc_to_ipu_pix, eliminate also the pixel formats mappings
that, first are not used within mainline code and second, standing at
the datasheets, they will not work properly:
The IPU internal bus support only the following data formatting
(44.1.1.3 Data Flows and Formats):
1 YUV 4:4:4 or RGB-8 bits per color component
2 YUV 4:4:4 or RGB-10 bits per color component
3 Generic data (from sensor to the system memory only)
And format conversions are done:
- from memory: unpacking from other formats to IPU supported ones
- to memory: packing in the inverse order.
So, assigning a packing/unpacking strategy to the IPU for those formats
will produce a packing to memory and not the inverse.
Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Anatolij Gustschin [Mon, 31 Jan 2011 12:58:01 +0000 (09:58 -0300)]
[media] V4L: mx3_camera: correct 'sizeimage' value reporting
The 'pix->width' field may be updated in mx3_camera_set_fmt() to
fulfill the IPU stride line alignment requirements. If this update
takes place, the 'fmt.pix.sizeimage' field in the struct v4l2_format
stucture returned by VIDIOC_S_FMT is wrong. We need to update the
'pix->sizeimage' field in the mx3_camera_set_fmt() function to fix
this issue.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mathias Krause [Sun, 30 Jan 2011 10:05:58 +0000 (07:05 -0300)]
[media] V4L: omap1_camera: fix use after free
Even though clk_put() is a no-op on most architectures it is not for
some ARM implementations. To not fail on those, release the clock timer
before freeing the surrounding structure.
This bug was spotted by the semantic patch tool coccinelle using the
script found at scripts/coccinelle/free/kfree.cocci.
More information about semantic patching is available at
http://coccinelle.lip6.fr/
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Alberto Panizzo [Wed, 12 Jan 2011 11:16:19 +0000 (08:16 -0300)]
[media] V4L: soc_mediabus: add a method to obtain the number of samples per pixel
Add a function to calculate the number of samples on the media-bus,
required to retrieve one pixel of a certain format.
Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Anatolij Gustschin [Mon, 31 Jan 2011 12:19:32 +0000 (09:19 -0300)]
[media] V4L: soc-camera: start stream after queueing the buffers
Some camera systems have strong requirement for capturing
an exact number of frames after starting the stream and do
not tolerate losing captured frames. By starting the stream
after the videobuf has queued the buffers, we ensure that
no frame will be lost.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Qing Xu [Thu, 20 Jan 2011 08:19:40 +0000 (05:19 -0300)]
[media] V4L: soc-camera: add enum-frame-size ioctl
add vidioc_enum_framesizes implementation, follow default_g_parm()
and g_mbus_fmt() method
Signed-off-by: Qing Xu <qingx@marvell.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Qing Xu [Thu, 20 Jan 2011 08:19:40 +0000 (05:19 -0300)]
[media] V4L: add enum_mbus_fsizes video operation
Add enum_mbus_fsizes V4L2 subdevice video operation.
Signed-off-by: Qing Xu <qingx@marvell.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Mon, 7 Feb 2011 07:37:38 +0000 (04:37 -0300)]
[media] saa7134-empress: add missing MPEG controls
Reported by, and based on a patch from, Martin Dauskardt.
The AUDIO_AC3_BITRATE control is still missing from this list, but such
optional controls are a bit hard to handle. This will be fixed automatically
when we switch to the control framework.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Reported-by: Martin Dauskardt <martin.dauskardt@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sat, 5 Feb 2011 13:07:39 +0000 (10:07 -0300)]
[media] firedtv: remove obsolete ieee1394 backend code
drivers/ieee1394/ has been removed in Linux 2.6.37. The corresponding
backend code in firedtv is no longer built in now and can be deleted.
Firedtv continues to work with drivers/firewire/.
Also, fix a Kconfig menu comment: Removal of CONFIG_IEEE1394 made the
"Supported FireWire (IEEE 1394) Adapters" comment disappear; bring it back
with corrected dependency.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sat, 5 Feb 2011 13:10:38 +0000 (10:10 -0300)]
[media] v4l: removal of old, obsolete ioctls
Some ioctl's were defined wrong on 2.6.2 and 2.6.6, using the wrong
type of R/W arguments. They were fixed, but the old ioctl names are
still there, maintained to avoid breaking binary compatibility:
There's no sense on preserving those forever, as it is very doubtful
that someone would try to use a such old binary with a modern kernel.
Removing them will allow us to remove some magic done at the V4L ioctl
handler.
Note that any application compiled with a videodev2.h from 2.6.7 or later
will be using the correct ioctls.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sat, 5 Feb 2011 12:29:31 +0000 (09:29 -0300)]
[media] dabusb: remove obsolete driver
The dabusb driver was conceived as an experimental driver for a test
device. The driver never supported any shipped product, and, while
there were some updates for it in 2003, for an ancient product,
those changes were never submitted upstream.
Also, there's no DocBook for its API, nor any upstream discussion.
So it was decided to remove it in 2.6.39. Future support for a DAB API
should be discussed on the linux-media list first.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sat, 5 Feb 2011 12:25:02 +0000 (09:25 -0300)]
[media] se401: remove last V4L1 driver
This driver is for obsolete hardware that the old maintainer
didn't care (or not have the hardware anymore), and that no other developer
could find any hardware to buy.
The V4L1 API is no longer supported, and since nobody stepped in to convert
them to V4L2 the decision was made to remove them.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Tue, 22 Feb 2011 16:39:36 +0000 (13:39 -0300)]
[media] staging-usbvideo: remove
With the new gspca v4l2 vicam driver, there is no more reason to keep the
old v4l1 usbvideo vicam driver around, and since that is the last
usbvideo framework using driver, the old usbvideo framework itself can
go too.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Mon, 21 Feb 2011 14:30:30 +0000 (11:30 -0300)]
[media] gspca_cpia1: Don't allow the framerate divisor to go above 2
Having a framerate divisor of 3 is not really necesarry and leads to
various troubles (frames going missing, compression issues) when allowed.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Mon, 21 Feb 2011 14:06:29 +0000 (11:06 -0300)]
[media] gspca: Add new vicam subdriver
This is a complete rewrite of the old v4l1 vicam subdriver, featuring
multiple resolutions, gain + exposure control and still has less code.
Oh and it is a v4l2 driver rather then v4l1 ofcourse :)
Many thanks to Devin Heitmueller <dheitmueller@kernellabs.com> for
donating his 3com homeconnect to me, which made this rewrite possible.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Thu, 17 Feb 2011 09:27:57 +0000 (06:27 -0300)]
[media] gspca_sn9c20x: Add another MSI laptop to the sn9c20x upside down list
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Wed, 16 Feb 2011 11:37:54 +0000 (08:37 -0300)]
[media] gspca_sn9c20x: Make buffers slightly larger for JPEG frames
In good lighting conditions (lots of details visible) the current buffers
are sometimes too small.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Wed, 16 Feb 2011 11:33:16 +0000 (08:33 -0300)]
[media] gspca_sn9c20x: Add LED_REVERSE flag for 0c45:62bb
This fixes the led not working on this camera
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Wed, 16 Feb 2011 11:17:36 +0000 (08:17 -0300)]
[media] gspca_sn9c20x: Add hflip and vflip controls for the ov7660 sensor
Tested with a camera with usb-id: 0c45:62bb
Also enable dmi based flopped laptop detection for the 0c45:627b ov7660 model.
Some of the MSI laptops with upside down camera have this one instead of the
0c45:624f.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Wed, 16 Feb 2011 10:11:14 +0000 (07:11 -0300)]
[media] gspca_sn9c20x: Fix colored borders with ov7660 sensor
Tested with a camera with usb-id: 0c45:62bb
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Stefan Ringel [Tue, 25 Jan 2011 16:40:55 +0000 (13:40 -0300)]
[media] tm6000: relabeling any registers
relabeling any registers
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-François Moine [Thu, 10 Feb 2011 16:37:48 +0000 (13:37 -0300)]
[media] gspca - ov519: Add the 800x600 resolution for sensors ov2610/2610ae
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-François Moine [Thu, 10 Feb 2011 16:32:22 +0000 (13:32 -0300)]
[media] gspca - ov519: Add the sensor ov2610ae
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-François Moine [Thu, 10 Feb 2011 16:18:58 +0000 (13:18 -0300)]
[media] gspca - sonixj: The pin S_PWR_DN is inverted for sensor mi0360
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-François Moine [Thu, 10 Feb 2011 13:15:45 +0000 (10:15 -0300)]
[media] gspca - ov534: Add saturation control for ov767x
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-François Moine [Thu, 10 Feb 2011 13:11:04 +0000 (10:11 -0300)]
[media] gspca - ov534: Add the webcam 06f8:3002 and sensor ov767x
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-François Moine [Thu, 10 Feb 2011 12:34:57 +0000 (09:34 -0300)]
[media] gspca - ov534: Use the new control mechanism
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-François Moine [Thu, 10 Feb 2011 11:10:50 +0000 (08:10 -0300)]
[media] gspca - sonixj, zc3xx: Let some bandwidth for audio when USB 1.1
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-François Moine [Thu, 10 Feb 2011 11:03:24 +0000 (08:03 -0300)]
[media] gspca - sonixj: Set both pins for infrared of mt9v111 webcams
This avoids to define the webcam model.
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-François Moine [Thu, 10 Feb 2011 11:00:40 +0000 (08:00 -0300)]
[media] gspca - sonixj: Same init for all bridges but the sn9c102p
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-François Moine [Thu, 10 Feb 2011 10:52:58 +0000 (07:52 -0300)]
[media] gspca - sonixj: Simplify GPIO setting when audio present
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-François Moine [Thu, 10 Feb 2011 10:49:32 +0000 (07:49 -0300)]
[media] gspca - sonixj: Adjust autogain for sensor mt9v111
The gain/expo adjustment was too long.
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-François Moine [Thu, 10 Feb 2011 10:44:59 +0000 (07:44 -0300)]
[media] gspca - sonixj: Fix start sequence of sensor mt9v111
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-François Moine [Thu, 10 Feb 2011 10:38:58 +0000 (07:38 -0300)]
[media] gspca - sonixj: Update the JPEG quality for best image transfer
During image capture, the filling rate of the isoc packets is computed.
It is then used by a work queue to update the current JPEG quality.
Tested-by: Franck Bourdonnec <fbourdonnec@chez.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-François Moine [Thu, 10 Feb 2011 10:30:03 +0000 (07:30 -0300)]
[media] gspca - sonixj: Have the same JPEG quality for encoding and decoding
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-François Moine [Thu, 10 Feb 2011 10:15:24 +0000 (07:15 -0300)]
[media] gspca - sonixj: Better scanning of isochronous packets
A marker 'ff ff 00 c4 c4 96' indicates an end of frame.
It is 62 bytes long and may be splitted on 2 packets.
It contains a flag 'USB full' which indicates that the frame is truncated.
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-François Moine [Thu, 10 Feb 2011 10:01:30 +0000 (07:01 -0300)]
[media] gspca - sonixj: Move the avg lum computation to a separate function
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Pawel Osciak [Sun, 16 Jan 2011 16:53:31 +0000 (13:53 -0300)]
[media] Remove compatibility layer from multi-planar API documentation
This feature will probably be moved to libv4l2.
Signed-off-by: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Tue, 22 Feb 2011 15:31:07 +0000 (12:31 -0300)]
[media] v4l2-ctrls: Fix control enumeration for multiple subdevs with ctrl
v4l2-ctl and qv4l2 enumerate controls using V4L2_CTRL_FLAG_NEXT_CTRL,
falling back to the old method if the flag isn't supported.
The v4l2_subdev_queryctrl function will currently handle that flag, but
for the controls of the subdev only. This isn't right, it should refuse
this flag, otherwise v4l2-ctl will only see the controls of the first
subdev.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Tue, 22 Feb 2011 04:00:58 +0000 (01:00 -0300)]
[media] em28xx: properly handle subdev controls
Subdev controls return codes are evil, as they return -EINVAL to mean
both unsupported and invalid arguments. Due to that, we need to use a
trick to identify what controls are supported by a subdev.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Tue, 22 Feb 2011 03:27:41 +0000 (00:27 -0300)]
[media] em28xx: Fix return value for s_ctrl
On some cases, driver returns 1. This should be OK, but qv4l2 is too
strict about return values.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Tue, 22 Feb 2011 03:10:22 +0000 (00:10 -0300)]
[media] tvp5150: device detection should be done only once
Having the device detection happening at reset is bad, as every time,
it will produce a message like:
tvp5150 2-005c: tvp5150am1 detected.
This only polutes the log and for an accidental kernel hacker, it looks
like a real problem. So, move those printk's to happen during device
probe.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Tue, 22 Feb 2011 00:03:59 +0000 (21:03 -0300)]
[media] tuner: Remove remaining usages of T_DIGITAL_TV
A few places used T_DIGITAL_TV internally. Remove the usage of this
obsolete mode mask.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Tue, 15 Feb 2011 12:31:01 +0000 (10:31 -0200)]
[media] tuner-core: Don't touch at standby during tuner_lookup
It makes no sense that tuner_lookup would touch at the standby
state. Remove it.
Thanks-to: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Tue, 15 Feb 2011 12:27:03 +0000 (10:27 -0200)]
[media] tuner-core: Rearrange some functions to better document
Group a few functions together and add/fix comments for each
block of the driver.
This is just a cleanup patch meant to improve driver readability.
No functional changes in this patch.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Tue, 15 Feb 2011 12:15:19 +0000 (10:15 -0200)]
[media] tuner-core: Improve function documentation
This driver is complex, and used by everyone. Better to have it
properly documented.
No functional changes are done in this patch.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Tue, 15 Feb 2011 11:30:50 +0000 (09:30 -0200)]
[media] tuner-core: remove usage of DIGITAL_TV
tuner-core has no business to do with digital TV. So, don't use
T_DIGITAL_TV on it, as it has no code to distinguish between
them, and nobody fills T_DIGITAL_TV right.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Mon, 14 Feb 2011 20:53:12 +0000 (18:53 -0200)]
[media] Remove the remaining usages for T_STANDBY
tda9887 used to use the T_STANDBY type internally, while tea5761
used it to put the device to sleep. Fix the code for it to work
properly with the tuner core changes and remove this flag from
tuner.h.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Tue, 15 Feb 2011 04:10:20 +0000 (01:10 -0300)]
[media] tuner-core: Fix a few comments on it
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Tue, 15 Feb 2011 03:55:18 +0000 (00:55 -0300)]
[media] tuner-core: dead code removal
Remove the now obsolete set_freq. Also merge set_addr and set_type_addr.
In the past, it used to have two different setup calls, one to set just
the tuner type to any tuner found, and another to set the type only if
the address matches. Those two internal calls were grouped together,
but the functions weren't merged, making the code uglier.
No functional changes are done in this patch.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Fri, 4 Feb 2011 15:56:39 +0000 (12:56 -0300)]
[media] tuner-core: Don't use a static var for xc5000_cfg
A static var is evil, especially if a device has two boards with
xc5000. Instead, just like the other drivers, use stack to store
its config during setup.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Fri, 4 Feb 2011 14:28:00 +0000 (11:28 -0300)]
[media] tuner-core: CodingStyle cleanups
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Fri, 4 Feb 2011 14:15:21 +0000 (11:15 -0300)]
[media] tuner-core: do the right thing for suspend/resume
Power down tuners at suspend. At resume, if the tuner is in standby,
calls set_mode, that will turn it on and set the latest frequencies.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Fri, 4 Feb 2011 13:42:09 +0000 (10:42 -0300)]
[media] tuner-core: Better implement standby mode
In the past, T_STANDBY were used on devices with a separate radio tuner to
mark a tuner that were disabled. With the time, it got newer meanings.
Also, due to a bug at the logic, the driver might incorrectly return
T_STANDBY to userspace.
So, instead of keeping the abuse, just use a boolean for storing
such information.
We can't remove T_STANDBY yet, as this is used on two other drivers. A
latter patch will address its usage outside tuner-core.
Thanks-to: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Fri, 4 Feb 2011 13:09:07 +0000 (10:09 -0300)]
[media] tuner-core: Some cleanups at check_mode/set_mode
Properly document those functions and do some cleanups around that.
There's just one behavior change on this patchset: it will now restore
TV frequency when changing from radio to TV mode.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Fri, 4 Feb 2011 02:32:07 +0000 (23:32 -0300)]
[media] tuner-core: Reorganize the functions internally
This is a big patch with no functional changes. It just
rearranges everything inside the driver, and prepares to
break TV and Radio into two separate fops groups.
Currently, it has an heuristics logic to determine if the
call came from radio or video. However, the caller driver
knows for sure, so tuner-core shouldn't try to guess it.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Fri, 4 Feb 2011 02:03:19 +0000 (23:03 -0300)]
[media] tuner-core: move some messages to the proper place
Move the frequency set debug printk's to the code that actually
are changing it.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Fri, 4 Feb 2011 01:18:14 +0000 (22:18 -0300)]
[media] tuner-core: remove the legacy is_stereo() call
Nobody is using this legacy call. Just remove it.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Fri, 4 Feb 2011 01:05:23 +0000 (22:05 -0300)]
[media] tuner-core: Remove V4L1/V4L2 API switch
V4L1 was removed. So, the code there is just dead code.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Mon, 14 Feb 2011 10:01:51 +0000 (07:01 -0300)]
[media] cx88: Don't allow opening a device while it is not ready
After registering the cdev, it would be possible do have an open on it.
In a matter of fact, some versions of udev do this. So, move registration
to the end and protect it with a mutex.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Mon, 14 Feb 2011 00:52:02 +0000 (21:52 -0300)]
[media] cx88: use unlocked_ioctl for cx88-video.
cx88-video has locks. don't use the locked ioctl version, as
it is not needed.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Tue, 1 Feb 2011 01:18:21 +0000 (22:18 -0300)]
[media] cx231xx: Add support for PV Xcapture USB
Adds support for Pixelviex Xcapture USB grabber device.
This device has one composite and one s-video entry
only, plus a button.
For now, the button is not supported.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Mon, 31 Jan 2011 19:25:39 +0000 (16:25 -0300)]
[media] cx231xx: Allow some boards to not use I2C port 3
Some devices don't need to use it. So allow to just disable this logic.
Having it enabled on some devices cause power management to complain,
generating error -71.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Tue, 1 Feb 2011 01:12:15 +0000 (22:12 -0300)]
[media] cx231xx: Use parameters to describe some board variants
Instead of per-model tests all over the code, use some parameters
at the board entries to describe the model variants for:
- devices with 417 MPEG encoder;
- devices that use external AV;
- devices where vbi VANC endpoint doesn't work;
- devices with xc5000 that require different IF
initialization (and probably will cover also
xc3028).
- devices with xceive tuner that require a reset
during init.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Sun, 30 Jan 2011 12:03:24 +0000 (09:03 -0300)]
[media] cx231xx: Use a generic check for TUNER_XC5000
The check for xc5000 assumes that the tuner will always
be using the same bus and will have the same address.
As those are configurable via dev->board, it should use,
instead, the values defined there.
Also, a similar type of test will be needed by other
tuners (for example, for TUNER_XC2028)
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Sun, 30 Jan 2011 01:10:56 +0000 (22:10 -0300)]
[media] cx231xx: Simplify interface checking logic at probe
Just a cleanup patch. Removes one indent level by moving
the return -ENODEV to happen before the device register
logic, if the interface is not the audio/video (int 1).
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Alina Friedrichsen [Sun, 23 Jan 2011 15:27:05 +0000 (12:27 -0300)]
[media] tuner-xc2028: More firmware loading retries
My Hauppauge WinTV HVR-1400 needs sometimes more then only one retry to load the firmware successfully.
Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
iceberg [Fri, 21 Jan 2011 18:00:25 +0000 (15:00 -0300)]
[media] double mutex lock in drivers/media/radio/si470x/radio-si470x-
KERNEL_VERSION: 2.6.37
common.c in function ssize_t si470x_fops_read.
1. First mutex_lock on &radio->lock in line 441
2. Second in line 462
I think that mutex in line 462 is not needed.
433static ssize_t si470x_fops_read(struct file *file, char __user *buf,
434 size_t count, loff_t *ppos)
435{
....
441 mutex_lock(&radio->lock);
442 if ((radio->registers[SYSCONFIG1] & SYSCONFIG1_RDS) == 0)
443 si470x_rds_on(radio);
444
445 /* block if no new data available */
446 while (radio->wr_index == radio->rd_index) {
447 if (file->f_flags & O_NONBLOCK) {
448 retval = -EWOULDBLOCK;
449 goto done;
450 }
451 if (wait_event_interruptible(radio->read_queue,
452 radio->wr_index != radio->rd_index) < 0) {
453 retval = -EINTR;
454 goto done;
455 }
456 }
457
458 /* calculate block count from byte count */
459 count /= 3;
460
461 /* copy RDS block out of internal buffer and to user buffer */
462 mutex_lock(&radio->lock);
Found by Linux Device Drivers Verification Project
Remove second mutex.
Signed-off-by: Alexander Strakh <strakh@ispras.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Dmitri Belimov [Thu, 20 Jan 2011 06:05:08 +0000 (03:05 -0300)]
[media] tm6000: add/rework reg.defines
Rework registers defines. Add TM6000 specific registers defines.
Add marks and comments for TM6010 specific registers.
Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sat, 22 Jan 2011 09:36:02 +0000 (06:36 -0300)]
[media] cpia2: convert to video_ioctl2
Unable to test this due to lack of hardware.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sat, 22 Jan 2011 09:34:55 +0000 (06:34 -0300)]
[media] pwc: convert to video_ioctl2
Tested with a Logitech QuickCam Pro 4000.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Thu, 13 Jan 2011 08:05:36 +0000 (05:05 -0300)]
[media] pwc: convert to core-assisted locking
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Tue, 11 Jan 2011 20:32:28 +0000 (17:32 -0300)]
[media] vivi: fix compiler warning
drivers/media/video/vivi.c:1059: warning: this decimal constant is unsigned only in ISO C90
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 23 Jan 2011 14:33:16 +0000 (12:33 -0200)]
[media] vivi: convert to the control framework and add test controls
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 12 Dec 2010 11:46:15 +0000 (08:46 -0300)]
[media] tvp7002: use control framework
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 12 Dec 2010 11:45:59 +0000 (08:45 -0300)]
[media] vpx3220: use control framework
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 12 Dec 2010 11:45:43 +0000 (08:45 -0300)]
[media] tvp5150: use the control framework
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 12 Dec 2010 11:45:22 +0000 (08:45 -0300)]
[media] tvp514x: use the control framework
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 12 Dec 2010 11:45:04 +0000 (08:45 -0300)]
[media] tlv320aic23b: use control framework
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 12 Dec 2010 11:27:48 +0000 (08:27 -0300)]
[media] saa7110: use control framework
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 12 Dec 2010 11:19:41 +0000 (08:19 -0300)]
[media] bt819: use control framework
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 12 Dec 2010 11:19:16 +0000 (08:19 -0300)]
[media] adv7343: use control framework
Also fixed a memory leak in the probe function if an error occurred.
The gain control range was also fixed (a proper range from -64 to 64).
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Fri, 31 Dec 2010 13:22:52 +0000 (10:22 -0300)]
[media] cx18: Use the control framework
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 12 Dec 2010 10:53:28 +0000 (07:53 -0300)]
[media] cs5345: use the control framework
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Wed, 10 Nov 2010 00:31:40 +0000 (22:31 -0200)]
[media] technisat-usb2: CodingStyle cleanups
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Wed, 19 Jan 2011 18:25:17 +0000 (16:25 -0200)]
[media] add support for Encore FM3
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Wed, 19 Jan 2011 18:11:58 +0000 (16:11 -0200)]
[media] saa7134: Properly report when a board doesn't have eeprom
When a device is not detected, the driver prints a warning message.
That's ok, except for the fact that, even on newer devices that have
eeprom but aren't yet supported, it prints a message saying that the
device doesn't have eeprom.
Fix it by having a separate message for devices with eeprom, but not
yet known by the driver.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Wed, 19 Jan 2011 18:05:30 +0000 (16:05 -0200)]
[media] tuner-simple: add support for Tena TNF5337 MFD
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 16 Jan 2011 20:21:02 +0000 (17:21 -0300)]
[media] DocBook/v4l: fix validation errors
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Pawel Osciak [Wed, 19 Jan 2011 15:02:29 +0000 (13:02 -0200)]
[media] v4l: vivi: port to videobuf2
Make vivi use videobuf2 in place of videobuf.
Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Pawel Osciak <pawel@osciak.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Tue, 18 Jan 2011 00:18:02 +0000 (22:18 -0200)]
[media] ngene: Fix compilation when cxd2099 is not enabled
drivers/media/dvb/ngene/ngene-i2c.o: In function `cxd2099_attach':
ngene-i2c.c:(.text+0x195): multiple definition of `cxd2099_attach'
drivers/media/dvb/ngene/ngene-core.o:ngene-core.c:(.text+0x100): first defined here
drivers/media/dvb/ngene/ngene-cards.o: In function `cxd2099_attach':
ngene-cards.c:(.text+0x116): multiple definition of `cxd2099_attach'
drivers/media/dvb/ngene/ngene-core.o:ngene-core.c:(.text+0x100): first defined here
drivers/media/dvb/ngene/ngene-dvb.o: In function `cxd2099_attach':
ngene-dvb.c:(.text+0x7ad): multiple definition of `cxd2099_attach'
drivers/media/dvb/ngene/ngene-core.o:ngene-core.c:(.text+0x100): first defined here
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Mon, 17 Jan 2011 16:20:49 +0000 (14:20 -0200)]
[media] Move CI cxd2099 driver to staging
This driver is abusing the kernel<=>userspace API, due to the lack of a
proper solution for it. A discussion were done at:
http://www.mail-archive.com/linux-media@vger.kernel.org/msg22196.html
But there's not a solution for it yet. So, move the driver to staging, while
we don't have a final solution.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Oliver Endriss [Mon, 10 Jan 2011 09:36:24 +0000 (06:36 -0300)]
[media] stv090x: 22kHz workaround must also be performed for the 2nd frontend
22kHz workaround must also be performed for the 2nd frontend.
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Oliver Endriss [Mon, 10 Jan 2011 09:36:23 +0000 (06:36 -0300)]
[media] ngene: Improved channel initialisation and release
Refactored code for channel initialisation and release:
- Do not create device nodes which are not required.
- Better error handling.
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>