1
0
Fork 0
Commit Graph

324063 Commits (5f49908adb1ff4f0cec429923f1f49e79f318812)

Author SHA1 Message Date
Dan Carpenter 5f49908adb [media] rc-core: fix return codes in ir_lirc_ioctl()
These should be -ENOSYS because not -EINVAL.

Reported-by: Sean Young <sean@mess.org>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-06 09:25:01 -03:00
Dan Carpenter 48cafec9a9 [media] rc: divide by zero bugs in s_tx_carrier()
"carrier" comes from a get_user() in ir_lirc_ioctl().  We need to test
that it's not zero before using it as a divisor.  It might have been
nice to test for this ir_lirc_ioctl() but the mceusb driver uses zero to
disable carrier modulation.
The bug in redrat3 is a little more subtle.  The ->carrier is passed to
mod_freq_to_val() which uses it as a divisor.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-06 09:24:39 -03:00
Frank Schäfer a52eb6c02f [media] ov2640: select sensor register bank before applying h/v-flip settings
We currently don't select the register bank in ov2640_s_ctrl, so we can end up
writing to DSP register 0x04 instead of sensor register 0x04.
This happens for example when calling ov2640_s_ctrl after ov2640_s_fmt.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-06 09:21:27 -03:00
Peter Senna Tschudin ab99cb18ae [media] drivers/media/platform/soc_camera/soc_camera.c: fix error return code
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
[g.liakhovetski@gmx.de: follow the soc_camera.c style: check "ret < 0"]
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-06 09:20:32 -03:00
Peter Senna Tschudin 58dec65d71 [media] drivers/media/platform/soc_camera/mx2_camera.c: fix error return code
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}
// </smpl>

[mchehab@redhat.com: Second hunk removed, as it doesn't apply anymore,
 due to a merge conflict]
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-06 09:18:10 -03:00
Sachin Kamat 0224936935 [media] soc_camera: Use devm_kzalloc function
devm_kzalloc() has been used to simplify error handling.
While at it, the soc_camera_device_register function has been moved to
save a few lines of code and a variable.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
[g.liakhovetski@gmx.de: remove a superfluous empty line]
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-06 09:12:36 -03:00
Sachin Kamat ec0341b3b7 [media] soc_camera: Use module_platform_driver macro
module_platform_driver simplifies the code by eliminating
module_init and module_exit calls.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-06 09:12:13 -03:00
Javier Martin 1aeed35575 [media] media: mx2_camera: Don't modify non volatile parameters in try_fmt
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
[g.liakhovetski@gmx.de: also don't clear pcdev->resizing in .try_fmt()]
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-06 09:11:54 -03:00
Sylwester Nawrocki eb3c311cde [media] soc-camera: Use new selection target definitions
Replace the deprecated V4L2_SEL_TGT_*_ACTIVE selection target
names with their new unified counterparts.
Compatibility definitions are already in linux/v4l2-common.h.

Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-06 09:11:18 -03:00
Peter Senna Tschudin cb9e40fc98 [media] drivers/media/radio/si4713-i2c.c: removes unnecessary semicolon
removes unnecessary semicolon
Found by Coccinelle: http://coccinelle.lip6.fr/

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-06 08:26:14 -03:00
Peter Senna Tschudin a6224d46d0 [media] drivers/media/dvb-frontends/sp8870.c: removes unnecessary semicolon
removes unnecessary semicolon
Found by Coccinelle: http://coccinelle.lip6.fr/

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-06 08:22:22 -03:00
Peter Senna Tschudin 1c4bbfd1c9 [media] drivers/media/dvb-frontends/itd1000.c: removes unnecessary semicolon
removes unnecessary semicolon
Found by Coccinelle: http://coccinelle.lip6.fr/

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-06 08:22:17 -03:00
Peter Senna Tschudin 6ec93f0193 [media] drivers/media/pci/cx88/cx88-blackbird.c: removes unnecessary semicolon
removes unnecessary semicolon
Found by Coccinelle: http://coccinelle.lip6.fr/

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-06 08:22:06 -03:00
Alfredo Jesús Delaiti 082c0576d6 [media] Mygica X8507 audio for YPbPr, AV and S-Video
Adds audio support for input YPbPr, AV and S-Video on Mygica X8507 card.

Remains to be done: IR, FM and ISDBT

Signed-off-by: Alfredo J. Delaiti <alfredodelaiti@netscape.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-06 08:06:16 -03:00
Antti Palosaari 44e0d7de4e [media] cxd2820r: silence compiler warning
drivers/media/dvb-frontends/cxd2820r_core.c: In function 'cxd2820r_attach':
drivers/media/dvb-frontends/cxd2820r_core.c:691:10: warning: unused variable 'gpio' [-Wunused-variable]

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-05 23:15:54 -03: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
Arun Kumar K cdcf45e700 [media] s5p-mfc: Set vfl_dir for encoder
The vfl_dir flag is presently set to VFL_DIR_M2M only for decoder.
The encoder is not working because of this. So adding this flag
to the encoder part also.

Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-05 23:09:04 -03:00
Jeongtae Park f96f3cfa0b [media] s5p-mfc: Update MFC v4l2 driver to support MFC6.x
Multi Format Codec 6.x is a hardware video coding acceleration
module present in new Exynos5 SoC series. It is capable of
handling several new video codecs for decoding and encoding.

Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Signed-off-by: Jaeryul Oh <jaeryul.oh@samsung.com>
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-05 23:08:31 -03:00
Jeongtae Park 5b781e171e [media] s5p-mfc: MFCv6 register definitions
Adds register definitions for MFC v6.x firmware

Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Signed-off-by: Jaeryul Oh <jaeryul.oh@samsung.com>
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-05 22:58:00 -03:00
Arun Kumar K 8f532a7fec [media] s5p-mfc: Add MFC variant data to device context
MFC variant data replaces various macros used in the driver
which will change in a different version of MFC hardware.
Also does a cleanup of MFC context structure and common files.

Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
Signed-off-by: Jaeryul Oh <jaeryul.oh@samsung.com>
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-05 22:57:25 -03:00
Arun Kumar K 43a1ea1f90 [media] s5p-mfc: Update MFCv5 driver for callback based architecture
Modifies the driver to use a callback based architecture
for hardware dependent calls. This architecture is suitable
for supporting co-existence with newer versions of MFC hardware.

Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-05 22:53:37 -03:00
Arun Kumar K 77a788fc2d [media] s5p-mfc: Prepare driver for callback based re-architecture
The patch renames hardware specific opr and cmd files to
opr_v5 and cmd_v5 respectively. This is done for accomodating
firmware v6. Also the shared memory management files are removed
and the functionality is added to the opr_v5 file.

Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-05 22:44:40 -03:00
Arun Kumar K 2e81dde943 [media] v4l: Add control definitions for new H264 encoder features
New controls are added for supporting H264 encoding features like:
 - MVC frame packing,
 - flexible macroblock ordering,
 - arbitrary slice ordering,
 - hierarchical coding.

Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-05 22:42:17 -03:00
Arun Kumar K 4d08f670e6 [media] v4l: Add fourcc definitions for new formats
Add the following new fourcc definitions, for multiplanar YCbCr:
V4L2_PIX_FMT_NV21M, V4L2_PIX_FMT_NV12MT_16X16 and compressed formats:
V4L2_PIX_FMT_H264_MVC, V4L2_PIX_FMT_VP8.

Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-05 22:39:51 -03:00
Sylwester Nawrocki 65214a8603 [media] s5p-csis: Allow to specify pixel clock's source through platform data
Depending on the sensor configuration it might be required to adjust
the CSIS's output pixel clock so it is greater than its input pixel
clock, in order to avoid the input data FIFO overflow.
Use platform data to select SCLK_CSIS clock from CMU as a source, rather
than CSI APB clock.

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:35:16 -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
Sylwester Nawrocki ccbfd1d49d [media] s5p-csis: Replace phy_enable platform data callback with direct call
The phy_enable callback is common for all Samsung SoC platforms,
replace it with direct function call so the MIPI-CSI2 DPHY control
is also possible on device tree instantiated platforms.

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:33:39 -03:00
Mauro Carvalho Chehab eabe7b01c2 Merge branch 'samsung_platform_data' into staging/for_v3.7
* samsung_platform_data:
  ARM: samsung: move platform_data definitions
  ARM: orion: move platform_data definitions
  ARM: nomadik: move platform_data definitions
  ARM: w90x900: move platform_data definitions
  ARM: vt8500: move platform_data definitions
  ARM: tegra: move sdhci platform_data definition
  ARM: sa1100: move platform_data definitions
  ARM: pxa: move platform_data definitions
  ARM: netx: move platform_data definitions
  ARM: msm: move platform_data definitions
  ARM: imx: move platform_data definitions
  ARM: ep93xx: move platform_data definitions
  ARM: davinci: move platform_data definitions
  ARM: at91: move platform_data definitions
2012-10-05 22:32:05 -03:00
Sylwester Nawrocki c421a1e418 [media] ARM: EXYNOS: Change MIPI-CSIS device regulator supply names
Rename MIPI-CSIS regulator supply names to match definitions in
the driver after commit "s5p-csis: Change regulator supply names".

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>
2012-10-05 22:29:28 -03:00
Sylwester Nawrocki 29de2337f9 [media] s5p-csis: Change regulator supply names
Rename the regulator supply names to more meaningful ones.
It's a prerequisite for adding device tree support.

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:29:02 -03:00
Sylwester Nawrocki 69a3d4f7b3 [media] ARM: samsung: Change __s5p_mipi_phy_control() function signature
Replace pdev argument __s5p_mipi_phy_control() helper with plain int
so MIPI-CSIS hardware instance index can be passed directly making
the function usable on platforms instantiated from device tree.

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>
2012-10-05 22:28:43 -03:00
Sylwester Nawrocki 73f56c239f [media] ARM: samsung: Remove unused fields from FIMC and CSIS platform data
The MIPI-CSI2 bus data alignment is now being derived from the media
bus pixel code, the drivers don't use the corresponding structure
fields, so remove them. Also remove the s5p_csis_phy_enable callback
which is now used directly by s5p-csis driver.

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>
2012-10-05 22:27:30 -03:00
Hans Verkuil e3b1b4e732 [media] DocBook: various updates w.r.t. v4l2_buffer and multiplanar
Clarify the behavior of v4l2_buffer in the multiplanar case,
including fixing a false statement: you can't set m.planes to NULL
when calling DQBUF.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-05 22:25:17 -03:00
Hans Verkuil 96b1a70226 [media] v4l2-ioctl.c: handle PREPARE_BUF like QUERYBUF
The core code for PREPARE_BUF didn't take the multiplanar case into account,
which might cause page faults. Handle PREPARE_BUF just like QUERYBUF and
QBUF/DQBUF.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-05 22:24:11 -03:00
Hans Verkuil 3c0b606181 [media] videobuf2-core: fill in length field for multiplanar buffers
length should be set to num_planes in __fill_v4l2_buffer(). That way the
caller knows how many planes there are in the buffer.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-05 22:23:24 -03:00
Hans Verkuil 32a7726031 [media] videobuf2-core: move plane verification out of __fill_v4l2/vb_buffer
The plane verification should be done before actually queuing or
dequeuing buffers, so move it out of __fill_v4l2_buffer and __fill_vb_buffer
and call it as a separate step.
This also makes it possible to change the return type of __fill_v4l2/vb_buffer
to void.
The dqbuf case took some special care: before removing a buffer from the
done_list you have to verify that the receiving v4l2_buffer has enough room
for all the planes. The number of planes can differ between buffers due to the
fact that buffers for other formats can be prepared using VIDIOC_PREPARE_BUF.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Tested-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-05 22:21:40 -03:00
Lad, Prabhakar 626d533f8c [media] media: davinci: vpif: set device capabilities
set device_caps and also change the driver and
bus_info to proper values as per standard.

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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-05 22:14:40 -03:00
Lad, Prabhakar b4a711e7bf [media] media: davinci: vpif: Add return code check at vb2_queue_init()
from commit with id 896f38f582
it's mandatory to check the return code of vb2_queue_init().

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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-05 22:13:25 -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 c389648a92 [media] tvp514x: s_routing should just change routing, not try to detect a signal
The s_routing function should not try to detect a signal. It is a really
bad idea to try to detect a valid video signal and return an error if
you can't. Changing input should do just that and nothing more.
Also don't power on the ADCs on s_routing, instead do that on querystd.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.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:10:38 -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 882084ad0f [media] vpif_display: use a v4l2_subdev pointer to call a subdev
This makes it easier to have outputs without subdevs.
This needs more work. The way the outputs are configured should be identical
to how inputs are configured.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.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:07 -03:00
Hans Verkuil 178cce1262 [media] vpif_capture: separate subdev from input
vpif_capture relied on a 1-1 mapping of input and subdev. This is not
necessarily the case. Separate the two. So there is a list of subdevs
and a list of inputs. Each input refers to a subdev and has routing
information. An input does not have to have a subdev.
The initial input for each channel is set to the fist input.
Currently missing is support for associating multiple subdevs with
an input.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.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:08:09 -03:00
Hans Verkuil 5be452c343 [media] vpif_capture: fix cleanup code
The cleanup sequence was incorrect and could cause a kernel oops.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.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:06:05 -03:00
Hans Verkuil 01b1d97559 [media] vpif_display: fix cleanup code
The cleanup sequence was incorrect and could cause a kernel oops.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.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:05:37 -03:00
Hans Verkuil e6067f8b1e [media] vpif_display: first init subdevs, then register device nodes
When device nodes are registered they must be ready for use
immediately, so make sure the subdevs are loaded first.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.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:04:46 -03:00
Hans Verkuil b65814e546 [media] vpif_capture: first init subdevs, then register device nodes
When device nodes are registered they must be ready for use
immediately, so make sure the subdevs are loaded first.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.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:03:12 -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
Hans Verkuil 311673ee9b [media] vpif_display: move output_id to channel_obj
The output index does not belong to video_obj, it belongs to
channel_obj. Also rename to output_idx to be consistent with
the input_idx name used in vpif_capture.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.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:01:11 -03:00