firefly-linux-kernel-4.4.55.git
10 years ago[media] s5p-jpeg: fix HUF_TBL_EN bit clearing path
Jacek Anaszewski [Mon, 1 Sep 2014 13:05:52 +0000 (10:05 -0300)]
[media] s5p-jpeg: fix HUF_TBL_EN bit clearing path

Use proper bitwise operator while clearing HUF_TBL_EN bit.

Signed-off-by: Jacek Anaszewski <j.anaszewski@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-jpeg: avoid overwriting JPEG_CNTL register settings
Jacek Anaszewski [Mon, 1 Sep 2014 13:05:51 +0000 (10:05 -0300)]
[media] s5p-jpeg: avoid overwriting JPEG_CNTL register settings

Take into account the JPEG_CNTL register value read before
setting SYS_INT_EN bit field.

Signed-off-by: Jacek Anaszewski <j.anaszewski@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-jpeg: remove stray call to readl
Jacek Anaszewski [Mon, 1 Sep 2014 13:05:50 +0000 (10:05 -0300)]
[media] s5p-jpeg: remove stray call to readl

There is no need to read INT_EN_REG before enabling interrupts.

Signed-off-by: Jacek Anaszewski <j.anaszewski@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-jpeg: Avoid assigning readl result
Jacek Anaszewski [Mon, 1 Sep 2014 13:05:49 +0000 (10:05 -0300)]
[media] s5p-jpeg: Avoid assigning readl result

Avoid gcc warning when -Wunused-but-set-variable is enabled.
The readl return value need not to be assigned to any variable
as the reading itself is just a part of a sequence required
for clearing the interrupt flag.

Signed-off-by: Jacek Anaszewski <j.anaszewski@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] media: s5p-mfc: rename special clock to sclk_mfc
Marek Szyprowski [Wed, 27 Aug 2014 12:36:28 +0000 (09:36 -0300)]
[media] media: s5p-mfc: rename special clock to sclk_mfc

Commit d19f405a5a8d2ed942b40f8cf7929a5a50d0cc59 ("[media] s5p-mfc: Fix
selective sclk_mfc init") added support for special clock handling
(named "sclk-mfc"). However this clock is not defined yet on any
platform, so before adding it to all Exynos platform, better rename it
to "sclk_mfc" to match the scheme used for all other special clocks on
Exynos platform.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@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] media: s5p-mfc: correct improper logs
Zhaowei Yuan [Thu, 14 Aug 2014 02:11:47 +0000 (23:11 -0300)]
[media] media: s5p-mfc: correct improper logs

This patch corrects improper logs within the code initializing hardware.

Signed-off-by: Zhaowei Yuan <zhaowei.yuan@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] media: s5p_mfc: Release ctx->ctx if failed to allocate ctx->shm
Zhaowei Yuan [Wed, 6 Aug 2014 01:22:08 +0000 (22:22 -0300)]
[media] media: s5p_mfc: Release ctx->ctx if failed to allocate ctx->shm

ctx->ctx should be released if the following allocation for ctx->shm
gets failed.

Signed-off-by: Zhaowei Yuan <zhaowei.yuan@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] solo6x10: fix sparse warnings
Hans Verkuil [Wed, 20 Aug 2014 19:27:38 +0000 (16:27 -0300)]
[media] solo6x10: fix sparse warnings

drivers/media/pci/solo6x10/solo6x10-disp.c:184:24: warning: incorrect type in assignment (different base types)
drivers/media/pci/solo6x10/solo6x10-disp.c:223:32: warning: incorrect type in assignment (different base types)

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] img-ir: fix sparse warnings
Hans Verkuil [Wed, 20 Aug 2014 21:55:23 +0000 (18:55 -0300)]
[media] img-ir: fix sparse warnings

drivers/media/rc/img-ir/img-ir-nec.c:111:23: warning: symbol 'img_ir_nec' was not declared. Should it be static?
drivers/media/rc/img-ir/img-ir-jvc.c:54:23: warning: symbol 'img_ir_jvc' was not declared. Should it be static?
drivers/media/rc/img-ir/img-ir-sony.c:120:23: warning: symbol 'img_ir_sony' was not declared. Should it be static?
drivers/media/rc/img-ir/img-ir-sharp.c:75:23: warning: symbol 'img_ir_sharp' was not declared. Should it be static?
drivers/media/rc/img-ir/img-ir-sanyo.c:82:23: warning: symbol 'img_ir_sanyo' was not declared. Should it be static?

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] cx23885: remove FSF address as per checkpatch
Hans Verkuil [Sat, 9 Aug 2014 23:43:16 +0000 (20:43 -0300)]
[media] cx23885: remove FSF address as per checkpatch

These addresses are usually out-of-date and the top-level license will
always have the right address. So drop it from these sources.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] cx23885: use video_drvdata to get cx23885_dev pointer
Hans Verkuil [Wed, 23 Apr 2014 11:43:51 +0000 (08:43 -0300)]
[media] cx23885: use video_drvdata to get cx23885_dev pointer

Use video_drvdata(file) instead of fh->dev to get the cx23885_dev
pointer. This prepares for the vb2 conversion where fh->dev (renamed
to fh->q_dev in this patch) will be removed completely.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] cx23885: drop videobuf abuse in cx23885-alsa
Hans Verkuil [Wed, 23 Apr 2014 11:27:00 +0000 (08:27 -0300)]
[media] cx23885: drop videobuf abuse in cx23885-alsa

The alsa driver uses videobuf low-level functions that are not
available in vb2, so replace them by driver-specific functions.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] cx23885: fmt, width and height are global, not per-fh
Hans Verkuil [Wed, 23 Apr 2014 10:52:07 +0000 (07:52 -0300)]
[media] cx23885: fmt, width and height are global, not per-fh

Move these fields from cx23885_fh to cx23885_dev.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] cx23885: drop unused clip fields from struct cx23885_fh
Hans Verkuil [Wed, 23 Apr 2014 10:37:35 +0000 (07:37 -0300)]
[media] cx23885: drop unused clip fields from struct cx23885_fh

There is no overlay support, so drop these unused fields.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] cx23885: drop type field from struct cx23885_fh
Hans Verkuil [Wed, 23 Apr 2014 10:35:54 +0000 (07:35 -0300)]
[media] cx23885: drop type field from struct cx23885_fh

This information is available elsewhere as well.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] cx23885: drop radio-related dead code
Hans Verkuil [Wed, 23 Apr 2014 10:22:06 +0000 (07:22 -0300)]
[media] cx23885: drop radio-related dead code

Currently no radio device nodes are ever created, so remove the dead radio
code.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] cx23885: map invalid fields to a valid field
Hans Verkuil [Wed, 23 Apr 2014 10:18:12 +0000 (07:18 -0300)]
[media] cx23885: map invalid fields to a valid field

If field format is not valid, map it as V4L2_FIELD_INTERLACED,
instead of pretending to support an invalid format.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] cx23885: fix format colorspace compliance error
Hans Verkuil [Wed, 23 Apr 2014 10:11:49 +0000 (07:11 -0300)]
[media] cx23885: fix format colorspace compliance error

Fix v4l2-compliance failure relating to formatting.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] cx23885: convert 417 to the control framework
Hans Verkuil [Wed, 23 Apr 2014 10:02:15 +0000 (07:02 -0300)]
[media] cx23885: convert 417 to the control framework

Convert the -417 source to the control framework as well.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] cx23885: convert to the control framework
Hans Verkuil [Wed, 23 Apr 2014 09:34:44 +0000 (06:34 -0300)]
[media] cx23885: convert to the control framework

This is part 1, converting the uncompressed video/vbi nodes to use
the control framework.

The next patch converts the compressed video node as well.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] cx23885: use core locking, switch to unlocked_ioctl
Hans Verkuil [Sat, 9 Aug 2014 14:29:55 +0000 (11:29 -0300)]
[media] cx23885: use core locking, switch to unlocked_ioctl

Enable core locking which allows us to safely switch to unlocked_ioctl.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] cx23885: support v4l2_fh and g/s_priority
Hans Verkuil [Wed, 23 Apr 2014 08:32:58 +0000 (05:32 -0300)]
[media] cx23885: support v4l2_fh and g/s_priority

Add support for struct v4l2_fh and priority handling.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] cx23885: fix audio input handling
Hans Verkuil [Wed, 23 Apr 2014 08:24:58 +0000 (05:24 -0300)]
[media] cx23885: fix audio input handling

Fix a bunch of v4l2-compliance errors relating to audio input handling.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] cx23885: fix querycap
Hans Verkuil [Wed, 23 Apr 2014 07:50:14 +0000 (04:50 -0300)]
[media] cx23885: fix querycap

Set device_caps to fix the v4l2-compliance QUERYCAP complaints.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] vivid: comment the unused g_edid/s_edid functions
Mauro Carvalho Chehab [Tue, 2 Sep 2014 21:01:05 +0000 (18:01 -0300)]
[media] vivid: comment the unused g_edid/s_edid functions

Those non-static functions aren't used anywhere yet. Comment them
while they're unused.

Solves the following warnings:

drivers/media/platform/vivid/vivid-vid-out.c:1120:5: warning: no previous prototype for 'vivid_vid_out_g_edid' [-Wmissing-prototypes]
 int vivid_vid_out_g_edid(struct file *file, void *_fh,
     ^
drivers/media/platform/vivid/vivid-vid-out.c:1152:5: warning: no previous prototype for 'vivid_vid_out_s_edid' [-Wmissing-prototypes]
 int vivid_vid_out_s_edid(struct file *file, void *_fh,
     ^

Cc: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] vivid: Don't declare .vidioc_overlay twice
Mauro Carvalho Chehab [Tue, 2 Sep 2014 20:58:59 +0000 (17:58 -0300)]
[media] vivid: Don't declare .vidioc_overlay twice

Removes the following warnings:

drivers/media/platform/vivid/vivid-core.c:581:2: warning: initialized field overwritten [-Woverride-init]
  .vidioc_overlay   = vidioc_overlay,
  ^
drivers/media/platform/vivid/vivid-core.c:581:2: warning: (near initialization for 'vivid_ioctl_ops.vidioc_overlay') [-Woverride-init]

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] vivid: add some missing headers
Mauro Carvalho Chehab [Tue, 2 Sep 2014 20:57:34 +0000 (17:57 -0300)]
[media] vivid: add some missing headers

That remove a few warnings:

drivers/media/platform/vivid/vivid-kthread-out.c:226:5: warning: no previous prototype for 'vivid_start_generating_vid_out' [-Wmissing-prototypes]
 int vivid_start_generating_vid_out(struct vivid_dev *dev, bool *pstreaming)
     ^
drivers/media/platform/vivid/vivid-kthread-out.c:260:6: warning: no previous prototype for 'vivid_stop_generating_vid_out' [-Wmissing-prototypes]
 void vivid_stop_generating_vid_out(struct vivid_dev *dev, bool *pstreaming)
      ^
drivers/media/platform/vivid/vivid-kthread-cap.c:806:5: warning: no previous prototype for 'vivid_start_generating_vid_cap' [-Wmissing-prototypes]
 int vivid_start_generating_vid_cap(struct vivid_dev *dev, bool *pstreaming)
     ^
drivers/media/platform/vivid/vivid-kthread-cap.c:841:6: warning: no previous prototype for 'vivid_stop_generating_vid_cap' [-Wmissing-prototypes]
 void vivid_stop_generating_vid_cap(struct vivid_dev *dev, bool *pstreaming)
      ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] vivi: remove driver, it's replaced by vivid
Hans Verkuil [Mon, 25 Aug 2014 11:49:53 +0000 (08:49 -0300)]
[media] vivi: remove driver, it's replaced by vivid

The vivid driver is a vastly superior test driver, so just drop the old
vivi driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] vivid: enable the vivid driver
Hans Verkuil [Mon, 25 Aug 2014 11:06:34 +0000 (08:06 -0300)]
[media] vivid: enable the vivid driver

Update the Kconfig and Makefile files so this driver can be compiled.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] vivid: Don't mess with namespace adding a "get_format" function
Mauro Carvalho Chehab [Tue, 2 Sep 2014 20:52:07 +0000 (17:52 -0300)]
[media] vivid: Don't mess with namespace adding a "get_format" function

This fixes a compilation error with allyesconfig:

drivers/media/platform/exynos-gsc/built-in.o: In function `get_format':
(.text+0x12f5): multiple definition of `get_format'
drivers/media/platform/vivid/built-in.o:(.text+0x4bf4): first defined here

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] vivid: add support for software defined radio
Hans Verkuil [Mon, 25 Aug 2014 11:03:32 +0000 (08:03 -0300)]
[media] vivid: add support for software defined radio

This adds support for an SDR capture device. It generates simple
sine/cosine waves. The code for that has been contributed by
Antti.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] vivid: add support for radio receivers and transmitters
Hans Verkuil [Mon, 25 Aug 2014 11:02:56 +0000 (08:02 -0300)]
[media] vivid: add support for radio receivers and transmitters

This adds radio receiver and transmitter support. Part of that is common
to both and so is placed in the radio-common source.

These drivers also support RDS. In order to generate valid RDS data a
simple RDS generator is implemented in rds-gen.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] vivid: add the Test Pattern Generator
Hans Verkuil [Mon, 25 Aug 2014 11:02:14 +0000 (08:02 -0300)]
[media] vivid: add the Test Pattern Generator

The test patterns for video capture are generated by this code. All patterns
are precalculated taking into account colorspace information, pixel and video
aspect ratios and scaling information.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] vivid: add a simple framebuffer device for overlay testing
Hans Verkuil [Mon, 25 Aug 2014 11:01:49 +0000 (08:01 -0300)]
[media] vivid: add a simple framebuffer device for overlay testing

In order to test capture and output overlays a simple framebuffer
device is created. It's bare bone, but it does the job.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] vivid: add the kthread code that controls the video rate
Hans Verkuil [Mon, 25 Aug 2014 11:00:20 +0000 (08:00 -0300)]
[media] vivid: add the kthread code that controls the video rate

Add the kthread handlers for video/vbi capture and video/vbi output.
These carefully control the rate at which frames are generated (video
capture) and accepted (video output). While the short-term jitter is
around the order of a jiffie, in the long term the rate matches the
configured framerate exactly.

The capture thread handler also takes care of the video looping and
of capture and overlay support. This is probably the most complex part
of this driver due to the many combinations of crop, compose and scaling
on the input and output, and the blending that has to be done if
overlay support is enabled as well.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] vivid: add VBI capture and output code
Hans Verkuil [Mon, 25 Aug 2014 10:56:49 +0000 (07:56 -0300)]
[media] vivid: add VBI capture and output code

This adds support for VBI capture (raw and sliced) and VBI output
(raw and sliced) to the vivid driver. In addition a VBI generator
is added that generates simple VBI data in either sliced or raw
format.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] vivid: add the video capture and output parts
Hans Verkuil [Mon, 25 Aug 2014 10:56:18 +0000 (07:56 -0300)]
[media] vivid: add the video capture and output parts

This adds the ioctl and vb2 queue support for video capture and output.
Part of this is common to both, so that is placed in a vid-common source.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] vivid: add the control handling code
Hans Verkuil [Mon, 25 Aug 2014 10:55:23 +0000 (07:55 -0300)]
[media] vivid: add the control handling code

The vivid-ctrls code sets up and processes the various V4L2 controls
that are needed by this driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] vivid: add core driver code
Hans Verkuil [Mon, 25 Aug 2014 10:54:46 +0000 (07:54 -0300)]
[media] vivid: add core driver code

This is the core driver code that creates all the driver instances
and all the configured devices.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] vivid.txt: add documentation for the vivid driver
Hans Verkuil [Mon, 25 Aug 2014 10:52:44 +0000 (07:52 -0300)]
[media] vivid.txt: add documentation for the vivid driver

The vivid Virtual Video Test Driver helps testing V4L2 applications
and can emulate V4L2 hardware. Add the documentation for this driver.

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 multiplanar read() with non-zero data_offset
Hans Verkuil [Fri, 25 Jul 2014 09:08:36 +0000 (06:08 -0300)]
[media] vb2: fix multiplanar read() with non-zero data_offset

If this is a multiplanar buf_type and the plane we want to read has a
non-zero data_offset, then that data_offset was not taken into account.

Note that read() or write() for formats with more than one plane is currently
not allowed, hence the use of 'planes[0]' since this is only relevant for a
single-plane format.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] m88ds3103: fix coding style issues
Antti Palosaari [Fri, 22 Aug 2014 00:38:29 +0000 (21:38 -0300)]
[media] m88ds3103: fix coding style issues

Fix coding style issues pointed out by checkpatch.pl.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] m88ds3103: change .set_voltage() implementation
Antti Palosaari [Fri, 22 Aug 2014 00:06:13 +0000 (21:06 -0300)]
[media] m88ds3103: change .set_voltage() implementation

Add some error checking and implement functionality a little bit
differently.

Cc: Nibble Max <nibble.max@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] m88ts2022: fix coding style issues
Antti Palosaari [Thu, 21 Aug 2014 19:22:02 +0000 (16:22 -0300)]
[media] m88ts2022: fix coding style issues

Fix coding style issues pointed out by checkpatch.pl.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] m88ts2022: fix 32bit overflow on filter calc
Antti Palosaari [Thu, 21 Aug 2014 17:02:27 +0000 (14:02 -0300)]
[media] m88ts2022: fix 32bit overflow on filter calc

Maximum satellite symbol rate used is 45000000Sps which overflows
when multiplied by 135. As final calculation result is fraction,
we could use mult_frac macro in order to keep calculation inside
32 bit number limits and prevent overflow.

Original bug and fix was provided by Nibble Max. I decided to
implement it differently as it is now.

Reported-by: Nibble Max <nibble.max@gmail.com>
Tested-by: Nibble Max <nibble.max@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] msi2500: remove unneeded local pointer on msi2500_isoc_init()
Antti Palosaari [Thu, 21 Aug 2014 15:03:58 +0000 (12:03 -0300)]
[media] msi2500: remove unneeded local pointer on msi2500_isoc_init()

There is no need to keep local copy of usb_device pointer as we
have same pointer stored and available easily from device state.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] dvb-usb-v2: remove dvb_usb_device NULL check
Antti Palosaari [Thu, 21 Aug 2014 14:19:13 +0000 (11:19 -0300)]
[media] dvb-usb-v2: remove dvb_usb_device NULL check

Reported by Dan Carpenter:

The patch d10d1b9ac97b: "[media] dvb_usb_v2: use dev_* logging
macros" from Jun 26, 2012, leads to the following Smatch complaint:

drivers/media/usb/dvb-usb-v2/dvb_usb_urb.c:31 dvb_usb_v2_generic_io()
 error: we previously assumed 'd' could be null (see line 29)

...
Remove whole check as it must not happen in any case. Driver is
totally broken if it does not have valid pointer to device.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
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 delivery system SYS_ATSC
Olli Salonen [Sun, 17 Aug 2014 05:24:49 +0000 (02:24 -0300)]
[media] si2157: Add support for delivery system SYS_ATSC

Set the property for delivery system also in case of SYS_ATSC. This
behaviour is observed in the sniffs taken with Hauppauge HVR-955Q
Windows driver.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Reviewed-by: Antti Palosaari <crope@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: DVB-T2 PLP selection implemented
CrazyCat [Sat, 16 Aug 2014 21:33:14 +0000 (18:33 -0300)]
[media] si2168: DVB-T2 PLP selection implemented

DVB-T2 PLP selection implemented for Si2168 demod.
Tested with PCTV 292e.

Signed-off-by: Evgeny Plehov <EvgenyPlehov@ukr.net>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] cxusb: Add read_mac_address for TT CT2-4400 and CT2-4650
Olli Salonen [Thu, 21 Aug 2014 12:05:01 +0000 (09:05 -0300)]
[media] cxusb: Add read_mac_address for TT CT2-4400 and CT2-4650

Read MAC address from the EEPROM.

This version two corrects a flaw in the result code returning that
did exist in the first version.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] cxusb: Add support for TechnoTrend TT-connect CT2-4650 CI
Olli Salonen [Fri, 8 Aug 2014 07:06:37 +0000 (04:06 -0300)]
[media] cxusb: Add support for TechnoTrend TT-connect CT2-4650 CI

TechnoTrend TT-connect CT2-4650 CI (0b48:3012) is an USB DVB-T2/C tuner with
the following components:

 USB interface: Cypress CY7C68013A-56LTXC
 Demodulator: Silicon Labs Si2168-A20
 Tuner: Silicon Labs Si2158-A20
 CI chip: CIMaX SP2HF

The firmware for the tuner is the same as for TechnoTrend TT-TVStick CT2-4400.
See https://www.mail-archive.com/linux-media@vger.kernel.org/msg76944.html

The demodulator needs a firmware that can be extracted from the Windows drivers.
File ttConnect4650_64.sys should be extracted from
http://www.tt-downloads.de/bda-treiber_4.1.0.4.zip (MD5 sum below).

3464bfc37a47b4032568718bacba23fb  ttConnect4650_64.sys

Then the firmware can be extracted:
dd if=ttConnect4650_64.sys ibs=1 skip=273376 count=6424 of=dvb-demod-si2168-a20-01.fw

The SP2 CI module requires a definition of a function cxusb_tt_ct2_4650_ci_ctrl
that is passed on to the SP2 driver and called back for CAM operations.

[crope@iki.fi: meld USB ID define patch to this]
Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] sp2: Add I2C driver for CIMaX SP2 common interface module
Olli Salonen [Fri, 8 Aug 2014 07:06:35 +0000 (04:06 -0300)]
[media] sp2: Add I2C driver for CIMaX SP2 common interface module

Driver for the CIMaX SP2 common interface chip. It is very much based on
the existing cimax2 driver for cx23885, but should be more reusable. The
product has been sold with name Atmel T90FJR as well and the data sheets
for that chip seem to be publicly available.

It seems that the USB device that I have and the cx23885 based devices will
need to interact differently with the chip for the CAM operations. Thus
there is one callback function that is passed on to the sp2 driver
(see function sp2_ci_op_cam for that one).

IRQ functionality is not included currently (not needed by USB devices
and I don't have a PCIe device for development).

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] cxusb: add ts mode setting for TechnoTrend CT2-4400
Olli Salonen [Mon, 11 Aug 2014 19:58:12 +0000 (16:58 -0300)]
[media] cxusb: add ts mode setting for TechnoTrend CT2-4400

TS mode must be set in the existing TechnoTrend CT2-4400 driver.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] em28xx: add ts mode setting for PCTV 292e
Olli Salonen [Mon, 11 Aug 2014 19:58:11 +0000 (16:58 -0300)]
[media] em28xx: add ts mode setting for PCTV 292e

TS mode must be set in the existing PCTV 292e driver.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Reviewed-by: Antti Palosaari <crope@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: add ts_mode setting and move to si2168_init
Olli Salonen [Mon, 11 Aug 2014 19:58:10 +0000 (16:58 -0300)]
[media] si2168: add ts_mode setting and move to si2168_init

Luis Alves submitted a TS mode patch to si2168 earlier, but the
patch was rejected due to a small issue. Here is a working version.
Also, setting of TS mode is moved from si2168_set_frontend to
si2168_init.

This patch adds the TS mode as a config option for the si2168 demod:
- ts_mode added to config struct.
- Possible (interesting) values are
   * Parallel mode = 0x06
   * Serial mode = 0x03

Currently the modules using this demod only use parallel mode.
Patches for these modules later in this patch series.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] m88ds3103: implement set voltage and TS clock
nibble.max [Mon, 11 Aug 2014 04:22:45 +0000 (01:22 -0300)]
[media] m88ds3103: implement set voltage and TS clock

Implement set voltage operation.
Separate TS clock as a own configuration parameter.
Add TS clock polarity parameter.

[crope@iki.fi: merge em28xx driver m88ds3103 config change patch
to that one, in order to keep build unbroken]

Signed-off-by: Nibble Max <nibble.max@gmail.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] si2157: clean logging
Olli Salonen [Tue, 5 Aug 2014 12:03:54 +0000 (09:03 -0300)]
[media] si2157: clean logging

Same thing for si2157 as Antti did earlier for tda18212:

There is no need to print module name nor function name as those
are done by kernel logging system when dev_xxx logging is used and
driver is proper I2C driver.

While here, fix a typo ("unknown") in si2157_init.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Reviewed-by: Antti Palosaari <crope@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: clean logging
Olli Salonen [Tue, 5 Aug 2014 11:54:08 +0000 (08:54 -0300)]
[media] si2168: clean logging

Same thing for si2168 as Antti did earlier for tda18212:

There is no need to print module name nor function name as those
are done by kernel logging system when dev_xxx logging is used and
driver is proper I2C driver.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] media: check status of dmxdev->exit in poll functions of demux&dvr
Changbing Xiong [Thu, 21 Aug 2014 02:05:40 +0000 (23:05 -0300)]
[media] media: check status of dmxdev->exit in poll functions of demux&dvr

when usb-type tuner is pulled out, user applications did not close device's FD,
and go on polling the device, we should return POLLERR directly.

Signed-off-by: Changbing Xiong <cb.xiong@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] media: correct return value in dvb_demux_poll
Changbing Xiong [Thu, 21 Aug 2014 02:05:07 +0000 (23:05 -0300)]
[media] media: correct return value in dvb_demux_poll

Data type of return value is unsigned int, but in function of dvb_demux_poll,
when the pointer of dmxdevfilter equals NULL, it will return -EINVAL, which
is invalid.

Signed-off-by: Changbing Xiong <cb.xiong@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] media: fix kernel deadlock due to tuner pull-out while playing
Changbing Xiong [Thu, 21 Aug 2014 02:04:25 +0000 (23:04 -0300)]
[media] media: fix kernel deadlock due to tuner pull-out while playing

Normally, ADAP_STREAMING bit is set in dvb_usb_start_feed and cleared in
dvb_usb_stop_feed.

But in exceptional cases, for example, when the tv is playing programs
and the tuner is pulled out, then dvb_usbv2_disconnect is called.

In such case, it will first call dvb_usbv2_adapter_frontend_exit to stop
dvb_frontend_thread, and then call dvb_usbv2_adapter_dvb_exit to clear
ADAP_STREAMING bit.

At this point, if dvb_frontend_thread is sleeping and waiting for
ADAP_STREAMING to be cleared to get out of sleep. then
dvb_frontend_thread can never be stoped, because clearing ADAP_STREAMING
bit is performed after dvb_frontend_thread is stopped (i.e. performed in
dvb_usbv2_adapter_dvb_exit).

So, deadlock:

[  240.822037] INFO: task khubd:497 blocked for more than 120 seconds.
[  240.822655] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  240.830493] khubd           D c0013b3c     0   497      2 0x00000000
[  240.836996] [<c0013b3c>] (__schedule+0x200/0x54c) from [<c00110f4>] (schedule_timeout+0x14c/0x19c)
[  240.845940] [<c00110f4>] (schedule_timeout+0x14c/0x19c) from [<c00137f4>] (wait_for_common+0xac/0x150)
[  240.855234] [<c00137f4>] (wait_for_common+0xac/0x150) from [<c004989c>] (kthread_stop+0x58/0x90)
[  240.864004] [<c004989c>] (kthread_stop+0x58/0x90) from [<c03b2ebc>] (dvb_frontend_stop+0x3c/0x9c)
[  240.872849] [<c03b2ebc>] (dvb_frontend_stop+0x3c/0x9c) from [<c03b2f3c>] (dvb_unregister_frontend+0x20/0xd8)
[  240.882666] [<c03b2f3c>] (dvb_unregister_frontend+0x20/0xd8) from [<c03ed938>] (dvb_usbv2_exit+0x68/0xfc)
[  240.892204] [<c03ed938>] (dvb_usbv2_exit+0x68/0xfc) from [<c03eda18>] (dvb_usbv2_disconnect+0x4c/0x70)
[  240.901499] [<c03eda18>] (dvb_usbv2_disconnect+0x4c/0x70) from [<c031c050>] (usb_unbind_interface+0x58/0x188)
[  240.911395] [<c031c050>] (usb_unbind_interface+0x58/0x188) from [<c02c3e78>] (__device_release_driver+0x74/0xd0)
[  240.921544] [<c02c3e78>] (__device_release_driver+0x74/0xd0) from [<c02c3ef0>] (device_release_driver+0x1c/0x28)
[  240.931697] [<c02c3ef0>] (device_release_driver+0x1c/0x28) from [<c02c39b8>] (bus_remove_device+0xc4/0xe4)
[  240.941332] [<c02c39b8>] (bus_remove_device+0xc4/0xe4) from [<c02c1344>] (device_del+0xf4/0x178)
[  240.950106] [<c02c1344>] (device_del+0xf4/0x178) from [<c0319eb0>] (usb_disable_device+0xa0/0x1c8)
[  240.959040] [<c0319eb0>] (usb_disable_device+0xa0/0x1c8) from [<c03128b4>] (usb_disconnect+0x88/0x188)
[  240.968326] [<c03128b4>] (usb_disconnect+0x88/0x188) from [<c0313edc>] (hub_thread+0x4d0/0x1200)
[  240.977100] [<c0313edc>] (hub_thread+0x4d0/0x1200) from [<c0049690>] (kthread+0xa4/0xb0)
[  240.985174] [<c0049690>] (kthread+0xa4/0xb0) from [<c0009118>] (ret_from_fork+0x14/0x3c)
[  240.993259] INFO: task kdvb-ad-0-fe-0:3256 blocked for more than 120 seconds.
[  241.000349] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  241.008162] kdvb-ad-0-fe-0  D c0013b3c     0  3256      2 0x00000000
[  241.014507] [<c0013b3c>] (__schedule+0x200/0x54c) from [<c03eda44>] (wait_schedule+0x8/0x10)
[  241.022924] [<c03eda44>] (wait_schedule+0x8/0x10) from [<c001120c>] (__wait_on_bit+0x74/0xb8)
[  241.031434] [<c001120c>] (__wait_on_bit+0x74/0xb8) from [<c00112b8>] (out_of_line_wait_on_bit+0x68/0x70)
[  241.040902] [<c00112b8>] (out_of_line_wait_on_bit+0x68/0x70) from [<c03e5e88>] (dvb_usb_fe_sleep+0xf4/0xfc)
[  241.050618] [<c03e5e88>] (dvb_usb_fe_sleep+0xf4/0xfc) from [<c03b4b74>] (dvb_frontend_thread+0x124/0x4e8)
[  241.060164] [<c03b4b74>] (dvb_frontend_thread+0x124/0x4e8) from [<c0049690>] (kthread+0xa4/0xb0)
[  241.068929] [<c0049690>] (kthread+0xa4/0xb0) from [<c0009118>] (ret_from_fork+0x14/0x3c)

Fix it by calling dvb_usbv2_adapter_frontend_exit() latter.

Test enviroment: odroidx2 + Hauppauge(WinTV-Aero-M)

Signed-off-by: Changbing Xiong <cb.xiong@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] omap: be sure that MMU is there for COMPILE_TEST
Mauro Carvalho Chehab [Tue, 26 Aug 2014 19:51:56 +0000 (16:51 -0300)]
[media] omap: be sure that MMU is there for COMPILE_TEST

COMPILE_TEST fail on (some) archs without MMU.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] be sure that HAS_DMA is enabled for vb2-dma-contig
Mauro Carvalho Chehab [Tue, 26 Aug 2014 19:45:39 +0000 (16:45 -0300)]
[media] be sure that HAS_DMA is enabled for vb2-dma-contig

vb2-dma-contig depends on HAS_DMA, but the Kbuild doesn't take
it into account at select.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] enable COMPILE_TEST for media drivers
Mauro Carvalho Chehab [Wed, 20 Aug 2014 19:21:35 +0000 (13:21 -0600)]
[media] enable COMPILE_TEST for media drivers

There are several arch-specific media drivers that don't
require asm-specific includes and can be successfully
compiled on x86. Add COMPILE_TEST dependency for them, in
order to allow a broader test on those drivers.

That helps static analysis tools like Coverity to discover
eventual troubles there.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] enable COMPILE_TEST for OMAP2 vout
Mauro Carvalho Chehab [Wed, 20 Aug 2014 19:56:21 +0000 (13:56 -0600)]
[media] enable COMPILE_TEST for OMAP2 vout

We don't need anything special to enable COMPILE_TEST for
this driver.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] allow COMPILE_TEST for SAMSUNG_EXYNOS4_IS
Mauro Carvalho Chehab [Wed, 20 Aug 2014 19:50:03 +0000 (13:50 -0600)]
[media] allow COMPILE_TEST for SAMSUNG_EXYNOS4_IS

That helps some static checks, so enable it. While there, it was
noticed that linux/sizes.h was missing:

drivers/media/platform/exynos4-is/mipi-csis.c: In function â€˜s5pcsis_s_rx_buffer’:
drivers/media/platform/exynos4-is/mipi-csis.c:114:31: error: â€˜SZ_4K’ undeclared (first use in this function)
 #define S5PCSIS_PKTDATA_SIZE  SZ_4K
                               ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] enable COMPILE_TEST for ti-vbe
Mauro Carvalho Chehab [Wed, 20 Aug 2014 19:41:56 +0000 (13:41 -0600)]
[media] enable COMPILE_TEST for ti-vbe

Allowing COMPILE_TEST here is trivial, but there's one missing
header to be added:

drivers/media/platform/ti-vpe/vpe.c: In function â€˜vpe_probe’:
drivers/media/platform/ti-vpe/vpe.c:2266:56: error: â€˜SZ_32K’ undeclared (first use in this function)
  dev->base = devm_ioremap(&pdev->dev, dev->res->start, SZ_32K);
                                                        ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] enable COMPILE_TEST for MX2 eMMa-PrP driver
Mauro Carvalho Chehab [Wed, 20 Aug 2014 19:35:22 +0000 (13:35 -0600)]
[media] enable COMPILE_TEST for MX2 eMMa-PrP driver

By allowing compilation on all archs, we can use static
analysis tools to test this driver.

In order to do that, replace asm/sizes.h by its generic
name (linux/sizes.h), with should keep doing the right
thing.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years agoRevert "[media] staging: omap4iss: copy paste error in iss_get_clocks"
Mauro Carvalho Chehab [Tue, 26 Aug 2014 18:04:34 +0000 (15:04 -0300)]
Revert "[media] staging: omap4iss: copy paste error in iss_get_clocks"

This patch readded a call to iss_put_clocks(), with was removed
by changeset 1153be56a105, causing a compilation breakage.

This reverts commit d4b32646468088323f27a7788ce3b07191015142.

10 years ago[media] s5p-jpeg: Get rid of a warning
Mauro Carvalho Chehab [Tue, 26 Aug 2014 14:23:58 +0000 (11:23 -0300)]
[media] s5p-jpeg: Get rid of a warning

drivers/media/platform/s5p-jpeg/jpeg-hw-s5p.c: In function 's5p_jpeg_clear_int':
drivers/media/platform/s5p-jpeg/jpeg-hw-s5p.c:327:16: warning: variable 'reg' set but not used [-Wunused-but-set-variable]
  unsigned long reg;
                ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] atmel-isi: get rid of a warning
Mauro Carvalho Chehab [Tue, 26 Aug 2014 14:21:43 +0000 (11:21 -0300)]
[media] atmel-isi: get rid of a warning

drivers/media/platform/soc_camera/atmel-isi.c: In function 'start_streaming':
drivers/media/platform/soc_camera/atmel-isi.c:387:6: warning: variable 'sr' set but not used [-Wunused-but-set-variable]
  u32 sr = 0;
      ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] mx2_camera: get rid of a warning
Mauro Carvalho Chehab [Tue, 26 Aug 2014 14:20:42 +0000 (11:20 -0300)]
[media] mx2_camera: get rid of a warning

drivers/media/platform/soc_camera/mx2_camera.c: In function 'mx27_camera_emma_prp_reset':
drivers/media/platform/soc_camera/mx2_camera.c:812:6: warning: variable 'cntl' set but not used [-Wunused-but-set-variable]
  u32 cntl;
      ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] exynos4-is/media-dev: get rid of a warning for a dead code
Mauro Carvalho Chehab [Tue, 26 Aug 2014 14:19:18 +0000 (11:19 -0300)]
[media] exynos4-is/media-dev: get rid of a warning for a dead code

drivers/media/platform/exynos4-is/media-dev.c: In function 'fimc_md_link_notify':
drivers/media/platform/exynos4-is/media-dev.c:1102:4: warning: suggest braces around empty body in an 'else' statement [-Wempty-body]
    ; /* TODO: Link state change validation */
    ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] mipi-csis: get rid of a warning
Mauro Carvalho Chehab [Tue, 26 Aug 2014 14:17:16 +0000 (11:17 -0300)]
[media] mipi-csis: get rid of a warning

drivers/media/platform/exynos4-is/mipi-csis.c: In function 's5pcsis_parse_dt':
drivers/media/platform/exynos4-is/mipi-csis.c:756:2: warning: comparison is always false due to limited range of data type [-Wtype-limits]
  if (state->index < 0 || state->index >= CSIS_MAX_ENTITIES)
  ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] s5p_mfc: get rid of several warnings
Mauro Carvalho Chehab [Tue, 26 Aug 2014 14:13:47 +0000 (11:13 -0300)]
[media] s5p_mfc: get rid of several warnings

drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:826:5: warning: no previous prototype for 'vidioc_decoder_cmd' [-Wmissing-prototypes]
 int vidioc_decoder_cmd(struct file *file, void *priv,
     ^
drivers/media/platform/s5p-mfc/s5p_mfc.c: In function 's5p_mfc_runtime_resume':
drivers/media/platform/s5p-mfc/s5p_mfc.c:1314:6: warning: variable 'pre_power' set but not used [-Wunused-but-set-variable]
  int pre_power;
      ^
drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v5.c:163:25: warning: no previous prototype for 's5p_mfc_init_hw_cmds_v5' [-Wmissing-prototypes]
 struct s5p_mfc_hw_cmds *s5p_mfc_init_hw_cmds_v5(void)
                         ^
drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v6.c:156:25: warning: no previous prototype for 's5p_mfc_init_hw_cmds_v6' [-Wmissing-prototypes]
 struct s5p_mfc_hw_cmds *s5p_mfc_init_hw_cmds_v6(void)
                         ^
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c: In function 's5p_mfc_run_dec_frame':
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c:1189:15: warning: variable 'index' set but not used [-Wunused-but-set-variable]
  unsigned int index;
               ^
drivers/media/platform/s5p-mfc/s5p_mfc_enc.c: In function 'cleanup_ref_queue':
drivers/media/platform/s5p-mfc/s5p_mfc_enc.c:742:27: warning: variable 'mb_c_addr' set but not used [-Wunused-but-set-variable]
  unsigned long mb_y_addr, mb_c_addr;
                           ^
drivers/media/platform/s5p-mfc/s5p_mfc_enc.c:742:16: warning: variable 'mb_y_addr' set but not used [-Wunused-but-set-variable]
  unsigned long mb_y_addr, mb_c_addr;
                ^
drivers/media/platform/s5p-mfc/s5p_mfc_enc.c: At top level:
drivers/media/platform/s5p-mfc/s5p_mfc_enc.c:1684:5: warning: no previous prototype for 'vidioc_encoder_cmd' [-Wmissing-prototypes]
 int vidioc_encoder_cmd(struct file *file, void *priv,
     ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] s5p_mfc_ctrl: add missing s5p_mfc_ctrl.h header
Mauro Carvalho Chehab [Tue, 26 Aug 2014 13:58:23 +0000 (10:58 -0300)]
[media] s5p_mfc_ctrl: add missing s5p_mfc_ctrl.h header

That gets rid of the following warnings:

drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c:119:5: warning: no previous prototype for 's5p_mfc_release_firmware' [-Wmissing-prototypes]
 int s5p_mfc_release_firmware(struct s5p_mfc_dev *dev)
     ^
drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c:132:5: warning: no previous prototype for 's5p_mfc_reset' [-Wmissing-prototypes]
 int s5p_mfc_reset(struct s5p_mfc_dev *dev)
     ^
drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c:214:5: warning: no previous prototype for 's5p_mfc_init_hw' [-Wmissing-prototypes]
 int s5p_mfc_init_hw(struct s5p_mfc_dev *dev)
     ^
drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c:291:6: warning: no previous prototype for 's5p_mfc_deinit_hw' [-Wmissing-prototypes]
 void s5p_mfc_deinit_hw(struct s5p_mfc_dev *dev)
      ^
drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c:301:5: warning: no previous prototype for 's5p_mfc_sleep' [-Wmissing-prototypes]
 int s5p_mfc_sleep(struct s5p_mfc_dev *dev)
     ^
drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c:330:5: warning: no previous prototype for 's5p_mfc_wakeup' [-Wmissing-prototypes]
 int s5p_mfc_wakeup(struct s5p_mfc_dev *dev)
     ^
drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c:378:5: warning: no previous prototype for 's5p_mfc_open_mfc_inst' [-Wmissing-prototypes]
 int s5p_mfc_open_mfc_inst(struct s5p_mfc_dev *dev, struct s5p_mfc_ctx *ctx)
     ^
drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c:420:6: warning: no previous prototype for 's5p_mfc_close_mfc_inst' [-Wmissing-prototypes]
 void s5p_mfc_close_mfc_inst(struct s5p_mfc_dev *dev, struct s5p_mfc_ctx *ctx)
      ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] fimc-is-param: get rid of warnings
Mauro Carvalho Chehab [Tue, 26 Aug 2014 13:56:24 +0000 (10:56 -0300)]
[media] fimc-is-param: get rid of warnings

In file included from drivers/media/platform/exynos4-is/fimc-is-param.c:31:0:
drivers/media/platform/exynos4-is/fimc-is-errno.h:245:20: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
 const char * const fimc_is_strerr(unsigned int error);
                    ^
drivers/media/platform/exynos4-is/fimc-is-errno.h:246:20: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
 const char * const fimc_is_param_strerr(unsigned int error);
                    ^
drivers/media/platform/exynos4-is/fimc-is-param.c: In function 'fimc_is_set_initial_params':
drivers/media/platform/exynos4-is/fimc-is-param.c:670:23: warning: variable 'sensor' set but not used [-Wunused-but-set-variable]
  struct sensor_param *sensor;
                       ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] g2d: remove unused var
Mauro Carvalho Chehab [Tue, 26 Aug 2014 13:52:56 +0000 (10:52 -0300)]
[media] g2d: remove unused var

drivers/media/platform/s5p-g2d/g2d.c: In function 'job_abort':
drivers/media/platform/s5p-g2d/g2d.c:493:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
  int ret;
      ^

The job_abort function returns void. No sense to get the
returned argument, if this won't be used.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] s5p-jpeg: get rid of some warnings
Mauro Carvalho Chehab [Tue, 26 Aug 2014 13:50:23 +0000 (10:50 -0300)]
[media] s5p-jpeg: get rid of some warnings

Declare this as static:

drivers/media/platform/s5p-jpeg/jpeg-core.c:732:6: warning: no previous prototype for 'exynos4_jpeg_set_huff_tbl' [-Wmissing-prototypes]
 void exynos4_jpeg_set_huff_tbl(void __iomem *base)
      ^

And don't compile this dead code, while not needed:
drivers/media/platform/s5p-jpeg/jpeg-hw-exynos3250.c:236:14: warning: no previous prototype for 'exynos3250_jpeg_get_y' [-Wmissing-prototypes]
 unsigned int exynos3250_jpeg_get_y(void __iomem *regs)
              ^
drivers/media/platform/s5p-jpeg/jpeg-hw-exynos3250.c:241:14: warning: no previous prototype for 'exynos3250_jpeg_get_x' [-Wmissing-prototypes]
 unsigned int exynos3250_jpeg_get_x(void __iomem *regs)
              ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] omap_vout: Get rid of a few warnings
Mauro Carvalho Chehab [Tue, 26 Aug 2014 13:46:49 +0000 (10:46 -0300)]
[media] omap_vout: Get rid of a few warnings

drivers/media/platform/omap/omap_vout.c: In function 'omapvid_setup_overlay':
drivers/media/platform/omap/omap_vout.c:372:29: warning: variable 'pixheight' set but not used [-Wunused-but-set-variable]
  int cropheight, cropwidth, pixheight, pixwidth;
                             ^
drivers/media/platform/omap/omap_vout.c: In function 'vidioc_s_ctrl':
drivers/media/platform/omap/omap_vout.c:1454:24: warning: variable 'ovl' set but not used [-Wunused-but-set-variable]
   struct omap_overlay *ovl;
                        ^
drivers/media/platform/omap/omap_vout.c: In function 'vidioc_reqbufs':
drivers/media/platform/omap/omap_vout.c:1492:55: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
  if ((req->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) || (req->count < 0))
                                                       ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] omap: fix compilation if !VIDEO_OMAP2_VOUT_VRFB
Mauro Carvalho Chehab [Fri, 22 Aug 2014 16:11:06 +0000 (11:11 -0500)]
[media] omap: fix compilation if !VIDEO_OMAP2_VOUT_VRFB

When CONFIG_VIDEO_OMAP2_VOUT_VRFB is disabled, the compilation
will fail, as the function stubs are wrong. Also, as they weren't
declared as static inline, lots of warnings will be generated.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] gsc: Use %pad for dma_addr_t
Mauro Carvalho Chehab [Fri, 22 Aug 2014 15:57:21 +0000 (10:57 -0500)]
[media] gsc: Use %pad for dma_addr_t

drivers/media/platform/exynos-gsc/gsc-core.c:855:2: note: in expansion of macro 'pr_debug'
  pr_debug("ADDR: y= 0x%X  cb= 0x%X cr= 0x%X ret= %d",
  ^
include/linux/dynamic_debug.h:64:16: warning: format '%X' expects argument of type 'unsigned int', but argument 4 has type 'dma
_addr_t' [-Wformat=]
  static struct _ddebug  __aligned(8)   \
                ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] dvb_frontend: estimate bandwidth also for DVB-S/S2/Turbo
Mauro Carvalho Chehab [Fri, 22 Aug 2014 15:30:17 +0000 (10:30 -0500)]
[media] dvb_frontend: estimate bandwidth also for DVB-S/S2/Turbo

The needed bandwidth can be estimated using the symbol rate and
the rolloff factor. This could be useful for the frontend drivers,
as they don't need to calculate it themselves.

Reported-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] dm644x_ccdc: use unsigned long for fpc_table_addr
Mauro Carvalho Chehab [Fri, 22 Aug 2014 12:00:42 +0000 (07:00 -0500)]
[media] dm644x_ccdc: use unsigned long for fpc_table_addr

The fpc_table_addr is used as an unsigned integer that stores
an address. At the Kernel, the proper type for such integers
is unsigned long.

This generates lots of warnings when compiling on 64 bits.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] vpif: don't cast pointers to int
Mauro Carvalho Chehab [Fri, 22 Aug 2014 11:38:14 +0000 (06:38 -0500)]
[media] vpif: don't cast pointers to int

Shut up several warnings about invalid casting when printing
the values of two pointers.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] s5p_mfc: don't use an external symbol called 'debug'
Mauro Carvalho Chehab [Fri, 22 Aug 2014 11:07:57 +0000 (06:07 -0500)]
[media] s5p_mfc: don't use an external symbol called 'debug'

The 'debug' name is known to cause conflicts with allyesconfig
on several archs. So, localize its name.

>> drivers/built-in.o:(.bss+0xc7ee2c): multiple definition of `debug'
   arch/x86/built-in.o:(.entry.text+0xf78): first defined here
   ld: Warning: size of symbol `debug' changed from 86 in arch/x86/built-in.o to 4 in drivers/built-in.o

While here, fix a wrong file name reference

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] atmel-isi: Fix a truncate warning
Mauro Carvalho Chehab [Fri, 22 Aug 2014 10:53:27 +0000 (05:53 -0500)]
[media] atmel-isi: Fix a truncate warning

   drivers/media/platform/soc_camera/atmel-isi.c: In function 'start_streaming':
   drivers/media/platform/soc_camera/atmel-isi.c:397:26: warning: large integer implicitly truncated to unsigned type [-Woverflow]
     isi_writel(isi, ISI_INTDIS, ~0UL);
                             ^

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] atmel-isi: tag dma_addr_t as such
Mauro Carvalho Chehab [Fri, 22 Aug 2014 10:52:54 +0000 (05:52 -0500)]
[media] atmel-isi: tag dma_addr_t as such

Instead of using u32 for DMA address, use the proper
Kernel type for it.

   drivers/media/platform/soc_camera/atmel-isi.c: In function 'atmel_isi_probe':
>> drivers/media/platform/soc_camera/atmel-isi.c:981:26: warning: passing argument 3 of 'dma_alloc_attrs' from incompatible pointer type
     isi->p_fb_descriptors = dma_alloc_coherent(&pdev->dev,
                             ^

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] ti-vpe: shut up a casting warning message
Mauro Carvalho Chehab [Fri, 22 Aug 2014 10:45:02 +0000 (05:45 -0500)]
[media] ti-vpe: shut up a casting warning message

   drivers/media/platform/ti-vpe/vpdma.c: In function 'vpdma_alloc_desc_buf':
>> drivers/media/platform/ti-vpe/vpdma.c:332:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     WARN_ON((u32) buf->addr & VPDMA_DESC_ALIGN);
             ^

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] ti-vpe: use %pad for dma address
Mauro Carvalho Chehab [Fri, 22 Aug 2014 10:41:56 +0000 (05:41 -0500)]
[media] ti-vpe: use %pad for dma address

   drivers/media/platform/ti-vpe/vpdma.c: In function 'dump_dtd':
   include/linux/dynamic_debug.h:64:16: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'dma_addr_t' [-Wformat=]
     static struct _ddebug  __aligned(8)   \
                   ^
   include/linux/dynamic_debug.h:76:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
     DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);  \
     ^
   include/linux/printk.h:263:2: note: in expansion of macro 'dynamic_pr_debug'
     dynamic_pr_debug(fmt, ##__VA_ARGS__)
     ^
>> drivers/media/platform/ti-vpe/vpdma.c:587:2: note: in expansion of macro 'pr_debug'
     pr_debug("word2: start_addr = 0x%08x\n", dtd->start_addr);
     ^

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] gsc-m2m: Remove an unused var.
Mauro Carvalho Chehab [Thu, 21 Aug 2014 21:05:39 +0000 (16:05 -0500)]
[media] gsc-m2m: Remove an unused var.

drivers/media/platform/exynos-gsc/gsc-m2m.c: In function 'gsc_m2m_reqbufs':
drivers/media/platform/exynos-gsc/gsc-m2m.c:365:20: warning: variable 'frame' s
et but not used [-Wunused-but-set-variable]
  struct gsc_frame *frame;
                    ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] gsc-core: Remove useless test
Mauro Carvalho Chehab [Thu, 21 Aug 2014 20:56:16 +0000 (15:56 -0500)]
[media] gsc-core: Remove useless test

drivers/media/platform/exynos-gsc/gsc-core.c: In function 'gsc_probe':
drivers/media/platform/exynos-gsc/gsc-core.c:1089:2: warning: comparison is alw
ays false due to limited range of data type [-Wtype-limits]
  if (gsc->id < 0 || gsc->id >= drv_data->num_entities) {
  ^

gsc->id is declared as u16, so it should always be a positive
value.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] dm355_ccdc: declare a function as static
Mauro Carvalho Chehab [Thu, 21 Aug 2014 20:53:23 +0000 (15:53 -0500)]
[media] dm355_ccdc: declare a function as static

drivers/media/platform/davinci/dm355_ccdc.c:463:5: warning: no previous prototy
pe for 'ccdc_write_dfc_entry' [-Wmissing-prototypes]
 int ccdc_write_dfc_entry(int index, struct ccdc_vertical_dft *dfc)
     ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] dm644x_ccdc: declare some functions as static
Mauro Carvalho Chehab [Thu, 21 Aug 2014 20:51:38 +0000 (15:51 -0500)]
[media] dm644x_ccdc: declare some functions as static

drivers/media/platform/davinci/dm644x_ccdc.c:133:6: warning: no previous protot
ype for 'ccdc_setwin' [-Wmissing-prototypes]
 void ccdc_setwin(struct v4l2_rect *image_win,
      ^
drivers/media/platform/davinci/dm644x_ccdc.c:373:6: warning: no previous protot
ype for 'ccdc_config_ycbcr' [-Wmissing-prototypes]
 void ccdc_config_ycbcr(void)
      ^
drivers/media/platform/davinci/dm644x_ccdc.c:526:6: warning: no previous protot
ype for 'ccdc_config_raw' [-Wmissing-prototypes]
 void ccdc_config_raw(void)
      ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] vpif_capture: get rid of some unused vars
Mauro Carvalho Chehab [Thu, 21 Aug 2014 20:49:06 +0000 (15:49 -0500)]
[media] vpif_capture: get rid of some unused vars

drivers/media/platform/davinci/vpif_capture.c: In function 'vpif_channel_isr':
drivers/media/platform/davinci/vpif_capture.c:376:18: warning: variable 'field'
 set but not used [-Wunused-but-set-variable]
  enum v4l2_field field;
                  ^
drivers/media/platform/davinci/vpif_capture.c: In function 'vpif_calculate_offs
ets':
drivers/media/platform/davinci/vpif_capture.c:536:23: warning: variable 'vpitch
' set but not used [-Wunused-but-set-variable]
  unsigned int hpitch, vpitch, sizeimage;
                       ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] vpif_display: get rid of some unused vars
Mauro Carvalho Chehab [Thu, 21 Aug 2014 20:46:46 +0000 (15:46 -0500)]
[media] vpif_display: get rid of some unused vars

drivers/media/platform/davinci/vpif_display.c: In function 'vpif_channel_isr':
drivers/media/platform/davinci/vpif_display.c:363:18: warning: variable 'field'
 set but not used [-Wunused-but-set-variable]
  enum v4l2_field field;
                  ^
drivers/media/platform/davinci/vpif_display.c: In function 'vpif_calculate_offs
ets':
drivers/media/platform/davinci/vpif_display.c:505:23: warning: variable 'vpitch
' set but not used [-Wunused-but-set-variable]
  unsigned int hpitch, vpitch, sizeimage;
                       ^
drivers/media/platform/davinci/vpif_display.c: In function 'vpif_set_output':
drivers/media/platform/davinci/vpif_display.c:816:27: warning: variable 'subdev
_info' set but not used [-Wunused-but-set-variable]
  struct vpif_subdev_info *subdev_info = NULL;

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] media: ttpci: fix av7110 build to be compatible with CONFIG_INPUT_EVDEV
Randy Dunlap [Sat, 16 Aug 2014 00:15:53 +0000 (21:15 -0300)]
[media] media: ttpci: fix av7110 build to be compatible with CONFIG_INPUT_EVDEV

Fix build when CONFIG_INPUT_EVDEV=m and DVB_AV7110=y.
Only build av7110_ir.c when CONFIG_INPUT_EVDEV is compatible with
CONFIG_DVB_AV7110.

Fixes these build errors:

drivers/built-in.o: In function `input_sync':
av7110_ir.c:(.text+0x1223ac): undefined reference to `input_event'
drivers/built-in.o: In function `av7110_emit_key':
av7110_ir.c:(.text+0x12247c): undefined reference to `input_event'
av7110_ir.c:(.text+0x122495): undefined reference to `input_event'
av7110_ir.c:(.text+0x122569): undefined reference to `input_event'
av7110_ir.c:(.text+0x1225a7): undefined reference to `input_event'
drivers/built-in.o:av7110_ir.c:(.text+0x122629): more undefined
references to `input_event' follow
drivers/built-in.o: In function `av7110_ir_init':
(.text+0x1227e4): undefined reference to `input_allocate_device'
drivers/built-in.o: In function `av7110_ir_init':
(.text+0x12298f): undefined reference to `input_register_device'
drivers/built-in.o: In function `av7110_ir_init':
(.text+0x12299e): undefined reference to `input_free_device'
drivers/built-in.o: In function `av7110_ir_exit':
(.text+0x122a94): undefined reference to `input_unregister_device'

drivers/built-in.o: In function `av7110_detach':
av7110.c:(.text+0x228d4a): undefined reference to `av7110_ir_exit'
drivers/built-in.o: In function `arm_thread':
av7110.c:(.text+0x22a404): undefined reference to `av7110_check_ir_config'
av7110.c:(.text+0x22a626): undefined reference to `av7110_check_ir_config'
drivers/built-in.o: In function `av7110_attach':
av7110.c:(.text+0x22b08c): undefined reference to `av7110_ir_init'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: Jim Davis <jim.epost@gmail.com>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] usbtv: Make it dependent on ALSA
Mauro Carvalho Chehab [Fri, 15 Aug 2014 19:16:46 +0000 (16:16 -0300)]
[media] usbtv: Make it dependent on ALSA

Now that alsa code is part of the driver, it can be compiled
only if alsa is enabled.

   drivers/built-in.o: In function `snd_usbtv_hw_free':
>> usbtv-audio.c:(.text+0x21eb55): undefined reference to `snd_pcm_lib_free_pages'
   drivers/built-in.o: In function `snd_usbtv_hw_params':
>> usbtv-audio.c:(.text+0x21eb72): undefined reference to `snd_pcm_lib_malloc_pages'
   drivers/built-in.o: In function `usbtv_audio_urb_received':
>> usbtv-audio.c:(.text+0x21ed66): undefined reference to `snd_pcm_link_rwlock'
>> usbtv-audio.c:(.text+0x21ed9f): undefined reference to `snd_pcm_link_rwlock'
>> usbtv-audio.c:(.text+0x21edf5): undefined reference to `snd_pcm_period_elapsed'
   drivers/built-in.o: In function `usbtv_audio_init':
>> (.text+0x21f00a): undefined reference to `snd_card_new'
   drivers/built-in.o: In function `usbtv_audio_init':
>> (.text+0x21f0a2): undefined reference to `snd_pcm_new'
   drivers/built-in.o: In function `usbtv_audio_init':
>> (.text+0x21f0e5): undefined reference to `snd_pcm_set_ops'
   drivers/built-in.o: In function `usbtv_audio_init':
>> (.text+0x21f103): undefined reference to `snd_pcm_lib_preallocate_pages_for_all'
   drivers/built-in.o: In function `usbtv_audio_init':
>> (.text+0x21f10c): undefined reference to `snd_card_register'
   drivers/built-in.o: In function `usbtv_audio_init':
>> (.text+0x21f12a): undefined reference to `snd_card_free'
   drivers/built-in.o: In function `usbtv_audio_free':
>> (.text+0x21f15c): undefined reference to `snd_card_free'
>> drivers/built-in.o:(.data+0x43250): undefined reference to `snd_pcm_lib_ioctl'

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] media: fix au0828 dvb suspend/resume to call dvb_frontend_suspend/resume
Shuah Khan [Wed, 13 Aug 2014 18:52:39 +0000 (15:52 -0300)]
[media] media: fix au0828 dvb suspend/resume to call dvb_frontend_suspend/resume

au0828 doesn't resume correctly and TV tuning fails with
xc_set_signal_source(0) failed message. Change au0828 dvb
suspend and resume interfaces to suspend and resume frontend
during suspend and resume respectively. dvb_frontend_suspend()
suspends tuner and fe using tuner and fe ops. dvb_frontend_resume()
resumes fe and tuner using fe and tuner ops ini before waking up
the frontend. With this change HVR950Q suspend and resume work
when system gets suspended when digital function is tuned to a
channel and with active TV stream, and after resume it went right
back to active TV stream.

Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
10 years ago[media] em28xx-v4l: fix video buffer field order reporting in progressive mode
Frank Schaefer [Sat, 9 Aug 2014 09:37:21 +0000 (06:37 -0300)]
[media] em28xx-v4l: fix video buffer field order reporting in progressive mode

The correct field order in progressive mode is V4L2_FIELD_NONE, not V4L2_FIELD_INTERLACED.

Cc: <stable@vger.kernel.org>
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>