[media] v4l: omap4iss: Make __iss_video_get_format() return a v4l2_mbus_framefmt
The function will be used by a caller that needs the media bus format
instead of the pixel format currently returned. Move the media bus
format to pixel format conversion to the existing caller.
[media] v4l: omap4iss: resizer: Stop the whole resizer to avoid FIFO overflows
When stopping the resizer due to a buffer underrun, disabling RZA only
produces input FIFO overflows, most probably when the next frame is
received. Disable the whole resizer to work around the problem.
Laurent Pinchart [Sat, 31 Aug 2013 01:23:17 +0000 (22:23 -0300)]
[media] v4l: omap4iss: Create and use register access functions
Replace the direct readl/writel calls with helper functions that take an
ISS pointer and compute the register memory address. Also add bit clear,
set and update helpers.
Laurent Pinchart [Thu, 29 Aug 2013 10:40:37 +0000 (07:40 -0300)]
[media] v4l: omap4iss: isif: Ignore VD0 interrupts when no buffer is available
The ISIF generates VD0 interrupts even when writes are disabled.
Disabling the ISIF when no buffer is available is thus not be enough, we
need to handle the situation explicitly.
Archit Taneja [Tue, 3 Dec 2013 11:51:13 +0000 (08:51 -0300)]
[media] v4l: ti-vpe: make sure VPDMA line stride constraints are met
When VPDMA fetches or writes to an image buffer, the line stride must be a
multiple of 16 bytes. If it isn't, VPDMA HW will write/fetch until the next
16 byte boundry. This causes VPE to work incorrectly for source or destination
widths which don't satisfy the above alignment requirement.
In order to prevent this, we now make sure that when we set pix format for the
input and output buffers, the VPE source and destination image line strides are
16 byte aligned. Also, the motion vector buffers for the de-interlacer are
allocated in such a way that it ensures the same alignment.
Archit Taneja [Tue, 3 Dec 2013 11:51:12 +0000 (08:51 -0300)]
[media] v4l: ti-vpe: Fix the data_type value for UYVY VPDMA format
The data_type value to be programmed in the data descriptors to fetch/write a
UYVY buffer was not mentioned correctly in the older DRA7x documentation. This
caused VPE to fail with UYVY color formats.
Update the data_type value to fix functionality when UYVY format is used.
Frank Schaefer [Sun, 1 Dec 2013 21:06:57 +0000 (18:06 -0300)]
[media] em28xx: add support for the SpeedLink Vicious And Devine Laplace webcams
The SpeedLink Vicious And Devine Laplace webcam is using an EM2765 bridge and
an OV2640 sensor. It has a built-in microphone (USB standard device class)
and provides 3 buttons (snapshot, illumination, mute) and 2 LEDs (capturing/mute
and illumination/flash). It is also equipped with an eeprom.
The device is available in two colors: white (1ae7:9003) and black (1ae7:9004).
For further details see http://linuxtv.org/wiki/index.php/VAD_Laplace.
Please note the following limitations that need to be addressed later:
- resolution limited to 640x480 (sensor supports 1600x1200)
- picture quality needs to be improved
- AV-mute button doesn't work yet
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Frank Schaefer [Sun, 1 Dec 2013 21:06:56 +0000 (18:06 -0300)]
[media] em28xx: add support for illumination button and LED
The SpeedLink VAD Laplace webcam is equipped with an illumination button and
an illumination LED. When the button is pressed, the driver must toggle the
LED state via the corresponding GPO port.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Frank Schaefer [Sun, 1 Dec 2013 21:06:53 +0000 (18:06 -0300)]
[media] em28xx: add debouncing mechanism for GPI-connected buttons
So far, the driver only supports a snapshot button which is assigned to
register 0x0c bit 5. This special port has a built-in debouncing mechanism.
For buttons connected to ordinary GPI ports, this patch implements a software
debouncing mechanism.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Frank Schaefer [Sun, 1 Dec 2013 21:06:52 +0000 (18:06 -0300)]
[media] em28xx: extend the support for device buttons
The current code supports only a single snapshot button assigned to
register 0x0c bit 5. But devices may be equipped with multiple buttons
with different functionalities and they can also be assigned to the
various GPI-ports.
Extend the em28xx-input code to handle multiple buttons assigned to different
GPI-ports / register addresses and bits.
Also make easier to extend the code with further button types.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Laurent Pinchart [Fri, 29 Nov 2013 23:01:34 +0000 (20:01 -0300)]
[media] v4l: vs6624: Fix warning due to unused function
vs6624_read() is only called in the conditionally-compiled
vs6624_g_register() function. Make the former conditionally-compiled as
well to silence build warnings.
Mauro Dreissig [Tue, 26 Nov 2013 14:15:20 +0000 (11:15 -0300)]
[media] staging: as102: Declare local variables as static
As pointed out by sparse:
drivers/staging/media/as102/as102_fw.c:29:6: warning: symbol 'as102_st_fw1' was not declared. Should it be static?
drivers/staging/media/as102/as102_fw.c:30:6: warning: symbol 'as102_st_fw2' was not declared. Should it be static?
drivers/staging/media/as102/as102_fw.c:31:6: warning: symbol 'as102_dt_fw1' was not declared. Should it be static?
drivers/staging/media/as102/as102_fw.c:32:6: warning: symbol 'as102_dt_fw2' was not declared. Should it be static?
drivers/staging/media/as102/as102_usb_drv.c:194:25: warning: symbol 'as102_priv_ops' was not declared. Should it be static?
Also use the const qualifier on the firmware name strings.
Dan Carpenter [Fri, 22 Nov 2013 07:56:33 +0000 (04:56 -0300)]
[media] dw2102: some missing unlocks on error
We recently introduced some new error paths but the unlocks are missing. Fixes: 0065a79a8698 ('[media] dw2102: Don't use dynamic static allocation') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Dan Carpenter [Fri, 22 Nov 2013 07:55:43 +0000 (04:55 -0300)]
[media] cxusb: unlock on error in cxusb_i2c_xfer()
We recently introduced some new error paths which are missing their
unlocks. Fixes: 64f7ef8afbf8 ('[media] cxusb: Don't use dynamic static allocation') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Dan Carpenter [Fri, 22 Nov 2013 07:51:47 +0000 (04:51 -0300)]
[media] cx18: check for allocation failure in cx18_read_eeprom()
It upsets static checkers when we don't check for allocation failure. I
moved the memset() of "tv" earlier so we don't use uninitialized data on
error. Fixes: 1d212cf0c2d8 ('[media] cx18: struct i2c_client is too big for stack') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Add usb id of Hauppauge WinTV-HVR-930C HD to mceusb RC driver.
This device has no IR transmitter (according to eeprom content decoded
by tveeprom).
Set the rc mapping to Hauppauge, every key of the deliviered remote
control works correctly.
Evgeny Plehov [Fri, 15 Nov 2013 19:43:33 +0000 (16:43 -0300)]
[media] dw2102: Use RC Core instead of the legacy RC (second edition)
Use RC Core instead of the legacy RC.
DVBWorld, TBS, TeVii, Prof hardware decode only NEC remotes (one byte code).
Geniatech hardware decode only RC5 (two bytes).
+ New keymap for Geniatech HDStar (SU3000).
Wei Yongjun [Sat, 9 Nov 2013 00:24:18 +0000 (21:24 -0300)]
[media] media: i2c: lm3560: use correct clientdata in lm3560_remove()
We had set the i2c clientdata to &flash->subdev_led[LM3560_LED1]
after call lm3560_subdev_init(flash, LM3560_LED1, "lm3560-led1"),
but the container_of() in lm3560_remove() return the wrong pointer
to flash.(should be container_of(subdev, struct lm3560_flash,
subdev_led[LM3560_LED_MAX-1])
This patch fix to set i2c clientdata to flash so we can get flash
from clientdata directly.
[media] az6007: support Technisat Cablestar Combo HDCI (minus remote)
This is similar to the Terratec H7. It works with the same az6007 firmware as
the former, however the drx-k firmware of the H7 will NOT work. Hence use
a different firmware name. The firmware does not need to exist as the one in
the eeprom is just fine as long as the h7 one doesn't get loaded, but maybe
some day someone wants to load it (the one from the h5 would work too).
Also since the config entry is now different anyway disable support for rc.
AFAIK the Technisat remote (TS35) is RC5 and the code (which a code comment
claims doesn't work anyway) only would handle NEC hence it's pointless creating
a device and polling it if we already know it can't work.
CI is untested.
Originally based on idea found on
http://www.linuxtv.org/wiki/index.php/TechniSat_CableStar_Combo_HD_CI claiming
only id needs to be added (but failed to mention it only worked because the
driver couldn't find the h7 drx-k firmware...).
Signed-off-by: Roland Scheidegger <rscheidegger_lists@hispeed.ch> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Wei Yongjun [Wed, 30 Oct 2013 03:15:13 +0000 (00:15 -0300)]
[media] v4l: ti-vpe: fix return value check in vpe_probe()
In case of error, the function devm_kzalloc() and devm_ioremap()
returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return
value check should be replaced with NULL test.
Ricardo Ribalda [Tue, 26 Nov 2013 12:58:44 +0000 (09:58 -0300)]
[media] videobuf2-dma-sg: Support io userptr operations on io memory
Memory exported via remap_pfn_range cannot be remapped via
get_user_pages.
Other videobuf2 methods (like the dma-contig) supports io memory.
This patch adds support for this kind of memory.
v2: Comments by Marek Szyprowski
-Use vb2_get_vma and vb2_put_vma
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Acked-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Ricardo Ribalda [Fri, 8 Nov 2013 10:08:45 +0000 (07:08 -0300)]
[media] vb2: Return 0 when streamon and streamoff are already on/off
According to the doc:
If VIDIOC_STREAMON is called when streaming is already in progress,
or if VIDIOC_STREAMOFF is called when streaming is already stopped,
then the ioctl does nothing and 0 is returned.
The current implementation was returning -EINVAL instead.
Correct reference of reading values. (rval -> reg_val)
Add the missing unlock before return from function lm3560_get_ctrl()
to avoid deadlock.
Thank you Dan Carpenter & Sakari.
Signed-off-by: Daniel Jeong <gshark.jeong@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
[media] smiapp: Fix BUG_ON() on an impossible condition
internal_csi_format_idx and csi_format_idx are unsigned integers,
therefore they can never be nevative.
CC drivers/media/i2c/smiapp/smiapp-core.o
In file included from include/linux/err.h:4:0,
from include/linux/clk.h:15,
from drivers/media/i2c/smiapp/smiapp-core.c:29:
drivers/media/i2c/smiapp/smiapp-core.c: In function ‘smiapp_update_mbus_formats’:
include/linux/kernel.h:669:20: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
#define min(x, y) ({ \
^
include/linux/compiler.h:153:42: note: in definition of macro ‘unlikely’
# define unlikely(x) __builtin_expect(!!(x), 0)
^
drivers/media/i2c/smiapp/smiapp-core.c:402:2: note: in expansion of macro ‘BUG_ON’
BUG_ON(min(internal_csi_format_idx, csi_format_idx) < 0);
^
drivers/media/i2c/smiapp/smiapp-core.c:402:9: note: in expansion of macro ‘min’
BUG_ON(min(internal_csi_format_idx, csi_format_idx) < 0);
^
Hans Verkuil [Mon, 4 Nov 2013 11:37:34 +0000 (08:37 -0300)]
[media] bcm2048: add TODO file for this staging driver
Describe the tasks to be done for this driver to be promoted to a
non-staging one.
[m.chehab@samsung.com: Add a patch description; add a note about the
CodingStyle issues and make sure that the README lines are not bigger
than 80 cols.] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Hans Verkuil [Mon, 4 Nov 2013 11:34:42 +0000 (08:34 -0300)]
[media] This adds support for the BCM2048 radio module found in Nokia N900
Add suport for Nokia N900 radio. This driver is far from being ready
to be added at the main tree, as it creates its own sysfs interface,
and violates lots of Coding Style rules, doing even evil things like
returning from a function inside a macro.
So, it is being added at staging with the condition that it will be
soon be fixed.
[m.chehab@samsung.com: added a description for the patch] Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com> Signed-off-by: Nils Faerber <nils.faerber@kernelconcepts.de> Signed-off-by: Joni Lapilainen <joni.lapilainen@gmail.com> Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
[hans.verkuil@cisco.com: moved to staging, added slab.h include]
The fimc_is_hw_wait_intsr0_intsd0() function is currently unused and
can be safely removed. The other polling function simplified and ETIME
error code is replaced with more commonly used ETIMEDOUT.
Dan Carpenter [Fri, 8 Nov 2013 09:52:24 +0000 (06:52 -0300)]
[media] exynos4-is: Cleanup a define in mipi-csis driver
This define is only used in s5pcsis_irq_handler():
if ((status & S5PCSIS_INTSRC_NON_IMAGE_DATA) && pktbuf->data) {
The problem is that "status" is a 32 bit and (0xff << 28) is larger than
32 bits and that sets off a static checker warning. I consulted with
Sylwester Nawrocki and the define should actually be (0xf << 28).
[media] s5p-tv: mixer: Prepare for common clock framework
Replace clk_enable() by clock_enable_prepare() and clk_disable()
with clk_disable_unprepare(). clk_{prepare/unprepare} calls are
required by common clock framework and this driver was missed while
converting all users of the Samsung original clocks driver to its
new implementation based on the common clock API.
[media] s5p-tv: sdo: Prepare for common clock framework
Replace clk_enable() by clock_enable_prepare() and clk_disable()
with clk_disable_unprepare(). clk_{prepare/unprepare} calls are
required by common clock framework and this driver was missed while
converting all users of the Samsung original clocks driver to its
new implementation based on the common clock API.
[media] V4L: Add mem2mem ioctl and file operation helpers
This patch adds ioctl helpers to the V4L2 mem-to-mem API, so we can avoid
several ioctl handlers in the mem-to-mem video node drivers that are simply
a pass-through to the v4l2_m2m_* calls. These helpers will only be useful
for drivers that use same mutex for both OUTPUT and CAPTURE queue, which
is the case for all currently in tree v4l2 m2m drivers. In order to use
the helpers the drivers are required to use struct v4l2_fh.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sakari Ailus [Sun, 13 Oct 2013 11:00:26 +0000 (08:00 -0300)]
[media] media: Check for active links on pads with MEDIA_PAD_FL_MUST_CONNECT flag
Do not allow streaming if a pad with MEDIA_PAD_FL_MUST_CONNECT flag is not
connected by an active link.
This patch makes it possible to avoid drivers having to check for the most
common case of link state validation: a sink pad that must be connected.
[media] v4l: omap4iss: Move code out of mutex-protected section
The pad::get_fmt call must be protected by a mutex, but preparing its
arguments doesn't need to be. Move the non-critical code out of the
mutex-protected section.
[media] v4l: omap4iss: Don't check for missing get_fmt op on remote subdev
The remote subdev of any video node in the OMAP4 ISS is an internal
subdev that is guaranteed to implement get_fmt. Don't check the return
value for -ENOIOCTLCMD, as this can't happen.
[media] v4l: omap4iss: Don't use v4l2_g_ext_ctrls() internally
Instead of using the extended control API internally to get the sensor
pixel rate, use the dedicated in-kernel APIs (find the control with
v4l2_ctrl_find() and get its value with v4l2_ctrl_g_ctrl_int64()).
[media] v4l: omap4iss: Add support for OMAP4 camera interface - Build system
This adds a very simplistic driver to utilize the CSI2A interface inside
the ISS subsystem in OMAP4, and dump the data to memory.
Check Documentation/video4linux/omap4_camera.txt for details.
This commit adds and updates Kconfig's and Makefile's, as well as a TODO
list.
Sergio Aguirre [Mon, 24 Jan 2011 18:48:19 +0000 (15:48 -0300)]
[media] v4l: omap4iss: Add support for OMAP4 camera interface - Resizer
This adds a very simplistic driver to utilize the CSI2A interface inside
the ISS subsystem in OMAP4, and dump the data to memory.
Check Documentation/video4linux/omap4_camera.txt for details.
This commit adds resizer support.
[Port the driver to v3.12-rc3, including the following changes
- Don't include plat/ headers
- Don't use cpu_is_omap44xx() macro
- Don't depend on EXPERIMENTAL
- Fix s_crop operation prototype
- Update link_notify prototype
- Rename media_entity_remote_source to media_entity_remote_pad]
Sergio Aguirre [Mon, 24 Jan 2011 18:48:19 +0000 (15:48 -0300)]
[media] v4l: omap4iss: Add support for OMAP4 camera interface - IPIPE(IF)
This adds a very simplistic driver to utilize the CSI2A interface inside
the ISS subsystem in OMAP4, and dump the data to memory.
Check Documentation/video4linux/omap4_camera.txt for details.
This commit adds the IPIPEIF and IPIPE processing blocks support.
Sergio Aguirre [Mon, 24 Jan 2011 18:48:19 +0000 (15:48 -0300)]
[media] v4l: omap4iss: Add support for OMAP4 camera interface - CSI receivers
This adds a very simplistic driver to utilize the CSI2A interface inside
the ISS subsystem in OMAP4, and dump the data to memory.
Check Documentation/video4linux/omap4_camera.txt for details.
This commit adds CSI receivers support.
Sergio Aguirre [Mon, 24 Jan 2011 18:48:19 +0000 (15:48 -0300)]
[media] v4l: omap4iss: Add support for OMAP4 camera interface - Video devices
This adds a very simplistic driver to utilize the CSI2A interface inside
the ISS subsystem in OMAP4, and dump the data to memory.
Check Documentation/video4linux/omap4_camera.txt for details.
This commit adds video devices support.
Sergio Aguirre [Mon, 24 Jan 2011 18:48:19 +0000 (15:48 -0300)]
[media] v4l: omap4iss: Add support for OMAP4 camera interface - Core
This adds a very simplistic driver to utilize the CSI2A interface inside
the ISS subsystem in OMAP4, and dump the data to memory.
Check Documentation/video4linux/omap4_camera.txt for details.
This commit adds the driver core, registers definitions and
documentation.
Libin Yang [Tue, 5 Nov 2013 02:18:15 +0000 (23:18 -0300)]
[media] marvell-ccic: drop resource free in driver remove
The mmp-driver is using devm_* to allocate the resource. The old
resource release methods are not appropriate here.
Signed-off-by: Libin Yang <lbyang@marvell.com> Acked-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: stable@vger.kernel.org # for v3.12 and up Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>