Antti Palosaari [Tue, 24 Mar 2015 12:40:58 +0000 (09:40 -0300)]
[media] ts2020: do not use i2c_transfer() on sleep()
There is no need to use bulk i2c_transfer() to write single register.
Use write register function instead.
Tested-by: David Howells <dhowells@redhat.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Mon, 23 Mar 2015 23:35:57 +0000 (20:35 -0300)]
[media] m88ts2022: remove obsolete driver
This driver was replaced by ts2020 driver.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Sun, 29 Mar 2015 22:28:39 +0000 (19:28 -0300)]
[media] dw2102: switch ts2022 to ts2020 driver
Change ts2022 driver to ts2020 driver. ts2020 driver supports
both tuner chip models.
That affects TechnoTrend TT-connect S2-4600 DVB-S/S2 device, which
Olli just added.
Cc: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Mon, 23 Mar 2015 23:32:39 +0000 (20:32 -0300)]
[media] dvbsky: switch ts2022 to ts2020 driver
Change ts2022 driver to ts2020 driver. ts2020 driver supports
both tuner chip models.
Cc: Nibble Max <nibble.max@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Mon, 23 Mar 2015 23:22:28 +0000 (20:22 -0300)]
[media] smipcie: switch ts2022 to ts2020 driver
Change ts2022 driver to ts2020 driver. ts2020 driver supports
both tuner chip models.
Cc: Nibble Max <nibble.max@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Mon, 23 Mar 2015 21:52:46 +0000 (18:52 -0300)]
[media] cx23885: switch ts2022 to ts2020 driver
Change ts2022 driver to ts2020 driver. ts2020 driver supports
both chip models.
Cc: Olli Salonen <olli.salonen@iki.fi>
Cc: Nibble Max <nibble.max@gmail.com>
Tested-by: David Howells <dhowells@redhat.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Mon, 23 Mar 2015 21:33:29 +0000 (18:33 -0300)]
[media] em28xx: switch PCTV 461e to ts2020 driver
Change ts2022 driver to ts2020 driver as ts2020 driver now supports
both models.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Mon, 23 Mar 2015 21:26:55 +0000 (18:26 -0300)]
[media] ts2020: implement I2C client bindings
Implement I2C binding model.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Mon, 23 Mar 2015 17:14:40 +0000 (14:14 -0300)]
[media] ts2020: add support for TS2022
TS2022 is slightly newer and different version of same tuner, which
could be supported with rather small changes. Tuner type is
auto-detected.
Tested-by: David Howells <dhowells@redhat.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Olli Salonen [Mon, 16 Mar 2015 17:22:18 +0000 (14:22 -0300)]
[media] dw2102: TechnoTrend TT-connect S2-4600 DVB-S/S2 tuner
TechnoTrend TT-connect S2-4600 is a USB2.0 DVB-S/S2 tuner using the popular
Montage M88DS3103/M88TS2022 demod/tuner.
The demodulator needs a firmware. Antti posted a firmware when releasing
support for PCTV 461e, available here:
http://palosaari.fi/linux/v4l-dvb/firmware/M88DS3103/
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>
Olli Salonen [Mon, 16 Mar 2015 17:14:05 +0000 (14:14 -0300)]
[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>
Olli Salonen [Mon, 16 Mar 2015 17:14:04 +0000 (14:14 -0300)]
[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>
David Howells [Fri, 20 Mar 2015 13:37:38 +0000 (10:37 -0300)]
[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>
Sakari Ailus [Mon, 9 Mar 2015 23:44:40 +0000 (20:44 -0300)]
[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>
Benoit Parrot [Fri, 20 Mar 2015 21:03:52 +0000 (18:03 -0300)]
[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>
Michael Opdenacker [Sun, 22 Mar 2015 18:35:56 +0000 (15:35 -0300)]
[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>
Hans Verkuil [Fri, 20 Mar 2015 17:05:02 +0000 (14:05 -0300)]
[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>
Hans Verkuil [Fri, 20 Mar 2015 16:23:06 +0000 (13:23 -0300)]
[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>
Hans Verkuil [Thu, 19 Mar 2015 14:31:10 +0000 (11:31 -0300)]
[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>
Hans Verkuil [Wed, 18 Mar 2015 10:05:31 +0000 (07:05 -0300)]
[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>
Sakari Ailus [Mon, 9 Mar 2015 21:46:32 +0000 (18:46 -0300)]
[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>
Benjamin Larsson [Sat, 21 Mar 2015 10:18:07 +0000 (07:18 -0300)]
[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>
Antti Palosaari [Mon, 16 Mar 2015 22:01:53 +0000 (19:01 -0300)]
[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>
Antti Palosaari [Mon, 16 Mar 2015 21:56:21 +0000 (18:56 -0300)]
[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>
Benjamin Larsson [Sun, 15 Mar 2015 22:57:54 +0000 (19:57 -0300)]
[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>
Benjamin Larsson [Sun, 15 Mar 2015 22:57:53 +0000 (19:57 -0300)]
[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>
Benjamin Larsson [Sun, 15 Mar 2015 22:57:52 +0000 (19:57 -0300)]
[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>
Benjamin Larsson [Sun, 15 Mar 2015 22:57:51 +0000 (19:57 -0300)]
[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>
Benjamin Larsson [Sun, 15 Mar 2015 22:57:50 +0000 (19:57 -0300)]
[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>
Benjamin Larsson [Sun, 15 Mar 2015 22:57:48 +0000 (19:57 -0300)]
[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>
Benjamin Larsson [Sun, 15 Mar 2015 22:57:47 +0000 (19:57 -0300)]
[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>
Benjamin Larsson [Sun, 15 Mar 2015 22:57:46 +0000 (19:57 -0300)]
[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>
Laurent Pinchart [Wed, 1 Jan 2014 17:40:35 +0000 (14:40 -0300)]
[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>
Laurent Pinchart [Thu, 12 Mar 2015 23:53:51 +0000 (20:53 -0300)]
[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>
Laurent Pinchart [Wed, 1 Jan 2014 17:40:35 +0000 (14:40 -0300)]
[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>
Laurent Pinchart [Sat, 20 Sep 2014 21:38:56 +0000 (18:38 -0300)]
[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>
Lad, Prabhakar [Fri, 27 Feb 2015 16:10:19 +0000 (13:10 -0300)]
[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>
Lad, Prabhakar [Thu, 26 Feb 2015 18:05:38 +0000 (15:05 -0300)]
[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>
Enrico Scholz [Wed, 4 Feb 2015 14:53:32 +0000 (11:53 -0300)]
[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>
Laurent Pinchart [Tue, 3 Mar 2015 11:08:42 +0000 (08:08 -0300)]
[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>
Laurent Pinchart [Thu, 11 Dec 2014 13:23:57 +0000 (10:23 -0300)]
[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>
Florian Echtler [Mon, 16 Mar 2015 09:48:23 +0000 (06:48 -0300)]
[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>
Hans Verkuil [Sun, 15 Mar 2015 20:54:30 +0000 (17:54 -0300)]
[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>
Hans Verkuil [Sun, 15 Mar 2015 20:51:54 +0000 (17:51 -0300)]
[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>
Hans Verkuil [Sun, 15 Mar 2015 16:40:04 +0000 (13:40 -0300)]
[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>
Hans Verkuil [Fri, 13 Mar 2015 16:22:07 +0000 (13:22 -0300)]
[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>
Hans Verkuil [Sat, 14 Mar 2015 12:35:23 +0000 (09:35 -0300)]
[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>
Hans Verkuil [Sat, 14 Mar 2015 11:01:50 +0000 (08:01 -0300)]
[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>
Hans Verkuil [Fri, 13 Mar 2015 10:41:05 +0000 (07:41 -0300)]
[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>
Hans Verkuil [Fri, 13 Mar 2015 08:40:37 +0000 (05:40 -0300)]
[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>
Hans Verkuil [Fri, 13 Mar 2015 09:35:40 +0000 (06:35 -0300)]
[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>
Hans Verkuil [Fri, 13 Mar 2015 08:36:08 +0000 (05:36 -0300)]
[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>
Hans Verkuil [Fri, 13 Mar 2015 10:54:12 +0000 (07:54 -0300)]
[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>
Hans Verkuil [Thu, 12 Mar 2015 18:40:36 +0000 (15:40 -0300)]
[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>
Hans Verkuil [Fri, 13 Mar 2015 08:51:21 +0000 (05:51 -0300)]
[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>
Hans Verkuil [Thu, 12 Mar 2015 08:08:01 +0000 (05:08 -0300)]
[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>
Hans Verkuil [Wed, 11 Mar 2015 11:16:03 +0000 (08:16 -0300)]
[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>
Hans Verkuil [Wed, 11 Mar 2015 11:14:34 +0000 (08:14 -0300)]
[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>
Hans Verkuil [Mon, 9 Mar 2015 13:37:52 +0000 (10:37 -0300)]
[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>
Hans Verkuil [Mon, 9 Mar 2015 15:06:27 +0000 (12:06 -0300)]
[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>
Hans Verkuil [Mon, 9 Mar 2015 15:03:52 +0000 (12:03 -0300)]
[media] vivid: add support for single buffer planar formats
Make vivid aware of the difference of planes and buffers. Note that
this does not yet add support for hor/vert downsampled formats.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Sat, 7 Mar 2015 18:04:49 +0000 (15:04 -0300)]
[media] vivid: add new format fields
These fields are necessary to handle the new planar formats.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Mon, 9 Mar 2015 14:52:43 +0000 (11:52 -0300)]
[media] vivid-tpg: split off the pattern drawing code
The last part of the vivid-tpg refactoring: split off the pattern
drawing code into a function of its own. This greatly improves the
readability and maintainability of this code.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Mon, 9 Mar 2015 14:47:48 +0000 (11:47 -0300)]
[media] vivid-tpg: move the 'extras' drawing to a separate function
This moves the drawing code for the extras (border, square, etc) to
a function of its own instead of having this in the main for loop.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Mon, 9 Mar 2015 14:39:19 +0000 (11:39 -0300)]
[media] vivid-tpg: move 'extras' parameters to tpg_draw_params
Any parameters related to drawing 'extras' like the border, the square,
etc. are moved to struct tpg_draw_params.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Mon, 9 Mar 2015 14:30:05 +0000 (11:30 -0300)]
[media] vivid-tpg: move pattern-related fields to struct tpg_draw_params
Add a new function that fills in pattern-related fields in struct
tpg_draw_params.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Mon, 9 Mar 2015 14:26:43 +0000 (11:26 -0300)]
[media] vivid-tpg: move common parameters to tpg_draw_params
Replace local variables by fields in the tpg_draw_params struct.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Mon, 9 Mar 2015 14:07:23 +0000 (11:07 -0300)]
[media] vivid-tpg: add a new tpg_draw_params structure
This is needed to refactor the drawing function which is much too big.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Mon, 9 Mar 2015 14:04:02 +0000 (11:04 -0300)]
[media] vivid-tpg: add const where appropriate
Added 'const' to several functions where that is possible to do.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Sun, 8 Mar 2015 08:53:10 +0000 (05:53 -0300)]
[media] vivid-tpg: add helper functions to simplify common calculations
Add helper functions to handle horizontal downscaling and horizontal
scaling.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Sat, 7 Mar 2015 17:57:50 +0000 (14:57 -0300)]
[media] vivid-tpg: add support for V4L2_PIX_FMT_GREY
Add monochrome support to the TPG.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Sat, 7 Mar 2015 17:55:09 +0000 (14:55 -0300)]
[media] vivid-tpg: add support for more planar formats
Now that the support for hor/vert downsampled planar formats is in
place we can add support for such formats to the TPG.
This patch adds support for:
V4L2_PIX_FMT_YUV420M
V4L2_PIX_FMT_YVU420M
V4L2_PIX_FMT_YUV420
V4L2_PIX_FMT_YVU420
V4L2_PIX_FMT_YUV422P
V4L2_PIX_FMT_NV16
V4L2_PIX_FMT_NV61
V4L2_PIX_FMT_NV12
V4L2_PIX_FMT_NV21
V4L2_PIX_FMT_NV12P
V4L2_PIX_FMT_NV21P
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Sat, 7 Mar 2015 17:50:41 +0000 (14:50 -0300)]
[media] vivid-tpg: finish hor/vert downsampling support
Implement horizontal and vertical downsampling when filling in the
plane. The TPG is now ready to support such formats.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Sat, 7 Mar 2015 17:23:16 +0000 (14:23 -0300)]
[media] vivid-tpg: add hor/vert downsampling support to tpg_gen_text
This will just skip lines/pixels since color fidelity is not quite
as important here as it is with the test patterns themselves.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Sat, 7 Mar 2015 17:15:25 +0000 (14:15 -0300)]
[media] vivid-tpg: correctly average the two pixels in gen_twopix()
gen_twopix() is always called twice: once for the first and once for
the second pixel. Improve the code to properly average the two if the
format requires horizontal downsampling.
This is necessary for patterns like 1x1 red/blue checkers.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Sat, 7 Mar 2015 17:06:43 +0000 (14:06 -0300)]
[media] vivid-tpg: precalculate downsampled lines
When dealing with vertical downsampling two successive lines have to be
averaged. In the case of the test pattern generator that only happens
if the two lines are using different patterns. So precalculate the average
between two pattern lines: one of pattern P and one of pattern P + 1.
That way there is no need to do any on-the-fly downsampling: it's all done
in the precalculate phase.
This patch also implements horizontal downsampling in the precalculate phase.
The only thing that needs to be done is to half the width since the actual
downsampling happens when two pixels at a time are generated.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Sat, 7 Mar 2015 16:57:27 +0000 (13:57 -0300)]
[media] vivid-tpg: add hor/vert downsampling fields
This is step one of supporting horizontal and vertical downsampling.
This just adds support for the h/vdownsampling fields and it increases
the maximum number of planes to 3.
Currently none of the planar formats need horizontal or vertical
downsampling, so this change has no effect at the moment.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Sat, 7 Mar 2015 16:39:01 +0000 (13:39 -0300)]
[media] vivid-tpg: add helper functions for single buffer planar formats
Add helpers functions to determine the line widths and image sizes
for planar formats that are stores in a single buffer.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Sat, 7 Mar 2015 16:01:53 +0000 (13:01 -0300)]
[media] vivid-tpg: separate planes and buffers
Add a new field that contains the number of buffers. This may be
less than the number of planes in case multiple planes are combined
into one buffer.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Mon, 9 Mar 2015 13:06:55 +0000 (10:06 -0300)]
[media] vivid: do not allow video loopback for SEQ_TB/BT
Sequential top-bottom/bottom-top fields are not supported as video loopback.
This is too much work to implement for field settings that are rarely used.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Sat, 7 Mar 2015 15:53:39 +0000 (12:53 -0300)]
[media] vivid-tpg: don't add offset when switching to monochrome
The grayscale values are still full range sRGB, so don't add the
limited range offset.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Sat, 7 Mar 2015 15:49:57 +0000 (12:49 -0300)]
[media] vivid: add new checkboard patterns
Add a 2x2 checker patterns and 1x1 and 2x2 red/blue checker patterns.
Useful for testing 4:2:2 and 4:2:0 formats.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Sat, 7 Mar 2015 15:38:42 +0000 (12:38 -0300)]
[media] vivid: fix test pattern movement for V4L2_FIELD_ALTERNATE
The successive TOP/BOTTOM fields did not move as they should: only
every other field actually changed position.
The cause was that the tpg needs to know if it is dealing with a
FIELD_ALTERNATE case since that requires slightly different handling.
So tell the TPG whether or not the field setting is for the ALTERNATE
case or not.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Sat, 7 Mar 2015 15:30:43 +0000 (12:30 -0300)]
[media] vivid: use TPG_MAX_PLANES instead of hardcoding plane-arrays
Two arrays of size 'max number of planes' have a hardcoded size instead
of using TPG_MAX_PLANES. Fix that, since TPG_MAX_PLANES will be increased
later on.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Fri, 6 Mar 2015 14:24:04 +0000 (11:24 -0300)]
[media] vivid: wrong top/bottom order for FIELD_ALTERNATE
The condition to decide whether the current field is top or bottom
was inverted. Fix this.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Sat, 7 Mar 2015 15:19:36 +0000 (12:19 -0300)]
[media] vivid: fix typo in plane size checks
The plane size check was hardcoded to plane 0 instead of using the plane
index.
This failed when using the NV61M format which has a larger plane size for
the second plane compared to the first plane.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Mon, 9 Mar 2015 15:34:32 +0000 (12:34 -0300)]
[media] vivid: the overlay API wasn't disabled completely for multiplanar
If the vivid driver is loaded in multiplanar mode, then the capture overlay
functionality should be disabled. This wasn't fully done, which led to
v4l2-compliance errors.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Laurent Pinchart [Mon, 9 Mar 2015 06:39:35 +0000 (03:39 -0300)]
[media] rcar-vin: Don't implement empty optional clock operations
The clock_start and clock_stop operations are now optional, don't
implement empty stubs.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Laurent Pinchart [Mon, 9 Mar 2015 06:39:34 +0000 (03:39 -0300)]
[media] soc-camera: Make clock_start and clock_stop operations optional
Instead of forcing drivers to implement empty clock operations, make
them optional.
v4l2 clock registration in the soc-camera core should probably be
conditionned on the availability of those operations, but careful
review and/or testing of all drivers would be needed, so that should be
a separate step.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Laurent Pinchart [Mon, 9 Mar 2015 06:39:33 +0000 (03:39 -0300)]
[media] soc-camera: Unregister v4l2 clock in the OF bind error path
The v4l2 clock registered in soc_of_bind() must be unregistered if an
error occurs and makes the function fail.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Josh Wu [Tue, 10 Feb 2015 09:31:35 +0000 (06:31 -0300)]
[media] media: ov2640: add primary dt support
Add device tree support for ov2640.
In device tree, user needs to provide the master clock (xvclk).
User can add the reset/pwdn pins if they have.
Cc: devicetree@vger.kernel.org
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Josh Wu [Tue, 10 Feb 2015 09:31:36 +0000 (06:31 -0300)]
[media] media: ov2640: dt: add the device tree binding document
Add the document for ov2640 dt.
Cc: devicetree@vger.kernel.org
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Josh Wu [Mon, 2 Mar 2015 01:52:38 +0000 (22:52 -0300)]
[media] media: ov2640: add async probe function
In async probe, there is a case that ov2640 is probed before the
host device which provided 'mclk'.
To support this async probe, we will get 'mclk' at first in the probe(),
if failed it will return -EPROBE_DEFER. That will let ov2640 wait for
the host device probed.
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Josh Wu [Tue, 10 Feb 2015 09:31:33 +0000 (06:31 -0300)]
[media] media: soc-camera: use icd->control instead of icd->pdev for reset()
icd->control is the sub device dev, i.e. i2c device.
icd->pdev is the soc camera device's device.
To be consitent with power() function, we will call reset() with
icd->control as well.
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Guennadi Liakhovetski [Sun, 1 Feb 2015 11:12:33 +0000 (08:12 -0300)]
[media] V4L: add CCF support to the v4l2_clk API
V4L2 clocks, e.g. used by camera sensors for their master clock, do not
have to be supplied by a different V4L2 driver, they can also be
supplied by an independent source. In this case the standart kernel
clock API should be used to handle such clocks. This patch adds support
for such cases.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Guennadi Liakhovetski [Sat, 31 Jan 2015 23:21:32 +0000 (20:21 -0300)]
[media] V4L: remove clock name from v4l2_clk API
All uses of the v4l2_clk API so far only register one clock with a fixed
name. This allows us to get rid of it, which also will make CCF and DT
integration easier.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Sat, 14 Mar 2015 16:28:25 +0000 (13:28 -0300)]
[media] v4l2-ioctl: allow all controls if ctrl_class == 0
The check_ext_ctrls() function in v4l2-ioctl.c checks if all controls in the
control array are from the same control class as c->ctrl_class. However,
that check should only be done if c->ctrl_class != 0. A 0 value means
that this restriction does not apply.
So return 1 (OK) if c->ctrl_class == 0.
Found by running v4l2-compliance on the uvc driver.
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>
Hans Verkuil [Fri, 13 Mar 2015 16:25:53 +0000 (13:25 -0300)]
[media] v4l2-dev: disable selection ioctls for non-video devices
The selection/cropping ioctls are only valid for video nodes, not for vbi.
Found by v4l2-compliance when run on a VBI device node.
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>
Hans Verkuil [Fri, 13 Mar 2015 13:41:39 +0000 (10:41 -0300)]
[media] au0828: fix broken streaming
Commit
c5036d61e0bed3f4f51391a145638b426825e69c ("media: au0828: drop
vbi_buffer_filled() and re-use buffer_filled()") broke video and vbi streaming.
The vb2_buffer struct was copied instead of taking a pointer to it, but
vb2_buffer_done() needs the real object, not a copy, since it is hooking
the buffer into a different list.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Fri, 13 Mar 2015 11:00:05 +0000 (08:00 -0300)]
[media] DocBook media: fix PIX_FMT_SGRBR8 example
Fix the example of the V4L2_PIX_FMT_SGRBG8 Bayer format.
The even lines should read BGBG, not RBRB.
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>