dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

14235 Commits

Author SHA1 Message Date
Dan Carpenter 3a495ed77a [media] tuner-xc2028: fix "=" vs "==" typo
We intended to do a compare here, not an assignment.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 20:33:08 -03:00
Hans Verkuil 1a17a942cd [media] vivi: remove pointless video_nr++
Remove the pointless video_nr++. It doesn't do anything useful and it has
the unexpected side-effect of changing the video_nr module option, so
cat /sys/module/vivi/parameters/video_nr gives a different value back
then what was specified with modprobe.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 20:31:56 -03:00
Hans de Goede f140612d02 [media] radio-si470x: Add support for the new band APIs
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 20:23:14 -03:00
Hans de Goede 8d8c1b375c [media] radio-si470x: Fix band selection
The mask was wrong resulting in band 0 and 1 always ending up as band 0
in the register.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 20:23:13 -03:00
Hans de Goede c1af23c4f7 [media] radio-si470x: restore ctrl settings after suspend/resume
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 20:23:12 -03:00
Hans Verkuil 6652c716a5 [media] radio-cadet: implement frequency band enumeration
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 20:23:10 -03:00
Hans Verkuil cc0d32665f [media] radio-cadet: fix RDS handling
The current RDS code suffered from bit rot. Clean it up and make it work again.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 20:23:09 -03:00
Hans Verkuil b54c97db7f [media] radio-cadet: upgrade to latest frameworks
- add control framework
- use core locking
- use V4L2_TUNER_CAP_LOW
- remove volume support: there is no hardware volume control

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 20:23:08 -03:00
Hans Verkuil 82b655bfc3 [media] v4l2: add core support for the new VIDIOC_ENUM_FREQ_BANDS ioctl
This adds the usual core support code for this new ioctl.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 20:23:05 -03:00
Dan Carpenter afcc8e8c34 [media] tvp5150: signedness bug in tvp5150_selmux()
tvp5150_read() returns negative error codes so this needs to be an int
for the error handling to work.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 20:22:38 -03:00
Sachin Kamat 79ef87edea [media] videobuf-dma-contig: Use NULL instead of plain integer
Fixes the following sparse warning:
drivers/media/video/videobuf-dma-contig.c:59:46:
warning: Using plain integer as NULL pointer

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 20:22:37 -03:00
Hans de Goede db3912c073 [media] radio-si470x: Lower firmware version requirements
Testing with a firmware version 12 usb radio stick has shown version 12
to work fine too.

Reported-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 20:22:35 -03:00
Federico Vaga c9fbedddc2 [media] adv7180.c: convert to v4l2 control framework
[mchehab@redhat.com: fix checkpatch.pl ERROR:
 Macros with complex values should be enclosed in parenthesis]

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 20:22:34 -03:00
Sachin Kamat c082266f60 [media] V4L: Use NULL pointer instead of plain integer in v4l2-ctrls.c file
Fixes the following sparse warning:
drivers/media/video/v4l2-ctrls.c:2123:43: warning: Using plain integer as NULL pointer

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 19:54:53 -03:00
Dror Cohen 6f45b1b9f7 [media] media/video: vpif: fixed vpfe->vpif typo
Signed-off-by: Dror Cohen <dror@liveu.tv>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 19:54:41 -03:00
Ezequiel García c21813e974 [media] cx25821: Replace struct memcpy with struct assignment
Copying structs by assignment is type safe.
Plus, is shorter and easier to read.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 19:54:25 -03:00
Ezequiel García 23ba641a08 [media] cx231xx: Replace struct memcpy with struct assignment
Copying structs by assignment is type safe.
Plus, is shorter and easier to read.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 19:54:15 -03:00
Ezequiel García 630081e990 [media] cx23885: Replace struct memcpy with struct assignment
Copying structs by assignment is type safe.
Plus, is shorter and easier to read.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 19:53:55 -03:00
Ezequiel García ddebe8cdd6 [media] saa7164: Replace struct memcpy with struct assignment
Copying structs by assignment is type safe.
Plus, is shorter and easier to read.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 19:53:46 -03:00
Ezequiel García 5a6fa3fe9a [media] saa7164: Remove unused saa7164_call_i2c_clients()
This function has no users, so it's safe to remove it.
Tested by compilation only.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 19:53:30 -03:00
Ezequiel García b26f453963 [media] cx25821: Remove useless struct i2c_algo_bit_data
The field 'struct i2c_algo_bit_data i2c_algo' is wrongly confused with
struct i2c_algorithm. Moreover, i2c_algo field is not used since
i2c is registered using i2c_add_adpater() and not i2c_bit_add_bus().
Therefore, it's safe to remove it.
Tested by compilation only.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 19:53:03 -03:00
Ezequiel García 2728635403 [media] cx231xx: Remove useless struct i2c_algo_bit_data
The field 'struct i2c_algo_bit_data i2c_algo' is wrongly confused with
struct i2c_algorithm. Moreover, i2c_algo field is not used since
i2c is registered using i2c_add_adpater() and not i2c_bit_add_bus().
Therefore, it's safe to remove it.
Tested by compilation only.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 19:52:52 -03:00
Ezequiel García c410d09bf3 [media] cx23885: Remove useless struct i2c_algo_bit_data
The field 'struct i2c_algo_bit_data i2c_algo' is wrongly confused with
struct i2c_algorithm. Moreover, i2c_algo field is not used since
i2c is registered using i2c_add_adpater() and not i2c_bit_add_bus().
Therefore, it's safe to remove it.
Tested by compilation only.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 19:52:39 -03:00
Ezequiel García 6fe31039d4 [media] saa7164: Remove useless struct i2c_algo_bit_data
The field 'struct i2c_algo_bit_data i2c_algo' is wrongly confused with
struct i2c_algorithm. Moreover, i2c_algo field is not used since
i2c is registered using i2c_add_adpater() and not i2c_bit_add_bus().
Therefore, it's safe to remove it.
Tested by compilation only.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 19:52:22 -03:00
Sylwester Nawrocki f0476a83d6 [media] V4L: Add capability flags for memory-to-memory devices
This patch adds new V4L2_CAP_VIDEO_M2M and V4L2_CAP_VIDEO_M2M_MPLANE
capability flags that are intended to be used for memory-to-memory (M2M)
devices, instead of ORed V4L2_CAP_VIDEO_CAPTURE and V4L2_CAP_VIDEO_OUTPUT.

V4L2_CAP_VIDEO_M2M flag is added at the drivers, CAPTURE and OUTPUT
capability flags are left untouched and will be removed in future,
after a transition period required for existing applications to be
adapted to check only for V4L2_CAP_VIDEO_M2M.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Kamil Debski <k.debski@samsung.com>
Acked-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 19:31:53 -03:00
Sylwester Nawrocki 6126b912c8 [media] m5mols: Correct reported ISO values
The V4L2_CID_ISO_SENSITIVITY control menu values should be
standard ISO values multiplied by 1000. Multiply all menu
items by 1000 so ISO is properly reported as 50...3200 range.

This applies to kernels 3.5+.

Cc: stable@vger.kernel.org
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>
2012-07-30 19:23:33 -03:00
Sylwester Nawrocki 31ce54f6ae [media] s5p-fimc: Use switch statement for better readability
Use switch statement rather than multiple 'else if'.

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>
2012-07-30 19:23:17 -03:00
Sachin Kamat a516d08fa6 [media] s5p-fimc: Replace custom err() macro with v4l2_err() macro
Replace custom err() macro with v4l2_err() macro.

[s.nawrocki: added missing end-of-line at the log print]

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>
2012-07-30 19:23:01 -03:00
Sylwester Nawrocki c2d430af08 [media] s5p-fimc: Remove V4L2_FL_LOCK_ALL_FOPS flag
This patch adds locking for open(), close(), poll() and mmap()
file operations in the driver as a follow up to the changes
done in commit 5126f2590b
"v4l2-dev: add flag to have the core lock all file operations".

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>
2012-07-30 19:22:44 -03:00
Hans Verkuil 837c7e4256 [media] v4l2-dev: G_PARM was incorrectly enabled for all video nodes
G_PARM should only be enabled if:

- vidioc_g_parm is present
- or: it is a video node and vidioc_g_std or tvnorms are set.

Without this additional check v4l2-compliance would complain about
being able to use g_parm when it didn't expect it.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 19:20:44 -03:00
Hans Verkuil 47556ffaf2 [media] mem2mem_testdev: set default size and fix colorspace
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 19:20:21 -03:00
Hans Verkuil 97a3c902e9 [media] mem2mem_testdev: add control events support
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 19:20:10 -03:00
Hans Verkuil 08eb85100d [media] v4l2-mem2mem: support events in v4l2_m2m_poll
v4l2_m2m_poll didn't support events, but that's essential if you want to
be able to use control events for example.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 19:20:00 -03:00
Hans Verkuil b0d1499634 [media] mem2mem_testdev: set bus_info and device_caps
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 19:19:51 -03:00
Hans Verkuil d3dd59c232 [media] mem2mem_testdev: convert to the control framework and v4l2_fh
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 19:19:31 -03:00
Laurent Pinchart 7bf6afbb6b [media] tw9910: Don't access the device in the g_mbus_fmt operation
The g_mbus_fmt operation only needs to return the current mbus frame
format and doesn't need to configure the hardware to do so. Fix it to
avoid requiring the chip to be powered on when calling the operation.

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@redhat.com>
2012-07-30 19:15:53 -03:00
Laurent Pinchart f2730756ad [media] ov772x: Don't access the device in the g_mbus_fmt operation
The g_mbus_fmt operation only needs to return the current mbus frame
format and doesn't need to configure the hardware to do so. Fix it to
avoid requiring the chip to be powered on when calling the operation.

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@redhat.com>
2012-07-30 19:15:13 -03:00
Laurent Pinchart f985983912 [media] ov2640: Don't access the device in the g_mbus_fmt operation
The g_mbus_fmt operation only needs to return the current mbus frame
format and doesn't need to configure the hardware to do so. Fix it to
avoid requiring the chip to be powered on when calling the operation.

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@redhat.com>
2012-07-30 19:14:48 -03:00
Laurent Pinchart 2744782ef1 [media] soc-camera: Pass the physical device to the power operation
There will be no soc_camera_device instance with a soc-camera device is
used with a non soc-camera host, so we won't be able to pass the
soc_camera_device fake platform device to board code. Pass the physical
device instead.

The argument is currently not used by any board file so this is safe.

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@redhat.com>
2012-07-30 19:14:17 -03:00
Laurent Pinchart 1858c99db4 [media] soc-camera: Don't fail at module init time if no device is present
The soc-camera module exports functions that are needed by soc-camera
client drivers even when not running in soc-camera mode. Replace the
platform_driver_probe() with a platform_driver_register() call to avoid
module load failures if no soc-camera device is present.

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@redhat.com>
2012-07-30 19:13:39 -03:00
Hans Verkuil a1acb8f9a0 [media] v4l2-ioctl.c: zero the v4l2_dv_timings_cap struct
Zero all fields after the first type field.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 19:12:27 -03:00
Hans Verkuil 4c1110aabe [media] v4l2-dev: forgot to add VIDIOC_DV_TIMINGS_CAP
The VIDIOC_DV_TIMINGS_CAP ioctl check wasn't added to determine_valid_ioctls().
This caused this ioctl to always return -ENOTTY.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 19:11:04 -03:00
Manjunath Hadli 2c026deed9 [media] davinci: vpif: Enable selection of the ADV7343 and THS7303
The auto selection of pertinent helper chips (VIDEO_HELPER_CHIPS_AUTO)
should select the ADV7343 and THS7303 driver, which is used by VPIF
display driver.

Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 19:09:46 -03:00
Manjunath Hadli 0fd4652108 [media] davinci: vpif: add build configuration for vpif drivers
add generic build configuration for vpif capture
and display drivers as it is common for DM6467/DA850/OMAP-L138.

Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 19:09:09 -03:00
Manjunath Hadli 31415d0ef3 [media] davinci: vpif: Add suspend/resume callbacks to vpif driver
add clock enable and disable in probe and remove functions.
Probe will succeed only if the device clock is provided instead of
assuming that the clock is always enabled. VPIF clock has to be
dealt with during suspend and resume. Implement power management
callbacks to VPIF driver to disable/enable clock on suspend/resume
respectively.

Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 19:08:34 -03:00
Manjunath Hadli 3d5946dcfd [media] davinci: vpif capture:Add power management support
Implement power management operations - suspend and resume as part of
dev_pm_ops for VPIF capture driver.

Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 19:08:20 -03:00
Manjunath Hadli e9530dac31 [media] davinci: vpif display: Add power management support
Implement power management operations - suspend and resume as part of
dev_pm_ops for VPIF display driver.

Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 19:07:30 -03:00
Manjunath Hadli 6964b10363 [media] davinci: vpif: add support for clipping on output data
add hardware clipping support for VPIF output data. This
is needed as it is possible that the external encoder
might get confused between the FF or 00 which are a part
of the data and that of the SAV or EAV codes.

Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 19:06:55 -03:00
Lad, Prabhakar 2401dd25c7 [media] davinci: vpif display: migrate driver to videobuf2
This patch migrates VPIF display driver to videobuf2 framework.

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 19:06:33 -03:00
Lad, Prabhakar 60aa38d87d [media] davinci: vpif capture: migrate driver to videobuf2
This patch migrates VPIF capture driver to videobuf2 framework.

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 19:05:29 -03:00
Manjunath Hadli 764af39aa4 [media] davinci: vpif capture: size up the memory for the buffers from the buffer pool
Size up the memory for the buffers from the buffer pool allocated in board
file.  Then adjust the reqbuf count depending the available memory.

Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 19:04:32 -03:00
Manjunath Hadli fc613d44e0 [media] davinci: vpif display: size up the memory for the buffers from the buffer pool
Size up the memory for the buffers from the buffer pool allocated in board
file.  Then adjust the reqbuf count depending the available memory.

Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 19:03:53 -03:00
Manjunath Hadli 3bc1953b22 [media] davinci: vpif: fix setting of data width in config_vpif_params() function
fix setting of data width in config_vpif_params() function,
which was wrongly set.

Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 19:02:28 -03:00
Manjunath Hadli 0316b89ae0 [media] davinci: vpif: make request_irq flags as shared
omap-l138 shares the interrupt between capture and display.
Make sure we are able to request for the same irq number
by making a shared irq request.

Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 19:01:44 -03:00
Manjunath Hadli 0a63172a8a [media] davinci: vpif: make generic changes to re-use the vpif drivers on da850/omap-l138 soc
change the dm646x specific strings in the driver to make
them generic across platforms. In this case change all the
strings which have a dm646x connotation to vpif which is a
platform independent ip.

Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 19:00:49 -03:00
Manjunath Hadli b1fc42302b [media] davinci: vpif: add check for genuine interrupts in the isr
As the same interrupt is shared between capture and display devices,
sometimes we get isr calls where the interrupt might not genuinely belong
to capture or display. Hence, add a condition in the isr to check for
interrupt ownership and channel number to make sure we do not
service wrong interrupts.

Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:59:50 -03:00
Lad, Prabhakar 4099040eaa [media] videobuf-dma-contig: restore buffer mapping for uncached bufers
from commit a8f3c203e1
restore the mapping scheme for uncached buffers,
which was changed in a common scheme for cached and uncached.
This apparently was wrong, and was probably intended only for cached buffers.
the fix fixes the crash observed while mapping uncached buffers.

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Hadli, Manjunath <manjunath.hadli@ti.com>
Acked-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:52:56 -03:00
Hans de Goede 4faba767c6 [media] shark2: New driver for the Griffin radioSHARK v2 USB radio receiver
This driver consists of 2 parts, a generic tea5777 driver and a driver
for the Griffin radioSHARK v2 USB radio receiver, which is the only driver
using the generic tea5777 for now.

This first version only implements FM support, once the the new
VIDIOC_ENUM_FREQ_BANDS API is upstream I'll also add AM support.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:46:17 -03:00
Hans Verkuil 7a3ed2d95e [media] v4l2-ioctl: Don't assume file->private_data always points to a v4l2_fh
Commit efbceecd45, adds a number of helper
functions for ctrl related ioctls to v4l2-ioctl.c, these helpers assume that
if file->private_data != NULL, it points to a v4l2_fh, which is only the case
for drivers which actually use v4l2_fh.

This breaks for example bttv which use the "filedata" pointer for its own uses,
and now all the ctrl ioctls try to use whatever its filedata points to as
v4l2_fh and think it has a ctrl_handler, leading to:

[  142.499214] BUG: unable to handle kernel NULL pointer dereference at 0000000000000021
[  142.499270] IP: [<ffffffffa01cb959>] v4l2_queryctrl+0x29/0x230 [videodev]
[  142.514649]  [<ffffffffa01c7a77>] v4l_queryctrl+0x47/0x90 [videodev]
[  142.517417]  [<ffffffffa01c58b1>] __video_do_ioctl+0x2c1/0x420 [videodev]
[  142.520116]  [<ffffffffa01c7ee6>] video_usercopy+0x1a6/0x470 [videodev]
...

This patch adds the missing test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags) tests
to the ctrl ioctl helpers v4l2_fh paths, fixing the issues with for example
the bttv driver.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:44:07 -03:00
Hans de Goede a2f8b84fed [media] v4l2-ctrls: Teach v4l2-ctrls that V4L2_CID_AUTOBRIGHTNESS is a boolean
And document V4L2_CID_AUTOBRIGHTNESS.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:42:44 -03:00
Hans de Goede 0dddf83869 [media] gspca: Don't use video_device_node_name in v4l2_device release handler
When the v4l2_device release handler gets called the kobject under
vdev->dev has already been released, so we cannot use kobject_name on
it (which video_device_node_name does).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:42:10 -03:00
Hans de Goede 872099e806 [media] gspca_xirlink_cit: Grab backlight compensation control while streaming
As it cannot be changed while streaming.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:41:53 -03:00
Hans de Goede 1ea172d2fd [media] gspca_t613: Disable CIF resolutions
These are broken with my test cam and I've been unable to fix them.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:41:30 -03:00
Hans de Goede 3f25ea562b [media] gspca_stv0680: Remove empty ctrls array
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:41:13 -03:00
Hans de Goede a8931d5948 [media] gscpa_spca561: Add brightness control for rev12a cams
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:41:06 -03:00
Hans de Goede 9a3dafe431 [media] gspca_sn9c2028: Remove empty ctrls array
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:40:29 -03:00
Hans de Goede e163609ef7 [media] gspca_konica: Fix init sequence
The konica needs a freaking large time (circa 6.5 seconds) to "boot", and
does not want to be bothered while doing so, so sleep for 6 seconds, and
then query its status register at 100ms intervals until it becomes ready.

This removes the "reg_w err: -32" messages shown in dmesg whenever a
konica cam gets initialized, and also fixes the camera not working when
an app tries to use it directly after it has been plugged in and after
a suspend/resume cycle.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:40:19 -03:00
Hans de Goede 8bb58964bc [media] gspca: Add reset_resume callback to all sub-drivers
1) The gspca-core's suspend/resume code is such that resume being called after
a reset is safe / ok.

2) All devices tested sofar seem to need the reset_resume callback to work
properly over a suspend

3) The USB-core won't call the reset_resume callback for devices which don't
need it

Thus it seems the simplest and the best to just add the callback to all
sub-drivers, rather then adding the callbacks one-by-one as each driver gets
tested with suspend/resume.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:39:22 -03:00
Hans de Goede 1289179404 [media] gspca_benq: Remove empty ctrls array
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:38:40 -03:00
Hans de Goede b56ab4ca1c [media] gspca: Remove bogus JPEG quality controls from various sub-drivers
Various gspca-subdrivers have a JPEG quality control which only changes
the quantization tables in the JPEG headers send to user-space without
making any changes to the settings of the bridge. Remove these bogus / wrong
controls.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:38:24 -03:00
Hans Verkuil 82b343b231 [media] gspca: always call v4l2_ctrl_handler_setup after start
This ensures the controls are setup correctly.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:37:25 -03:00
Hans Verkuil ac3322b0d4 [media] gspca: clear priv field and disable relevant ioctls
The v4l2_pix_format priv field must be 0, so zero it.

Also disable ioctls that are not implemented by a subdriver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:37:04 -03:00
Hans Verkuil 0cfe9de234 [media] gspca-topro: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:36:01 -03:00
Hans Verkuil 930806cb92 [media] vc032x: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:35:37 -03:00
Hans Verkuil d5d875cb8f [media] xirlink_cit: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:35:10 -03:00
Hans Verkuil 4910adf1d0 [media] vicam: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:34:17 -03:00
Hans Verkuil 726795c1d9 [media] tv8532: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:34:04 -03:00
Hans Verkuil 9bf81642e1 [media] gspca_t613: convert to the control framework
Changes by Hans de Goede:
-rework how gain controls work to better match control framework
-make awb + gain + red/blue-balance a single auto-cluster
-only add the HFLIP control for TAS5130a sensor cams, as it breaks the
 video on other cams

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:33:46 -03:00
Hans Verkuil ed5cd6bbde [media] sunplus: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:32:20 -03:00
Hans Verkuil 74dec79714 [media] stk014: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:31:45 -03:00
Hans Verkuil df0df1acca [media] sq930x: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:31:16 -03:00
Hans Verkuil 3fa24bf5e1 [media] spca561: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:30:25 -03:00
Hans Verkuil fca2e678c1 [media] spca508: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:29:49 -03:00
Hans Verkuil de687ecf5d [media] spca506: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:29:33 -03:00
Hans Verkuil 2aed6c1b77 [media] spca505: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:29:12 -03:00
Hans Verkuil 9b6b35dcb0 [media] gspca-spca501: remove old function prototypes
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:29:11 -03:00
Hans Verkuil 705881e3a8 [media] spca501: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:27:25 -03:00
Hans Verkuil 9bf0c43eee [media] spca500: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:27:05 -03:00
Hans Verkuil 6e937b7fb7 [media] spca1528: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:26:34 -03:00
Hans Verkuil 5262eeec39 [media] es401: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:26:10 -03:00
Hans Verkuil f3920f0f76 [media] ov534_9: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:25:43 -03:00
Hans Verkuil cf9211e85e [media] ov519: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:25:24 -03:00
Hans Verkuil a17dd1ebd5 [media] nw80x: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:24:04 -03:00
Hans Verkuil 3e0ed00903 [media] gspca-mr97310a: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:23:18 -03:00
Hans Verkuil 1bdee422cd [media] gspca-konica: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:22:47 -03:00
Hans Verkuil bfaab899e7 [media] gspca-jeilinj: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:22:26 -03:00
Hans Verkuil 8792015ec5 [media] gspca-etoms: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:22:03 -03:00
Hans Verkuil 1bfea3e49d [media] gspca-cpia1: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:21:35 -03:00
Hans Verkuil cbc1c94cc5 [media] gspca-conex: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:21:00 -03:00
Antonio Ospite 1bd7d6adc6 [media] gspca_ov534: Convert to the control framework
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 18:20:44 -03:00