aboutsummaryrefslogtreecommitdiff
path: root/drivers/media
AgeCommit message (Collapse)Author
2014-03-24[media] adv7180: free an interrupt on failure paths in init_device()Alexey Khoroshilov
There is request_irq() in init_device(), but the interrupt is not removed on failure paths. The patch adds proper error handling. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-24[media] e4000: make VIDEO_V4L2 dependency optionalAntti Palosaari
That tuner driver is mainly for DVB API, but there is some V4L2 API controls for SDR usage. Make driver compile conditional so that V4L2 is not mandatory. Without the V4L2 support driver is build as a DVB only, without SDR controls. Fixes following errors reported by kbuild test robot: ERROR: "v4l2_ctrl_auto_cluster" [drivers/media/tuners/e4000.ko] undefined! ERROR: "v4l2_ctrl_new_std" [drivers/media/tuners/e4000.ko] undefined! ERROR: "v4l2_ctrl_handler_init_class" [drivers/media/tuners/e4000.ko] undefined! ERROR: "v4l2_ctrl_handler_free" [drivers/media/tuners/e4000.ko] undefined! Reported-by: kbuild test robot <fengguang.wu@intel.com> Cc: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-14[media] af9033: Don't export functions for the hardware filterMauro Carvalho Chehab
Exporting functions for hardware filter is a bad idea, as it breaks compilation if: CONFIG_DVB_USB_AF9035=y CONFIG_DVB_AF9033=m Because the PID filter function calls would be hardcoded at af9035. The same doesn't happen with af9033_attach() because the dvb_attach() doesn't hardcode it. Instead, it dynamically links it at runtime. However, calling dvb_attach() multiple times is problematic, as it increments module kref. So, the better is to pass one parameter for the af9033 module to fill the hardware filters, and then use it inside af9035. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-14[media] af9035: use af9033 PID filtersAntti Palosaari
PID filters are property of af9033 demod. Use PID filters from af9033 driver as it provides those now. Allow possible dual mode on USB 1.1 mode too as bandwidth could be just enough when filters are used on both frontends. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-14[media] af9033: implement PID filterAntti Palosaari
Implement PID filter and export it via symbol. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-14[media] e4000: fix 32-bit build errorAntti Palosaari
All error/warnings: drivers/built-in.o: In function `e4000_set_params': >> e4000.c:(.text+0x1219a1b): undefined reference to `__umoddi3' 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>
2014-03-14[media] s5p-jpeg: Fix broken indentation in jpeg-regs.hJacek Anaszewski
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>
2014-03-14[media] exynos4-is: Add the FIMC-IS ISP capture DMA driverSylwester Nawrocki
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>
2014-03-14[media] exynos4-is: Add support for asynchronous subdevices registrationSylwester Nawrocki
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>
2014-03-14[media] exynos4-is: Add clock provider for the SCLK_CAM clock outputsSylwester Nawrocki
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>
2014-03-14[media] exynos4-is: Use external s5k6a3 sensor driverSylwester Nawrocki
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>
2014-03-14[media] V4L: s5c73m3: Add device tree supportSylwester Nawrocki
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>
2014-03-14[media] V4L: Add driver for s5k6a3 image sensorSylwester Nawrocki
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>
2014-03-14[media] em28xx-audio: make sure audio is unmuted on open()Frank Schaefer
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>
2014-03-14[media] rc: img-ir: hw: Fix min/max bits setupJames Hogan
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>
2014-03-14[media] rc: img-ir: jvc: Remove unused no-leader timingsJames Hogan
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>
2014-03-14[media] rc: img-ir: hw: Remove unnecessary semi-colonJames Hogan
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>
2014-03-14[media] media: davinci: vpbe: fix build warningLad, Prabhakar
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>
2014-03-14[media] e4000: rename some variablesAntti Palosaari
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>
2014-03-14[media] e4000: convert to Regmap APIAntti Palosaari
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>
2014-03-14[media] e4000: get rid of DVB i2c_gate_ctrl()Antti Palosaari
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>
2014-03-14[media] rtl28xxu: use muxed RTL2832 I2C adapters for E4000 and RTL2832_SDRAntti Palosaari
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>
2014-03-14[media] rtl28xxu: depends on I2C_MUXAntti Palosaari
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>
2014-03-14[media] rtl28xxu: fix switch-case style issueAntti Palosaari
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>
2014-03-14[media] rtl28xxu: attach SDR extension moduleAntti Palosaari
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>
2014-03-14[media] rtl28xxu: constify demod config structsAntti Palosaari
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>
2014-03-14[media] e4000: implement PLL lock v4l controlAntti Palosaari
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>
2014-03-14[media] e4000: fix PLL calc to allow higher frequenciesAntti Palosaari
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>
2014-03-14[media] e4000: implement controls via v4l2 control frameworkAntti Palosaari
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>
2014-03-14[media] e4000: convert DVB tuner to I2C driver modelAntti Palosaari
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>
2014-03-13[media] media: rc-core: use %s in rc_map_get() module loadKees Cook
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>
2014-03-13[media] v4l: rename v4l2_format_sdr to v4l2_sdr_formatAntti Palosaari
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>
2014-03-13[media] v4l: add control for RF tuner PLL lock flagAntti Palosaari
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>
2014-03-13[media] v4l: add RF tuner channel bandwidth controlAntti Palosaari
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>
2014-03-12[media] rtl28xxu: add USB ID for Genius TVGo DVB-T03Jan Vcelak
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>
2014-03-12[media] v4l: vsp1: Update copyright noticeLaurent Pinchart
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>
2014-03-12[media] dvb_frontend: Fix possible read out of boundsOle Ernst
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>
2014-03-12[media] m88ds3103: possible uninitialized scalar variableAntti Palosaari
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>
2014-03-12[media] m88ds3103: remove dead code 2nd partAntti Palosaari
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>
2014-03-12[media] m88ds3103: remove dead codeAntti Palosaari
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>
2014-03-11[media] rc-main: fix missing unlock if no devno leftJames Hogan
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>
2014-03-11[media] ddbridge: remove unneeded an NULL checkDan Carpenter
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>
2014-03-11[media] av7110_hw: fix a sanity check in av7110_fw_cmd()Dan Carpenter
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>
2014-03-11[media] rc: img-ir: add Sanyo decoder moduleJames Hogan
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>
2014-03-11[media] rc: img-ir: add Sharp decoder moduleJames Hogan
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>
2014-03-11[media] rc: img-ir: add Sony decoder moduleJames Hogan
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>
2014-03-11[media] rc: img-ir: add JVC decoder moduleJames Hogan
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>
2014-03-11[media] rc: img-ir: add NEC decoder moduleJames Hogan
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>
2014-03-11[media] rc: img-ir: add to buildJames Hogan
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>
2014-03-11[media] rc: img-ir: add hardware decoder driverJames Hogan
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>