firefly-linux-kernel-4.4.55.git
11 years ago[media] [PATH,1/2] mxl5007 move reset to attach
Jose Alberto Reguero [Sun, 3 Feb 2013 21:30:38 +0000 (18:30 -0300)]
[media] [PATH,1/2] mxl5007 move reset to attach

This patch move the soft reset to the attach function because with dual
tuners, when one tuner do reset, the other one is perturbed, and the
stream has errors.

Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] soc-camera: fix compilation breakage in 3 drivers
Guennadi Liakhovetski [Wed, 30 Jan 2013 12:25:25 +0000 (09:25 -0300)]
[media] soc-camera: fix compilation breakage in 3 drivers

A recent commit broke compilation of 3 camera drivers: for PXA2x0, OMAP1
and MX1 by using a wrong pointer. Fix them.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] Documentation: update V4L cardlists
Mauro Carvalho Chehab [Fri, 8 Feb 2013 16:51:36 +0000 (14:51 -0200)]
[media] Documentation: update V4L cardlists

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] saa7134: Add capture card Hawell HW-9004V1
Vadim Frolov [Wed, 30 Jan 2013 08:14:59 +0000 (05:14 -0300)]
[media] saa7134: Add capture card Hawell HW-9004V1

This patch adds new capture board Hawell HW-9004V1. This card has 4 SAA71300 chips. In order to work it is needed to initialize its registers (gpio mask and value). The value of these registers were dumped under Windows using flytest.

Signed-off-by: Vadim Frolov <fralik@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tm6000: check an allocation for failure
Dan Carpenter [Wed, 30 Jan 2013 06:03:43 +0000 (03:03 -0300)]
[media] tm6000: check an allocation for failure

This allocation had no error checking.  It didn't need to be under
the mutex so I moved it out form there. That makes the error handling
easier and is a potential speed up.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] ov7670: remove legacy ctrl callbacks
Javier Martin [Tue, 29 Jan 2013 11:21:40 +0000 (08:21 -0300)]
[media] ov7670: remove legacy ctrl callbacks

via-camera and mcam-core were the only bridge drivers that used ov7670.
Since now they have been moved to use the ctrl framework, the old
legacy callbacks in the ov7670 can be removed.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] via-camera: implement the control framework
Javier Martin [Tue, 29 Jan 2013 11:06:35 +0000 (08:06 -0300)]
[media] via-camera: implement the control framework

And added a missing kfree to clean up the via_camera struct.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] mcam-core: implement the control framework
Javier Martin [Tue, 29 Jan 2013 10:58:48 +0000 (07:58 -0300)]
[media] mcam-core: implement the control framework

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] ov7670: use the control framework
Javier Martin [Tue, 29 Jan 2013 10:31:17 +0000 (07:31 -0300)]
[media] ov7670: use the control framework

Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: ov7670: Add possibility to disable pixclk during hblank
Javier Martin [Tue, 29 Jan 2013 10:26:38 +0000 (07:26 -0300)]
[media] media: ov7670: Add possibility to disable pixclk during hblank

Some bridge drivers capture pixels during blanking periods if
pixclk is enabled. In order to avoid capturing bogus data we need to
disable pixclk in the sensor during those blanking periods.

Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: ov7670: add possibility to bypass pll for ov7675
Javier Martin [Tue, 29 Jan 2013 10:23:42 +0000 (07:23 -0300)]
[media] media: ov7670: add possibility to bypass pll for ov7675

For a frame rate of 30 fps a pixclk of 24MHz is needed. For those
cases where the ov7670 has a clean 24MHz input (xvclk) the PLL
can be bypassed.
This will result in a value of clkrc of 1, which means that in practice
pixclk = xvclk (input clock)

Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: ov7670: calculate framerate properly for ov7675
Javier Martin [Tue, 29 Jan 2013 10:16:59 +0000 (07:16 -0300)]
[media] media: ov7670: calculate framerate properly for ov7675

According to the datasheet ov7675 uses a formula to achieve
the desired framerate that is different from the operations
done in the current code.
In fact, this formula should apply to ov7670 too. This would
mean that current code is wrong but, in order to preserve
compatibility, the new formula will be used for ov7675 only.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: ov7670: make try_fmt() consistent with 'min_height' and 'min_width'
Javier Martin [Tue, 29 Jan 2013 10:14:27 +0000 (07:14 -0300)]
[media] media: ov7670: make try_fmt() consistent with 'min_height' and 'min_width'

'min_height' and 'min_width' are variables that allow to specify the minimum
resolution that the sensor will achieve. This patch make v4l2 fmt callbacks
consider this parameters in order to return valid data to user space.

Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: ov7670: add support for ov7675
Javier Martin [Tue, 29 Jan 2013 10:12:13 +0000 (07:12 -0300)]
[media] media: ov7670: add support for ov7675

ov7675 and ov7670 share the same registers but there is no way
to distinguish them at runtime. However, they require different
tweaks to achieve the desired resolution. For this reason this
patch adds a new ov7675 entry to the ov7670_id table.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] redrat3: fix transmit return value and overrun
Sean Young [Tue, 29 Jan 2013 11:19:31 +0000 (08:19 -0300)]
[media] redrat3: fix transmit return value and overrun

If more than 127 different lengths are transmitted then the driver causes
an overrun on sample_lens. Try to send as much as possible and return the
amount sent.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] mceusb: make transmit work on HP transceiver
Sean Young [Tue, 29 Jan 2013 11:19:30 +0000 (08:19 -0300)]
[media] mceusb: make transmit work on HP transceiver

This transceiver expects the set IR TX ports and IR data as seperate
packets, like the Windows driver does. Remove unnecessary kzalloc.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] mceusb: make transmit work on the Philips IR transceiver
Sean Young [Tue, 29 Jan 2013 11:19:29 +0000 (08:19 -0300)]
[media] mceusb: make transmit work on the Philips IR transceiver

The GET_REVISION command puts the device in an unresponsive state,
although it continues to report any IR activity. Note that GET_REVISION
command is not documented, nor is any possible response to it parsed.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] ttusbir: add missing endian conversion
Sean Young [Tue, 29 Jan 2013 11:19:28 +0000 (08:19 -0300)]
[media] ttusbir: add missing endian conversion

spotted by sparse.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] ttusbir: do not set led twice on resume
Sean Young [Tue, 29 Jan 2013 11:19:27 +0000 (08:19 -0300)]
[media] ttusbir: do not set led twice on resume

led_classdev_resume already sets the led.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] Documentation/media-framework.txt: fix a sentence
Antonio Ospite [Mon, 28 Jan 2013 20:45:31 +0000 (17:45 -0300)]
[media] Documentation/media-framework.txt: fix a sentence

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] staging/media/solo6x10: Use PTR_RET rather than if(IS_ERR(...)) + PTR_ERR
Peter Huewe [Fri, 25 Jan 2013 22:10:12 +0000 (19:10 -0300)]
[media] staging/media/solo6x10: Use PTR_RET rather than if(IS_ERR(...)) + PTR_ERR

Found with coccicheck.
The semantic patch that makes this change is available
in scripts/coccinelle/api/ptr_ret.cocci.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5c73m3: Remove __dev* attributes
Sylwester Nawrocki [Wed, 6 Feb 2013 20:35:41 +0000 (17:35 -0300)]
[media] s5c73m3: Remove __dev* attributes

Remove no longer supported __devinit, __devexit attributes.

Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] em28xx: overhaul em28xx_capture_area_set()
Frank Schaefer [Sun, 20 Jan 2013 12:26:47 +0000 (09:26 -0300)]
[media] em28xx: overhaul em28xx_capture_area_set()

- move the bit shifting of width+height values inside the function
- fix the debug message format and output values
- add comment about the size limit (e.g. EM277x supports >2MPix)
- make void, because error checking is incomplete and we never check the
  returned value (we would continue anyway)

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] adv7180: remove {query/g_/s_}ctrl
Federico Vaga [Wed, 23 Jan 2013 13:07:07 +0000 (10:07 -0300)]
[media] adv7180: remove {query/g_/s_}ctrl

All drivers which use this subdevice use also the control framework.
The v4l2_subdev_core_ops operations {query/g_/s_}ctrl are useless because
device drivers will inherit controls from this subdevice.

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] sta2x11_vip: convert to videobuf2, control framework, file handler
Federico Vaga [Tue, 5 Feb 2013 17:34:37 +0000 (14:34 -0300)]
[media] sta2x11_vip: convert to videobuf2, control framework, file handler

This patch re-write the driver and use the videobuf2
interface instead of the old videobuf. Moreover, it uses also
the control framework which allows the driver to inherit
controls from its subdevice (ADV7180). Finally the driver does not
implement custom file operation but it uses the generic ones from
videobuf2 and v4l2_fh

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Giancarlo Asnaghi <giancarlo.asnaghi@st.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l2-core: do not enable the buffer ioctls for radio devices
Frank Schaefer [Tue, 22 Jan 2013 18:51:55 +0000 (15:51 -0300)]
[media] v4l2-core: do not enable the buffer ioctls for radio devices

The buffer ioctls (VIDIOC_REQBUFS, VIDIOC_QUERYBUF, VIDIOC_QBUF, VIDIOC_DQBUF,
VIDIOC_EXPBUF, VIDIOC_CREATE_BUFS, VIDIOC_PREPARE_BUF) are not applicable for
radio devices. Hence, they should be set valid only for non-radio devices in
determine_valid_ioctls().

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-fimc: Fix fimc-lite entities deregistration
Sylwester Nawrocki [Fri, 11 Jan 2013 10:06:28 +0000 (07:06 -0300)]
[media] s5p-fimc: Fix fimc-lite entities deregistration

Clear the proper array when deregistering FIMC-LITE devices. Now
fimc[] array is erroneously accessed instead of fimc_lite[] and
fimc_md_unregister_entities() function call can result in an oops
from NULL pointer dereference, since fmd->fimc[] is cleared earlier.
This might happen in normal conditions when the driver's probing
is deferred and then retried.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-mfc: end-of-stream handling in encoder bug fix
Kamil Debski [Fri, 11 Jan 2013 14:29:34 +0000 (11:29 -0300)]
[media] s5p-mfc: end-of-stream handling in encoder bug fix

In some circumstances after issuing the V4L2_ENC_CMD_STOP the application
could freeze. This patch prevents this behavior.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-csis: Fix clock handling on error path in probe()
Sylwester Nawrocki [Fri, 18 Jan 2013 16:52:38 +0000 (13:52 -0300)]
[media] s5p-csis: Fix clock handling on error path in probe()

Move e_clkput label after the clk_disable() call so a not acquired clock
is not attempted to be disabled. This fixes runtime warnings like:
 s5p-mipi-csis 11880000.csis: failed to get clock: sclk_csis
 ------------[ cut here ]------------
 WARNING: at drivers/clk/clk.c:478 clk_disable+0x24/0x34()
 Modules linked in:
 [<c001603c>] (unwind_backtrace+0x0/0x13c) from [<c0022060>] (warn_slowpath_common+0x54/0x64)
 [<c0022060>] (warn_slowpath_common+0x54/0x64) from [<c002208c>] (warn_slowpath_null+0x1c/0x24)
 [<c002208c>] (warn_slowpath_null+0x1c/0x24) from [<c033f868>] (clk_disable+0x24/0x34)
 [<c033f868>] (clk_disable+0x24/0x34) from [<c02feff8>] (s5pcsis_probe+0x25c/0x4c8)
 [<c02feff8>] (s5pcsis_probe+0x25c/0x4c8) from [<c0268e34>] (platform_drv_probe+0x18/0x1c)
 [<c0268e34>] (platform_drv_probe+0x18/0x1c) from [<c0267700>] (driver_probe_device+0xa4/0x368)
 [<c0267700>] (driver_probe_device+0xa4/0x368) from [<c0267a50>] (__driver_attach+0x8c/0x90)
 [<c0267a50>] (__driver_attach+0x8c/0x90) from [<c0265c94>] (bus_for_each_dev+0x60/0x8c)
 [<c0265c94>] (bus_for_each_dev+0x60/0x8c) from [<c02665e8>] (bus_add_driver+0x20c/0x2d4)
 [<c02665e8>] (bus_add_driver+0x20c/0x2d4) from [<c0268064>] (driver_register+0x78/0x194)
 [<c0268064>] (driver_register+0x78/0x194) from [<c0008668>] (do_one_initcall+0x34/0x188)
 [<c0008668>] (do_one_initcall+0x34/0x188) from [<c03de57c>] (kernel_init+0x180/0x2f0)
 [<c03de57c>] (kernel_init+0x180/0x2f0) from [<c000f0d8>] (ret_from_fork+0x14/0x3c)
 ---[ end trace 0c5a55345c42530b ]---

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] uvcvideo: Implement videobuf2 .wait_prepare and .wait_finish operations
Laurent Pinchart [Mon, 21 Jan 2013 09:51:41 +0000 (06:51 -0300)]
[media] uvcvideo: Implement videobuf2 .wait_prepare and .wait_finish operations

Those optional operations are used to release and reacquire the queue
lock when videobuf2 needs to perform operations that sleep for a long
time, such as waiting for a buffer to be complete. Implement them to
avoid blocking qbuf or streamoff calls when a dqbuf is in progress.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: Convert to devm_ioremap_resource()
Thierry Reding [Mon, 21 Jan 2013 09:09:07 +0000 (06:09 -0300)]
[media] media: Convert to devm_ioremap_resource()

Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.
devm_ioremap_resource() provides its own error messages so all explicit
error messages can be removed from the failure code paths.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] use IS_ENABLED() macro
Peter Senna Tschudin [Sun, 20 Jan 2013 04:32:56 +0000 (01:32 -0300)]
[media] use IS_ENABLED() macro

This patch introduces the use of IS_ENABLED() macro. For example,
replacing:
 #if defined(CONFIG_I2C) || (defined(CONFIG_I2C_MODULE) && defined(MODULE))
with:
 #if IS_ENABLED(CONFIG_I2C)
All changes made by this patch respect the same replacement pattern.

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] [V2,24/24] v4l2-core/v4l2-common.c: use IS_ENABLED() macro
Peter Senna Tschudin [Sat, 19 Jan 2013 22:41:31 +0000 (19:41 -0300)]
[media] [V2,24/24] v4l2-core/v4l2-common.c: use IS_ENABLED() macro

replace:
 #if defined(CONFIG_MEDIA_TUNER_TEA5761) || \
     defined(CONFIG_MEDIA_TUNER_TEA5761_MODULE)
with:
 #if IS_ENABLED(CONFIG_MEDIA_TUNER_TEA5761)
This change was made for: CONFIG_MEDIA_TUNER_TEA5761
Also replaced:
 #if defined(CONFIG_I2C) || (defined(CONFIG_I2C_MODULE) && defined(MODULE))
with:
 #if IS_ENABLED(CONFIG_I2C)

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] [V2,23/24] usb/hdpvr/hdpvr-i2c.c: use IS_ENABLED() macro
Peter Senna Tschudin [Sat, 19 Jan 2013 22:41:30 +0000 (19:41 -0300)]
[media] [V2,23/24] usb/hdpvr/hdpvr-i2c.c: use IS_ENABLED() macro

replace:
 #if defined(CONFIG_I2C) || \
     defined(CONFIG_I2C_MODULE)
with:
 #if IS_ENABLED(CONFIG_I2C)
This change was made for: CONFIG_I2C

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] [V2,22/24] usb/hdpvr/hdpvr-core.c: use IS_ENABLED() macro
Peter Senna Tschudin [Sat, 19 Jan 2013 22:41:29 +0000 (19:41 -0300)]
[media] [V2,22/24] usb/hdpvr/hdpvr-core.c: use IS_ENABLED() macro

replace:
 #if defined(CONFIG_I2C) || \
     defined(CONFIG_I2C_MODULE)
with:
 #if IS_ENABLED(CONFIG_I2C)
This change was made for: CONFIG_I2C

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] [V2,04/24] platform/marvell-ccic/mcam-core.h: use IS_ENABLED() macro
Peter Senna Tschudin [Sat, 19 Jan 2013 22:41:11 +0000 (19:41 -0300)]
[media] [V2,04/24] platform/marvell-ccic/mcam-core.h: use IS_ENABLED() macro

replace:
 #if defined(CONFIG_VIDEOBUF2_VMALLOC) || \
     defined(CONFIG_VIDEOBUF2_VMALLOC_MODULE)
with:
 #if IS_ENABLED(CONFIG_VIDEOBUF2_VMALLOC)
This change was made for: CONFIG_VIDEOBUF2_VMALLOC,
CONFIG_VIDEOBUF2_DMA_CONTIG, CONFIG_VIDEOBUF2_DMA_SG

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] [V2,03/24] pci/ttpci/av7110.c: use IS_ENABLED() macro
Peter Senna Tschudin [Sat, 19 Jan 2013 22:41:10 +0000 (19:41 -0300)]
[media] [V2,03/24] pci/ttpci/av7110.c: use IS_ENABLED() macro

replace:
 #if defined(CONFIG_INPUT_EVDEV) || \
     defined(CONFIG_INPUT_EVDEV_MODULE)
with:
 #if IS_ENABLED(CONFIG_INPUT_EVDEV)
This change was made for: CONFIG_INPUT_EVDEV,
CONFIG_DVB_SP8870

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] [V2,02/24] pci/saa7134/saa7134.h: use IS_ENABLED() macro
Peter Senna Tschudin [Sat, 19 Jan 2013 22:41:09 +0000 (19:41 -0300)]
[media] [V2,02/24] pci/saa7134/saa7134.h: use IS_ENABLED() macro

replace:
 #if defined(CONFIG_VIDEO_SAA7134_DVB) || \
     defined(CONFIG_VIDEO_SAA7134_DVB_MODULE)
with:
 #if IS_ENABLED(CONFIG_VIDEO_SAA7134_DVB)
This change was made for: CONFIG_VIDEO_SAA7134_DVB

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] [V2,01/24] pci/cx88/cx88.h: use IS_ENABLED() macro
Peter Senna Tschudin [Sat, 19 Jan 2013 22:41:08 +0000 (19:41 -0300)]
[media] [V2,01/24] pci/cx88/cx88.h: use IS_ENABLED() macro

replace:
 #if defined(CONFIG_VIDEO_CX88_DVB) || \
     defined(CONFIG_VIDEO_CX88_DVB_MODULE)
with:
 #if IS_ENABLED(CONFIG_VIDEO_CX88_DVB)
This change was made for: CONFIG_VIDEO_CX88_DVB,
CONFIG_VIDEO_CX88_BLACKBIRD, CONFIG_VIDEO_CX88_VP3054

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] blackfin: add error frame support
Scott Jiang [Fri, 18 Jan 2013 20:09:48 +0000 (17:09 -0300)]
[media] blackfin: add error frame support

Mark current frame as error frame when ppi error interrupt
report fifo error. Member next_frm in struct bcap_device can
be optimized out.

Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] add maintainer for blackfin media drivers
Scott Jiang [Fri, 18 Jan 2013 20:09:47 +0000 (17:09 -0300)]
[media] add maintainer for blackfin media drivers

Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] staging: go7007: fix test for V4L2_STD_SECAM
Dan Carpenter [Mon, 28 Jan 2013 13:19:42 +0000 (10:19 -0300)]
[media] staging: go7007: fix test for V4L2_STD_SECAM

The current test doesn't make a lot of sense.  It's likely to be true,
which is what we would want in most cases.  From looking at how this is
handled in other drivers,  I think "&" was intended instead of "*".
It's an easy mistake to make because they are next to each other on the
keyboard.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] staging/media/go7007: Use kmemdup rather than duplicating its implementation
Peter Huewe [Fri, 25 Jan 2013 22:23:30 +0000 (19:23 -0300)]
[media] staging/media/go7007: Use kmemdup rather than duplicating its implementation

Found with coccicheck.
The semantic patch that makes this change is available
in scripts/coccinelle/api/memdup.cocci.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] staging: media: go7007: call_all stream stuff Some Additional stuff for v4l2_...
Volokh Konstantin [Wed, 16 Jan 2013 12:00:51 +0000 (09:00 -0300)]
[media] staging: media: go7007: call_all stream stuff Some Additional stuff for v4l2_subdev stream events partial need for new style framework. Also need for wis_tw2804 notification stuff

Signed-off-by: Volokh Konstantin <volokh84@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] staging: media: go7007: i2c GPIO initialization Reset i2c stuff for GO7007_BO...
Volokh Konstantin [Wed, 16 Jan 2013 12:00:50 +0000 (09:00 -0300)]
[media] staging: media: go7007: i2c GPIO initialization Reset i2c stuff for GO7007_BOARDID_ADLINK_MPG24 need reset GPIO always when encoder initialize

Signed-off-by: Volokh Konstantin <volokh84@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] staging: media: go7007: firmware protection Protection for unfirmware load
Volokh Konstantin [Wed, 16 Jan 2013 12:00:49 +0000 (09:00 -0300)]
[media] staging: media: go7007: firmware protection Protection for unfirmware load

If no firmware was loaded (no exists,wrong or some error) then rmmod
fails with OOPS, so need some protection stuff.

Signed-off-by: Volokh Konstantin <volokh84@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] staging: media: go7007: memory clear fix memory clearing for v4l2_subdev...
Volokh Konstantin [Wed, 16 Jan 2013 12:00:48 +0000 (09:00 -0300)]
[media] staging: media: go7007: memory clear fix memory clearing for v4l2_subdev allocation

Signed-off-by: Volokh Konstantin <volokh84@gmail.com>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agoRevert "[media] drivers/media/usb/dvb-usb/dib0700_core.c: fix left shift"
Mauro Carvalho Chehab [Wed, 6 Feb 2013 10:29:39 +0000 (08:29 -0200)]
Revert "[media] drivers/media/usb/dvb-usb/dib0700_core.c: fix left shift"

On Wed, 6 Feb 2013 09:04:39 +0000
Olivier GRENIE <olivier.grenie@parrot.com> wrote:

> I do not agree with the patch. Let's take an example: adap->id = 0. Then:
>  * 1 << ~(adap->id) = 1 << ~(0) = 0
>  * ~(1 << adap->id) = ~(1 << 0) = 0xFE
>
> The correct change should be: st->channel_state |= 1 << (1 - adap->id); Indeed, the original source code was not correct.

Requested-by: Olivier GRENIE <olivier.grenie@parrot.com>
Cc: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Cc: Nickolai Zeldovich <nickolai@csail.mit.edu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: tvp514x: remove field description
Prabhakar Lad [Tue, 15 Jan 2013 06:55:40 +0000 (03:55 -0300)]
[media] media: tvp514x: remove field description

This patch removes the field description of fields that no
longer exists, along side aligns the field description of
fields.

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] Support Digivox Mini HD (rtl2832)
Eddi De Pieri [Mon, 14 Jan 2013 21:21:32 +0000 (18:21 -0300)]
[media] Support Digivox Mini HD (rtl2832)

Add support for Digivox Mini HD (rtl2832)
The tuner works, but with worst performance then realtek linux driver,
due to incomplete implementation of fc2580.c

Signed-off-by: Eddi De Pieri <eddi@depieri.net>
Tested-by: Lorenzo Dongarrà <lorenzo_64@katamail.com>
Acked-by: Antti Palosaari <crope@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] DocBook: mention that EINVAL can be returned for invalid menu indices
Hans Verkuil [Fri, 11 Jan 2013 13:49:12 +0000 (10:49 -0300)]
[media] DocBook: mention that EINVAL can be returned for invalid menu indices

The documentation suggested that if the control value is wrong only
ERANGE can be returned. But in some cases (an invalid menu index)
EINVAL can also be returned. Clarify this.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] DocBook: improve the error_idx field documentation
Hans Verkuil [Fri, 11 Jan 2013 13:33:30 +0000 (10:33 -0300)]
[media] DocBook: improve the error_idx field documentation

The documentation of the error_idx field was incomplete and confusing.
This patch improves it.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] DocBook: fix various validation errors
Hans Verkuil [Fri, 11 Jan 2013 11:18:55 +0000 (08:18 -0300)]
[media] DocBook: fix various validation errors

Fixed the following errors (with exception of the SVG errors):
  GEN     /home/hans/work/src/v4l/media-git/Documentation/DocBook//v4l2.xml
  rm -rf Documentation/DocBook/index.html; echo '<h1>Linux Kernel HTML Documentation</h1>' >> Documentation/DocBook/index.html && echo '<h2>Kernel Version: 3.8.0-rc1</h2>' >> Documentation/DocBook/index.html && cat Documentation/DocBook/media_api.html >> Documentation/DocBook/index.html
  /tmp/x.xml:883: element revremark: validity error : Element structname is not declared in revremark list of possible children
  /tmp/x.xml:883: element revremark: validity error : Element xref is not declared in revremark list of possible children
  /tmp/x.xml:9580: element xref: validity error : Element xref was declared EMPTY this one has content
  /tmp/x.xml:13508: element link: validity error : Element link does not carry attribute linkend
  /tmp/x.xml:13508: element link: validity error : No declaration for attribute linked of element link
  /tmp/x.xml:16986: element imagedata: validity error : Value "SVG" for attribute format of imagedata is not among the enumerated set
  /tmp/x.xml:17003: element imagedata: validity error : Value "SVG" for attribute format of imagedata is not among the enumerated set
  /tmp/x.xml:17022: element imagedata: validity error : Value "SVG" for attribute format of imagedata is not among the enumerated set

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tuners/xc5000: fix MODE_AIR in xc5000_set_params()
Dan Carpenter [Sun, 13 Jan 2013 18:31:33 +0000 (15:31 -0300)]
[media] tuners/xc5000: fix MODE_AIR in xc5000_set_params()

There is a missing break so we use XC_RF_MODE_CABLE instead of
XC_RF_MODE_AIR.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] em28xx: input: use common work_struct callback function for IR RC key polling
Frank Schaefer [Sun, 13 Jan 2013 13:20:45 +0000 (10:20 -0300)]
[media] em28xx: input: use common work_struct callback function for IR RC key polling

Remove em28xx_i2c_ir_work() and check the device type in the common callback
function em28xx_ir_work() instead. Simplifies em28xx_ir_start().
Reduces the code size with a minor performance drawback.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] em28xx: i2c RC devices: minor code size and memory usage optimization
Frank Schaefer [Sun, 13 Jan 2013 13:20:44 +0000 (10:20 -0300)]
[media] em28xx: i2c RC devices: minor code size and memory usage optimization

Set up the i2c_client locally in em28xx_i2c_ir_handle_key().

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] em28xx: fix a comment and a small coding style issue
Frank Schaefer [Sun, 13 Jan 2013 13:20:43 +0000 (10:20 -0300)]
[media] em28xx: fix a comment and a small coding style issue

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] em28xx: remove unused parameter ir_raw from i2c RC key polling functions
Frank Schaefer [Sun, 13 Jan 2013 13:20:42 +0000 (10:20 -0300)]
[media] em28xx: remove unused parameter ir_raw from i2c RC key polling functions

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] em28xx: get rid of the dependency on module ir-kbd-i2c
Frank Schaefer [Sun, 13 Jan 2013 13:20:41 +0000 (10:20 -0300)]
[media] em28xx: get rid of the dependency on module ir-kbd-i2c

We already have the key polling functions and the polling infrastructure in
em28xx-input, so we can easily get rid of the dependency on module ir-kbd-i2c.
For maximum safety, do not touch the key reporting mechanism for those devices.
Code size could be improved further but would have minor peformance impacts.
Tested with device "Terratec Cinergy 200 USB" (EM2800_BOARD_TERRATEC_CINERGY_200)

[mchehab@redhat.com: Fix two checkpatch.pl warnings:
 ERROR: "foo * bar" should be "foo *bar" (line 465)
 WARNING: kfree(NULL) is safe this check is probably not required (line 725)]

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] em28xx: remove i2cdprintk() messages
Frank Schaefer [Sun, 13 Jan 2013 13:20:40 +0000 (10:20 -0300)]
[media] em28xx: remove i2cdprintk() messages

We don't report any key/scan codes or errors inside the key polling functions
for internal IR RC devices, just in the key handling fucntions.
Do the same for external devices.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] em28xx-input: remove dead code line from em28xx_get_key_em_haup()
Frank Schaefer [Sun, 13 Jan 2013 13:20:39 +0000 (10:20 -0300)]
[media] em28xx-input: remove dead code line from em28xx_get_key_em_haup()

Field 'old' of struct IR_i2c is used nowhere in module ir-kbd-i2c.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] em28xx: add missing IR RC slave address to the list of known i2c devices
Frank Schaefer [Sun, 13 Jan 2013 13:15:08 +0000 (10:15 -0300)]
[media] em28xx: add missing IR RC slave address to the list of known i2c devices

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] cx231xx: add a missing break statement
Dan Carpenter [Fri, 11 Jan 2013 05:48:41 +0000 (02:48 -0300)]
[media] cx231xx: add a missing break statement

My static checker complains about the fall through here.  From the
context it looks like we should add a break statement.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] staging: go7007: print the audio input type
Dan Carpenter [Thu, 10 Jan 2013 08:00:57 +0000 (05:00 -0300)]
[media] staging: go7007: print the audio input type

Smatch complains that the "Audio input:" printk isn't reachable.  Hiding
the "return 0;" behind another statement is a style violation.
It looks like audio_input is normally configured so I've enabled the
print statement.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drivers/media/pci: use memmove for overlapping regions
Nickolai Zeldovich [Tue, 8 Jan 2013 01:28:05 +0000 (22:28 -0300)]
[media] drivers/media/pci: use memmove for overlapping regions

Change several memcpy() to memmove() in cases when the regions are
definitely overlapping; memcpy() of overlapping regions is undefined
behavior in C and can produce different results depending on the compiler,
the memcpy implementation, etc.

Cc: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Nickolai Zeldovich <nickolai@csail.mit.edu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] DocBook: media: struct v4l2_capability card field is a UTF-8 string
Laurent Pinchart [Mon, 7 Jan 2013 19:30:24 +0000 (16:30 -0300)]
[media] DocBook: media: struct v4l2_capability card field is a UTF-8 string

The struct v4l2_capability card field stores the device name. That name
can be hardcoded in drivers, or be retrieved directly from the device.
The later is very common with USB devices. As several devices already
report names that include non-ASCII characters, update the field
description to use UTF-8.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: cx18, ivtv: eliminate unnecessary array index checks
Nickolai Zeldovich [Mon, 7 Jan 2013 00:52:03 +0000 (21:52 -0300)]
[media] media: cx18, ivtv: eliminate unnecessary array index checks

The idx values passed to cx18_i2c_register() and ivtv_i2c_register()
by cx18_init_subdevs() and ivtv_load_and_init_modules() respectively
are always in-range, based on how the hw_all bitmask is populated.
Previously, the checks were already ineffective because arrays were
being dereferenced using the index before the check.

Acked-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Nickolai Zeldovich <nickolai@csail.mit.edu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drivers/media/usb/dvb-usb/dib0700_core.c: fix left shift
Nickolai Zeldovich [Sat, 5 Jan 2013 18:13:05 +0000 (15:13 -0300)]
[media] drivers/media/usb/dvb-usb/dib0700_core.c: fix left shift

Fix bug introduced in 7757ddda6f4febbc52342d82440dd4f7a7d4f14f, where
instead of bit-negating the bitmask, the bit position was bit-negated
instead.

Signed-off-by: Nickolai Zeldovich <nickolai@csail.mit.edu>
Cc: Olivier Grenie <olivier.grenie@dibcom.fr>
Cc: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] iguanair: intermittent initialization failure
Sean Young [Mon, 14 Jan 2013 08:51:44 +0000 (05:51 -0300)]
[media] iguanair: intermittent initialization failure

On cold boot the device does not initialize until the first packet is
received, and that packet is not processed.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] iguanair: ensure transmission mask is initialized
Sean Young [Sun, 6 Jan 2013 16:19:44 +0000 (13:19 -0300)]
[media] iguanair: ensure transmission mask is initialized

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] winbond-cir: only enable higher sample resolution if needed
Sean Young [Sun, 6 Jan 2013 16:19:43 +0000 (13:19 -0300)]
[media] winbond-cir: only enable higher sample resolution if needed

A sample resolution of 2us generates more than 300 interrupts per key
and this resolution is not needed unless carrier reports are enabled.
Revert to a resolution of 10us unless carrier reports are needed. This
generates up to a fifth of the interrupts.

Signed-off-by: Sean Young <sean@mess.org>
Acked-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] ARM: davinci: da850 evm: pass platform data for adv7343 encoder
Lad, Prabhakar [Tue, 15 Jan 2013 08:04:41 +0000 (05:04 -0300)]
[media] ARM: davinci: da850 evm: pass platform data for adv7343 encoder

Without this patch the adv7343 encoder was being set to default
configuration which caused display not to work on this board.
This patch passes the necessary platform data required for adv7343
encoder to work on da850 evm.

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: adv7343: accept configuration through platform data
Lad, Prabhakar [Tue, 22 Jan 2013 04:19:50 +0000 (01:19 -0300)]
[media] media: adv7343: accept configuration through platform data

The current code was implemented with some default configurations,
this default configuration works on board and doesn't work on other.
This patch accepts the configuration through platform data and configures
the encoder depending on the data passed.

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tm6000: fix G/TRY_FMT
Hans Verkuil [Fri, 1 Feb 2013 12:08:46 +0000 (09:08 -0300)]
[media] tm6000: fix G/TRY_FMT

Two fixes:
- the priv field wasn't set to 0.
- only V4L2_FIELD_INTERLACED is supported.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tm6000: add poll op for radio device node
Hans Verkuil [Tue, 11 Sep 2012 14:53:51 +0000 (11:53 -0300)]
[media] tm6000: add poll op for radio device node

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tm6000: set colorspace field
Hans Verkuil [Tue, 11 Sep 2012 14:51:02 +0000 (11:51 -0300)]
[media] tm6000: set colorspace field

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tm6000: add support for control events and prio handling
Hans Verkuil [Tue, 11 Sep 2012 14:50:37 +0000 (11:50 -0300)]
[media] tm6000: add support for control events and prio handling

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tm6000: convert to the control framework
Hans Verkuil [Thu, 31 Jan 2013 11:23:01 +0000 (08:23 -0300)]
[media] tm6000: convert to the control framework

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tm6000: fix querycap and input/tuner compliance issues
Hans Verkuil [Tue, 11 Sep 2012 10:35:30 +0000 (07:35 -0300)]
[media] tm6000: fix querycap and input/tuner compliance issues

- add device_caps support
- fix bus_info
- fix numerous tuner-related problems due to incorrect tests
  and setting v4l2_tuner fields to wrong values.
- remove (audio) input support from the radio: it doesn't belong
  there. This also fixed a nasty issue where opening the radio
  would set dev->input to 5 for no good reason. This was never
  set back to a valid TV input after closing the radio device,
  thus leaving it at 5 which is out of bounds of the vinput
  card array.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] meye: convert to the control framework
Hans Verkuil [Tue, 29 Jan 2013 10:21:02 +0000 (07:21 -0300)]
[media] meye: convert to the control framework

Convert the meye driver to the control framework. Some private controls
have been replaced with standardized controls (SHARPNESS and JPEGQUAL).
The AGC control looks like it can be replaced by the AUTOGAIN control, but
it isn't a boolean so I do not know how to interpret it.
The FRAMERATE control looks like it can be replaced by S_PARM, but again,
without knowing how to interpret it I decided to leave it alone.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] videobuf2: don't return POLLERR when only polling for events
Hans Verkuil [Wed, 30 Jan 2013 16:29:02 +0000 (13:29 -0300)]
[media] videobuf2: don't return POLLERR when only polling for events

If you only poll for events, then vb2_poll will return POLLPRI | POLLERR if
no streaming is in progress. That's not right, it's perfectly valid to
poll just for events.

Cc: Pawel Osciak <pawel@osciak.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] bw-qcam: remove unnecessary qc_reset and qc_setscanmode calls
Hans Verkuil [Wed, 30 Jan 2013 17:07:38 +0000 (14:07 -0300)]
[media] bw-qcam: remove unnecessary qc_reset and qc_setscanmode calls

These are already done elsewhere.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] bw-qcam: convert to videobuf2
Hans Verkuil [Wed, 30 Jan 2013 17:10:14 +0000 (14:10 -0300)]
[media] bw-qcam: convert to videobuf2

I know, nobody really cares about this black-and-white webcam anymore, but
it was fun to do.
Tested with an actual webcam.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] bw-qcam: zero priv field
Hans Verkuil [Wed, 30 Jan 2013 14:59:48 +0000 (11:59 -0300)]
[media] bw-qcam: zero priv field

Fix a v4l2-compliance problem: the priv field of v4l2_pix_format must be
cleared by drivers.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] radio-miropcm20: fix signal and stereo indication
Hans Verkuil [Mon, 28 May 2012 14:10:01 +0000 (11:10 -0300)]
[media] radio-miropcm20: fix signal and stereo indication

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] radio-miropcm20: Fix audmode/tuner/frequency handling
Hans Verkuil [Wed, 30 Jan 2013 08:55:50 +0000 (05:55 -0300)]
[media] radio-miropcm20: Fix audmode/tuner/frequency handling

- instead of a mute module option, use audmode as per the spec.
- clamp the frequency before setting it.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] radio-miropcm20: add prio and control event support
Hans Verkuil [Wed, 30 Jan 2013 08:54:33 +0000 (05:54 -0300)]
[media] radio-miropcm20: add prio and control event support

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] radio-miropcm20: convert to the control framework
Hans Verkuil [Wed, 30 Jan 2013 08:50:28 +0000 (05:50 -0300)]
[media] radio-miropcm20: convert to the control framework

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] radio-miropcm20: remove input/audio ioctls
Hans Verkuil [Wed, 30 Jan 2013 08:49:53 +0000 (05:49 -0300)]
[media] radio-miropcm20: remove input/audio ioctls

Such ioctls are not valid for radio devices.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] radio-miropcm20: fix querycap
Hans Verkuil [Wed, 30 Jan 2013 14:26:36 +0000 (11:26 -0300)]
[media] radio-miropcm20: fix querycap

Don't set version (done by the v4l2 core), fill in bus_info, set correct
driver name and add device_caps support.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tvaudio: convert to the control framework
Hans Verkuil [Sat, 2 Feb 2013 09:03:36 +0000 (06:03 -0300)]
[media] tvaudio: convert to the control framework

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tvaudio: fix two tea6420 errors
Hans Verkuil [Mon, 10 Sep 2012 14:06:57 +0000 (11:06 -0300)]
[media] tvaudio: fix two tea6420 errors

The inputmask for the tea6420 wasn't set and the wrong mute register value
was used.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tvaudio: fix broken volume/balance calculations
Hans Verkuil [Sat, 2 Feb 2013 08:57:37 +0000 (05:57 -0300)]
[media] tvaudio: fix broken volume/balance calculations

The balance control did not do what it is supposed to do due to wrong
calculations.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] mt9v011: convert to the control framework
Hans Verkuil [Fri, 7 Sep 2012 08:42:15 +0000 (05:42 -0300)]
[media] mt9v011: convert to the control framework

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] Move DV-class control IDs from videodev2.h to v4l2-controls.h
Hans Verkuil [Thu, 24 Jan 2013 07:42:05 +0000 (04:42 -0300)]
[media] Move DV-class control IDs from videodev2.h to v4l2-controls.h

When the control IDs were split off from videodev2.h to v4l2-controls.h
these new Digital Video controls were forgotten (the two patches may
have crossed one another).
Move these controls to their proper place in v4l2-controls.h.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-fimc: Redefine platform data structure for fimc-is
Sylwester Nawrocki [Fri, 1 Feb 2013 18:00:40 +0000 (15:00 -0300)]
[media] s5p-fimc: Redefine platform data structure for fimc-is

Newer Exynos4 SoC are equipped with a local camera ISP that
controls external raw image sensor directly. Such sensors
can be connected through FIMC-LITEn (and MIPI-CSISn) IPs to
the ISP, which then feeds image data to the FIMCn IP. Thus
there can be two busses associated with an image source
(sensor). Rename struct s5p_fimc_isp_info describing external
image sensor (video decoder) to struct fimc_source_info to
avoid confusion. bus_type is split into fimc_bus_type and
sensor_bus_type. The bus type enumeration is extended to
include both FIMC Writeback input types.
The bus_type enumeration and the data structure name in the
board files are modified according to the above changes.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] MAINTAINERS: Add s5c73m3 driver entry
Andrzej Hajda [Thu, 31 Jan 2013 10:03:05 +0000 (07:03 -0300)]
[media] MAINTAINERS: Add s5c73m3 driver entry

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5c73m3: Use devm_regulator_bulk_get API
Sachin Kamat [Thu, 31 Jan 2013 04:12:46 +0000 (01:12 -0300)]
[media] s5c73m3: Use devm_regulator_bulk_get API

devm_regulator_bulk_get saves some cleanup and exit code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-fimc: Add clk_prepare/unprepare for sclk_cam clocks
Sylwester Nawrocki [Fri, 18 Jan 2013 18:34:37 +0000 (15:34 -0300)]
[media] s5p-fimc: Add clk_prepare/unprepare for sclk_cam clocks

Add clk_prepare(), clk_unprepare() calls for the sclk_cam clocks
to ensure the driver works on platforms with the common clocks
API enabled.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-fimc: Fix FIMC.n subdev set_selection ioctl handler
Sylwester Nawrocki [Wed, 30 Jan 2013 12:55:46 +0000 (09:55 -0300)]
[media] s5p-fimc: Fix FIMC.n subdev set_selection ioctl handler

The V4L2_SEL_TGT_CROP_BOUNDS, V4L2_SEL_TGT_COMPOSE_BOUNDS selection
targets are not supposed to be handled in the set_selection ioctl.
Remove the code that doesn't do anything sensible now and make sure
ctx->state is modified with the spinlock held.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>