1
0
Fork 0
Commit Graph

505873 Commits (70769b24d2973428907de3429dd2a5792e4ce317)

Author SHA1 Message Date
Olli Salonen 70769b24d2 [media] dw2102: store i2c client for tuner into dw2102_state
Prepare the dw2102 driver for tuner drivers that are implemented as I2C
drivers (such as m88ts2022). The I2C client is stored in to the state
and released at disconnect.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 22:24:01 -03:00
Olli Salonen 2c4ffe27d0 [media] dw2102: combine su3000_state and s6x0_state into dw2102_state
Two separate state structs are defined for different devices inside the
dw2102. Combine them, as both only contain one element.

This will also make it easier to further cleanup the driver.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 22:24:01 -03:00
David Howells 67e6590aa9 [media] m88ts2022: Nested loops shouldn't use the same index variable
There are a pair of nested loops inside m88ts2022_cmd() that use the same
index variable, but for different things.  Split the variable.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 22:24:00 -03:00
Sakari Ailus 0fd68f2f7a [media] smiapp: Clean up smiapp_get_pdata()
Don't set rval when it's not used (the function returns a pointer to struct
smiapp_platform_data).

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 22:24:00 -03:00
Benoit Parrot c4c0283ab3 [media] media: i2c: add support for omnivision's ov2659 sensor
this patch adds support for omnivision's ov2659
sensor, the driver supports following features:
1: Asynchronous probing
2: DT support
3: Media controller support

Signed-off-by: Benoit Parrot <bparrot@ti.com>
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 22:15:46 -03:00
Michael Opdenacker d16cae25cb [media] DocBook media: fix broken EIA hyperlink
This fixes the bibliography hyperlink to "http://www.eia.org"
which now redirects to a page with a "404 Not found" error.

The latest update to the document referred to is now available
on the Consumer Electronics Association website.

Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 22:12:21 -03:00
Hans Verkuil 924b34ea48 [media] DocBook media: improve V4L2_DV_FL_HALF_LINE documentation
Explicitly specify where the half-line is added or removed in
each field.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Prashant Laddha <prladdha@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 22:11:55 -03:00
Hans Verkuil e202e515b7 [media] vivid-tpg.c: fix wrong Bt.2020 coefficients
Mistyping 0.2627 as 0.2726 I can understand, but -0.4598 as -0.4629? No idea how
I managed that. Anyway, these coefficients are now correct again.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 22:08:19 -03:00
Hans Verkuil 486e56be52 [media] DocBook media: fix BT.2020 description
One number was wrong (0.6789 -> 0.6780) and Y' should have been Yc'.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 22:07:53 -03:00
Hans Verkuil b766586b1a [media] DocBook media: improve event documentation
It always annoyed me that the event type documentation was separate from the struct
v4l2_event documentation. This patch moves it all to one place, VIDIOC_DQEVENT.

This makes much more sense.

Also changed the 'changes-flags' ref to 'ctrl-changes-flags' since this referred to
control changes. There is a src-changes-flags as well, so 'changes-flags' was a bit
vague.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 22:04:07 -03:00
Sakari Ailus 9a68c9fa76 [media] smiapp: Read link-frequencies property from the endpoint node
The documentation stated that the link-frequencies property belongs to the
endpoint node, not to the device's of_node. Fix this.

There are no DT board descriptions using the driver yet, so a fix in the
driver is sufficient.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:57:28 -03:00
Benjamin Larsson 0aa83bb181 [media] mn88473: implement lock for all delivery systems
Add capability to check if digital TV has lock for all delivery
systems.

Signed-off-by: Benjamin Larsson <benjamin@southpole.se>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:55:34 -03:00
Antti Palosaari d73ab40613 [media] mn88472: define symbol rate limits
w_scan complains about missing symbol rate limits:
This dvb driver is *buggy*: the symbol rate limits are undefined - please report to linuxtv.org

Lets add some reasonable limits in order to keep w_scan happy :)

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:54:20 -03:00
Antti Palosaari 8459e41da5 [media] mn88473: define symbol rate limits
w_scan complains about missing symbol rate limits:
This dvb driver is *buggy*: the symbol rate limits are undefined - please report to linuxtv.org

Lets add some reasonable limits in order to keep w_scan happy :)

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:54:04 -03:00
Benjamin Larsson 4752eb2731 [media] mn88472: check if firmware is already running before loading it
Signed-off-by: Benjamin Larsson <benjamin@southpole.se>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:53:39 -03:00
Benjamin Larsson 567627bfb2 [media] mn88473: check if firmware is already running before loading it
Signed-off-by: Benjamin Larsson <benjamin@southpole.se>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:53:18 -03:00
Benjamin Larsson 0f21ac7f92 [media] mn88473: implement firmware parity check
Signed-off-by: Benjamin Larsson <benjamin@southpole.se>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:52:56 -03:00
Benjamin Larsson 307e95c922 [media] mn88472: implement firmware parity check
Signed-off-by: Benjamin Larsson <benjamin@southpole.se>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:52:36 -03:00
Benjamin Larsson ba6d6d8a06 [media] mn88472: implement lock for all delivery systems
The increase of the lock timeout is needed for dvb-t2.

Signed-off-by: Benjamin Larsson <benjamin@southpole.se>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:52:16 -03:00
Benjamin Larsson 46cf707482 [media] rtl28xxu: lower the rc poll time to mitigate i2c transfer errors
The Astrometa device has issues with i2c transfers. Lowering the
poll time somehow makes these errors disappear.

Signed-off-by: Benjamin Larsson <benjamin@southpole.se>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:51:37 -03:00
Benjamin Larsson b91bfcda45 [media] r820t: change read_gain() code to match register layout
Signed-off-by: Benjamin Larsson <benjamin@southpole.se>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:50:57 -03:00
Benjamin Larsson 7b7ef4b4a5 [media] r820t: add DVBC profile in sysfreq_sel
This will make the Astrometa DVB-T/T2/C usb stick be able to pick up
muxes around 290-314 MHz.

Signed-off-by: Benjamin Larsson <benjamin@southpole.se>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:49:53 -03:00
Laurent Pinchart f2272e1347 [media] v4l: mt9v032: Add OF support
Parse DT properties into a platform data structure when a DT node is
available.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:31:31 -03:00
Laurent Pinchart 5888f9df0d [media] of: Add vendor prefix for Aptina Imaging
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:30:51 -03:00
Laurent Pinchart 2d01209fd2 [media] v4l: mt9v032: Consider control initialization errors as fatal
The device requires control to be properly operated, they're not
optional.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:30:26 -03:00
Laurent Pinchart 7c3be9f812 [media] v4l: mt9p031: Convert to the gpiod API
This simplifies platform data and DT integration.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:29:56 -03:00
Lad, Prabhakar 9012d0888c [media] media: i2c: mt9p031: add support for asynchronous probing
Both synchronous and asynchronous mt9p031 subdevice probing
is supported by this patch.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:28:54 -03:00
Lad, Prabhakar 15af4a532f [media] media: i2c: mt9p031: make sure we destroy the mutex
Make sure to call mutex_destroy() in case of probe failure or module
unload.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:28:19 -03:00
Enrico Scholz 198b47ddd2 [media] mt9p031: fixed calculation of clk_div
There must be used 'min_t', not 'max_t' for calculating the divider.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:19:04 -03:00
Laurent Pinchart ac0eb4809e [media] staging: media: omap4iss: video: Don't WARN() on unknown pixel formats
When mapping from a V4L2 pixel format to a media bus format in the
VIDIOC_TRY_FMT and VIDIOC_S_FMT handlers, the requested format may be
unsupported by the driver. Return a hardcoded default format instead of
WARN()ing in that case.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:17:48 -03:00
Laurent Pinchart 9d9104fb9d [media] staging: media: omap4iss: Cleanup media entities after unregistration
The ipipeif, ipipe and resizer media entities are cleaned up before
unregistering the media device, creating a race condition. Fix it by
cleaning them up at cleanup time.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:17:04 -03:00
Florian Echtler e831cd251f [media] add raw video stream support for Samsung SUR40
This patch adds raw video support for the Samsung SUR40 using vbuf2-dma-sg.
All tests from v4l2-compliance pass. Support for VB2_USERPTR is currently
disabled due to unexpected interference with dma-sg buffer sizes.

Signed-off-by: Florian Echtler <floe@butterbrot.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
[hans.verkuil@cisco.com: fix compile warning: %ld -> %zd]

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:16:03 -03:00
Hans Verkuil 5f85348732 [media] DocBook media: fix awkward language in VIDIOC_QUERYCAP
Fix some awkward language in the VIDIOC_QUERYCAP description.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:13:56 -03:00
Hans Verkuil 3c828ff896 [media] DocBook media: fix VIDIOC_CROPCAP type description
The type field of VIDIOC_CROPCAP does not allow the MPLANE variants, just
as all the other crop/selection related ioctls.

Fix the description of CROPCAP and G_CROP and make the text describing
this consistent for all selection ioctls.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:13:21 -03:00
Hans Verkuil 82bdb26abc [media] vivid: sanitize selection rectangle
Handle values like ~0 as width, height, left or top fields.
Just strip off the top 16 bits will ensure that the calculations
remain OK.

Found with v4l2-compliance.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:10:45 -03:00
Hans Verkuil 29813a6f34 [media] vivid: report only one frameinterval
The vivid driver reports a range of frame intervals for non-webcams, when in fact
the frame interval is fixed for those inputs as it depends on the DV timings or
standard. Just report the single discrete frame interval instead.

Caught by v4l2-compliance.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:10:11 -03:00
Hans Verkuil 1bd0835a27 [media] vivid: allow s_dv_timings if it is the same as the current
Allow setting the same timings as the current timings (i.e., do nothing in that
case). The code was actually there, but the vb2_is_busy() call was done before
the timings check instead of afterwards.

Found by v4l2-compliance.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:09:35 -03:00
Hans Verkuil 02aa769d9f [media] vivid: add support for 8-bit Bayer formats
Add support for: PIX_FMT_SBGGR8, SGBRG8, SGRBG8 and SRGGB8.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:08:30 -03:00
Hans Verkuil 87c674e243 [media] vivid: use v4l2_device.release to clean up the driver
Use the release callback of the v4l2_device to clean up the memory.
This prevents vivid from breaking if someone tries to unbind the
driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:08:04 -03:00
Hans Verkuil f46d740fb0 [media] vivid: turn this into a platform_device
This turns this driver into a platform device. This ensures that it
appears in /sys/bus/platform_device since it now has a proper parent
device.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:07:36 -03:00
Hans Verkuil 628821c84e [media] vivid: add support for packed YUV formats
Add support for the packed YUV formats YUV444, YUV555, YUV565 and YUV32.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:05:59 -03:00
Hans Verkuil 68cd4e9f21 [media] vivid: add support for BGR666
Add support for the four byte BGR666 format.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:05:37 -03:00
Hans Verkuil f234a76e10 [media] DocBook media: clarify BGR666
The documentation is not clear whether this is a three or four byte
format. Clarify this.

Also move the BGR666 format to the other 32 bit formats.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:05:15 -03:00
Hans Verkuil 71491063b8 [media] vivid: add support for PIX_FMT_RGB332
Add support for the one-byte-per-pixel RGB332 format.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:04:51 -03:00
Hans Verkuil dde72bd773 [media] vivid: add support for NV24 and NV42
Add support for the YUV 4:4:4 formats NV24 and NV42.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:04:24 -03:00
Hans Verkuil 8f1ff5435d [media] vivid: add support for [A|X]RGB555X
Only RGB555X was supported, add support for the other two variants.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:03:31 -03:00
Hans Verkuil 9e1b73cfed [media] vivid: fix format comments
Clarify which formats have an alpha channel and which do not by
using 'x' instead of 'a' if there is no alpha channel.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:03:07 -03:00
Hans Verkuil 8aca230b6d [media] vivid: add RGB444 support
Add support for (A/X)RGB444 formats.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 21:02:45 -03:00
Hans Verkuil b521c37551 [media] vivid: add the new planar and monochrome formats
Everything is in place to support these formats, so add them to
the list.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 20:55:36 -03:00
Hans Verkuil 1f9f23f62f [media] vivid: add downsampling support
Add support in vivid for downsampling. Most of the changes are in
vivid_copy_buffer which needs to know about the right line widths.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 20:55:12 -03:00