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

1078 Commits

Author SHA1 Message Date
Sylwester Nawrocki babde1c243 [media] V4L: Add driver for S3C24XX/S3C64XX SoC series camera interface
This patch adds V4L2 driver for Samsung S3C24XX/S3C64XX SoC series
camera interface. The driver exposes a subdev device node for CAMIF
pixel resolution and crop control and two video capture nodes - for
the "codec" and "preview" data paths. It has been tested on Mini2440
(s3c2440) and Mini6410 (s3c6410) board with gstreamer and mplayer.

Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Andrey Gusakov <dron0gus@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-28 09:43:34 -02:00
Mauro Carvalho Chehab d033a308d8 Merge remote-tracking branch 'linus/master' into staging/for_v3.8
* linus/master: (1428 commits)
  futex: avoid wake_futex() for a PI futex_q
  watchdog: using u64 in get_sample_period()
  writeback: put unused inodes to LRU after writeback completion
  mm: vmscan: check for fatal signals iff the process was throttled
  Revert "mm: remove __GFP_NO_KSWAPD"
  proc: check vma->vm_file before dereferencing
  UAPI: strip the _UAPI prefix from header guards during header installation
  include/linux/bug.h: fix sparse warning related to BUILD_BUG_ON_INVALID
  Linux 3.7-rc7
  powerpc/eeh: Do not invalidate PE properly
  ALSA: hda - Fix build without CONFIG_PM
  of/address: sparc: Declare of_iomap as an extern function for sparc again
  PM / QoS: fix wrong error-checking condition
  bnx2x: remove redundant warning log
  vxlan: fix command usage in its doc
  8139cp: revert "set ring address before enabling receiver"
  MPI: Fix compilation on MIPS with GCC 4.4 and newer
  MIPS: Fix crash that occurs when function tracing is enabled
  MIPS: Merge overlapping bootmem ranges
  jbd: Fix lock ordering bug in journal_unmap_buffer()
  ...
2012-11-28 07:22:38 -02:00
Tomasz Stanislawski 83ae7c5a1b [media] v4l: vb2: add buffer exporting via dmabuf
This patch adds extension to videobuf2-core. It allow to export an mmap buffer
as a DMABUF file descriptor.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-25 17:21:00 -02:00
Tomasz Stanislawski b799d09a15 [media] v4l: add buffer exporting via dmabuf
This patch adds extension to V4L2 api. A new ioctl VIDIOC_EXPBUF is added.  The
ioctl is used to export an mmap buffer as a DMABUF file descriptor.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-25 17:20:47 -02:00
Marek Szyprowski c60520fa50 [media] v4l: vb2-dma-contig: let mmap method to use dma_mmap_coherent call
Let mmap method to use dma_mmap_coherent call.  Moreover, this patch removes
vb2_mmap_pfn_range from videobuf2 helpers as it was suggested by Laurent
Pinchart.  The function is no longer used in vb2 code.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-25 17:20:25 -02:00
Marek Szyprowski 3e0c2f2046 [media] v4l: vb2: add prepare/finish callbacks to allocators
This patch adds support for prepare/finish callbacks in VB2 allocators. These
callback are used for buffer flushing.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-25 17:12:12 -02:00
Sumit Semwal c538404869 [media] v4l: vb2: add support for shared buffer (dma_buf)
This patch adds support for DMABUF memory type in videobuf2. It calls relevant
APIs of dma_buf for v4l reqbuf / qbuf / dqbuf operations.
For this version, the support is for videobuf2 as a user of the shared buffer;
so the allocation of the buffer is done outside of V4L2. [A sample allocator of
dma-buf shared buffer is given at [1]]
[1]: Rob Clark's DRM:
   https://github.com/robclark/kernel-omap4/commits/drmplane-dmabuf
   [original work in the PoC for buffer sharing]

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-25 17:11:12 -02:00
Anatolij Gustschin b6f50b49b9 [media] mt9v022: set y_skip_top field to zero as default
Set "y_skip_top" to zero and revise comment as I do not see this line
corruption on two different mt9v022 setups. The first read-out line
is perfectly fine. Add mt9v022 platform data configuring y_skip_top
for platforms that have issues with the first read-out line. Set
y_skip_top to 1 for pcm990 board.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Acked-by: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-22 11:36:50 -02:00
Hans Verkuil 6b0d5d344a [media] adv7604: Replace prim_mode by mode
Changes the way the primary mode is handled:
- Remove it from platform_data since it doesn't belong there.
- Add a new mode enum for use with s_routing.
- Collapse the two HDMI modes into one HDMI mode: when setting up the
  timings manually we do not need to select HDMI_COMP mode. That's only
  needed when selecting a preset.
This patch prepares for the next step where we switch to using the presets
where available.

Signed-off-by: Mats Randgaard <mats.randgaard@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-21 17:43:49 -02:00
Lad, Prabhakar 13fc23d306 [media] media: davinci: vpbe: migrate driver to videobuf2
This patch migrates VPBE 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-11-21 13:55:10 -02:00
Lad, Prabhakar baa29837a7 [media] media: davinci: vpbe: fix build warning
Warnings were generated because of the following commit changed data type for
address pointer
195bbca ARM: 7500/1: io: avoid writeback addressing modes for __raw_ accessors
add  __iomem annotation to fix following warnings
drivers/media/platform/davinci/vpbe_osd.c: In function ‘osd_read’:
drivers/media/platform/davinci/vpbe_osd.c:49:2: warning: passing
 argument 1 of ‘__raw_readl’ makes pointer from integer without a cast [enabled by default]
arch/arm/include/asm/io.h:104:19: note: expected ‘const volatile
 void *’ but argument is of type ‘long unsigned int’
This patch stores the ioremap_nocache() returned address in a
void __iomem * instead of a unsigned long and passes the same to
readl/writel functions which fixes the above warnings.

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-21 13:53:28 -02:00
Sakari Ailus 8c5dff9057 [media] v4l, smiapp, smiapp-pll, adp1653: Update contact information
Update contact information to correspond my e-mail address changes.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-21 13:34:50 -02:00
David Härdeman c003ab1bed [media] rc-core: add separate defines for protocol bitmaps and numbers
The RC_TYPE_* defines are currently used both where a single protocol is
expected and where a bitmap of protocols is expected.

Functions like rc_keydown() and functions which add/remove entries to the
keytable want a single protocol. Future userspace APIs would also
benefit from numeric protocols (rather than bitmap ones). Keytables are
smaller if they can use a small(ish) integer rather than a bitmap.

Other functions or struct members (e.g. allowed_protos,
enabled_protocols, etc) accept multiple protocols and need a bitmap.

Using different types reduces the risk of programmer error. Using a
protocol enum whereever possible also makes for a more future-proof
user-space API as we don't need to worry about a sufficient number of
bits being available (e.g. in structs used for ioctl() calls).

The use of both a number and a corresponding bit is dalso one in e.g.
the input subsystem as well (see all the references to set/clear bit when
changing keytables for example).

This patch separate the different usages in preparation for
upcoming patches.

Where a single protocol is expected, enum rc_type is used; where one or more
protocol(s) are expected, something like u64 is used.

The patch has been rewritten so that the format of the sysfs "protocols"
file is no longer altered (at the loss of some detail). The file itself
should probably be deprecated in the future though.

Signed-off-by: David Härdeman <david@hardeman.nu>
Cc: Andy Walls <awalls@md.metrocast.net>
Cc: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: Antti Palosaari <crope@iki.fi>
Cc: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-27 11:49:51 -02:00
Tomasz Stanislawski 78a0b0608b [media] media: s5p-hdmi: add HPD GPIO to platform data
This patch extends s5p-hdmi platform data by a GPIO identifier for
Hot-Plug-Detection pin.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-05 23:11:51 -03:00
Sylwester Nawrocki 09ff034047 [media] s5p-fimc: Remove unused platform data structure fields
alignment, fixed_phy_vdd and phy_enable fields are now unused
so removed them. The data alignment is now derived directly
from media bus pixel code, phy_enable callback has been replaced
with direct function call and fixed_phy_vdd was dropped in commit
438df3ebe5
"[media] s5p-csis: Handle all available power supplies".

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-10-05 22:34:47 -03:00
Lad, Prabhakar 2bd4e58c9d [media] media: davinci: vpif: display: separate out subdev from output
vpif_display relied on a 1-1 mapping of output and subdev. This is not
necessarily the case. Separate the two. So there is a list of subdevs
and a list of outputs. Each output refers to a subdev and has routing
information. An output does not have to have a subdev.
The initial output for each channel is set to the fist output.
Currently missing is support for associating multiple subdevs with
an output.

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-05 22:12:27 -03:00
Hans Verkuil 0d4f35f3f0 [media] davinci: move struct vpif_interface to chan_cfg
struct vpif_interface is channel specific, not subdev specific.
Move it to the channel config.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Tested-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-05 22:09:57 -03:00
Hans Verkuil 7aaad13124 [media] vpif_capture: move routing info from subdev to input
Routing information is a property of the input, not of the subdev.
One subdev may provide multiple inputs, each with its own routing
information.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Tested-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-05 22:02:34 -03:00
Hans Verkuil 33bf178660 [media] vpif_capture: remove unnecessary can_route flag
Calling a subdev op that isn't implemented will just return -ENOIOCTLCMD
No need to have a flag for that.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Tested-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-05 22:02:10 -03:00
Lad, Prabhakar 117a711a2c [media] media: v4l2-ctrl: add a helper function to add standard control with driver specific menu
Add helper function v4l2_ctrl_new_std_menu_items(), which adds
a standard menu control, with driver specific menu.

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-05 21:48:03 -03:00
Sylwester Nawrocki 2910311924 [media] V4L: Add [get/set]_frame_desc subdev callbacks
Add subdev callbacks for setting up parameters of the frame on media bus
that are not exposed to user space directly. This is just an initial,
mostly stub implementation. struct v4l2_mbus_frame_desc is intended
to be extended with sub-structures specific to a particular hardware media
bus. For now these new callbacks are used only to query or specify maximum
size of a compressed or hybrid (container) media bus frame in octets.

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-10-05 21:28:01 -03:00
Sylwester Nawrocki a375e1dfef [media] V4L: Add s_rx_buffer subdev video operation
The s_rx_buffer callback allows the host to set buffer for a data being
received by the subdev, e.g. non-image frame (meta) data. This callback
can be implemented by subdevice like a MIPI CSI2 receiver, allowing the
host driver to gather additional data into frame buffer passed to user
space.

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-10-05 21:28:00 -03:00
Hans Verkuil 368640827c [media] dm644x: replace the obsolete preset API by the timings API
This patch replaces the preset API by the timings API, and
appropriate changes in board file.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-05 14:27:18 -03:00
Sylwester Nawrocki b9ee31e621 [media] s5p-fimc: Add pipeline ops to separate FIMC-LITE module
In order to reuse the FIMC-LITE module on Exynos4 and Exynos5
SoC introduce a set of callbacks for the media pipeline control
from within FIMC/FIMC-LITE video node. It lets us avoid symbol
dependencies between FIMC-LITE and the whole media device driver,
which simplifies the initialization sequences and doesn't
introduce issues preventing common kernel image for exynos4 and
exynos5 SoCs.
This patch also corrects following build errors:
drivers/built-in.o: In function `buffer_queue':
drivers/media/video/s5p-fimc/fimc-lite.c:414: undefined reference
to `fimc_pipeline_s_stream'
drivers/built-in.o: In function `fimc_lite_resume':
drivers/media/video/s5p-fimc/fimc-lite.c:1518: undefined reference
to `fimc_pipeline_initialize'
drivers/built-in.o: In function `fimc_lite_suspend':
drivers/media/video/s5p-fimc/fimc-lite.c:1544: undefined reference
to `fimc_pipeline_shutdown'
when only CONFIG_VIDEO_EXYNOS_FIMC_LITE is selected, without
CONFIG_VIDEO_S5P_FIMC.

Reported-by: Sachin Kamat <sachin.kamat@linaro.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-10-01 20:25:32 -03:00
Hans Verkuil 34a6b7d093 [media] v4l2-ctrls: add a filter function to v4l2_ctrl_add_handler
With a filter function you can control more precisely which controls
are added. This is useful in particular for radio device nodes for
combined TV/Radio cards where you want to show just the radio-specific
controls and not controls like brightness.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-01 17:07:07 -03:00
Ezequiel Garcia 896f38f582 [media] videobuf2-core: Replace BUG_ON and return an error at vb2_queue_init()
This replaces BUG_ON() calls with WARN_ON(), and returns
EINVAL if some parameter is NULL, as suggested by Jonathan and Mauro.
The BUG_ON() call is too drastic to be used in this case.
See the full discussion here:
http://www.spinics.net/lists/linux-media/msg52462.html

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-27 06:09:10 -03:00
Sangwook Lee 8b99312b72 [media] Add v4l2 subdev driver for S5K4ECGX sensor
This patch adds driver for Samsung S5K4ECGX image sensor with an
embedded SoC ISP. The driver only implements preview operation mode
and still capture (snapshot) and face detection features are missing
now. Following controls are supported: contrast, saturation,
brightness, sharpness.

Signed-off-by: Sangwook Lee <sangwook.lee@linaro.org>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-26 17:32:54 -03:00
Hans Verkuil 5c77879ff9 [media] v4l2-dev: add new VFL_DIR_ defines
These will be used by v4l2-dev.c to improve ioctl checking.
I.e. ioctls for capture should return -ENOTTY when called for
an output device.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-26 11:03:53 -03:00
Hans Verkuil 4f996594ce [media] v4l2: make vidioc_s_crop const
Write-only ioctls should have a const argument in the ioctl op.
Do this conversion for vidioc_s_crop.
Adding const for write-only ioctls was decided during the 2012 Media Workshop.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-26 11:02:25 -03:00
Hans Verkuil 3f70e1f598 [media] v4l2: make vidioc_s_modulator const
Write-only ioctls should have a const argument in the ioctl op.
Do this conversion for vidioc_s_modulator.
Adding const for write-only ioctls was decided during the 2012 Media Workshop.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-26 10:58:02 -03:00
Hans Verkuil ba9425bce9 [media] v4l2: make vidioc_s_audout const
Write-only ioctls should have a const argument in the ioctl op.
Do this conversion for vidioc_s_audout.
Adding const for write-only ioctls was decided during the 2012 Media Workshop.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-26 10:56:23 -03:00
Hans Verkuil 0e8025b9f6 [media] v4l2: make vidioc_s_audio const
Write-only ioctls should have a const argument in the ioctl op.
Do this conversion for vidioc_s_audio.
Adding const for write-only ioctls was decided during the 2012 Media Workshop.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-26 10:50:12 -03:00
Hans Verkuil 85f5fe3962 [media] v4l2: make vidioc_(un)subscribe_event const
Write-only ioctls should have a const argument in the ioctl op.
Do this conversion for vidioc_(un)subscribe_event.
Adding const for write-only ioctls was decided during the 2012 Media Workshop.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-26 10:48:52 -03:00
Hans Verkuil ec6f432810 [media] v4l2: make vidioc_s_freq_hw_seek const
Write-only ioctls should have a const argument in the ioctl op.
Do this conversion for vidioc_s_freq_hw_seek.
Adding const for write-only ioctls was decided during the 2012 Media Workshop.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-26 10:47:28 -03:00
Hans Verkuil d88aab53bd [media] v4l2: make vidioc_s_jpegcomp const
Write-only ioctls should have a const argument in the ioctl op.
Do this conversion for vidioc_s_jpegcomp.
Adding const for write-only ioctls was decided during the 2012 Media Workshop.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-26 10:43:04 -03:00
Hans Verkuil e6eb28c220 [media] v4l2: make vidioc_s_fbuf const
Write-only ioctls should have a const argument in the ioctl op.
Do this conversion for vidioc_s_fbuf.
Adding const for write-only ioctls was decided during the 2012 Media Workshop.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-26 10:42:36 -03:00
Hans Verkuil 633c98e52a [media] v4l2-core: deprecate V4L2_BUF_TYPE_PRIVATE
This buffer type isn't used at all, and since it is effectively undefined
what it should do it is deprecated. The define still exists, but any
internal support for such buffers is removed.
The decisions to deprecate this was taken during the 2012 Media Workshop.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-26 09:38:15 -03:00
Sascha Hauer 961ae44980 [media] media v4l2-mem2mem: fix src/out and dst/cap num_rdy
src bufs belong to out queue, dst bufs belong to in queue. Currently
this is not a real problem since all users currently need exactly one
input and one output buffer.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-18 12:13:34 -03:00
Laurent Pinchart e9a50e4c2d [media] mt9v032: Provide link frequency control
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-13 16:29:07 -03:00
Laurent Pinchart 03d5285b8b [media] v4l2-ctrls: Add v4l2_ctrl_[gs]_ctrl_int64()
These helper functions get and set a 64-bit control's value from within
a driver. They are similar to v4l2_ctrl_[gs]_ctrl() but operate on
64-bit integer controls instead of 32-bit controls.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-13 16:23:36 -03:00
Hans Verkuil 117a55b69d [media] ad9389b: driver for the Analog Devices AD9389B video encoder
Initial version of this driver.

The full datasheets are available from the Analog Devices website:

  http://ez.analog.com/docs/DOC-1741

Not all features of the receiver are supported by this driver for various
reasons. Most notably:

- No CEC support (the CEC API needs a lot more discussion)
- No HDCP repeater support (we don't use that either)

I'm sure that there are more things missing, but this driver does work
well for our hardware.

Note that I am using the register addresses instead of register names: the
datasheet containing the register descriptions is organized by register
address. Using names would make the datasheet lookup very hard. An attempt
was made to try and document what is being done when registers are used
instead.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-13 16:15:36 -03:00
Hans Verkuil 54450f591c [media] adv7604: driver for the Analog Devices ADV7604 video decoder
Initial version of this driver.

The full datasheets are available from the Analog Devices website:

  http://ez.analog.com/docs/DOC-1545

Not all features of the receiver are supported by this driver for various
reasons. Most notably:

- No CEC support (the CEC API needs a lot more discussion)
- Only port A of the four HDMI input ports is implemented (our hardware only
  uses that port)
- No HDCP repeater support (we don't use that either)

And since there are some 600-odd pages of datasheet for this single device,
I'm sure that there are many more things missing, but this driver does work
well for our hardware.

Note that I am using the register addresses instead of register names: the
datasheet containing the register descriptions is organized by register
address. Using names would make the datasheet lookup very hard. An attempt
was made to try and document what is being done when registers are used
instead.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-13 16:13:47 -03:00
Hans Verkuil c61bd6a0e2 [media] v4l2-common: add CVT and GTF detection functions
These two helper functions detect whether the analog video timings detected
by the video receiver match the VESA CVT or GTF standards.

They basically do the inverse of the CVT and GTF modeline calculations.

This patch also adds a helper function that will determine the aspect ratio
based on the provided EDID values. This aspect ratio can be given to the GTF
helper function.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-13 16:09:59 -03:00
Hans Verkuil c2a667fa2b [media] v4l2-common: add v4l_match_dv_timings
Add the v4l_match_dv_timings function that can be used to compare two
v4l2_dv_timings structs.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-13 16:08:22 -03:00
Hans Verkuil ed45ce2cc0 [media] v4l2-subdev: add support for the new edid ioctls
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-13 16:07:24 -03:00
Guennadi Liakhovetski 3bfb41001d [media] V4L: soc-camera: add selection API host operations
Add .get_selection() and .set_selection() soc-camera host driver
operations. Additionally check, that the user is not trying to change the
output sizes during a running capture.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15 17:37:39 -03:00
Laurent Pinchart 4ec10bacd6 [media] soc-camera: Add and use soc_camera_power_[on|off]() helper functions
Instead of forcing all soc-camera drivers to go through the mid-layer to
handle power management, create soc_camera_power_[on|off]() functions
that can be called from the subdev .s_power() operation to manage
regulators and platform-specific power handling. This allows non
soc-camera hosts to use soc-camera-aware clients.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
[g.liakhovetski@gmx.de: fix compile breakage]
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15 17:03:29 -03:00
Timo Kokkonen c332e8472d [media] media: rc: Introduce RX51 IR transmitter driver
This is the driver for the IR transmitter diode found on the Nokia
N900 (also known as RX51) device. The driver is mostly the same as
found in the original 2.6.28 based kernel that comes with the device.

The following modifications have been made compared to the original
driver version:

- Adopt to the changes that has happen in the kernel during the past
  five years, such as the change in the include paths

- The OMAP DM-timers require much more care nowadays. The timers need
  to be enabled and disabled or otherwise many actions fail. Timers
  must not be freed without first stopping them or otherwise the timer
  cannot be requested again.

The code has been tested with sending IR codes with N900 device
running Debian userland. The device receiving the codes was Anysee
DVB-C USB receiver.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
Cc: Tony Lindgren <tony@atomide.com>
Cc: linux-omap@vger.kernel.org
Cc: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13 16:53:45 -03:00
Mauro Carvalho Chehab 9adf6132dc [media] dvb: get rid of fe_ioctl_override callback
This callback were meant to allow overriding a FE callback, before its
call, but it is not really needed, as the callback can be intercepted
after tuner attachment.

Worse than that, only DVBv3 calls are intercepted this way, so a DVBv5
application will produce different effects than a DVBv3 one.

So, get rid of it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Antti Palosaari <crope@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
2012-08-13 16:34:03 -03:00
Michael Jones 9d380adf02 [media] v4l2: typos
[mchehab@redhat.com: fix a merge conflict at Documentation/video4linux/v4l2-framework.txt]
Signed-off-by: Michael Jones <michael.jones@matrix-vision.de>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-11 16:55:53 -03:00