sfrench/cifs-2.6.git
11 years ago[media] rc: nuvoton-cir: fix potential double free in nvt_probe()
Wei Yongjun [Tue, 9 Apr 2013 08:44:29 +0000 (05:44 -0300)]
[media] rc: nuvoton-cir: fix potential double free in nvt_probe()

Since rc_unregister_device() frees its argument, the subsequently
call to rc_free_device() on the same variable will cause a double
free bug. Fix by set argument to NULL, thus when fall through to
rc_free_device(), nothing will be done there.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] rc: ite-cir: fix potential double free in ite_probe()
Wei Yongjun [Tue, 9 Apr 2013 08:43:53 +0000 (05:43 -0300)]
[media] rc: ite-cir: fix potential double free in ite_probe()

Since rc_unregister_device() frees its argument, the subsequently
call to rc_free_device() on the same variable will cause a double
free bug. Fix by set argument to NULL, thus when fall through to
rc_free_device(), nothing will be done there.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] rc: winbond-cir: fix potential double free in wbcir_probe()
Wei Yongjun [Tue, 9 Apr 2013 08:43:33 +0000 (05:43 -0300)]
[media] rc: winbond-cir: fix potential double free in wbcir_probe()

Since rc_unregister_device() frees its argument, the subsequently
call to rc_free_device() on the same variable will cause a double
free bug. Fix by set argument to NULL, thus when fall through to
rc_free_device(), nothing will be done there.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] MAINTAINERS: Mark the SH VOU driver as Odd Fixes
Laurent Pinchart [Thu, 4 Apr 2013 13:31:58 +0000 (10:31 -0300)]
[media] MAINTAINERS: Mark the SH VOU driver as Odd Fixes

The driver isn't actively maintained anymore, update its status.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] soc-camera: fix typos in the default format-conversion table
Guennadi Liakhovetski [Fri, 8 Mar 2013 11:08:56 +0000 (08:08 -0300)]
[media] soc-camera: fix typos in the default format-conversion table

The default format conversion table mbus_fmt[] in soc_mediabus.c lists
"natural" conversions between media-bus and fourcc pixel formats, that are
achieved by storing data from the bus in RAM exactly as it arrives, only
possibly padding missing high or low bits. Such data acquisition mode
cannot change data endianness, therefore two locations with opposite
endianness are erroneous. This change might affest the omap1-camera driver,
existing configurations should be verified.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] ARM: daVinci: dm644x/dm355/dm365: replace V4L2_STD_525_60/625_50 with V4L2_ST...
Lad, Prabhakar [Fri, 12 Apr 2013 10:46:19 +0000 (07:46 -0300)]
[media] ARM: daVinci: dm644x/dm355/dm365: replace V4L2_STD_525_60/625_50 with V4L2_STD_NTSC/PAL

This patch replaces V4L2_STD_525_60/625_50 with V4L2_STD_NTSC/PAL
respectively as this are the proper video standards.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Reported-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] ARM: davinci: dm355 EVM: add support for VPBE display
Lad, Prabhakar [Tue, 7 Aug 2012 10:42:56 +0000 (07:42 -0300)]
[media] ARM: davinci: dm355 EVM: add support for VPBE display

add support for V4L2 video display to DM355 EVM.
Support for SD modes is provided, along with Composite
output

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] ARM: davinci: dm355: add support for v4l2 video display
Lad, Prabhakar [Tue, 9 Apr 2013 13:35:05 +0000 (10:35 -0300)]
[media] ARM: davinci: dm355: add support for v4l2 video display

Create platform devices for various video modules like venc,osd,
vpbe and v4l2 driver for dm355.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] ARM: davinci: dm365 EVM: add support for VPBE display
Lad, Prabhakar [Thu, 14 Mar 2013 07:12:34 +0000 (04:12 -0300)]
[media] ARM: davinci: dm365 EVM: add support for VPBE display

add support for V4L2 video display to DM365 EVM.
Support for SD and ED modes is provided, along with Composite
and Component outputs.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] ARM: davinci: dm365: add support for v4l2 video display
Lad, Prabhakar [Tue, 19 Mar 2013 10:34:36 +0000 (07:34 -0300)]
[media] ARM: davinci: dm365: add support for v4l2 video display

Create platform devices for various video modules like venc,osd,
vpbe and v4l2 driver for dm365.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] davinic: vpss: trivial cleanup
Lad, Prabhakar [Tue, 2 Apr 2013 11:26:32 +0000 (08:26 -0300)]
[media] davinic: vpss: trivial cleanup

this patch removes unnecessary header file inclusions and
fixes the typo's.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: davinci: vpbe: venc: move the enabling of vpss clocks to driver
Lad, Prabhakar [Fri, 22 Mar 2013 07:53:13 +0000 (04:53 -0300)]
[media] media: davinci: vpbe: venc: move the enabling of vpss clocks to driver

The vpss clocks were enabled by calling a exported function from a driver
in a machine code. calling driver code from platform code is incorrect way.
This patch fixes this issue and calls the function from driver code itself.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: davinci: vpss: enable vpss clocks
Lad, Prabhakar [Fri, 22 Mar 2013 07:53:12 +0000 (04:53 -0300)]
[media] media: davinci: vpss: enable vpss clocks

By default the VPSS clocks were enabled in capture driver
for davinci family which creates duplicates for dm355/dm365/dm644x.
This patch adds support to enable the VPSS clocks in VPSS driver,
which avoids duplication of code and also adding clock aliases.
This patch uses PM runtime API to enable/disable clock, instead
of DaVinci clock framework. con_ids for master and slave clocks of
vpss is added in pm_domain.
This patch cleanups the VPSS clock enabling in the capture driver,
and also removes the clock alias in machine file. Along side adds
a vpss slave clock for DM365 as mentioned by Sekhar
(https://patchwork.kernel.org/patch/1221261/).
The Suspend/Resume in dm644x_ccdc.c which enabled/disabled the VPSS clock
is now implemented as part of the VPSS driver.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] davinci: vpif: add pm_runtime support
Lad, Prabhakar [Tue, 2 Apr 2013 12:41:30 +0000 (09:41 -0300)]
[media] davinci: vpif: add pm_runtime support

Add pm_runtime support to the TI Davinci VPIF driver.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: davinci: kconfig: fix incorrect selects
Sekhar Nori [Tue, 12 Mar 2013 09:14:52 +0000 (06:14 -0300)]
[media] media: davinci: kconfig: fix incorrect selects

drivers/media/platform/davinci/Kconfig uses selects where
it should be using 'depends on'. This results in warnings of
the following sort when doing randconfig builds.
warning: (VIDEO_DM6446_CCDC && VIDEO_DM355_CCDC && VIDEO_ISIF && VIDEO_DAVINCI_VPBE_DISPLAY) selects VIDEO_VPSS_SYSTEM which has unmet direct dependencies (MEDIA_SUPPORT && V4L_PLATFORM_DRIVERS && ARCH_DAVINCI)
The VPIF kconfigs had a strange 'select' and 'depends on' cross
linkage which have been fixed as well by removing unneeded
VIDEO_DAVINCI_VPIF config symbol.
Similarly, remove the unnecessary VIDEO_VPSS_SYSTEM and
VIDEO_VPFE_CAPTURE. They don't select any independent functionality
and were being used to manage code dependencies which can
be handled using makefile.
Selecting video modules is now dependent on all ARCH_DAVINCI
instead of specific EVMs and SoCs earlier. This should help build
coverage. Remove unnecessary 'default y' for some config symbols.
While at it, fix the Kconfig help text to make it more readable
and fix names of modules created during module build.
Rename VIDEO_ISIF to VIDEO_DM365_ISIF as per suggestion from
Prabhakar.
This patch has only been build tested; I have tried to not break
any existing assumptions. I do not have the setup to test video,
so any test reports welcome.

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
[prabhakar.csengg@gmail.com: Fixed typo]
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] adv7180: fix querystd() method for no input signal
Vladimir Barinov [Thu, 11 Apr 2013 21:06:46 +0000 (18:06 -0300)]
[media] adv7180: fix querystd() method for no input signal

When the input signal is not detected querystd() method should return
V4L2_STD_UNKNOWN instead of previously latched analog video standard.

Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] em28xx: improve em2710/em2820 distinction
Frank Schaefer [Thu, 11 Apr 2013 18:56:47 +0000 (15:56 -0300)]
[media] em28xx: improve em2710/em2820 distinction

Chip id 18 is used by the em2710 and em2820.
The current code assumes that if the device is a camera, the chip is an em2710
and an em2820 otherwise.
But it turned out that the em2820 is also used in camera devices.
"Silvercrest 1.3 MPix" webcams for example are available with both chips.
Fortunately both variants are using different generic USD IDs which give us a
hint about the used chip.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] em28xx: fix snapshot button support
Frank Schaefer [Thu, 11 Apr 2013 18:56:01 +0000 (15:56 -0300)]
[media] em28xx: fix snapshot button support

The snapshot button support is currently broken, because module em28xx-rc is
loaded only if the device has remote control support.
Fix it by also loading this module if the device has a snapshot button.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: Fix randconfig error
Randy Dunlap [Mon, 8 Apr 2013 16:47:03 +0000 (13:47 -0300)]
[media] media: Fix randconfig error

Fix randconfig error when USB is not enabled:
ERROR: "usb_control_msg" [drivers/media/common/cypress_firmware.ko] undefined!

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] MAINTAINERS: update CYPRESS_FIRMWARE media driver
Antti Palosaari [Wed, 10 Apr 2013 00:30:41 +0000 (21:30 -0300)]
[media] MAINTAINERS: update CYPRESS_FIRMWARE media driver

It is moved to the different location and renamed.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] dt3155v4l: fix timestamp handling
Hans Verkuil [Wed, 10 Apr 2013 11:07:07 +0000 (08:07 -0300)]
[media] dt3155v4l: fix timestamp handling

Use the monotonic clock and set the timestamp_type that vb2 expects.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] dt3155v4l: fix incorrect mutex locking
Hans Verkuil [Wed, 10 Apr 2013 11:05:00 +0000 (08:05 -0300)]
[media] dt3155v4l: fix incorrect mutex locking

A mutex_unlock was missing in the 'success' path of the open() call,
and also at one error path in the same function.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] MAINTAINERS: add hdpvr entry
Hans Verkuil [Thu, 11 Apr 2013 06:36:49 +0000 (03:36 -0300)]
[media] MAINTAINERS: add hdpvr entry

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] hdpvr: allow g/s/enum/querystd when in legacy mode
Hans Verkuil [Wed, 10 Apr 2013 17:26:52 +0000 (14:26 -0300)]
[media] hdpvr: allow g/s/enum/querystd when in legacy mode

Both MythTV and gstreamer expect that they can set/get/query/enumerate the
standards, even if the input is the component input for which standards
really do not apply.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] hdpvr: add dv_timings support
Hans Verkuil [Wed, 20 Mar 2013 18:29:52 +0000 (15:29 -0300)]
[media] hdpvr: add dv_timings support

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] hdpvr: add g/querystd, remove deprecated current_norm
Hans Verkuil [Tue, 19 Mar 2013 12:53:29 +0000 (09:53 -0300)]
[media] hdpvr: add g/querystd, remove deprecated current_norm

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] hdpvr: recognize firmware version 0x1e
Hans Verkuil [Wed, 20 Mar 2013 07:23:51 +0000 (04:23 -0300)]
[media] hdpvr: recognize firmware version 0x1e

This is the latest firmware version and - it seems - the most reliable.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] hdpvr: register the video node at the end of probe
Hans Verkuil [Tue, 19 Mar 2013 12:34:58 +0000 (09:34 -0300)]
[media] hdpvr: register the video node at the end of probe

Video nodes can be used at once after registration, so make sure the full
initialization is done before registering them.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] hdpvr: small fixes
Hans Verkuil [Tue, 12 Feb 2013 12:26:30 +0000 (09:26 -0300)]
[media] hdpvr: small fixes

- return EBUSY instead of EAGAIN.
- add missing break.
- remove unnecessary buf type check (done by the core).

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] hdpvr: support device_caps in querycap
Hans Verkuil [Tue, 12 Feb 2013 12:21:36 +0000 (09:21 -0300)]
[media] hdpvr: support device_caps in querycap

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] hdpvr: add prio and control event support
Hans Verkuil [Tue, 12 Feb 2013 11:26:59 +0000 (08:26 -0300)]
[media] hdpvr: add prio and control event support

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] hdpvr: remove hdpvr_fh and just use v4l2_fh
Hans Verkuil [Sat, 6 Apr 2013 09:00:17 +0000 (06:00 -0300)]
[media] hdpvr: remove hdpvr_fh and just use v4l2_fh

This prepares the driver for priority and control event handling.
This patch also checks for correct streaming ownership and it makes a
small improvement to the encoder_cmd ioctls: always zero 'flags' and
drop the memset of 'raw' as that is already done by the v4l2 core.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] hdpvr: convert to the control framework
Hans Verkuil [Tue, 19 Mar 2013 12:30:50 +0000 (09:30 -0300)]
[media] hdpvr: convert to the control framework

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l2-dv-timings.h: add 480i59.94 and 576i50 CEA-861-E timings
Hans Verkuil [Wed, 20 Mar 2013 17:31:34 +0000 (14:31 -0300)]
[media] v4l2-dv-timings.h: add 480i59.94 and 576i50 CEA-861-E timings

These formats are supported by the HDPVR, but they were missing in the list.
Note that these formats are different from the common PAL/NTSC/SECAM formats
since all color channels are transmitted separately and so there is no PAL
or NTSC or SECAM color encoding involved.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] videodev2.h: fix incorrect V4L2_DV_FL_HALF_LINE bitmask
Hans Verkuil [Wed, 20 Mar 2013 18:26:36 +0000 (15:26 -0300)]
[media] videodev2.h: fix incorrect V4L2_DV_FL_HALF_LINE bitmask

This was set to 1 << 0 which is the same as V4L2_DV_FL_REDUCED_BLANKING.
It should be 1 << 3 instead. Luckily interlaced formats are rarely used,
which is why this bug wasn't seen until now.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] radio-si4713: add prio checking and control events
Hans Verkuil [Mon, 8 Apr 2013 10:23:32 +0000 (07:23 -0300)]
[media] radio-si4713: add prio checking and control events

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Tested-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] radio-si4713: convert to the control framework
Hans Verkuil [Mon, 8 Apr 2013 20:27:18 +0000 (17:27 -0300)]
[media] radio-si4713: convert to the control framework

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Tested-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] radio-si4713: fix g/s_frequency
Hans Verkuil [Mon, 8 Apr 2013 20:25:05 +0000 (17:25 -0300)]
[media] radio-si4713: fix g/s_frequency

- check for invalid modulators.
- clamp frequency to valid range.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Tested-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] radio-si4713: use V4L2 core lock
Hans Verkuil [Mon, 8 Apr 2013 09:31:30 +0000 (06:31 -0300)]
[media] radio-si4713: use V4L2 core lock

Simplify locking by using the V4L2 core lock mechanism. This allows us to
remove all locking from the i2c module. This will also simplify the upcoming
conversion to the control framework.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Tested-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] radio-si4713: improve querycap
Hans Verkuil [Mon, 8 Apr 2013 09:27:43 +0000 (06:27 -0300)]
[media] radio-si4713: improve querycap

Set bus_info and fill in device_caps.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Tested-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] radio-si4713: embed struct video_device instead of allocating it
Hans Verkuil [Mon, 8 Apr 2013 09:11:12 +0000 (06:11 -0300)]
[media] radio-si4713: embed struct video_device instead of allocating it

Also set the v4l2_dev pointer in struct video_device as this was missing.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Tested-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] radio-si4713: remove audout ioctls
Hans Verkuil [Tue, 29 Jan 2013 11:52:19 +0000 (08:52 -0300)]
[media] radio-si4713: remove audout ioctls

The audout ioctls are not appropriate for radio transmitters, they apply to
video output devices only. Remove them from this driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Tested-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] em28xx: fix kernel oops when watching digital TV
Hans Verkuil [Mon, 8 Apr 2013 19:25:04 +0000 (16:25 -0300)]
[media] em28xx: fix kernel oops when watching digital TV

dvb->adapter.priv should also be set to the i2c bus since that's what
em28xx_tuner_callback expects.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] videodev2.h: increase size of 'reserved' array
Hans Verkuil [Mon, 8 Apr 2013 14:53:55 +0000 (11:53 -0300)]
[media] videodev2.h: increase size of 'reserved' array

Increase the size of the 'reserved' array to give more room for future
extensions.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l2: rename VIDIOC_DBG_G_CHIP_NAME to _CHIP_INFO
Hans Verkuil [Sat, 6 Apr 2013 09:16:58 +0000 (06:16 -0300)]
[media] v4l2: rename VIDIOC_DBG_G_CHIP_NAME to _CHIP_INFO

This ioctl will be extended to return more information than just the name.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l2-ioctl: fill in name before calling vidioc_g_chip_name
Hans Verkuil [Sat, 6 Apr 2013 09:06:13 +0000 (06:06 -0300)]
[media] v4l2-ioctl: fill in name before calling vidioc_g_chip_name

That way drivers do not need to fill in the name themselves for bridge address 0.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l2: drop V4L2_CHIP_MATCH_SUBDEV_NAME
Hans Verkuil [Wed, 3 Apr 2013 07:08:19 +0000 (04:08 -0300)]
[media] v4l2: drop V4L2_CHIP_MATCH_SUBDEV_NAME

After using the new VIDIOC_DBG_G_CHIP_NAME ioctl I realized that the matching
by name possibility is useless. Just drop it and rename MATCH_SUBDEV_IDX to
just MATCH_SUBDEV.
The v4l2-dbg utility is much better placed to match by name by just enumerating
all bridge and subdev devices until chip_name.name matches.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l2: put VIDIOC_DBG_G_CHIP_NAME under ADV_DEBUG
Hans Verkuil [Wed, 27 Mar 2013 11:04:23 +0000 (08:04 -0300)]
[media] v4l2: put VIDIOC_DBG_G_CHIP_NAME under ADV_DEBUG

Only enable this ioctl if the VIDEO_ADV_DEBUG config option is set. This
prevents abuse from both userspace and kernelspace (some bridge drivers
abuse DBG_G_CHIP_IDENT, lets prevent that from happening again with this
ioctl).

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tuner-core/simple: get_rf_strength can be tuner mode specific
Hans Verkuil [Sat, 6 Apr 2013 07:41:29 +0000 (04:41 -0300)]
[media] tuner-core/simple: get_rf_strength can be tuner mode specific

The get_rf_strength op in tuner-simple is valid only for the radio mode.
But due to the way get_signal in analog_demod_ops was designed it would
overwrite the signal value with a bogus value when in TV mode.
Pass a pointer to the signal value instead, and when not in radio mode
leave it alone in the tuner-simple.
This broke in commit 030755bde42bbed133182b0ece7c7a9c759478e8
(tuner-core: call has_signal for both TV and radio) in kernel 3.6. Before
that this was working correctly. That commit did the right thing, but what
wasn't realized at the time was that tuner-simple should have been updated
as well to restrict setting the signal strength to the radio mode only.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tuner-core/tda9887: get_afc can be tuner mode specific
Hans Verkuil [Sat, 6 Apr 2013 07:35:27 +0000 (04:35 -0300)]
[media] tuner-core/tda9887: get_afc can be tuner mode specific

The get_afc op in tda9887 is valid only for the radio mode.
But due to the way get_afc in analog_demod_ops was designed it would
overwrite the afc value with a bogus value when in TV mode.
Pass a pointer to the afc value instead, and when not in radio mode
leave it alone in the tda9887.
This broke a long time ago in 2.6.19 when the get_afc op was introduced.
Before that the afc was only set for radio mode in the tda9887.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] saa7134: v4l2-compliance: clear reserved part of VBI structure
Ondrej Zary [Fri, 1 Feb 2013 23:01:21 +0000 (20:01 -0300)]
[media] saa7134: v4l2-compliance: clear reserved part of VBI structure

Make saa7134 driver more V4L2 compliant: clear reserved space of VBI
structure to make sure no garbage is left there

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] saa7134: v4l2-compliance: remove bogus g_parm
Ondrej Zary [Fri, 1 Feb 2013 23:01:20 +0000 (20:01 -0300)]
[media] saa7134: v4l2-compliance: remove bogus g_parm

Make saa7134 driver more V4L2 compliant: remove empty g_parm function

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] saa7134: v4l2-compliance: remove bogus audio input support
Ondrej Zary [Fri, 1 Feb 2013 23:01:19 +0000 (20:01 -0300)]
[media] saa7134: v4l2-compliance: remove bogus audio input support

Make saa7134 driver more V4L2 compliant: remove empty g_audio and s_audio
functions and don't set audioset in enum_input

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] saa7134: v4l2-compliance: fix g_tuner/s_tuner
Ondrej Zary [Fri, 1 Feb 2013 23:01:18 +0000 (20:01 -0300)]
[media] saa7134: v4l2-compliance: fix g_tuner/s_tuner

Make saa7134 driver more V4L2 compliant: return real frequency range in
g_tuner and fail in s_tuner for non-zero tuner

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] saa7134: v4l2-compliance: return real frequency
Ondrej Zary [Fri, 1 Feb 2013 23:01:17 +0000 (20:01 -0300)]
[media] saa7134: v4l2-compliance: return real frequency

Make saa7134 driver more V4L2 compliant: don't cache frequency in
s_frequency/g_frequency but return real one instead

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] saa7134: v4l2-compliance: use v4l2_fh to fix priority handling
Ondrej Zary [Fri, 1 Feb 2013 23:01:16 +0000 (20:01 -0300)]
[media] saa7134: v4l2-compliance: use v4l2_fh to fix priority handling

Make saa7134 driver more V4L2 compliant: remove broken priority handling
and use v4l2_fh instead

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
[hans.verkuil@cisco.com: fixed a merge conflict in saa7134.h]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] saa7134: v4l2-compliance: don't report invalid audio modes for radio
Ondrej Zary [Fri, 1 Feb 2013 23:01:15 +0000 (20:01 -0300)]
[media] saa7134: v4l2-compliance: don't report invalid audio modes for radio

Make saa7134 driver more V4L2 compliant: filter audio modes that came from
tuner - keep only MONO/STEREO in radio mode

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] saa7134: v4l2-compliance: implement V4L2_CAP_DEVICE_CAPS
Ondrej Zary [Fri, 1 Feb 2013 23:01:14 +0000 (20:01 -0300)]
[media] saa7134: v4l2-compliance: implement V4L2_CAP_DEVICE_CAPS

Make saa7134 driver more V4L2 compliant: implement V4L2_CAP_DEVICE_CAPS support
and fix all capabilities problems reported by v4l2-compliance.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] mt9p031: Use the common clock framework
Laurent Pinchart [Fri, 21 Dec 2012 19:11:55 +0000 (16:11 -0300)]
[media] mt9p031: Use the common clock framework

Configure the device external clock using the common clock framework
instead of a board code callback function.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] mt9p031: Add support for regulators
Laurent Pinchart [Tue, 8 May 2012 13:10:36 +0000 (10:10 -0300)]
[media] mt9p031: Add support for regulators

Enable the regulators when powering the sensor up, and disable them when
powering it down.
The regulators are mandatory. Boards that don't allow controlling the
sensor power lines must provide fixed voltage regulators.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] mt9p031: Use devm_* managed helpers
Laurent Pinchart [Fri, 21 Dec 2012 19:34:06 +0000 (16:34 -0300)]
[media] mt9p031: Use devm_* managed helpers

Replace kzalloc and gpio_request_one by their managed equivalents.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] mt9m032: Define MT9M032_READ_MODE1 bits
Laurent Pinchart [Wed, 26 Sep 2012 08:54:17 +0000 (05:54 -0300)]
[media] mt9m032: Define MT9M032_READ_MODE1 bits

Replace hardcoded values with #define's.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] mt9m032: Fix PLL setup
Laurent Pinchart [Tue, 25 Sep 2012 13:46:34 +0000 (10:46 -0300)]
[media] mt9m032: Fix PLL setup

The MT9M032 PLL was assumed to be identical to the MT9P031 PLL but
differs significantly. Update the registers definitions and PLL limits
according to the datasheet.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] exynos4-is: Disable debug trace by default in fimc-isp.c
Sylwester Nawrocki [Wed, 10 Apr 2013 09:42:44 +0000 (06:42 -0300)]
[media] exynos4-is: Disable debug trace by default in fimc-isp.c

Make sure the debug level is properly set initially so any debug
information is not printed to the kernel log without explicitly
enabling it.

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>
11 years ago[media] exynos4-is: Remove meaningless test before bit setting
Sylwester Nawrocki [Wed, 10 Apr 2013 09:27:22 +0000 (06:27 -0300)]
[media] exynos4-is: Remove meaningless test before bit setting

There is no need to check same bit before setting it, since we
always end up with a bit set. Remove some of the tests and make
set unconditional, in every place where all that needs to be done
is just setting a bit.

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>
11 years ago[media] exynos4-is: Rename the ISP chain configuration data structure
Sylwester Nawrocki [Wed, 10 Apr 2013 09:24:46 +0000 (06:24 -0300)]
[media] exynos4-is: Rename the ISP chain configuration data structure

More appropriate names for the ISP chain data structure.

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>
11 years ago[media] exynos4-is: Improve the ISP chain parameter count calculation
Sylwester Nawrocki [Wed, 10 Apr 2013 09:23:05 +0000 (06:23 -0300)]
[media] exynos4-is: Improve the ISP chain parameter count calculation

Instead of incrementing p_region_num field each time we set a bit
in the parameter mask calculate the number of bits set only when
this information is needed.

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>
11 years ago[media] exynos4-is: Make fimc-lite independent of struct fimc_sensor_info
Sylwester Nawrocki [Tue, 9 Apr 2013 14:11:58 +0000 (11:11 -0300)]
[media] exynos4-is: Make fimc-lite independent of struct fimc_sensor_info

Make the sensor subdevs host_data hold a pointer to struct fimc_source_info,
which is defined in the driver's public header, rather than a pointer to
struct fimc_sensor_info which is specific to exynos4-is media device driver.
The purpose of this change is to allow easier reuse of the fimc-lite module
in the exynos5-is driver, which should similarly store a pointer to struct
fimc_source_info instance in the sensor's subdev host_data.

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>
11 years ago[media] exynos4-is: Make fimc-lite independent of the pipeline->subdevs array
Sylwester Nawrocki [Mon, 8 Apr 2013 16:17:36 +0000 (13:17 -0300)]
[media] exynos4-is: Make fimc-lite independent of the pipeline->subdevs array

Get the sensor subdev by walking media graph in both cases: when the
device is used as a subdev only and through video node. This allows
to not dereference the pipeline->subdevs[] array and makes the module
more generic and easier to re-use in other media driver.

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>
11 years ago[media] exynos4-is: Move the subdev group ID definitions to public header
Sylwester Nawrocki [Tue, 9 Apr 2013 10:19:27 +0000 (07:19 -0300)]
[media] exynos4-is: Move the subdev group ID definitions to public header

Move the sub-device group ID definitions to the driver's public header
so they are available to other media drivers that need to share modules
found in exynos4-is.

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>
11 years ago[media] s5p-mfc: Remove potential uninitialized variable usage
Sylwester Nawrocki [Wed, 10 Apr 2013 10:17:52 +0000 (07:17 -0300)]
[media] s5p-mfc: Remove potential uninitialized variable usage

Make sure mem_info[] array is not used uninitialized. This prevents
following compiler warning:
drivers/media/platform/s5p-mfc/s5p_mfc.c: In function s5p_mfc_probe:
drivers/media/platform/s5p-mfc/s5p_mfc.c:1032:33: warning: mem_info[0] may be used uninitialized in this function [-Wuninitialized]
drivers/media/platform/s5p-mfc/s5p_mfc.c:1021:15: note: mem_info[0] was declared here
drivers/media/platform/s5p-mfc/s5p_mfc.c:1032:33: warning: mem_info[1] may be used uninitialized in this function [-Wuninitialized]
drivers/media/platform/s5p-mfc/s5p_mfc.c:1021:15: note: mem_info[1] was declared here

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>
11 years ago[media] s5c73m3: Fix s5c73m3-core.c compiler warning
Hans Verkuil [Mon, 8 Apr 2013 08:10:34 +0000 (05:10 -0300)]
[media] s5c73m3: Fix s5c73m3-core.c compiler warning

Fix for this compiler warning:
CC [M]  drivers/media/i2c/s5c73m3/s5c73m3-core.o
drivers/media/i2c/s5c73m3/s5c73m3-core.c: In function ‘s5c73m3_load_fw’:
drivers/media/i2c/s5c73m3/s5c73m3-core.c:360:2: warning: format ‘%d’ expects
argument of type ‘int’, but argument 4 has type ‘size_t’ [-Wformat]

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-mfc: Add support for EOS command and EOS event in video decoder
Kamil Debski [Fri, 11 Jan 2013 15:29:33 +0000 (12:29 -0300)]
[media] s5p-mfc: Add support for EOS command and EOS event in video decoder

Add support for V4L2_DEC_CMD_STOP command which will instruct MFC device
to finish decoding and release all remaining frames kept for reference to
the user. After dequeueing last decoded frame the driver will generate an
V4L2_EVENT_EOS event.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyngmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] budget: Add support for Philips Semi Sylt PCI ref. design
Peter Wiese [Thu, 4 Apr 2013 20:36:12 +0000 (17:36 -0300)]
[media] budget: Add support for Philips Semi Sylt PCI ref. design

Add support for Philips Semiconductor (now NXP) SAA7146
reference design DVB Sat card, using ALPS BSRU6 tuner.

[mchehab@redhat.com: Merge conflicts fix; email whitespacing unmangling]
Signed-off-by: Peter Wiese <peter.wiese@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] cxd2820r_t2: Multistream support (MultiPLP)
Evgeny Plehov [Mon, 8 Apr 2013 02:56:46 +0000 (23:56 -0300)]
[media] cxd2820r_t2: Multistream support (MultiPLP)

MultiPLP filtering support for CXD2820r.

Signed-off-by: Evgeny Plehov <EvgenyPlehov@ukr.net>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] cx24123: improve precision when calculating symbol rate ratio
Mauro Carvalho Chehab [Mon, 8 Apr 2013 00:11:53 +0000 (21:11 -0300)]
[media] cx24123: improve precision when calculating symbol rate ratio

Symbol rate ratio were using a rough calculus, as the code was
limited to 32 bits arithmetic. Change it to 64 bits, in order
to better estimate the bandwidth low-pass filter on the demod.
This should reduce the noise and improve reception.

Reported-by: Hans-Peter Jansen <hpj@urpla.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] mb86a20s: better name temp vars at mb86a20s_layer_bitrate()
Mauro Carvalho Chehab [Mon, 8 Apr 2013 00:07:47 +0000 (21:07 -0300)]
[media] mb86a20s: better name temp vars at mb86a20s_layer_bitrate()

Using 'i' for the guard interval temporary var is a bad idea, as
'i' is generally used by "anonymous" indexes.
Let's rename modulation, fec and guard interval temp vars with
a meaningful name, as that makes easier to understand the code
and avoids cut-and-paste types of error.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] mb86a20s: Fix estimate_rate setting
Mauro Carvalho Chehab [Mon, 8 Apr 2013 00:06:12 +0000 (21:06 -0300)]
[media] mb86a20s: Fix estimate_rate setting

As reported by Dan Carpenter <dan.carpenter@oracle.com>:
        Smatch warnings:
        drivers/media/dvb-frontends/mb86a20s.c:644 mb86a20s_layer_bitrate() error: buffer overflow 'state->estimated_rate' 3 <= 3
What happens there is that estimate_rate index should be the layer
number, and not the guard interval.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] mb86a20s: Use 'layer' instead of 'i' on all places
Mauro Carvalho Chehab [Sun, 7 Apr 2013 23:52:16 +0000 (20:52 -0300)]
[media] mb86a20s: Use 'layer' instead of 'i' on all places

We're using the anonymous 'i' to indicate the layer number
on several places on the driver. That's not good, as some
cut-and-paste type of change might be doing the wrong thing.
So, call it as "layer" everywhere.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] mb86a20s: fix audio sub-channel check
Mauro Carvalho Chehab [Sun, 7 Apr 2013 23:51:32 +0000 (20:51 -0300)]
[media] mb86a20s: fix audio sub-channel check

As reported by Dan Carpenter <dan.carpenter@oracle.com>
FYI, there are new smatch warnings show up in:
tree:   git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next master
head:   da17d7bda957ae4697b6abc0793f74fb9b50b58f
commit: 04fa725e7b1c22c583dd71a8cd85b8d997edfce3 [media] mb86a20s: Implement set_frontend cache logic
New smatch warnings:
drivers/media/dvb-frontends/mb86a20s.c:1897 mb86a20s_set_frontend() error: buffer overflow 'mb86a20s_subchannel' 8 <= 8
04fa725e Mauro Carvalho Chehab 2013-03-04  1894   if (c->isdbt_sb_subchannel > ARRAY_SIZE(mb86a20s_subchannel))
04fa725e Mauro Carvalho Chehab 2013-03-04  1895   c->isdbt_sb_subchannel = 0;
04fa725e Mauro Carvalho Chehab 2013-03-04  1896
04fa725e Mauro Carvalho Chehab 2013-03-04 @1897   state->subchannel = mb86a20s_subchannel[c->isdbt_sb_subchannel];

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] mb86a20s: Use a macro for the number of layers
Mauro Carvalho Chehab [Sun, 7 Apr 2013 23:50:34 +0000 (20:50 -0300)]
[media] mb86a20s: Use a macro for the number of layers

Instead of using the magic number "3", use NUM_LAYERS macro
on all places that are related to the ISDB-T layers.
This makes the source code a little more readable.
No functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tda8290: change magic LNA config values to enum
Ondrej Zary [Sat, 6 Apr 2013 17:29:29 +0000 (14:29 -0300)]
[media] tda8290: change magic LNA config values to enum

Use enum instead of magic values for LNA config in tda8290.
Update tda827x, tda18271 and saa7134 to use the enum too.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] saa7134: Add AverMedia A706 AverTV Satellite Hybrid+FM
Ondrej Zary [Sat, 6 Apr 2013 17:28:16 +0000 (14:28 -0300)]
[media] saa7134: Add AverMedia A706 AverTV Satellite Hybrid+FM

Add AverMedia AverTV Satellite Hybrid+FM (A706) card to saa7134 driver.
Working: analog inputs, TV, FM radio and IR remote control.
Untested: DVB-S.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tuner-core: Change config from unsigned int to void *
Ondrej Zary [Sat, 6 Apr 2013 17:21:36 +0000 (14:21 -0300)]
[media] tuner-core: Change config from unsigned int to void *

config looks like a hack that was added to tuner-core to allow some
configuration of TDA8290 tuner (it's not used by any other driver).
But with the new configuration options of tda8290 driver (no_i2c_gate
and std_map), it's no longer sufficient.
Change config to be void * instead, which allows passing tuner-dependent
config struct to drivers.
Also update saa7134 driver to reflect this change (no other driver uses this).

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tda8290: Allow custom std_map for tda18271
Ondrej Zary [Mon, 4 Feb 2013 01:48:56 +0000 (22:48 -0300)]
[media] tda8290: Allow custom std_map for tda18271

Allow specifying a custom std_map for tda18271 by external configuration.
This is required by cards that require custom std_map for analog TV or radio,
like AverMedia A706.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tda8290: Allow disabling I2C gate
Ondrej Zary [Mon, 4 Feb 2013 01:47:38 +0000 (22:47 -0300)]
[media] tda8290: Allow disabling I2C gate

Allow disabling I2C gate handling by external configuration.
This is required by cards that have all devices on a single I2C bus,
like AverMedia A706.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] cx88: kernel bz#9476: Fix tone setting for Nova-S+ model 92001
Mauro Carvalho Chehab [Fri, 5 Apr 2013 15:18:54 +0000 (12:18 -0300)]
[media] cx88: kernel bz#9476: Fix tone setting for Nova-S+ model 92001

Hauppauge Nova-S-Plus DVB-S model 92001 does not lock on horizontal
polarisation. According with the info provided at the BZ, model
92002 does.

The difference is that, on model 92001, the tone select is done via
isl6421, while, on other devices, this is done via cx24123 code.
This patch adds a way to override the demod's set_tone at isl6421
driver. In order to avoid regressions, the override is enabled
only for cx88 Nova S plus model 92001. For all other models and
devices, the set_tone is provided by the demod driver.

Patch originally proposed at bz@9476[1] by Michel Meyers and
John Donoghue but applying the original patch would break support
for all other devices based on isl6421.

[1] https://bugzilla.kernel.org/show_bug.cgi?id=9476

Tested-by: Adam Sampson <ats@offog.org>
Tested-by: Hans-Peter Jansen <hpj@urpla.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] MEDIA: ttusbir, fix double free
Jiri Slaby [Thu, 4 Apr 2013 19:32:09 +0000 (16:32 -0300)]
[media] MEDIA: ttusbir, fix double free

rc_unregister_device already calls rc_free_device to free the passed
device. But in one of ttusbir's probe fail paths, we call
rc_unregister_device _and_ rc_free_device. This is wrong and results
in a double free.
Instead, set rc to NULL resulting in rc_free_device being a noop.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] demux.h: Remove duplicated enum
Mauro Carvalho Chehab [Thu, 4 Apr 2013 16:25:30 +0000 (13:25 -0300)]
[media] demux.h: Remove duplicated enum

"enum dmx_ts_pes" and "typedef enum dmx_pes_type_t" are just the
same enum declared twice, since Kernel (2.6.12). There's no reason
to duplicate it there, and sparse complains about that:
drivers/media/dvb-core/dmxdev.c:600:55: warning: mixing different enum types
So, remove the internal define, keeping just the external one.
Internally, use only "enum dmx_ts_pes", as it is too late to drop
dmx_pes_type_t from the userspace API.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] exynos4-is: Ensure proper media pipeline state on device close
Sylwester Nawrocki [Mon, 25 Mar 2013 19:50:50 +0000 (16:50 -0300)]
[media] exynos4-is: Ensure proper media pipeline state on device close

Make sure media_entity_pipeline_stop() is called on video device
close in cases where there was VIDIOC_STREAMON ioctl and no
VIDIOC_STREAMOFF. This patch fixes media entities stream_count
state which could prevent links from being disconnected, due to
non-zero stream_count.

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>
11 years ago[media] exynos4-is: Correct input DMA YUV order configuration
Sylwester Nawrocki [Thu, 21 Mar 2013 17:22:34 +0000 (14:22 -0300)]
[media] exynos4-is: Correct input DMA YUV order configuration

This patch fixes erroneous setup of the YUV order caused by not
clearing FIMC_REG_MSCTRL_ORDER422_MASK bit field before setting
proper FIMC_REG_MSCTRL_ORDER422 bits. This resulted in false
colors for YUYV, YVYU, UYVY, VYUY color formats, depending in
what sequence those were configured by user space.
YUV order definitions are corrected so that following convention
is used:
        | byte3 | byte2 | byte1 | byte0
 -------+-------+-------+-------+------
 YCBYCR | CR    | Y     | CB    | Y
 YCRYCB | CB    | Y     | CR    | Y
 CBYCRY | Y     | CR    | Y     | CB
 CRYCBY | Y     | CB    | Y     | CR

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>
11 years ago[media] exynos4-is: Allow colorspace conversion at FIMC-LITE
Sylwester Nawrocki [Wed, 20 Mar 2013 18:31:03 +0000 (15:31 -0300)]
[media] exynos4-is: Allow colorspace conversion at FIMC-LITE

The FIMC-LITE output DMA allows to configure different YUV order
than the order at the camera input interface. Thus there is some
limited colorspace conversion possible. This patch makes the
color format variable be per FIMC-LITE input/output, rather than
a global per device. This also fixes incorrect behavior where
color format at the FIMC-LITE.N subdev's source pad is modified
by VIDIOC_S_FMT ioctl on the related video node.
YUV order definitions are corrected so that we use notation:
         | byte3 | byte2 | byte1 | byte0
  -------+-------+-------+-------+------
  YCBYCR | CR    | Y     | CB    | Y
  YCRYCB | CB    | Y     | CR    | Y
  CBYCRY | Y     | CR    | Y     | CB
  CRYCBY | Y     | CB    | Y     | CR

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>
11 years ago[media] exynos4-is: Use common driver data for all FIMC-LITE IP instances
Sylwester Nawrocki [Sat, 16 Mar 2013 20:35:10 +0000 (17:35 -0300)]
[media] exynos4-is: Use common driver data for all FIMC-LITE IP instances

There is no need to use separate variant data structure for each
FIMC-LITE IP instance. According to my knowledge there are no
differences across them on Exynos4 as well as Exynos5 SoCs. Drop
flite_variant data structure and use struct flite_drvdata instead.

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>
11 years ago[media] exynos4-is: Remove static driver data for Exynos4210 FIMC variants
Sylwester Nawrocki [Sun, 24 Feb 2013 21:29:21 +0000 (18:29 -0300)]
[media] exynos4-is: Remove static driver data for Exynos4210 FIMC variants

The Exynos platform will support only device tree based booting
from v3.10. The FIMC variant data will be parsed directly from
the device tree, hence the now unused static data can be removed.

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>
11 years ago[media] exynos4-is: Create media links for the FIMC-IS entities
Sylwester Nawrocki [Tue, 27 Nov 2012 16:29:48 +0000 (13:29 -0300)]
[media] exynos4-is: Create media links for the FIMC-IS entities

Create disabled links from the FIMC-LITE subdevs to the FIMC-IS-ISP
subdev and from FIMC-IS-ISP to all FIMC subdevs.

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>
11 years ago[media] exynos4-is: Add fimc-is subdevs registration
Sylwester Nawrocki [Thu, 21 Mar 2013 17:49:16 +0000 (14:49 -0300)]
[media] exynos4-is: Add fimc-is subdevs registration

This patch adds support for registration of the FIMC-IS device
represented by the FIMC-IS-ISP subdev to the top level media device
driver. The FIMC-IS subsystem is available on Exynos4x12 SoCs which
support only device tree based booting.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] exynos4-is: Add Exynos4x12 FIMC-IS device tree binding documentation
Sylwester Nawrocki [Tue, 26 Mar 2013 12:21:23 +0000 (09:21 -0300)]
[media] exynos4-is: Add Exynos4x12 FIMC-IS device tree binding documentation

This patch adds DT binding documentaton for the Imaging Subsystem
(camera ISP) found on Samsung Exynos4x12 SoCs.

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>
11 years ago[media] exynos4-is: Add common FIMC-IS image sensor driver
Sylwester Nawrocki [Mon, 11 Mar 2013 18:38:29 +0000 (15:38 -0300)]
[media] exynos4-is: Add common FIMC-IS image sensor driver

This patch adds a common image sensor driver and Makefile/Kconfig
to enable compilation of the whole IS driver.
The sensor subdev driver currently only handles an image sensor's
power supplies and reset signal. There is no I2C communication as
it is handled by the ISP's firmware.

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>
11 years ago[media] exynos4-is: Add FIMC-IS parameter region definitions
Sylwester Nawrocki [Mon, 11 Mar 2013 18:33:56 +0000 (15:33 -0300)]
[media] exynos4-is: Add FIMC-IS parameter region definitions

This patch adds the ISP processing parameters interface files.

Signed-off-by: Younghwan Joo <yhwan.joo@samsung.com>
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>
11 years ago[media] exynos4-is: Add FIMC-IS ISP I2C bus driver
Sylwester Nawrocki [Mon, 11 Mar 2013 18:28:18 +0000 (15:28 -0300)]
[media] exynos4-is: Add FIMC-IS ISP I2C bus driver

This patch adds the ISP I2C bus controller driver files.
Creating a standard I2C bus adapter, even if the driver doesn't
actually communicate with the hardware and it is instead
controlled by the ISP firmware running on the Cortex-A5, allows
to use standard hardware description in the device tree. As the
sensor would have actually had a standard V4L2 sub-device driver
run on the host CPU.
This approach allows to adapt the driver with a relatively small
effort should the Imaging Subsystem architecture change so that
the I2C bus is handled by the host's CPU OS, rather than the
internal FIMC-IS ARM CPU firmware. The image sensor driver could
be a standard I2C client driver, as in case of most existing
image sensors.

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>