Commit graph

301135 commits

Author SHA1 Message Date
Sylwester Nawrocki
6889d5ced7 [media] Feature removal: V4L2 selections API target and flag definitions
After unification of the V4L2 and V4L2 subdev selection targets and flags
the old flags are no longer required. Thus they can be removed. However, as
the API is present in a kernel release, this must go through the feature
removal process.

Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 20:25:15 -03:00
Sakari Ailus
9fe75aac38 [media] v4l: Unify selection flags documentation
As for the selection targets, the selection flags are now the same on V4L2
and V4L2 subdev interfaces. Also document them so.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 20:20:18 -03:00
Sakari Ailus
563df3d0bc [media] v4l: Unify selection flags
Unify flags on the selection interfaces on V4L2 and V4L2 subdev. Flags are
very similar to targets in this case: there are more similarities than
differences between the two interfaces.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 20:17:46 -03:00
Sakari Ailus
64b9ce83a4 [media] v4l: Common documentation for selection targets
Both V4L2 and V4L2 subdev interface have very similar selection APIs with
differences foremost related to in-memory and media bus formats. However,
the selection targets are the same for both. Most targets are and in the
future will likely continue to be more the same than with any differences.
Thus it makes sense to unify the documentation of the targets.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 20:17:00 -03:00
Sakari Ailus
5689b28890 [media] v4l: Unify selection targets across V4L2 and V4L2 subdev interfaces
Change the users of V4L2_SUBDEV_SEL_TGT_* targets to use V4L2_SEL_TGT_*
instead. The common definitions are moved to a new header file,
include/linux/v4l2-common.h.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 20:15:48 -03:00
Sakari Ailus
1ec0ed0839 [media] v4l: Remove "_ACTUAL" from subdev selection API target definition names
The string "_ACTUAL" does not say anything more about the target names. Drop
it. V4L2 selection API was changed by "V4L: Remove "_ACTIVE" from the
selection target name definitions" by Sylwester Nawrocki. This patch does
the same for the V4L2 subdev API.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 20:14:39 -03:00
Sylwester Nawrocki
c133482300 [media] V4L: Remove "_ACTIVE" from the selection target name definitions
This patch drops the _ACTIVE part from the selection target names
as a prerequisite to unify the selection target names across the subdev
and regular video node API.

The meaning of V4L2_SEL_TGT_*_ACTIVE and V4L2_SUBDEV_SEL_TGT_*_ACTUAL
selection targets is logically the same. Different names add to confusion
where both APIs are used in a single driver or an application. For some
system configurations different names may lead to interoperability issues.

For backwards compatibility V4L2_SEL_TGT_CROP_ACTIVE and
V4L2_SEL_TGT_COMPOSE_ACTIVE are defined as aliases to V4L2_SEL_TGT_CROP
and V4L2_SEL_TGT_COMPOSE. These aliases will be removed after deprecation
period, according to Documentation/feature-removal-schedule.txt.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 20:13:30 -03:00
Laurent Pinchart
5aedc10940 [media] omap3isp: preview: Fix contrast and brightness handling
Commit bac387efbb ("omap3isp: preview:
Simplify configuration parameters access") added three fields to the
preview_update structure, but failed to properly update the related
initializers. Fix this.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 19:36:39 -03:00
Laurent Pinchart
7103180b43 [media] omap3isp: preview: Fix output size computation depending on input format
The preview engine crops 4 columns and 4 lines when CFA is enabled.
Commit b2da46e52f ("omap3isp: preview: Add
support for greyscale input") inverted the condition by mistake, fix
this.

Reported-by: Florian Neuhaus <florian.neuhaus@reberinformatik.ch>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Florian Neuhaus <florian.neuhaus@reberinformatik.ch>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 19:36:39 -03:00
Anton Blanchard
8299d62843 [media] winbond-cir: Initialise timeout, driver_type and allowed_protos
We need to set a timeout so we can go idle on no activity.

Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 19:36:38 -03:00
Anton Blanchard
57f4422f7b [media] winbond-cir: Fix txandrx module info
We aren't getting any module info for the txandx option because
of a typo:

parm:           txandrx:bool

Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 19:36:37 -03:00
Anton Blanchard
c6cff16926 [media] cx23885: Silence unknown command warnings
I am seeing a constant stream of warnings on my cx23885 based card:
	cx23885_tuner_callback(): Unknown command 0x2.

Add a check in cx23885_tuner_callback to silence it.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 19:36:37 -03:00
Devin Heitmueller
0ac60acb54 [media] cx23885: add support for HVR-1255 analog (cx23888 variant)
Get the HVR-1255 analog support working for all supported inputs.  This
includes introduction of a new board profile for an OEM variant which
doesn't have all the same inputs as the retail version of the board.

Validated with the following boards:

HVR-1255 (0070:2259)

Thanks to Steven Toth and Hauppauge for	loaning	me various boards to
regression test	with.

Thanks-to: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Devin Heitmueler <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 19:36:35 -03:00
Devin Heitmueller
d214ddc868 [media] cx23885: make analog support work for HVR_1250 (cx23885 variant)
The analog support in the cx23885 driver was completely broken for the
HVR-1250.  Add the necessary code.

Note that this only implements analog for the composite and s-video
inputs. The tuner input continues to be non-functional due to a lack of
analog support in the mt2131 driver.

Validated with the following boards:

HVR-1250 (0070:7911)

Thanks to Steven Toth and Hauppauge for	loaning	me various boards to
regression test	with.

Thanks-to: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Devin Heitmueler <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 19:36:34 -03:00
Devin Heitmueller
b5c5c17bab [media] cx25840: fix vsrc/hsrc usage on cx23888 designs
The location of the vsrc/hsrc registers moved in the cx23888, causing
the s_mbus call to fail prematurely indicating that "720x480 is not a
valid size". The function bailed out before many pertinent registers
were set related to the scaler (causing unexpected results in video
rendering when doing raw video capture).

Use the correct registers for the cx23888.

Validated with the following boards:

HVR-1800 retail (0070:7801)
HVR-1800 OEM (0070:7809)
HVR-1850 retail (0070:8541)

Thanks to Steven Toth and Hauppauge for	loaning	me various boards to
regression test with.

Reported-by: Jonathan <sitten74490@mypacks.net>
Thanks-to: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Devin Heitmueler <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 19:36:32 -03:00
Devin Heitmueller
d90133ec58 [media] cx25840: fix regression in HVR-1800 analog audio
The refactoring of the cx25840 driver to support the cx23888 caused breakage
with the existing support for cx23885/cx23887 analog audio support.  Tweak
the code so that it only uses the code if it really is a cx23888 instead of
applying it to all cx2388x based devices.

Validated with the following boards:

HVR-1800 retail (0070:7801)
HVR-1800 OEM (0070:7809)
HVR_1850 retail	(0070:8541)

Thanks to Steven Toth and Hauppauge for	loaning	me various boards to
regression test with.

Reported-by: Jonathan <sitten74490@mypacks.net>
Thanks-to: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Devin Heitmueler <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 19:36:32 -03:00
Devin Heitmueller
e6d0db1d47 [media] cx25840: fix regression in analog support hue/saturation controls
Fix regression in HVR-1800 analog support hue/saturation controls.

The changes made for the cx23888 caused regressions in the analog
support for cx23885/cx23887 based boards (partly due to changes in the
locations of the hue/saturation controls).  As a result the wrong
registers were being overwritten.

Add code to use the correct registers if it's a cx23888

Validated with the following boards:

HVR-1800 retail (0070:7801)
HVR-1800 OEM (0070:7809)
HVR-1850 retail (0070:8541)

Thanks to Steven Toth and Hauppauge for	loaning	me various boards to
regression test	 with.

Reported-by: Jonathan <sitten74490@mypacks.net>
Thanks-to: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Devin Heitmueler <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 19:36:31 -03:00
Devin Heitmueller
ba50e7e16b [media] cx25840: fix regression in HVR-1800 analog support
The refactoring of the cx25840 driver to support the cx23888 caused breakage
with the existing support for cx23885/cx23887 analog support.  Rework the
routines such that the new code is only used for the 888.

Validated with the following boards:

HVR-1800 retail (0070:7801)
HVR-1800 OEM (0070:7809)
HVR_1850 retail (0070:8541)

Thanks to Steven Toth and Hauppauge for loaning me various boards to
regression test with.

Reported-by: Jonathan <sitten74490@mypacks.net>
Thanks-to: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Devin Heitmueler <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 19:36:30 -03:00
Kamil Debski
a65c3262a7 [media] s5p-mfc: Fixed setup of custom controls in decoder and encoder
Fixed bugs in functions that initialize custom controls.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 19:36:29 -03:00
David Dillow
a7deca6fa7 [media] cx231xx: don't DMA to random addresses
Commit 7a6f6c29d2 (cx231xx: use
URB_NO_TRANSFER_DMA_MAP) was intended to avoid mapping the DMA buffer
for URB twice. This works for the URBs allocated with usb_alloc_urb(),
as those are allocated from cohernent DMA pools, but the flag was also
added for the VBI and audio URBs, which have a manually allocated area.
This leaves the random trash in the structure after allocation as the
DMA address, corrupting memory and preventing VBI and audio from
working. Letting the USB core map the buffers solves the problem.

Cc: stable@kernel.org
Signed-off-by: David Dillow <dave@thedillows.org>
Cc: Sri Deevi <srinivasa.deevi@conexant.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 19:36:28 -03:00
Mauro Carvalho Chehab
4dab0e5fe8 [media] em28xx: fix em28xx-rc load
The logic that checks if a device has remote control is wrong.
Due to that, the em28xx RC module is not loaded by default.

Fix the logic, in order to make it work properly.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 19:36:27 -03:00
Santosh Nayak
82163edcdf [media] dvb-core: Release semaphore on error path dvb_register_device()
There is a missing "up_write()" here. Semaphore should be released
before returning error value.

Cc: stable@kernel.org
Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 19:36:27 -03:00
Andy Shevchenko
936148a71e [media] media: dvb-usb: print mac address via native %pM
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 18:49:19 -03:00
Sachin Kamat
02a890d626 [media] s5p-tv: Use module_i2c_driver in sii9234_drv.c file
module_i2c_driver makes the code simpler by eliminating module_init
and module_exit calls.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 18:28:52 -03:00
Du, Changbin
500c3201e2 [media] media: gpio-ir-recv: add allowed_protos for platform data
It's better to give platform code a chance to specify the allowed
protocols to use.

[mchehab@redhat.com: fix merge conflict with a patch that made
 half of this change]
Signed-off-by: Du, Changbin <changbin.du@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 18:21:53 -03:00
Sachin Kamat
87e9429490 [media] s5p-jpeg: Use module_platform_driver in jpeg-core.c file
module_platform_driver makes the code simpler by eliminating module_init
and module_exit calls.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 18:16:50 -03:00
Peter Meerwald
91268a5e78 [media] saa7134: fix spelling of detach in label
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 18:16:20 -03:00
Hans Verkuil
fcbd504989 [media] cx88-blackbird: replace ioctl by unlocked_ioctl
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 18:13:48 -03:00
Hans Verkuil
48d68801d7 [media] cx88: don't use current_norm
current_norm can only be used if there is a single device node since it is
local to the device node. In this case multiple device nodes share a single
tuner.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 18:13:38 -03:00
Hans Verkuil
f33e9868a4 [media] cx88: fix a number of v4l2-compliance violations
- missing COMPRESSED flag for MPEG formats
- set colorspace
- set sizeimage
- add tuner index checks
- setup the frequency ranges correctly
- add missing g_chip_ident ioctl
- fix audmode handling
- don't handle vbi formats on a video node and vice versa.

cx88 now passes the v4l2-compliance tests.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 18:13:06 -03:00
Hans Verkuil
1a3c60a072 [media] cx88: support control events
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 18:12:09 -03:00
Hans Verkuil
88bb42fb5a [media] cx88: add priority support
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 18:11:51 -03:00
Hans Verkuil
c5a861449f [media] cx88: move fmt, width and height to cx8800_dev
These are global properties and do not belong in the filehandle struct.

Note: the overlay related fields were just removed: they weren't used at all.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 18:11:31 -03:00
Hans Verkuil
edbd138ed0 [media] cx88: remove radio and type from cx8800_fh
This information is available elsewhere already.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 18:10:54 -03:00
Hans Verkuil
7bb34c8e42 [media] cx88: convert cx88-blackbird to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 18:09:48 -03:00
Hans Verkuil
8c7cb12ac1 [media] cx88: each device node gets the right controls
radio only sees audio controls, video sees video and audio and vbi
sees none.

Also disable the chroma_agc control if secam is selected.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 18:09:17 -03:00
Hans Verkuil
bac639818c [media] cx88: first phase to convert cx88 to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 18:08:23 -03:00
Hans Verkuil
902e197dcc [media] cx88: fix querycap
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 18:07:01 -03:00
Hans Verkuil
4a77a8361f [media] v4l2-framework.txt: Update the locking documentation
This documents the new queue->lock and how to use it. It also removes the
documentation of v4l2_disable_ioctl_locking: this is only used in gspca and
will be removed once gspca has been converted to vb2.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 17:36:46 -03:00
Hans Verkuil
387c71b262 [media] pwc: v4l2-compliance fixes
- add device_caps
- set colorspace
- s_parm should support a fps of 0 (== reset to nominal fps)

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 17:36:29 -03:00
Hans Verkuil
2e43dec0ee [media] pwc: use the new vb2 helpers
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 17:36:00 -03:00
Hans Verkuil
cc4b7e7f57 [media] v4l2-dev.c: also add debug support for the fops
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 17:34:05 -03:00
Hans Verkuil
2e90c6c38a [media] vivi: add create_bufs/preparebuf support
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 17:33:33 -03:00
Hans Verkuil
f2ba5a0b46 [media] vivi: use vb2 helper functions
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 17:33:14 -03:00
Hans Verkuil
70bd97ae5f [media] vivi: embed struct video_device instead of allocating it
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 17:32:44 -03:00
Hans Verkuil
4e1d2ac633 [media] vivi: remove pointless g/s_std support
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 17:32:24 -03:00
Hans Verkuil
4c1ffcaad5 [media] videobuf2-core: add helper functions
Add helper functions to make it easier to adapt drivers to vb2.

These helpers take care of core locking and check if the filehandle is the
owner of the queue.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 17:32:06 -03:00
Hans Verkuil
5a5adf6b66 [media] v4l2-dev/ioctl.c: add vb2_queue support to video_device
This prepares struct video_device for easier integration with vb2.

It also introduces a new lock that protects the vb2_queue. It is up
to the driver to use it or not. And the driver can associate an owner
filehandle with the queue to check whether queuing requests are
permitted for the calling filehandle.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 17:30:54 -03:00
Hans Verkuil
5d44f5e3e3 [media] Spec: document CREATE_BUFS behavior if count == 0
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 17:29:39 -03:00
Hans Verkuil
f05393d2eb [media] vb2-core: add support for count == 0 in create_bufs
This also fixes incorrect error handling in create_bufs: the return code
of __vb2_queue_alloc is the number of allocated buffers, and not a
traditional error code.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-06 17:29:14 -03:00