GitHub/LineageOS/G12/android_kernel_amlogic_linux-4.9.git
10 years ago[media] rtl2832_sdr: remove plain 64-bit divisions
Antti Palosaari [Tue, 22 Jul 2014 03:18:19 +0000 (00:18 -0300)]
[media] rtl2832_sdr: remove plain 64-bit divisions

Commit 0ba2aeb6dab80920edd9cf5b93b1ea4d6913b8f3
(v4l2-ctrls: increase internal min/max/step/def to 64 bit)
changes v4l2 controls to 64-bit. Driver it not working on 32-bit
arch as it uses directly control 'step' which is changed to 64-bit.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: 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] media:platform: OMAP3 camera support needs VIDEOBUF2_DMA_CONTIG
Peter Meerwald [Fri, 4 Jul 2014 07:51:47 +0000 (04:51 -0300)]
[media] media:platform: OMAP3 camera support needs VIDEOBUF2_DMA_CONTIG

drivers/built-in.o: In function `isp_video_open':
/src/linux/drivers/media/platform/omap3isp/ispvideo.c:1253: undefined reference to `vb2_dma_contig_memops'
drivers/built-in.o: In function `omap3isp_video_init':
/src/linux/drivers/media/platform/omap3isp/ispvideo.c:1344: undefined reference to `vb2_dma_contig_init_ctx'
/src/linux/drivers/media/platform/omap3isp/ispvideo.c:1350: undefined reference to `vb2_dma_contig_cleanup_ctx'
drivers/built-in.o: In function `omap3isp_video_cleanup':
/src/linux/drivers/media/platform/omap3isp/ispvideo.c:1381: undefined reference to `vb2_dma_contig_cleanup_ctx'
make: *** [vmlinux] Error 1

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] media-device: Remove duplicated memset() in media_enum_entities()
Salva Peiró [Sat, 7 Jun 2014 14:41:44 +0000 (11:41 -0300)]
[media] media-device: Remove duplicated memset() in media_enum_entities()

After the zeroing the whole struct struct media_entity_desc u_ent,
it is no longer necessary to memset(0) its u_ent.name field.

CC: stable@vger.kernel.org
Signed-off-by: Salva Peiró <speiro@ai2.upv.es>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: subdev: Unify argument validation across IOCTLs
Sakari Ailus [Wed, 4 Jun 2014 11:22:03 +0000 (08:22 -0300)]
[media] v4l: subdev: Unify argument validation across IOCTLs

Separate validation of different argument types. There's no reason to do
this separately for every IOCTL.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: s3c-camif: Return V4L2_FIELD_NONE from pad-level set format
Laurent Pinchart [Mon, 19 May 2014 15:04:32 +0000 (12:04 -0300)]
[media] v4l: s3c-camif: Return V4L2_FIELD_NONE from pad-level set format

The bridge driver doesn't support interlaced formats, always return the
field order set to V4L2_FIELD_NONE.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: smiapp: Return V4L2_FIELD_NONE from pad-level get/set format
Laurent Pinchart [Mon, 19 May 2014 15:04:32 +0000 (12:04 -0300)]
[media] v4l: smiapp: Return V4L2_FIELD_NONE from pad-level get/set format

The SMIA++ sensors are progressive, always return the field order set to
V4L2_FIELD_NONE.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: s5k6a3: Return V4L2_FIELD_NONE from pad-level set format
Laurent Pinchart [Mon, 19 May 2014 15:04:32 +0000 (12:04 -0300)]
[media] v4l: s5k6a3: Return V4L2_FIELD_NONE from pad-level set format

The sensor is progressive, always return the field order set to
V4L2_FIELD_NONE.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: s5k5baf: Return V4L2_FIELD_NONE from pad-level set format
Laurent Pinchart [Mon, 19 May 2014 15:04:32 +0000 (12:04 -0300)]
[media] v4l: s5k5baf: Return V4L2_FIELD_NONE from pad-level set format

The sensor is progressive, always return the field order set to
V4L2_FIELD_NONE.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: s5k4ecgx: Return V4L2_FIELD_NONE from pad-level set format
Laurent Pinchart [Mon, 19 May 2014 15:04:32 +0000 (12:04 -0300)]
[media] v4l: s5k4ecgx: Return V4L2_FIELD_NONE from pad-level set format

The sensor is progressive, always return the field order set to
V4L2_FIELD_NONE.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: noon010p30: Return V4L2_FIELD_NONE from pad-level set format
Laurent Pinchart [Mon, 19 May 2014 15:04:32 +0000 (12:04 -0300)]
[media] v4l: noon010p30: Return V4L2_FIELD_NONE from pad-level set format

The sensor is progressive, always return the field order set to
V4L2_FIELD_NONE.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] davinci: vpfe: dm365: remove duplicate RSZ_LPF_INT_MASK
Dan Carpenter [Mon, 9 Jun 2014 15:10:46 +0000 (12:10 -0300)]
[media] davinci: vpfe: dm365: remove duplicate RSZ_LPF_INT_MASK

The RSZ_LPF_INT_MASK define is cut and pasted twice so we can remove the
second instance.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] media: davinci_vpfe: dm365_resizer: fix sparse warning
Lad, Prabhakar [Tue, 29 Apr 2014 06:49:34 +0000 (03:49 -0300)]
[media] media: davinci_vpfe: dm365_resizer: fix sparse warning

this patch fixes following sparse warning,
dm365_resizer.c:223:1: warning: symbol 'resizer_calculate_resize_ratios' was not declared. Should it be static?
dm365_resizer.c:313:5: warning: symbol 'resizer_configure_output_win' was not declared. Should it be static?

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] staging: media: davinci_vpfe: fix checkpatch warning
Lad, Prabhakar [Sat, 29 Mar 2014 04:56:13 +0000 (01:56 -0300)]
[media] staging: media: davinci_vpfe: fix checkpatch warning

This patch fixes following checkpatch warning,
media/davinci_vpfe/dm365_ipipe.c:1271: WARNING: Missing a blank line after declarations
media/davinci_vpfe/dm365_ipipe.c:1313: WARNING: Missing a blank line after declarations

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] mt9v032: use regmap
Philipp Zabel [Wed, 4 Jun 2014 16:57:03 +0000 (13:57 -0300)]
[media] mt9v032: use regmap

This switches all register accesses to use regmap. It allows to
use the regmap cache, tracing, and debug register dump facilities,
and removes the need to open code read-modify-writes.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] mt9v032: register v4l2 asynchronous subdevice
Philipp Zabel [Wed, 4 Jun 2014 16:57:02 +0000 (13:57 -0300)]
[media] mt9v032: register v4l2 asynchronous subdevice

Add support for registering the sensor subdevice using the v4l2-async API.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] mt9v032: add support for mt9v022 and mt9v024
Philipp Zabel [Tue, 3 Jun 2014 09:35:54 +0000 (06:35 -0300)]
[media] mt9v032: add support for mt9v022 and mt9v024

as are mt9v024 and mt9v034. With minimal changes it is possible
to support mt9v02[24] with the same driver.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] mt9v032: do not clear reserved bits in read mode register
Philipp Zabel [Tue, 3 Jun 2014 09:35:53 +0000 (06:35 -0300)]
[media] mt9v032: do not clear reserved bits in read mode register

The read mode register bits 8 and 9 are set and marked as reserved.
Don't clear them.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] mt9v032: fix hblank calculation
Philipp Zabel [Mon, 26 May 2014 13:55:51 +0000 (10:55 -0300)]
[media] mt9v032: fix hblank calculation

Since (min_row_time - crop->width) can be negative, we have to do a signed
comparison here. Otherwise max_t casts the negative value to unsigned int
and sets min_hblank to that invalid value.

Cc: stable@vger.kernel.org
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] media: davinci: vpif: fix array out of bound warnings
Prabhakar Lad [Fri, 18 Jul 2014 16:31:51 +0000 (13:31 -0300)]
[media] media: davinci: vpif: fix array out of bound warnings

This patch fixes following array out of bound warnings,

drivers/media/platform/davinci/vpif_display.c: In function 'vpif_remove':
drivers/media/platform/davinci/vpif_display.c:1389:36: warning: iteration
1u invokes undefined behavior [-Waggressive-loop-optimizations]
   vb2_dma_contig_cleanup_ctx(common->alloc_ctx);
                                    ^
drivers/media/platform/davinci/vpif_display.c:1385:2: note: containing loop
  for (i = 0; i < VPIF_DISPLAY_MAX_DEVICES; i++) {
  ^
drivers/media/platform/davinci/vpif_capture.c: In function 'vpif_remove':
drivers/media/platform/davinci/vpif_capture.c:1581:36: warning: iteration
1u invokes undefined behavior [-Waggressive-loop-optimizations]
   vb2_dma_contig_cleanup_ctx(common->alloc_ctx);
                                    ^
drivers/media/platform/davinci/vpif_capture.c:1577:2: note: containing loop
  for (i = 0; i < VPIF_CAPTURE_MAX_DEVICES; i++) {
  ^
drivers/media/platform/davinci/vpif_capture.c:1580:23: warning: array subscript
is above array bounds [-Warray-bounds]
   common = &ch->common[i];

Reported-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2-ioctl: don't set PRIV_MAGIC unconditionally in g_fmt()
Hans Verkuil [Mon, 21 Jul 2014 10:50:39 +0000 (07:50 -0300)]
[media] v4l2-ioctl: don't set PRIV_MAGIC unconditionally in g_fmt()

Regression fix:

V4L2_PIX_FMT_PRIV_MAGIC should only be set for the VIDEO_CAPTURE and
VIDEO_OUTPUT buffer types, and not for any others. In the case of
the win format this overwrote a pointer value that is passed in from
userspace.

Just set it for V4L2_BUF_TYPE_VIDEO_CAPTURE and OUTPUT only. Set
it before the callback is called, just as is done for try/s_fmt, and
again afterwards in case the driver zeroed it. The latter was missing
in try/s_fmt, so add it there as well. Currently it is quite likely
that drivers clear priv (that was needed for a long time), so it makes
sense to set it twice.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2-ioctl: set V4L2_CAP_EXT_PIX_FORMAT for device_caps
Hans Verkuil [Mon, 21 Jul 2014 07:14:46 +0000 (04:14 -0300)]
[media] v4l2-ioctl: set V4L2_CAP_EXT_PIX_FORMAT for device_caps

V4L2_CAP_EXT_PIX_FORMAT is set for capabilities, but it needs to be set for
device_caps as well: device_caps should report all caps relevant to the
device node, and this is one of them.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] DocBook media typo
Hans Verkuil [Sun, 20 Jul 2014 20:16:41 +0000 (17:16 -0300)]
[media] DocBook media typo

V4L2_CID_BASE_LASTP1 should be V4L2_CID_LASTP1. This has probably been wrong
since the earliest days of this documentation until I did a copy-and-paste
and found out that V4L2_CID_BASE_LASTP1 doesn't actually exist :-)

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2-ctrls: fix corner case in round-to-range code
Hans Verkuil [Fri, 18 Jul 2014 08:15:21 +0000 (05:15 -0300)]
[media] v4l2-ctrls: fix corner case in round-to-range code

If you have a maximum that is at the limit of what the type supports,
and the step is > 1, then you can get wrap-around errors since the
code assumes that the maximum that the type supports is
ctrl->maximum + ctrl->step / 2.

In practice this is always fine, but in artificially crafted ranges
you will hit this bug. Since this is core code it should just work.

This bug has always been there but since it doesn't cause problems in
practice it was never noticed.

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: document new VBI defines
Hans Verkuil [Fri, 18 Jul 2014 05:58:42 +0000 (02:58 -0300)]
[media] DocBook media: document new VBI defines

Add defines for the start line numbers of each field for both
525 and 625 line formats.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] videodev2.h: add defines for the VBI field start lines
Hans Verkuil [Fri, 18 Jul 2014 05:58:41 +0000 (02:58 -0300)]
[media] videodev2.h: add defines for the VBI field start lines

While working with raw and sliced VBI support in several applications
I noticed that you really need to know the start linenumbers for
each video field in order to correctly convert the start line numbers
reported by v4l2_vbi_format to the line numbers used in v4l2_sliced_vbi_format.

This patch adds four defines that specify the start lines for each
field for both 525 and 625 line standards.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] solo6x10: a few checkpatch fixes
Hans Verkuil [Thu, 17 Jul 2014 23:40:22 +0000 (20:40 -0300)]
[media] solo6x10: a few checkpatch fixes

Added a blank line after variable declarations where checkpatch
requested that, and removed the 'write to the FSF' paragraph,
again as requested.

This is in preparation of the move out of staging into drivers/media.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] go7007: update the README, fix checkpatch warnings
Hans Verkuil [Thu, 17 Jul 2014 23:40:20 +0000 (20:40 -0300)]
[media] go7007: update the README, fix checkpatch warnings

This prepares the driver for moving out of staging.

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: fix incorrect note about packed RGB and colorspace
Hans Verkuil [Thu, 17 Jul 2014 22:24:33 +0000 (19:24 -0300)]
[media] DocBook media: fix incorrect note about packed RGB and colorspace

The fact that the pixelformat is using a packed RGB format has nothing
to do with the colorspace that is being used. Those are very different
things. The colorspace decides what color a triplet of RGB numbers
actually map to. E.g. a red color with values (255, 0, 0) is a different
type of red depending on the colorspace. If the original pixelformat was
e.g. YUV in colorspace REC709, then after the conversion to RGB the
colorspace is still REC709. Unless the hardware actually converted the
colorspace as well from REC709 to sRGB, but that rarely if ever happens.

Remove this incorrect comment.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] vb2: fix bytesused == 0 handling
Hans Verkuil [Thu, 17 Jul 2014 09:53:08 +0000 (06:53 -0300)]
[media] vb2: fix bytesused == 0 handling

The original report from Nikhil was that if data_offset > 0 and bytesused == 0,
then the check in __verify_length() would fail, even though the spec says that
if bytes_used == 0, then it will be replaced by the actual length of the
buffer.

After digging into it a bit more I realized that there were several other
things wrong:

- in __verify_length() it would use the application-provided length value
  for USERPTR and the vb2 core length for other memory models, but it
  should have used the application-provided length as well for DMABUF.

- in __fill_vb2_buffer() on the other hand it would replace bytesused == 0
  by the application-provided length, even for MMAP buffers where the
  length is determined by the vb2 core.

- in __fill_vb2_buffer() it tries to figure out if all the planes have
  bytesused == 0 before it will decide to replace bytesused by length.
  However, the spec makes no such provision, and it makes for convoluted
  code. So just replace any bytesused == 0 by the proper length.
  The idea behind this was that you could use bytesused to signal empty
  planes, something that is currently not supported. But that is better
  done in the future by using one of the reserved fields in strucy v4l2_plane.

This patch fixes all these issues.

Regards,

Hans

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Cc: Nikhil Devshatwar <nikhil.nd@ti.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] msi2500: fill FMT buffer size
Antti Palosaari [Fri, 18 Jul 2014 23:56:01 +0000 (20:56 -0300)]
[media] msi2500: fill FMT buffer size

Fill FMT buffer size field in order to inform app which will be
used streaming buffer size. Currently driver doesn't allow buffer
size value proposed by application.

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] msi2500: print notice to point SDR API is not 100% stable yet
Antti Palosaari [Mon, 14 Jul 2014 16:57:22 +0000 (13:57 -0300)]
[media] msi2500: print notice to point SDR API is not 100% stable yet

SDR API is very new and surprises may occur. Due to that print
notice to remind possible users.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] msi2500: change supported formats
Antti Palosaari [Mon, 14 Jul 2014 01:27:21 +0000 (22:27 -0300)]
[media] msi2500: change supported formats

Enable two native formats, V4L2_SDR_FMT_CS8 and V4L2_SDR_FMT_CS14LE.
Move emulated formats behind module parameter.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] MAINTAINERS: update MSI3101 / MSI2500 driver location
Antti Palosaari [Mon, 14 Jul 2014 00:35:47 +0000 (21:35 -0300)]
[media] MAINTAINERS: update MSI3101 / MSI2500 driver location

MSi3101 driver is moved out of staging and renamed.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agomsi2500: move msi3101 out of staging and rename
Antti Palosaari [Sun, 13 Jul 2014 01:12:05 +0000 (04:12 +0300)]
msi2500: move msi3101 out of staging and rename

Move msi3101 out of staging and rename to msi2500.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] airspy: fill FMT buffer size
Antti Palosaari [Sat, 19 Jul 2014 00:22:08 +0000 (21:22 -0300)]
[media] airspy: fill FMT buffer size

Fill FMT buffer size field in order to inform app which will be
used streaming buffer size. Currently driver doesn't allow buffer
size value proposed by application.

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: v4l2_sdr_format buffersize field
Antti Palosaari [Fri, 18 Jul 2014 23:21:16 +0000 (20:21 -0300)]
[media] DocBook media: v4l2_sdr_format buffersize field

New field buffersize was added to inform application maximum
buffer size used. Add it to documentation 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] rtl2832_sdr: fill FMT buffer size
Antti Palosaari [Fri, 18 Jul 2014 19:22:29 +0000 (16:22 -0300)]
[media] rtl2832_sdr: fill FMT buffer size

Fill FMT buffer size field in order to inform app which will be
used streaming buffer size. Currently driver doesn't allow buffer
size value proposed by application.

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: videodev2: add buffer size to SDR format
Antti Palosaari [Fri, 18 Jul 2014 18:28:24 +0000 (15:28 -0300)]
[media] v4l: videodev2: add buffer size to SDR format

Add buffer size field to struct v4l2_sdr_format. It is used for
negotiate streaming buffer size between application and driver.

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] si2157: Add get_if_frequency callback
Matthias Schwarzott [Tue, 15 Jul 2014 07:58:40 +0000 (04:58 -0300)]
[media] si2157: Add get_if_frequency callback

This is needed for PCTV 522e support.

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] si2157: Add support for spectral inversion
Matthias Schwarzott [Tue, 15 Jul 2014 19:34:36 +0000 (16:34 -0300)]
[media] si2157: Add support for spectral inversion

This is needed for PCTV 522e support.

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] em28xx-dvb: Prepare for si2157 driver getting more parameters
Matthias Schwarzott [Tue, 15 Jul 2014 19:34:35 +0000 (16:34 -0300)]
[media] em28xx-dvb: Prepare for si2157 driver getting more parameters

Modify all users of si2157_config to correctly initialize all not
listed values to 0.

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] cxusb: Prepare for si2157 driver getting more parameters
Matthias Schwarzott [Tue, 15 Jul 2014 19:34:34 +0000 (16:34 -0300)]
[media] cxusb: Prepare for si2157 driver getting more parameters

Modify all users of si2157_config to correctly initialize all not
listed values to 0.

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] si2157: Use name si2157_ops instead of si2157_tuner_ops
Olli Salonen [Fri, 18 Jul 2014 05:41:12 +0000 (02:41 -0300)]
[media] si2157: Use name si2157_ops instead of si2157_tuner_ops

The struct prototype is defined at the beginning of the code as
"si2157_ops" but the real struct is called "si2157_tuner_ops".

This is causing the name to be empty on this info msg: si2157 16-0060:
si2157: found a '' in cold state

[crope@iki.fi: commit msg from Luis email reply]
Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Cc: Luis Alves <ljalvs@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] si2168: Support Si2168-A20 firmware downloading
Luis Alves [Thu, 17 Jul 2014 22:43:37 +0000 (19:43 -0300)]
[media] si2168: Support Si2168-A20 firmware downloading

This adds support for the Si2168-A20 firmware download.

Extracting the firmware:

wget http://www.tbsdtv.com/download/document/tbs6281/tbs6281-t2-t-driver_v1.0.0.6.zip
unzip tbs6281-t2-t-driver_v1.0.0.6.zip
dd if=tbs-6281_x64/tbs6281_64.sys of=dvb-demod-si2168-a20-01.fw count=28656 bs=1 skip=1625088

md5sum:
32e06713b33915f674bfb2c209beaea5 /lib/firmware/dvb-demod-si2168-a20-01.fw

Signed-off-by: Luis Alves <ljalvs@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] si2168: Remove testing for demod presence on probe
Luis Alves [Thu, 17 Jul 2014 20:56:44 +0000 (17:56 -0300)]
[media] si2168: Remove testing for demod presence on probe

Testing demod presence on probe fails if the demod was sleep mode.

Signed-off-by: Luis Alves <ljalvs@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] si2168: Fix i2c_add_mux_adapter return value
Luis Alves [Thu, 17 Jul 2014 19:38:08 +0000 (16:38 -0300)]
[media] si2168: Fix i2c_add_mux_adapter return value

In case of failure the return value was always 0. Return proper
error code (ENODEV) instead.

Signed-off-by: Luis Alves <ljalvs@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] si2168: improve scanning performance
Olli Salonen [Thu, 17 Jul 2014 18:43:27 +0000 (15:43 -0300)]
[media] si2168: improve scanning performance

Improve scanning performance by setting property 0301 with a value
from Windows driver.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] si2168: Set symbol rate for DVB-C
Luis Alves [Thu, 17 Jul 2014 17:31:28 +0000 (14:31 -0300)]
[media] si2168: Set symbol rate for DVB-C

This patch adds symbol rate setting to the driver.

Signed-off-by: Luis Alves <ljalvs@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] MAINTAINERS: add airspy driver
Antti Palosaari [Fri, 18 Jul 2014 00:57:14 +0000 (21:57 -0300)]
[media] MAINTAINERS: add airspy driver

Video4Linux2 driver for AirSpy SDR device.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] airspy: print notice to point SDR API is not 100% stable yet
Antti Palosaari [Fri, 18 Jul 2014 00:47:48 +0000 (21:47 -0300)]
[media] airspy: print notice to point SDR API is not 100% stable yet

Print notice on driver load: "SDR API is still slightly
experimental and functionality changes may follow". It is just
remind possible used SDR API is very new and surprises may occur.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] airspy: move out of staging into drivers/media/usb
Antti Palosaari [Fri, 18 Jul 2014 00:42:24 +0000 (21:42 -0300)]
[media] airspy: move out of staging into drivers/media/usb

Move it out of staging into media like all the other SDR drivers
too. There is no good reasons to keep these SDR drivers in staging.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] airspy: remove v4l2-compliance workaround
Antti Palosaari [Fri, 18 Jul 2014 00:15:11 +0000 (21:15 -0300)]
[media] airspy: remove v4l2-compliance workaround

v4l2-compliance is now happy with frequency ranges where both lower
and upper limit is same.

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] MAINTAINERS: update RTL2832_SDR location
Antti Palosaari [Tue, 15 Jul 2014 00:19:29 +0000 (21:19 -0300)]
[media] MAINTAINERS: update RTL2832_SDR location

It is moved out of staging to media.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] rtl2832_sdr: print notice to point SDR API is not 100% stable yet
Antti Palosaari [Tue, 15 Jul 2014 00:16:50 +0000 (21:16 -0300)]
[media] rtl2832_sdr: print notice to point SDR API is not 100% stable yet

SDR API is very new and surprises may occur. Due to that print
notice to remind possible users.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] rtl2832_sdr: put complex U16 format behind module parameter
Antti Palosaari [Tue, 15 Jul 2014 00:11:12 +0000 (21:11 -0300)]
[media] rtl2832_sdr: put complex U16 format behind module parameter

Move emulated format behind module parameter as those are not
supported. Format conversions will be on library eventually.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agortl2832_sdr: move from staging to media
Antti Palosaari [Mon, 14 Jul 2014 23:08:38 +0000 (02:08 +0300)]
rtl2832_sdr: move from staging to media

Move rtl2832_sdr driver module from staging to media.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] Kconfig: sub-driver auto-select SPI bus
Antti Palosaari [Sun, 13 Jul 2014 00:48:39 +0000 (21:48 -0300)]
[media] Kconfig: sub-driver auto-select SPI bus

Mirics MSi001 and MSi2500 drivers uses SPI bus. Due to that we need
auto-select it too.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] Kconfig: add SDR support
Antti Palosaari [Sun, 13 Jul 2014 00:43:12 +0000 (21:43 -0300)]
[media] Kconfig: add SDR support

Add software defined radio device support for media Kconfig.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] MAINTAINERS: update MSI001 driver location
Antti Palosaari [Sat, 12 Jul 2014 11:58:32 +0000 (08:58 -0300)]
[media] MAINTAINERS: update MSI001 driver location

The driver moved out of staging. Update MAINTAINERS
accordingly.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agomsi001: move out of staging
Antti Palosaari [Sat, 12 Jul 2014 11:53:22 +0000 (14:53 +0300)]
msi001: move out of staging

Move MSi001 driver from staging to drivers/media/tuners/.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agostaging/airspy: fix a compilation warning
Mauro Carvalho Chehab [Mon, 21 Jul 2014 23:29:54 +0000 (20:29 -0300)]
staging/airspy: fix a compilation warning

drivers/staging/media/airspy/airspy.c: In function 'airspy_stop_streaming':
drivers/staging/media/airspy/airspy.c:569:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
  int ret;
      ^

Cc: 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_CS14LE - 'CS14'
Antti Palosaari [Fri, 11 Jul 2014 20:04:42 +0000 (17:04 -0300)]
[media] DocBook: V4L: add V4L2_SDR_FMT_CS14LE - 'CS14'

V4L2_SDR_FMT_CS14LE is complex signed 14-bit sample format, used
for software defined radio devices.

[m.chehab@samsung.com: remove V4L2_FL_USE_FH_PRIO setting to avoid
 compilation breakage, as this flag doesn't exist anymore]

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 format CS14
Antti Palosaari [Fri, 11 Jul 2014 19:35:47 +0000 (16:35 -0300)]
[media] v4l: uapi: add SDR format CS14

V4L2_SDR_FMT_CS14LE - Complex signed 14-bit IQ sample

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_CS8 - 'CS08'
Antti Palosaari [Fri, 11 Jul 2014 18:35:05 +0000 (15:35 -0300)]
[media] DocBook: V4L: add V4L2_SDR_FMT_CS8 - 'CS08'

V4L2_SDR_FMT_CS8 is complex signed 8-bit sample format, used for
software defined radio devices.

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 format CS8
Antti Palosaari [Fri, 11 Jul 2014 16:25:14 +0000 (13:25 -0300)]
[media] v4l: uapi: add SDR format CS8

V4L2_SDR_FMT_CS8 - Complex signed 8-bit IQ sample

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] airspy: AirSpy SDR driver
Antti Palosaari [Sat, 28 Jun 2014 00:30:55 +0000 (21:30 -0300)]
[media] airspy: AirSpy SDR driver

AirSpy SDR driver.

Thanks to Youssef Touil and Benjamin Vernoux for support, help and
hardware!
http://airspy.com/

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_RU12LE - 'RU12'
Antti Palosaari [Fri, 11 Jul 2014 16:14:27 +0000 (13:14 -0300)]
[media] DocBook: V4L: add V4L2_SDR_FMT_RU12LE - 'RU12'

Document V4L2_SDR_FMT_RU12LE format. It is real unsigned 12-bit
little endian sample inside 16-bit space. Used by software defined
radio devices.

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 format RU12LE
Antti Palosaari [Fri, 27 Jun 2014 20:42:18 +0000 (17:42 -0300)]
[media] v4l: uapi: add SDR format RU12LE

V4L2_SDR_FMT_RU12LE - Real unsigned 12-bit little endian sample
inside 16-bit (2 byte). V4L2 FourCC: RU12.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: ctrls: Unlocked variants of v4l2_ctrl_s_ctrl{,_int64}()
Sakari Ailus [Thu, 12 Jun 2014 16:09:42 +0000 (13:09 -0300)]
[media] v4l: ctrls: Unlocked variants of v4l2_ctrl_s_ctrl{,_int64}()

Implement unlocked variants of v4l2_ctrl_s_ctrl() and
v4l2_ctrl_s_ctrl_int64(). As drivers need to set controls as they access
driver internal state elsewhere than in the control framework unlocked
variants of these functions become handy.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: ctrls: Provide an unlocked variant of v4l2_ctrl_modify_range()
Sakari Ailus [Thu, 12 Jun 2014 16:09:40 +0000 (13:09 -0300)]
[media] v4l: ctrls: Provide an unlocked variant of v4l2_ctrl_modify_range()

Drivers may use the v4l2_ctrl_modify_range() internally as part of other
operations that need to be both serialised using a driver's lock which can
also be used to serialise access to the control handler. Provide an unlocked
version of the function, __v4l2_ctrl_modify_range() which then may be used
by drivers for the purpose.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l: ctrls: Move control lock/unlock above the control access functions
Sakari Ailus [Thu, 12 Jun 2014 16:09:39 +0000 (13:09 -0300)]
[media] v4l: ctrls: Move control lock/unlock above the control access functions

The v4l2_ctrl_{,un}lock will be needed elsewhere. Define them before the
functions that perform operations on controls.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] saa7146: fix compile warning
Hans Verkuil [Thu, 17 Jul 2014 18:27:39 +0000 (15:27 -0300)]
[media] saa7146: fix compile warning

Fall-out from the recent struct v4l2_framebuffer change.

drivers/media/common/saa7146/saa7146_fops.c: In function ‘saa7146_vv_init’:
drivers/media/common/saa7146/saa7146_fops.c:536:6: warning: assignment from incompatible pointer type [enabled by default]
  fmt = &vv->ov_fb.fmt;
        ^

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] staging/media/davinci_vpfe/dm365_ipipeif.c: fix negativity check
Andrey Utkin [Thu, 17 Jul 2014 16:27:16 +0000 (13:27 -0300)]
[media] staging/media/davinci_vpfe/dm365_ipipeif.c: fix negativity check

[linux-3.16-rc5/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:210]:
(style) Checking if unsigned variable 'val' is less than zero.

    val = get_oneshot_mode(ipipeif->input);
    if (val < 0) {
        pr_err("ipipeif: links setup required");
        return -EINVAL;
    }

but

static int get_oneshot_mode(enum ipipeif_input_entity input)

Introduced temporary variable for negativity check.
"val" is afterwards used in a lot of bitwise operations, so changing its type
to signed is not safe, according to CERT C Secure Coding Standards chapter
INT13-C: "Use bitwise operators only on unsigned operands"
https://www.securecoding.cert.org/confluence/display/seccode/INT13-C.+Use+bitwise+operators+only+on+unsigned+operands

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80521

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] adv7180: Remove duplicate unregister call
Ian Molton [Sat, 5 Jul 2014 22:26:20 +0000 (19:26 -0300)]
[media] adv7180: Remove duplicate unregister call

This driver moved over to v4l2_async_unregister_subdev()
but still retained a call to v4l2_unregister_subdev(). Remove.

Signed-off-by: Ian Molton <ian.molton@codethink.co.uk>
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] s5p-mfc: limit the size of the CPB
panpan liu [Wed, 16 Jul 2014 01:51:33 +0000 (22:51 -0300)]
[media] s5p-mfc: limit the size of the CPB

The CPB size is limited by the hardware. Add this limit to the s_fmt.

Signed-off-by: panpan liu <panpan1.liu@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] coda: simplify IRAM setup
Philipp Zabel [Fri, 11 Jul 2014 09:36:16 +0000 (06:36 -0300)]
[media] coda: simplify IRAM setup

OVL and BTP IRAM buffers are never used, setup the bits for
for DBK/BIT/IP usage depending on CODA version in one place.
Also, use a simple allocator function and group IRAM addresses
and size in a coda_aux_buf structure.
This is done in preparation for CODA960 support.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] coda: fix internal framebuffer allocation size
Philipp Zabel [Fri, 11 Jul 2014 09:36:15 +0000 (06:36 -0300)]
[media] coda: fix internal framebuffer allocation size

This error was introduced by 5677e3b04d3b3961200aa2bb9cc715e709eafeb9
"[media] coda: update CODA7541 to firmware 1.4.50".

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] coda: fix h.264 quantization parameter range
Philipp Zabel [Fri, 11 Jul 2014 09:36:14 +0000 (06:36 -0300)]
[media] coda: fix h.264 quantization parameter range

If bitrate is not set, the encoder is running in VBR mode, with the
I- and P-frame quantization parameters configured from userspace.
For the quantization parameters, 0 is a valid value.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] coda: fix readback of CODA_RET_DEC_SEQ_FRAME_NEED
Philipp Zabel [Fri, 11 Jul 2014 09:36:13 +0000 (06:36 -0300)]
[media] coda: fix readback of CODA_RET_DEC_SEQ_FRAME_NEED

Previously we'd add one to this value, allocating one additional, superfluous
internal buffer.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] coda: fix decoder I/P/B frame detection
Philipp Zabel [Fri, 11 Jul 2014 09:36:12 +0000 (06:36 -0300)]
[media] coda: fix decoder I/P/B frame detection

Currently the rotator unit is used to copy decoded frames out into buffers
provided by videobuf2. Since the CODA reports the I/P/B frame type of the
last decoded frame, and this frame will be copied out in a later device_run,
depending on display order, we have to store the frame type until such time.
This patch also adds the B-frame type.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] s5p-mfc: Fix selective sclk_mfc init
Jacek Anaszewski [Thu, 10 Jul 2014 09:00:39 +0000 (06:00 -0300)]
[media] s5p-mfc: Fix selective sclk_mfc init

fc906b6d "Remove special clock usage in driver" removed
initialization of MFC special clock, arguing that there's
no need to do it explicitly, since it's one of MFC gate clock's
dependencies and gets enabled along with it. However, there's
no promise of keeping this hierarchy across Exynos SoC
releases, therefore this approach fails to provide a stable,
portable solution.

Out of all MFC versions, only v6 doesn't use special clock at all.
For other versions log a message only in case clk_get fails,
as not all the devices with the same MFC version require
initializing the clock explicitly.

Signed-off-by: Mateusz Zalega <m.zalega@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] s5p: fix error code path when failing to allocate DMA memory
Maurizio Lombardi [Fri, 27 Jun 2014 09:28:31 +0000 (06:28 -0300)]
[media] s5p: fix error code path when failing to allocate DMA memory

In the s5p_mfc_alloc_firmware() function there are some mistakes
where the code checks whether the DMA memory is properly allocated or
not.

First of all dma_alloc_coherent() returns NULL in case of error.
The code also checked two times fw_virt_addr, ignoring
the bank2_virt pointer.

Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] zoran: remove duplicate ZR050_MO_COMP define
Dan Carpenter [Mon, 9 Jun 2014 15:21:35 +0000 (12:21 -0300)]
[media] zoran: remove duplicate ZR050_MO_COMP define

The ZR050_MO_COMP define is cut and pasted twice so we can delete the
second instance.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] saa7164-dvb: Remove unnecessary null test
Himangi Saraogi [Tue, 15 Jul 2014 21:29:53 +0000 (18:29 -0300)]
[media] saa7164-dvb: Remove unnecessary null test

This patch removes the null test on dvb. dvb is initialized at the
beginning of the function to &port->dvb. Since port is dereferenced
prior to the null test, port must be a valid pointer, and
&port->dvb cannot be null.

The following Coccinelle script is used for detecting the change:

@r@
expression e,f;
identifier g,y;
statement S1,S2;
@@

*e = &f->g
<+...
 f->y
 ...+>
*if (e != NULL || ...)
 S1 else S2

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] radio-bcm2048.c: Fix some checkpatch.pl errors
Luke Hart [Sat, 12 Jul 2014 18:48:22 +0000 (15:48 -0300)]
[media] radio-bcm2048.c: Fix some checkpatch.pl errors

Fix the following warnings reported in radio-bcm2048.c:

WARNING: else is not generally useful after a break or return
374: FILE: radio-bcm2048.c:374:
+ return 0;
+ } else {

WARNING: else is not generally useful after a break or return
728: FILE: radio-bcm2048.c:728:
+ return BCM2048_DE_EMPHASIS_75us;
+ else

WARNING: unchecked sscanf return value
1974: FILE: radio-bcm2048.c:1974:
+ sscanf(buf, mask, &value); \

WARNING: Missing a blank line after declarations
2245: FILE: radio-bcm2048.c:2245:
+ unsigned char tmpbuf[3];
+ tmpbuf[i] = bdev->rds_info.radio_text[bdev->rd_index+i+2];

WARNING: Possible unnecessary 'out of memory' message
2601: FILE: radio-bcm2048.c:2601:
+ if (!bdev) {
+ dev_dbg(&client->dev, "Failed to alloc video device.\n");

The following error was left since it seems to be a false positive:

ERROR: Macros with complex values should be enclosed in parenthesis
+#define DEFINE_SYSFS_PROPERTY(prop, signal, size, mask, check) \
+property_write(prop, signal size, mask, check) \
+property_read(prop, size, mask)

Signed-off-by: Luke Hart <luke.hart@birchleys.eu>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] media: pvrusb2: make logging code sane
Andrey Utkin [Thu, 10 Jul 2014 12:32:25 +0000 (09:32 -0300)]
[media] media: pvrusb2: make logging code sane

The issue was discovered by static analysis. It turns out that code is
somewhat insane, being
if (x) {...} else { if (x) {...} }

Edited it to do the only reasonable thing, which is to log the
information about the failed call. The most descriptive logging commands
set is taken from original code.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=79801

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
Acked-by: Mike Isely <isely@pobox.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] staging: media: bcm2048: radio-bcm2048.c - removed IRQF_DISABLED macro
Anil Belur [Wed, 9 Jul 2014 06:06:37 +0000 (03:06 -0300)]
[media] staging: media: bcm2048: radio-bcm2048.c - removed IRQF_DISABLED macro

- this patch removes IRQF_DISABLED macro, as this is
  deprecated/noop.

Signed-off-by: Anil Belur <askb23@gmail.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] solo6x10: update GOP size, QP immediately
Andrey Utkin [Tue, 8 Jul 2014 15:23:33 +0000 (12:23 -0300)]
[media] solo6x10: update GOP size, QP immediately

Previously, it was needed to reopen device to update GOP size and
quantization parameter. Now we update device registers with new values
immediately.

Signed-off-by: Andrey Utkin <andrey.utkin@corp.bluecherry.net>
Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] solo6x10: expose encoder quantization setting as V4L2 control
Andrey Utkin [Tue, 8 Jul 2014 15:23:32 +0000 (12:23 -0300)]
[media] solo6x10: expose encoder quantization setting as V4L2 control

solo6*10 boards have configurable quantization parameter which takes
values from 0 to 31, inclusively.

This change enables setting it with ioctl VIDIOC_S_CTRL with id
V4L2_CID_MPEG_VIDEO_H264_MIN_QP.

Signed-off-by: Andrey Utkin <andrey.utkin@corp.bluecherry.net>
Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net>
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: fix number of bits filled with zeros for SRGBB12
Andreas Weber [Mon, 7 Jul 2014 14:00:05 +0000 (11:00 -0300)]
[media] DocBook media: fix number of bits filled with zeros for SRGBB12

The total number of bits is 16 (12+4). Fix it.

Signed-off-by: Andreas Weber <andy.weber.aw@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] staging/solo6x10: SOLO6X10 should select BITREVERSE
Geert Uytterhoeven [Sun, 6 Jul 2014 08:58:41 +0000 (05:58 -0300)]
[media] staging/solo6x10: SOLO6X10 should select BITREVERSE

If CONFIG_SOLO6X10=y, but CONFIG_BITREVERSE=m:

    drivers/built-in.o: In function `solo_osd_print':
    (.text+0x1c7a1f): undefined reference to `byte_rev_table'
    make: *** [vmlinux] Error 1

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] hdpvr: fix reported HDTV colorspace
Hans Verkuil [Sat, 5 Jul 2014 08:51:55 +0000 (05:51 -0300)]
[media] hdpvr: fix reported HDTV colorspace

The colorspace for HDTV is REC709, not SMPTE240M.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] cx23885: add support for Hauppauge ImpactVCB-e
Hans Verkuil [Fri, 27 Jun 2014 14:15:42 +0000 (11:15 -0300)]
[media] cx23885: add support for Hauppauge ImpactVCB-e

Add support for Hauppauge model 71100: WinTV-ImpactVCB-e
(PCIe, Retail, half height)

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2-ioctl: clips, clipcount and bitmap should not be zeroed
Hans Verkuil [Thu, 17 Jul 2014 21:45:45 +0000 (18:45 -0300)]
[media] v4l2-ioctl: clips, clipcount and bitmap should not be zeroed

Otherwise you cannot get the current clip and bitmap information from
an overlay.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2-ioctl: call g_selection before calling cropcap
Hans Verkuil [Fri, 13 Jun 2014 07:31:06 +0000 (04:31 -0300)]
[media] v4l2-ioctl: call g_selection before calling cropcap

If the vidioc_cropcap op is implemented by the driver then the v4l2
core will call that directly.

If g_selection is available, then the core cropcap implementation
uses g_selection to fill in the bounds and defrect and it sets the
pixelaspect to 1x1.

But if both are available, then I would like to use g_selection to
fill in defrect and bounds before calling cropcap. That way the
driver's cropcap implementation doesn't have to set defrect or
bounds.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2-ioctl: clear reserved field of G/S_SELECTION
Hans Verkuil [Mon, 24 Mar 2014 12:51:34 +0000 (09:51 -0300)]
[media] v4l2-ioctl: clear reserved field of G/S_SELECTION

Be sure that the reserved fields are cleared.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2-ioctl: remove pointless INFO_FL_CLEAR
Hans Verkuil [Fri, 14 Mar 2014 14:52:38 +0000 (11:52 -0300)]
[media] v4l2-ioctl: remove pointless INFO_FL_CLEAR

The edid field is the last field of the struct, so there is nothing to clear.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2-dev: don't debug poll unless the debug level > 2
Hans Verkuil [Mon, 3 Mar 2014 09:47:38 +0000 (06:47 -0300)]
[media] v4l2-dev: don't debug poll unless the debug level > 2

Some applications poll a lot, so prevent the poll message from flooding
the log.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] videodev2.h: add V4L2_FIELD_HAS_T_OR_B macro
Hans Verkuil [Wed, 26 Feb 2014 21:22:05 +0000 (18:22 -0300)]
[media] videodev2.h: add V4L2_FIELD_HAS_T_OR_B macro

Add a macro to test if the field consists of a single top
or bottom field. Anyone who needs to work with fields as opposed to
frame will need this.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] v4l2-dev: streamon/off is only a valid ioctl for video, vbi and sdr
Hans Verkuil [Thu, 10 Jul 2014 22:51:26 +0000 (19:51 -0300)]
[media] v4l2-dev: streamon/off is only a valid ioctl for video, vbi and sdr

The VIDIOC_STREAMON/OFF ioctls are not valid for radio devices, just
like the other streaming I/O ioctls. Add the streamon/off ioctls
to the other streaming I/O ioctls.

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