firefly-linux-kernel-4.4.55.git
10 years ago[media] s5p-fimc: Remove reference to outdated macro
Paul Bolle [Wed, 12 Feb 2014 10:08:49 +0000 (07:08 -0300)]
[media] s5p-fimc: Remove reference to outdated macro

The Kconfig symbol S5P_SETUP_MIPIPHY was removed in v3.13. Remove a
reference to its macro from a list of Kconfig options.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] s5p-jpeg: Fix broken indentation in jpeg-regs.h
Jacek Anaszewski [Thu, 16 Jan 2014 11:26:32 +0000 (08:26 -0300)]
[media] s5p-jpeg: Fix broken indentation in jpeg-regs.h

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] exynos4-is: Add the FIMC-IS ISP capture DMA driver
Sylwester Nawrocki [Fri, 20 Dec 2013 22:35:06 +0000 (19:35 -0300)]
[media] exynos4-is: Add the FIMC-IS ISP capture DMA driver

Add a video capture node for the FIMC-IS ISP IP block. The Exynos4x12
FIMC-IS ISP IP block has 2 DMA interfaces that allow to capture raw
Bayer and YUV data to memory.  Currently only the DMA2 output is and
raw Bayer data capture is supported.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] exynos4-is: Add support for asynchronous subdevices registration
Sylwester Nawrocki [Mon, 24 Feb 2014 14:44:50 +0000 (11:44 -0300)]
[media] exynos4-is: Add support for asynchronous subdevices registration

Add support for registering external sensor subdevs using
v4l2-async API. The async API is used only for sensor subdevs
and only for booting from DT.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] exynos4-is: Add clock provider for the SCLK_CAM clock outputs
Sylwester Nawrocki [Fri, 20 Dec 2013 21:53:53 +0000 (18:53 -0300)]
[media] exynos4-is: Add clock provider for the SCLK_CAM clock outputs

This patch adds clock provider so the the SCLK_CAM0/1 output clocks
can be accessed by image sensor devices through the clk API.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] exynos4-is: Use external s5k6a3 sensor driver
Sylwester Nawrocki [Fri, 19 Jul 2013 14:35:11 +0000 (11:35 -0300)]
[media] exynos4-is: Use external s5k6a3 sensor driver

This patch removes the common fimc-is-sensor driver for image sensors
that are normally controlled by the FIMC-IS firmware. The FIMC-IS
driver now contains only a table of properties specific to each sensor.
The sensor properties required for the ISP's firmware are parsed from
device tree and retrieved from the internal table, which is selected
based on the compatible property of an image sensor.

To use the Exynos4x12 internal ISP the S5K6A3 sensor driver (drivers/
media/i2c/s5k6a3.c) is now required.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] V4L: s5c73m3: Add device tree support
Sylwester Nawrocki [Fri, 20 Dec 2013 22:46:44 +0000 (19:46 -0300)]
[media] V4L: s5c73m3: Add device tree support

This patch adds the V4L2 asynchronous subdev registration and
device tree support. Common clock API is used to control the
sensor master clock from within the subdev.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] V4L: Add driver for s5k6a3 image sensor
Sylwester Nawrocki [Fri, 9 Aug 2013 18:56:00 +0000 (15:56 -0300)]
[media] V4L: Add driver for s5k6a3 image sensor

This patch adds subdev driver for Samsung S5K6A3 raw image sensor.
As it is intended at the moment to be used only with the Exynos
FIMC-IS (camera ISP) subsystem it is pretty minimal subdev driver.
It doesn't do any I2C communication since the sensor is controlled
by the ISP and its own firmware.
This driver, if needed, can be updated in future into a regular
subdev driver where the main CPU communicates with the sensor
directly.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] Documentation: devicetree: Update Samsung FIMC DT binding
Sylwester Nawrocki [Fri, 20 Dec 2013 21:56:05 +0000 (18:56 -0300)]
[media] Documentation: devicetree: Update Samsung FIMC DT binding

This patch documents following updates of the Exynos4 SoC camera subsystem
devicetree binding:

 - addition of #clock-cells and clock-output-names properties to 'camera'
   node - these are now needed so the image sensor sub-devices can reference
   clocks provided by the camera host interface,
 - dropped a note about required clock-frequency properties at the
   image sensor nodes; the sensor devices can now control their clock
   explicitly through the clk API and there is no need to require this
   property in the camera host interface binding.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] Documentation: dt: Add binding documentation for S5C73M3 camera
Sylwester Nawrocki [Fri, 20 Dec 2013 22:57:47 +0000 (19:57 -0300)]
[media] Documentation: dt: Add binding documentation for S5C73M3 camera

This adds DT binding documentation for Samsung S5C73M3 camera sensor
with an embedded ISP.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] Documentation: dt: Add binding documentation for S5K6A3 image sensor
Sylwester Nawrocki [Thu, 29 Aug 2013 09:24:33 +0000 (06:24 -0300)]
[media] Documentation: dt: Add binding documentation for S5K6A3 image sensor

This patch adds binding documentation for the Samsung S5K6A3(YX)
raw image sensor.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] em28xx-audio: make sure audio is unmuted on open()
Frank Schaefer [Fri, 17 Jan 2014 17:18:43 +0000 (14:18 -0300)]
[media] em28xx-audio: make sure audio is unmuted on open()

In all cases, when the first capture is called, we need to
call the code that unmutes the volume.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] DocBook media: v4l2_format_sdr was renamed to v4l2_sdr_format
Hans Verkuil [Fri, 14 Mar 2014 11:57:06 +0000 (08:57 -0300)]
[media] DocBook media: v4l2_format_sdr was renamed to v4l2_sdr_format

Update the DocBook files accordingly.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] DocBook media: clarify v4l2_pix_format and v4l2_pix_format_mplane fields
Hans Verkuil [Fri, 14 Mar 2014 11:57:07 +0000 (08:57 -0300)]
[media] DocBook media: clarify v4l2_pix_format and v4l2_pix_format_mplane fields

Be more specific with regards to how some of these fields are interpreted.
In particular the height value and which fields can be set by the application.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2-pci-skeleton: add a V4L2 PCI skeleton driver
Hans Verkuil [Fri, 14 Mar 2014 11:38:21 +0000 (08:38 -0300)]
[media] v4l2-pci-skeleton: add a V4L2 PCI skeleton driver

This example driver uses all the latest frameworks and can serve as a
starting point for a new V4L2 PCI driver.

Originally written for a presentation on how to use V4L2 frameworks
during FOSDEM 2014.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] rc: img-ir: hw: Fix min/max bits setup
James Hogan [Thu, 13 Mar 2014 10:29:22 +0000 (07:29 -0300)]
[media] rc: img-ir: hw: Fix min/max bits setup

The calculated values for the minlen and maxlen fields, which were
rounded to multiples of 2 and clamped to a valid range, were left
unused. Use them in the calculation of the register value rather than
using the raw input minlen and maxlen.

This fixes the following warning with a W=1 build:
drivers/media/rc/img-ir/img-ir-hw.c In function ‘img_ir_free_timing’:
drivers/media/rc/img-ir/img-ir-hw.c +228 :23: warning: variable ‘maxlen’ set but not used [-Wunused-but-set-variable]
drivers/media/rc/img-ir/img-ir-hw.c +228 :15: warning: variable ‘minlen’ set but not used [-Wunused-but-set-variable]

Reported-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] rc: img-ir: jvc: Remove unused no-leader timings
James Hogan [Thu, 13 Mar 2014 10:29:23 +0000 (07:29 -0300)]
[media] rc: img-ir: jvc: Remove unused no-leader timings

The JVC timings included timings intended for the secondary decoder
(which matches messages with no leader), however they were in the wrong
part of the timings structure, repeating s00 and s01 rather than being
in s10 and s11.

Distinct repeat timings can't be properly supported yet for JVC anyway
since the scancode callback cannot determine which decoder matched the
message, so for now remove these timings and don't bother to enable the
secondary decoder.

This fixes the following warnings with W=1:
drivers/media/rc/img-ir/img-ir-jvc.c +76 :3: warning: initialized field overwritten [-Woverride-init]
drivers/media/rc/img-ir/img-ir-jvc.c +76 :3: warning: (near initialization for ‘img_ir_jvc.timings.s00’) [-Woverride-init]
drivers/media/rc/img-ir/img-ir-jvc.c +81 :3: warning: initialized field overwritten [-Woverride-init]
drivers/media/rc/img-ir/img-ir-jvc.c +81 :3: warning: (near initialization for ‘img_ir_jvc.timings.s01’) [-Woverride-init]

Reported-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] rc: img-ir: hw: Remove unnecessary semi-colon
James Hogan [Thu, 13 Mar 2014 10:29:21 +0000 (07:29 -0300)]
[media] rc: img-ir: hw: Remove unnecessary semi-colon

Fix a coccicheck warning in img-ir driver:
drivers/media/rc/img-ir/img-ir-hw.c:500:2-3: Unneeded semicolon

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] media: davinci: vpbe: fix build warning
Lad, Prabhakar [Fri, 14 Mar 2014 05:25:35 +0000 (02:25 -0300)]
[media] media: davinci: vpbe: fix build warning

this patch fixes following build warning
drivers/media/platform/davinci/vpbe_display.c: In function 'vpbe_start_streaming':
drivers/media/platform/davinci/vpbe_display.c:344: warning: unused variable 'vpbe_dev'

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] MAINTAINERS: add rtl2832_sdr driver
Antti Palosaari [Mon, 3 Feb 2014 03:00:32 +0000 (00:00 -0300)]
[media] MAINTAINERS: add rtl2832_sdr driver

Realtek RTL2832 SDR driver. Currently in staging as SDR API is not
ready.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] rtl2832_sdr: clamp bandwidth to nearest legal value in automode
Antti Palosaari [Mon, 10 Mar 2014 17:28:45 +0000 (14:28 -0300)]
[media] rtl2832_sdr: clamp bandwidth to nearest legal value in automode

Clamp bandwidth to nearest legal value in automode in order to pass
v4l2-compliance test.

Reported-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] rtl2832_sdr: fixing v4l2-compliance issues
Hans Verkuil [Wed, 5 Mar 2014 23:21:38 +0000 (20:21 -0300)]
[media] rtl2832_sdr: fixing v4l2-compliance issues

Fix rtl2832_sdr driver v4l2-compliance issues.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] e4000: rename some variables
Antti Palosaari [Tue, 11 Feb 2014 01:52:51 +0000 (22:52 -0300)]
[media] e4000: rename some variables

Rename some variables.
Change error status checks from (ret < 0) to (ret).
No actual functionality changes.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] e4000: convert to Regmap API
Antti Palosaari [Sat, 8 Feb 2014 09:20:35 +0000 (06:20 -0300)]
[media] e4000: convert to Regmap API

That comes possible after driver was converted to kernel I2C model
(I2C binding & proper I2C client with no gate control hack). All
nasty low level I2C routines are now covered by regmap.

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] e4000: get rid of DVB i2c_gate_ctrl()
Antti Palosaari [Sat, 8 Feb 2014 07:21:10 +0000 (04:21 -0300)]
[media] e4000: get rid of DVB i2c_gate_ctrl()

Gate control is now implemented by rtl2832 I2C adapter so we do not
need proprietary DVB i2c_gate_ctrl() anymore.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] rtl28xxu: use muxed RTL2832 I2C adapters for E4000 and RTL2832_SDR
Antti Palosaari [Sat, 8 Feb 2014 07:03:57 +0000 (04:03 -0300)]
[media] rtl28xxu: use muxed RTL2832 I2C adapters for E4000 and RTL2832_SDR

RTL2832 driver provides muxed I2C adapters for tuner bus I2C gate
control. Pass those adapters to rtl2832_sdr and e4000 modules in order
to get rid of proprietary DVB .i2c_gate_ctrl() callback use.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] rtl28xxu: depends on I2C_MUX
Antti Palosaari [Mon, 10 Mar 2014 18:18:55 +0000 (15:18 -0300)]
[media] rtl28xxu: depends on I2C_MUX

We need depend on I2C_MUX as rtl2832 demod used requires it.

All error/warnings:
warning: (DVB_USB_RTL28XXU) selects DVB_RTL2832 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CORE && I2C && I2C_MUX)
ERROR: "i2c_add_mux_adapter" [drivers/media/dvb-frontends/rtl2832.ko] undefined!
ERROR: "i2c_del_mux_adapter" [drivers/media/dvb-frontends/rtl2832.ko] undefined!

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] rtl28xxu: fix switch-case style issue
Antti Palosaari [Tue, 4 Feb 2014 02:07:21 +0000 (23:07 -0300)]
[media] rtl28xxu: fix switch-case style issue

Use break, not return, for every case.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] rtl28xxu: attach SDR extension module
Antti Palosaari [Tue, 10 Sep 2013 03:13:57 +0000 (00:13 -0300)]
[media] rtl28xxu: attach SDR extension module

With that extension module it supports SDR.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] rtl28xxu: constify demod config structs
Antti Palosaari [Sun, 13 Oct 2013 02:35:35 +0000 (23:35 -0300)]
[media] rtl28xxu: constify demod config structs

Optimize a little bit from data to text.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] rtl2832_sdr: expose e4000 controls to user
Antti Palosaari [Tue, 11 Feb 2014 01:15:01 +0000 (22:15 -0300)]
[media] rtl2832_sdr: expose e4000 controls to user

E4000 tuner driver provides now some controls. Expose those to
userland.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] rtl2832_sdr: Realtek RTL2832 SDR driver module
Antti Palosaari [Tue, 10 Sep 2013 03:07:56 +0000 (00:07 -0300)]
[media] rtl2832_sdr: Realtek RTL2832 SDR driver module

Implement SDR driver for Realtek RTL2832U chip as a DVB extension
module. SDR module is attached by DVB USB RTL28XXU driver as a DVB
SEC (satellite equipment controller) module. Abusing unused SEC here
has no harm as that is DVB-T only frontend.

SDR functionality is provided by RTL2832 DVB-T demodulator. I suspect
it is originally planned for DAB and FM, but it could be abused general
SDR, due to modern silicon tuners that has wide frequency range and a
lot of configurable parameters (filters, gains, ...).

http://thread.gmane.org/gmane.linux.drivers.video-input-infrastructure/44461

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] e4000: implement PLL lock v4l control
Antti Palosaari [Fri, 7 Feb 2014 05:55:57 +0000 (02:55 -0300)]
[media] e4000: implement PLL lock v4l control

Implement PLL lock control to get PLL lock flag status from tuner
synthesizer.

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] e4000: fix PLL calc to allow higher frequencies
Antti Palosaari [Mon, 27 Jan 2014 06:13:19 +0000 (03:13 -0300)]
[media] e4000: fix PLL calc to allow higher frequencies

There was 32-bit overflow on VCO frequency calculation which blocks
tuning to 1073 - 1104 MHz. Use 64 bit number in order to avoid VCO
frequency overflow.

After that fix device in question tunes to following range:
60 - 1104 MHz
1250 - 2207 MHz

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] e4000: implement controls via v4l2 control framework
Antti Palosaari [Mon, 27 Jan 2014 00:02:53 +0000 (21:02 -0300)]
[media] e4000: implement controls via v4l2 control framework

Implement gain and bandwidth controls using v4l2 control framework.

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] e4000: convert DVB tuner to I2C driver model
Antti Palosaari [Tue, 15 Oct 2013 22:22:45 +0000 (19:22 -0300)]
[media] e4000: convert DVB tuner to I2C driver model

Driver conversion from proprietary DVB tuner model to more
general I2C driver model.

Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] media: rc-core: use %s in rc_map_get() module load
Kees Cook [Tue, 11 Mar 2014 20:25:53 +0000 (17:25 -0300)]
[media] media: rc-core: use %s in rc_map_get() module load

rc_map_get() takes a single string literal for the module to load,
so make sure it cannot be used as a format string in the call to
request_module().

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] DocBook media: fix broken FIELD_ALTERNATE description
Hans Verkuil [Fri, 7 Mar 2014 12:33:28 +0000 (09:33 -0300)]
[media] DocBook media: fix broken FIELD_ALTERNATE description

The sizeimage is that of a single field, not that of a full frame.
That makes no sense, and in fact all drivers supporting ALTERNATE will
set sizeimage to that of a field.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] DocBook media: clarify v4l2_buffer/plane fields
Hans Verkuil [Fri, 7 Mar 2014 13:16:48 +0000 (10:16 -0300)]
[media] DocBook media: clarify v4l2_buffer/plane fields

Be more specific as to who has to fill in each field/flag: the driver
or the application.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] DocBook: fix incorrect code example
Hans Verkuil [Sun, 23 Feb 2014 23:12:46 +0000 (20:12 -0300)]
[media] DocBook: fix incorrect code example

The code said for (i = 0; i > 30; ++i) instead of i < 30.

Fix this and clean it up a bit at the same time.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] DocBook media: update STREAMON/OFF documentation
Hans Verkuil [Fri, 7 Mar 2014 11:40:59 +0000 (08:40 -0300)]
[media] DocBook media: update STREAMON/OFF documentation

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: rename v4l2_format_sdr to v4l2_sdr_format
Antti Palosaari [Mon, 10 Mar 2014 13:43:24 +0000 (10:43 -0300)]
[media] v4l: rename v4l2_format_sdr to v4l2_sdr_format

Rename v4l2_format_sdr to v4l2_sdr_format in order to keep it in
line with other formats.

Reported-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] msi3101: fix v4l2-compliance issues
Antti Palosaari [Mon, 10 Mar 2014 19:30:44 +0000 (16:30 -0300)]
[media] msi3101: fix v4l2-compliance issues

Fix msi3101 driver v4l2-compliance issues.

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] msi001: fix v4l2-compliance issues
Antti Palosaari [Mon, 10 Mar 2014 19:28:18 +0000 (16:28 -0300)]
[media] msi001: fix v4l2-compliance issues

Fix msi001 driver v4l2-compliance issues.

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] msi3101: clamp mmap buffers to reasonable level
Antti Palosaari [Wed, 26 Feb 2014 23:48:23 +0000 (20:48 -0300)]
[media] msi3101: clamp mmap buffers to reasonable level

That value is coming from the user and we need only ensure it is
reasonable. That was pointed by Hans when reviewing rtl2832_sdr driver.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] MAINTAINERS: add msi3101 driver
Antti Palosaari [Mon, 3 Feb 2014 02:55:12 +0000 (23:55 -0300)]
[media] MAINTAINERS: add msi3101 driver

Mirics MSi2500 (MSi3101) SDR ADC + USB interface driver. Currently
in staging as SDR API is not ready.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] MAINTAINERS: add msi001 driver
Antti Palosaari [Mon, 3 Feb 2014 02:51:30 +0000 (23:51 -0300)]
[media] MAINTAINERS: add msi001 driver

Mirics MSi001 silicon tuner driver. Currently in staging as SDR API
is not ready.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] msi3101: use msi001 tuner driver
Antti Palosaari [Mon, 3 Feb 2014 02:42:00 +0000 (23:42 -0300)]
[media] msi3101: use msi001 tuner driver

Remove MSi001 RF tuner related code as MSi001 functionality is moved
to own driver.

Implement SPI master adapter.

Attach MSi001 driver via SPI / V4L subdev framework.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] msi001: Mirics MSi001 silicon tuner driver
Antti Palosaari [Mon, 3 Feb 2014 02:34:23 +0000 (23:34 -0300)]
[media] msi001: Mirics MSi001 silicon tuner driver

That RF tuner driver is bound via SPI bus model and it implements V4L
subdev API. I split it out from MSi3101 SDR driver.
MSi3101 = MSi2500 + MSi001.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] msi3101: convert to SDR API
Antti Palosaari [Sun, 17 Nov 2013 06:04:51 +0000 (03:04 -0300)]
[media] msi3101: convert to SDR API

Massive rewrite. Use SDR API. Fix bugs.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: add control for RF tuner PLL lock flag
Antti Palosaari [Fri, 7 Feb 2014 05:46:16 +0000 (02:46 -0300)]
[media] v4l: add control for RF tuner PLL lock flag

Add volatile boolean control to indicate if tuner frequency synthesizer
is locked to requested frequency. That means tuner is able to receive
given frequency. Control is named as "PLL lock", since frequency
synthesizers are based of phase-locked-loop. Maybe more general name
could be wise still?

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] DocBook: media: document PLL lock control
Antti Palosaari [Fri, 7 Feb 2014 06:55:32 +0000 (03:55 -0300)]
[media] DocBook: media: document PLL lock control

Document PLL lock V4L2 control. It is read only RF tuner control
which is used to inform if tuner is receiving frequency or not.

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: add enum_freq_bands support to tuner sub-device
Antti Palosaari [Wed, 5 Feb 2014 05:24:35 +0000 (02:24 -0300)]
[media] v4l: add enum_freq_bands support to tuner sub-device

Add VIDIOC_ENUM_FREQ_BANDS, enumerate supported frequency bands,
IOCTL support for sub-device tuners too.

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: uapi: add SDR formats CU8 and CU16LE
Antti Palosaari [Wed, 5 Feb 2014 02:55:25 +0000 (23:55 -0300)]
[media] v4l: uapi: add SDR formats CU8 and CU16LE

V4L2_SDR_FMT_CU8 — Complex unsigned 8-bit IQ sample
V4L2_SDR_FMT_CU16LE — Complex unsigned 16-bit little endian IQ sample

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] DocBook: V4L: add V4L2_SDR_FMT_CU16LE - 'CU16'
Antti Palosaari [Fri, 31 Jan 2014 03:29:46 +0000 (00:29 -0300)]
[media] DocBook: V4L: add V4L2_SDR_FMT_CU16LE - 'CU16'

Document V4L2_SDR_FMT_CU16LE format.
It is complex unsigned 16-bit little endian IQ sample. Used by
software defined radio devices.

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] DocBook: V4L: add V4L2_SDR_FMT_CU8 - 'CU08'
Antti Palosaari [Fri, 31 Jan 2014 02:44:59 +0000 (23:44 -0300)]
[media] DocBook: V4L: add V4L2_SDR_FMT_CU8 - 'CU08'

Document V4L2_SDR_FMT_CU8 SDR format.
It is complex unsigned 8-bit IQ sample. Used by software defined
radio devices.

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] DocBook: media: add some general info about RF tuners
Antti Palosaari [Wed, 26 Feb 2014 23:30:35 +0000 (20:30 -0300)]
[media] DocBook: media: add some general info about RF tuners

Add some info what is RF tuner in context of V4L RF tuner class.

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: reorganize RF tuner control ID numbers
Antti Palosaari [Wed, 5 Feb 2014 01:13:44 +0000 (22:13 -0300)]
[media] v4l: reorganize RF tuner control ID numbers

It appears that controls are ordered by ID number when enumerating.
That could lead illogical UI as controls are usually enumerated and
drawn by the application at runtime.

Change order of controls by reorganizing assigned IDs now as we can.
It is not reasonable possible after the API is released. Also, leave
some spare space between IDs too for possible future extensions.

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: add RF tuner channel bandwidth control
Antti Palosaari [Sat, 1 Feb 2014 02:36:13 +0000 (23:36 -0300)]
[media] v4l: add RF tuner channel bandwidth control

Modern silicon RF tuners has one or more adjustable filters on
signal path, in order to filter noise from desired radio channel.

Add channel bandwidth control to tell the driver which is radio
channel width we want receive. Filters could be then adjusted by
the driver or hardware, using RF frequency and channel bandwidth
as a base of filter calculations.

On automatic mode (normal mode), bandwidth is calculated from sampling
rate or tuning info got from userspace. That new control gives
possibility to set manual mode and let user have more control for
filters.

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: define unit for V4L2_CID_RF_TUNER_BANDWIDTH
Antti Palosaari [Wed, 12 Mar 2014 17:53:39 +0000 (14:53 -0300)]
[media] v4l: define unit for V4L2_CID_RF_TUNER_BANDWIDTH

Use Hertz as a unit for radio channel bandwidth.

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] DocBook: document RF tuner bandwidth controls
Antti Palosaari [Wed, 5 Feb 2014 02:15:22 +0000 (23:15 -0300)]
[media] DocBook: document RF tuner bandwidth controls

Add documentation for RF tuner bandwidth controls. These controls are
used to set filters on tuner signal path.

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] DocBook: Fix typo in xml and template file
Masanari Iida [Wed, 12 Mar 2014 15:57:22 +0000 (12:57 -0300)]
[media] DocBook: Fix typo in xml and template file

Fix spelling typo under Documentation/DocBook/media.
It is because these files are NOT generated by "make htmldocs",
I have to fix the files.

[m.chehab@samsung.com: fix a merge conflict]
Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] rtl28xxu: add USB ID for Genius TVGo DVB-T03
Jan Vcelak [Wed, 26 Feb 2014 00:30:45 +0000 (21:30 -0300)]
[media] rtl28xxu: add USB ID for Genius TVGo DVB-T03

0458:707f KYE Systems Corp. (Mouse Systems) TVGo DVB-T03 [RTL2832]

The USB dongle uses RTL2832U demodulator and FC0012 tuner.

Signed-off-by: Jan Vcelak <jv@fcelda.cz>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: vsp1: Update copyright notice
Laurent Pinchart [Thu, 6 Feb 2014 17:42:31 +0000 (14:42 -0300)]
[media] v4l: vsp1: Update copyright notice

The "Renesas Corporation" listed in the copyright notice doesn't exist.
Replace it with "Renesas Electronics Corporation" and update the
copyright years.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] dvb_frontend: Fix possible read out of bounds
Ole Ernst [Wed, 5 Mar 2014 17:08:15 +0000 (14:08 -0300)]
[media] dvb_frontend: Fix possible read out of bounds

Check if index is within bounds _before_ accessing the value.

Signed-off-by: Ole Ernst <olebowle@gmx.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] m88ds3103: possible uninitialized scalar variable
Antti Palosaari [Sat, 1 Feb 2014 15:58:28 +0000 (12:58 -0300)]
[media] m88ds3103: possible uninitialized scalar variable

It was possible that tuner_frequency variable, used for carrier offset
compensation, was uninitialized. That happens when tuner
.get_frequency() callback is not defined.

Currently that case is not possible as only used tuner has this callback.

Coverity CID 1166057: Uninitialized scalar variable (UNINIT)

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] m88ds3103: remove dead code 2nd part
Antti Palosaari [Sat, 1 Feb 2014 15:30:28 +0000 (12:30 -0300)]
[media] m88ds3103: remove dead code 2nd part

Coverity CID 1166051: Logically dead code (DEADCODE)

TS clock calculation could be more accurate, but as it is not,
remove those unused clock speeds.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] m88ds3103: remove dead code
Antti Palosaari [Sat, 1 Feb 2014 14:57:50 +0000 (11:57 -0300)]
[media] m88ds3103: remove dead code

Coverity CID 1166050: Dead default in switch (DEADCODE)

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] rc-main: fix missing unlock if no devno left
James Hogan [Sat, 1 Mar 2014 22:52:25 +0000 (19:52 -0300)]
[media] rc-main: fix missing unlock if no devno left

While playing with make coccicheck I noticed this message:
drivers/media/rc/rc-main.c:1245:3-9: preceding lock on line 1238

It was introduced by commit 587d1b06e07b ([media] rc-core: reuse device
numbers) which returns -ENOMEM after a mutex_lock without first
unlocking it when there are no more device numbers left. The added code
doesn't depend on the device lock, so move it before the lock is taken.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] ddbridge: remove unneeded an NULL check
Dan Carpenter [Sat, 1 Mar 2014 13:55:29 +0000 (10:55 -0300)]
[media] ddbridge: remove unneeded an NULL check

Static checkers complain about the inconsistent NULL check here.

There is an unchecked dereference of "input->fe" in the call to
tuner_attach_tda18271() and there is a second unchecked dereference a
couple lines later when we do:
input->fe2->tuner_priv = input->fe->tuner_priv;

But actually "intput->fe" can't be NULL because if demod_attach_drxk()
fails to allocate it, then we would have return an error code.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] av7110_hw: fix a sanity check in av7110_fw_cmd()
Dan Carpenter [Sat, 1 Mar 2014 13:51:36 +0000 (10:51 -0300)]
[media] av7110_hw: fix a sanity check in av7110_fw_cmd()

ARRAY_SIZE(buf) (8 elements) was intended instead of sizeof(buf) (16
bytes).  But this is just a sanity check and the callers always pass
valid values so this doesn't cause a problem.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] rc: img-ir: add Sanyo decoder module
James Hogan [Fri, 28 Feb 2014 23:29:00 +0000 (20:29 -0300)]
[media] rc: img-ir: add Sanyo decoder module

Add an img-ir module for decoding the Sanyo infrared protocol.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] rc: img-ir: add Sharp decoder module
James Hogan [Fri, 28 Feb 2014 23:28:59 +0000 (20:28 -0300)]
[media] rc: img-ir: add Sharp decoder module

Add an img-ir module for decoding the Sharp infrared protocol.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] rc: img-ir: add Sony decoder module
James Hogan [Fri, 28 Feb 2014 23:28:58 +0000 (20:28 -0300)]
[media] rc: img-ir: add Sony decoder module

Add an img-ir module for decoding the Sony infrared protocol.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] rc: img-ir: add JVC decoder module
James Hogan [Fri, 28 Feb 2014 23:28:57 +0000 (20:28 -0300)]
[media] rc: img-ir: add JVC decoder module

Add an img-ir module for decoding the JVC infrared protocol.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] rc: img-ir: add NEC decoder module
James Hogan [Fri, 28 Feb 2014 23:28:56 +0000 (20:28 -0300)]
[media] rc: img-ir: add NEC decoder module

Add an img-ir module for decoding the NEC and extended NEC infrared
protocols.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] rc: img-ir: add to build
James Hogan [Fri, 28 Feb 2014 23:28:55 +0000 (20:28 -0300)]
[media] rc: img-ir: add to build

Add ImgTec IR decoder driver to the build system.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] rc: img-ir: add hardware decoder driver
James Hogan [Fri, 28 Feb 2014 23:28:54 +0000 (20:28 -0300)]
[media] rc: img-ir: add hardware decoder driver

Add remote control input driver for the ImgTec Infrared block hardware
decoder, which is set up with timings for a specific protocol and
supports mask/value filtering and wake events.

The hardware decoder timing values, raw data to scan code conversion
function and scan code filter to raw data filter conversion function
will be provided in separate files for each protocol which this part of
the driver can use. The new generic scan code filter interface is made
use of to reduce interrupts and control wake events.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] rc: img-ir: add raw driver
James Hogan [Fri, 28 Feb 2014 23:28:53 +0000 (20:28 -0300)]
[media] rc: img-ir: add raw driver

Add raw IR remote control input driver for the ImgTec Infrared decoder
block's raw edge interrupts. Generic software protocol decoders are used
to allow multiple protocols to be supported at a time, including those
not supported by the hardware decoder.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] rc: img-ir: add base driver
James Hogan [Fri, 28 Feb 2014 23:28:52 +0000 (20:28 -0300)]
[media] rc: img-ir: add base driver

Add base driver for the ImgTec Infrared decoder block. The driver is
split into separate components for raw (software) decode and hardware
decoder which are in following commits.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] dt: binding: add binding for ImgTec IR block
James Hogan [Fri, 28 Feb 2014 23:28:51 +0000 (20:28 -0300)]
[media] dt: binding: add binding for ImgTec IR block

Add device tree binding for ImgTec Consumer Infrared block, specifically
major revision 1 of the hardware.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] rc-main: automatically refresh filter on protocol change
James Hogan [Fri, 28 Feb 2014 23:17:06 +0000 (20:17 -0300)]
[media] rc-main: automatically refresh filter on protocol change

When either of the normal or wakeup filter protocols are changed,
refresh the corresponding scancode filter, i.e. try and set the same
scancode filter with the new protocol. If that fails clear the filter
instead.

If no protocol was selected the filter is just cleared, and if no
s_filter callback exists the filter is left unmodified.

Similarly clear the filter mask when the filter is set if no protocol is
currently selected.

This simplifies driver code which no longer has to explicitly worry
about modifying the filter on a protocol change. This also allows the
change_wakeup_protocol callback to be omitted entirely if there is only
a single available wakeup protocol at a time, since selecting no
protocol will automatically clear the wakeup filter, disabling wakeup.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Antti Seppälä <a.seppala@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] rc: add wakeup_protocols sysfs file
James Hogan [Fri, 28 Feb 2014 23:17:05 +0000 (20:17 -0300)]
[media] rc: add wakeup_protocols sysfs file

Add a wakeup_protocols sysfs file which controls the new
rc_dev::enabled_protocols[RC_FILTER_WAKEUP], which is the mask of
protocols that are used for the wakeup filter.

A new RC driver callback change_wakeup_protocol() is called to change
the wakeup protocol mask.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Antti Seppälä <a.seppala@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] rc: add allowed/enabled wakeup protocol masks
James Hogan [Fri, 28 Feb 2014 23:17:04 +0000 (20:17 -0300)]
[media] rc: add allowed/enabled wakeup protocol masks

Only a single allowed and enabled protocol mask currently exists in
struct rc_dev, however to support a separate wakeup filter protocol two
of each are needed, ideally as an array.

Therefore make both rc_dev::allowed_protos and rc_dev::enabled_protocols
arrays, update all users to reference the first element
(RC_FILTER_NORMAL), and add a couple more helper functions for drivers
to use for setting the allowed and enabled wakeup protocols.

We also rename allowed_protos to allowed_protocols while we're at it,
which is more consistent with enabled_protocols.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Antti Seppälä <a.seppala@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] rc: abstract access to allowed/enabled protocols
James Hogan [Fri, 28 Feb 2014 23:17:03 +0000 (20:17 -0300)]
[media] rc: abstract access to allowed/enabled protocols

The allowed and enabled protocol masks need to be expanded to be per
filter type in order to support wakeup filter protocol selection. To
ease that process abstract access to the rc_dev::allowed_protos and
rc_dev::enabled_protocols members with inline functions.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Antti Seppälä <a.seppala@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] rc-main: add generic scancode filtering
James Hogan [Fri, 28 Feb 2014 23:17:02 +0000 (20:17 -0300)]
[media] rc-main: add generic scancode filtering

Add generic scancode filtering of RC input events, and fall back to
permitting any RC_FILTER_NORMAL scancode filter to be set if no s_filter
callback exists. This allows raw IR decoder events to be filtered, and
potentially allows hardware decoders to set looser filters and rely on
generic code to filter out the corner cases.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Antti Seppälä <a.seppala@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] nuvoton-cir: Activate PNP device when probing
Antti Seppälä [Sun, 16 Feb 2014 10:16:02 +0000 (07:16 -0300)]
[media] nuvoton-cir: Activate PNP device when probing

On certain motherboards (mainly Intel NUC series) bios keeps the
Nuvoton CIR device disabled at boot.

This patch adds a call to kernel PNP layer to activate the device if it
is not already activated. This will improve the chances of the PNP probe
actually succeeding on Intel NUC platforms.

Signed-off-by: Antti Seppälä <a.seppala@gmail.com>
Cc: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] au0828: fix i2c clock speed for DViCO FusionHDTV7
Joonyoung Shim [Tue, 11 Feb 2014 01:54:34 +0000 (22:54 -0300)]
[media] au0828: fix i2c clock speed for DViCO FusionHDTV7

DViCO FusionHDTV7 device that use au0828 can fail to communicate with
xc5000 using i2c interface because of high i2c clock speed - i2c clock
stretching bug. It causes to fail xc5000 firmware loading normally at
the current driver.

Already this problem fixed as changing to low i2c clock speed at
HVR-950q device, also DViCO FusionHDTV7 device can solve it as using low
i2c clock speed - 20KHz.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] rc-main: store_filter: pass errors to userland
James Hogan [Mon, 10 Feb 2014 21:31:56 +0000 (18:31 -0300)]
[media] rc-main: store_filter: pass errors to userland

Propagate errors returned by drivers from the s_filter callback back to
userland when updating scancode filters. This allows userland to see
when the filter couldn't be updated, usually because it's not a valid
filter for the hardware.

Previously the filter was being updated conditionally on success of
s_filter, but the write always reported success back to userland.

Reported-by: Antti Seppälä <a.seppala@gmail.com>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] Siano: smsusb - Add a device id for PX-S1UD
Satoshi Nagahama [Mon, 10 Feb 2014 09:45:29 +0000 (06:45 -0300)]
[media] Siano: smsusb - Add a device id for PX-S1UD

Add a device id to support for PX-S1UD (PLEX ISDB-T usb dongle) which
has sms2270.

Signed-off-by: Satoshi Nagahama <sattnag@aim.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] omap_vout: Add DVI display type support
Laurent Pinchart [Sat, 8 Feb 2014 14:32:15 +0000 (11:32 -0300)]
[media] omap_vout: Add DVI display type support

Since the introduction of the new OMAP DSS DVI connector driver in
commit 348077b154357eec595068a3336ef6beb870e6f3 ("OMAPDSS: Add new DVI
Connector driver"), DVI outputs report a new display type of
OMAP_DISPLAY_TYPE_DVI instead of OMAP_DISPLAY_TYPE_DPI. Handle the new
type in the IRQ handler.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] bttv: Add support for Kworld V-Stream Xpert TV PVR878
Pojar George [Fri, 7 Feb 2014 17:56:17 +0000 (14:56 -0300)]
[media] bttv: Add support for Kworld V-Stream Xpert TV PVR878

New board addition. No other changes.

[m.chehab@samsung.com: rebase patch and fix whitespace mangling]
Signed-off-by: Pojar George <geoubuntu@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] media: i2c: Kconfig: create dependency to MEDIA_CONTROLLER for adv7*
Marcus Folkesson [Wed, 5 Feb 2014 15:56:13 +0000 (12:56 -0300)]
[media] media: i2c: Kconfig: create dependency to MEDIA_CONTROLLER for adv7*

These chips makes use of the media_entity in the v4l2_subdev struct
and is therefor dependent of the  MEDIA_CONTROLLER config.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] drx39xyj: fix 64 bit division on 32 bit arch
Gianluca Gennari [Tue, 11 Mar 2014 13:41:47 +0000 (10:41 -0300)]
[media] drx39xyj: fix 64 bit division on 32 bit arch

Fix this linker warning:
WARNING: "__divdi3" [media_build/v4l/drx39xyj.ko] undefined!

[m.chehab@samsung.com: add include for asm/div64.h]
Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] mem2mem_testdev: improve field handling
Hans Verkuil [Mon, 10 Mar 2014 13:58:29 +0000 (10:58 -0300)]
[media] mem2mem_testdev: improve field handling

try_fmt should just set field to NONE and not return an error if
a different field was passed.

buf_prepare should check if the field passed in from userspace has a
supported field value. At the moment only NONE is supported and ANY
is mapped to NONE.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] mem2mem_testdev: fix field, sequence and time copying
Hans Verkuil [Mon, 10 Mar 2014 13:58:28 +0000 (10:58 -0300)]
[media] mem2mem_testdev: fix field, sequence and time copying

- Set the sequence counters correctly.
- Copy timestamps, timecode, relevant buffer flags and field from
  the received buffer to the outgoing buffer.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] mem2mem_testdev: return pending buffers in stop_streaming()
Hans Verkuil [Mon, 10 Mar 2014 13:58:27 +0000 (10:58 -0300)]
[media] mem2mem_testdev: return pending buffers in stop_streaming()

To keep the vb2 buffer administration in balance stop_streaming() must
return any pending buffers to the vb2 framework.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] mem2mem_testdev: add USERPTR support
Hans Verkuil [Mon, 10 Mar 2014 13:58:26 +0000 (10:58 -0300)]
[media] mem2mem_testdev: add USERPTR support

There is no reason why we shouldn't enable this here.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] mem2mem_testdev: set priv to 0
Hans Verkuil [Mon, 10 Mar 2014 13:58:25 +0000 (10:58 -0300)]
[media] mem2mem_testdev: set priv to 0

v4l2_compliance fix.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] mem2mem_testdev: pick default format with try_fmt
Hans Verkuil [Mon, 10 Mar 2014 13:58:24 +0000 (10:58 -0300)]
[media] mem2mem_testdev: pick default format with try_fmt

This resolves an issue raised by v4l2-compliance: if the given format does
not exist, then pick a default format.

While there is an exception regarding this for TV capture drivers, this
m2m driver should do the right thing.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>