firefly-linux-kernel-4.4.55.git
10 years ago[media] sn9c20x: fix checkpatch warning: sizeof cmatrix should be sizeof(cmatrix)
Morgan Phillips [Mon, 8 Sep 2014 12:49:47 +0000 (09:49 -0300)]
[media] sn9c20x: fix checkpatch warning: sizeof cmatrix should be sizeof(cmatrix)

Signed-off-by: Morgan Phillips <winter2718@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] sn9c20x.c: fix checkpatch error: that open brace { should be on the previous...
Morgan Phillips [Mon, 8 Sep 2014 12:32:22 +0000 (09:32 -0300)]
[media] sn9c20x.c: fix checkpatch error: that open brace { should be on the previous line

Signed-off-by: Morgan Phillips <winter2718@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] cx23885: fix size helper functions
Hans Verkuil [Sat, 20 Sep 2014 13:19:33 +0000 (10:19 -0300)]
[media] cx23885: fix size helper functions

The norm_swidth function was unused and is dropped. It's not clear
what the purpose of that function was.

The norm_maxh function was changed so it tests for 60 Hz standards
rather than for 50 Hz standards. The is the preferred order.

The norm_maxw function was poorly written and used: it gives the maximum
allowed line width for the given standard. For 60 Hz that's 720, but
for 50 Hz that's 768 which allows for 768x576 which gives you square
pixels. For 60 Hz formats it is 640x480 that gives square pixels, so
there is no need to go beyond 720.

The initial width was set using norm_maxh(), which was wrong. Just set
to 720, that's what you normally use. Since the initial standard was
NTSC anyway the initial width was always 720 anyway.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] cx23885: fix VBI support
Hans Verkuil [Sat, 20 Sep 2014 13:19:32 +0000 (10:19 -0300)]
[media] cx23885: fix VBI support

Tested VBI support and discovered that the wrong offset was used.
After this change it is now working. Verified with CC/XDS for NTSC
and WSS/Teletext on PAL.

It also reported the wrong start lines for the second field. That's
now fixed as well.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] adv7604/adv7842: fix il_vbackporch typo and zero the struct
Hans Verkuil [Sat, 20 Sep 2014 10:36:39 +0000 (07:36 -0300)]
[media] adv7604/adv7842: fix il_vbackporch typo and zero the struct

Both adv7604 and adv7842 had the same typo in the code that sets
the vertical backporch for the second interlaced field: it was
assigned to vbackporch instead of il_vbackporch.

In addition, the timings struct wasn't zeroed in the adv7842 driver,
leaving several fields to undefined values causing the timing match
function to fail.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] v4l2-dv-timings: only check standards if non-zero
Hans Verkuil [Sat, 20 Sep 2014 10:36:38 +0000 (07:36 -0300)]
[media] v4l2-dv-timings: only check standards if non-zero

If one or both of the timings being compared have the standards field
with value 0, then accept that. Only check for matching standards if
both timings have actually filled in that field.

Otherwise no match will ever be found since when timings are detected
the standards field will typically be set to 0 by the driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] vivid: add teletext support to VBI capture
Hans Verkuil [Sat, 20 Sep 2014 09:11:44 +0000 (06:11 -0300)]
[media] vivid: add teletext support to VBI capture

This is useful to test teletext capture applications like alevt and mtt.

It also fixes a previously undetected bug where the PAL VBI start line
of the second field was off by one. Using the new field start defines
helps a lot fixing such bugs.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] DocBook media: fix wrong prototype
Hans Verkuil [Sat, 13 Sep 2014 09:28:02 +0000 (06:28 -0300)]
[media] DocBook media: fix wrong prototype

G_EDID is an RW ioctl, so the struct v4l2_edid isn't const.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] v4l2: uvcvideo: Allow using larger buffers
Guennadi Liakhovetski [Tue, 9 Sep 2014 07:42:43 +0000 (04:42 -0300)]
[media] v4l2: uvcvideo: Allow using larger buffers

A test in uvc_video_decode_isoc() checks whether an image has been
received from the camera completely. For this the data amount is compared
to the buffer length, which, however, doesn't have to be equal to the
image size. Switch to using formats .sizeimage field for an exact
expected image size.

[Renamed image_size to frame_size]

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] hackrf: Fix a long constant
Mauro Carvalho Chehab [Sun, 21 Sep 2014 23:35:05 +0000 (20:35 -0300)]
[media] hackrf: Fix a long constant

drivers/media/usb/hackrf/hackrf.c:64:3: warning: this decimal constant is unsigned only in ISO C90 [enabled by default]
   .rangehigh  = 4294967294, /* max u32, hw goes over 7GHz */
   ^

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] MAINTAINERS: add HackRF SDR driver
Antti Palosaari [Wed, 10 Sep 2014 07:20:15 +0000 (04:20 -0300)]
[media] MAINTAINERS: add HackRF SDR driver

HackRF SDR driver. Video4Linux USB device.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] hackrf: HackRF SDR driver
Antti Palosaari [Sat, 23 Aug 2014 07:40:01 +0000 (04:40 -0300)]
[media] hackrf: HackRF SDR driver

V4L2 driver for HackRF SDR. Very basic version, with reduced
feature set. Driver implements receiver only, hardware supports
also transmitter.

USB ID 1d50:6089. Model HackRF One

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] v4l: Fix ARGB32 fourcc value in the documentation
Laurent Pinchart [Mon, 21 Jul 2014 22:36:58 +0000 (19:36 -0300)]
[media] v4l: Fix ARGB32 fourcc value in the documentation

The ARGB32 pixel format's fourcc value is defined to 'BA24' in the
videodev2.h header, but documented as 'AX24'. Fix the documentation.

Reported-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] v4l: Add ARGB555X and XRGB555X pixel formats
Laurent Pinchart [Mon, 21 Jul 2014 20:06:33 +0000 (17:06 -0300)]
[media] v4l: Add ARGB555X and XRGB555X pixel formats

The existing RGB555X pixel format is ill-defined in respect to its alpha
bit and its meaning is driver dependent. Create new standard ARGB555X
and XRGB555X variants with clearly defined meanings and make the
existing variant deprecated.

The new pixel formats 4CC values have been selected to match the DRM
4CCs for the same in-memory formats.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] media: Use strlcpy instead of custom code
Laurent Pinchart [Thu, 17 Jul 2014 11:52:08 +0000 (08:52 -0300)]
[media] media: Use strlcpy instead of custom code

Replace strncpy + manually setting the terminating '\0' with an strlcpy
call.

Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] media: usb: uvc: add a quirk for Dell XPS M1330 webcam
Paul Fertser [Sun, 8 Jun 2014 15:16:48 +0000 (12:16 -0300)]
[media] media: usb: uvc: add a quirk for Dell XPS M1330 webcam

As reported on [1], this device needs this quirk to be able to
reliably initialise the webcam.

[1] http://ubuntuforums.org/showthread.php?t=2145996

Cc: stable@vger.kernel.org
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] uvcvideo: Work around buggy Logitech C920 firmware
William Manley [Thu, 13 Mar 2014 12:38:48 +0000 (09:38 -0300)]
[media] uvcvideo: Work around buggy Logitech C920 firmware

The uvcvideo webcam driver exposes the v4l2 control "Exposure (Absolute)"
which allows the user to control the exposure time of the webcam,
essentially controlling the brightness of the received image.  By default
the webcam automatically adjusts the exposure time automatically but the
if you set the control "Exposure, Auto"="Manual Mode" the user can fix
the exposure time.

Unfortunately it seems that the Logitech C920 has a firmware bug where
it will forget that it's in manual mode temporarily during initialisation.
This means that the camera doesn't respect the exposure time that the user
requested if they request it before starting to stream video.  They end up
with a video stream which is either too bright or too dark and must reset
the controls after video starts streaming.

This patch introduces the quirk UVC_QUIRK_RESTORE_CTRLS_ON_INIT which
causes the cached controls to be re-uploaded to the camera immediately
after initialising the camera.  This quirk is applied to the C920 to work
around this camera bug.

Signed-off-by: William Manley <will@williammanley.net>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] v4l: uvcvideo: Add support for pan/tilt speed controls
Vincent Palatin [Thu, 4 Sep 2014 00:47:48 +0000 (21:47 -0300)]
[media] v4l: uvcvideo: Add support for pan/tilt speed controls

Map V4L2_CID_TILT_SPEED and V4L2_CID_PAN_SPEED to the standard UVC
CT_PANTILT_RELATIVE_CONTROL terminal control request.

Tested by plugging a Logitech ConferenceCam C3000e USB camera
and controlling pan/tilt from the userspace using the VIDIOC_S_CTRL ioctl.
Verified that it can pan and tilt at the same time in both directions.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Pawel Osciak <posciak@chromium.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] v4l: Add camera pan/tilt speed controls
Vincent Palatin [Wed, 3 Sep 2014 19:38:39 +0000 (16:38 -0300)]
[media] v4l: Add camera pan/tilt speed controls

The V4L2_CID_PAN_SPEED and V4L2_CID_TILT_SPEED controls allow to move the
camera by setting its rotation speed around its axis.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Pawel Osciak <posciak@chromium.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] media: davinci: remove unneeded dependency ARCH_OMAP3
Prabhakar Lad [Sat, 16 Aug 2014 20:33:18 +0000 (17:33 -0300)]
[media] media: davinci: remove unneeded dependency ARCH_OMAP3

this patch removes unneeded dependency of ARCH_OMAP3
on VIDEO_DM6446_CCDC.
Also the top level platform Makefile descended into
davinci/ without any dependency so just drop the
dependency obj-y, as obj-$(CONFIG_ARCH_DAVINCI)
already exists.

Reported-by: Andreas Ruprecht <rupran@einserver.de>
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] media: davinci: vpif_capture: fix the check on suspend/resume callbacks
Prabhakar Lad [Sat, 6 Sep 2014 15:26:51 +0000 (12:26 -0300)]
[media] media: davinci: vpif_capture: fix the check on suspend/resume callbacks

It is possible to call STREAMON without having any buffers queued.
So vb2_is_streaming() can return true without start_streaming()
having been called. Only after at least one buffer has been
queued will start_streaming be called.

The check vb2_is_streaming() is incorrect as this would start
the DMA without having proper DMA pointers set up. this patch
uses vb2_start_streaming_called() instead to check is streaming
was called.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] media: davinci: vpif_display: fix the check on suspend/resume callbacks
Prabhakar Lad [Sat, 6 Sep 2014 15:26:50 +0000 (12:26 -0300)]
[media] media: davinci: vpif_display: fix the check on suspend/resume callbacks

It is possible to call STREAMON without having any buffers queued.
So vb2_is_streaming() can return true without start_streaming()
having been called. Only after at least one buffer has been
queued will start_streaming be called.

The check vb2_is_streaming() is incorrect as this would start
the DMA without having proper DMA pointers set up. this patch
uses vb2_start_streaming_called() instead to check is streaming
was called.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] media: videobuf2-core.h: add a helper to get status of start_streaming()
Prabhakar Lad [Sat, 6 Sep 2014 15:26:49 +0000 (12:26 -0300)]
[media] media: videobuf2-core.h: add a helper to get status of start_streaming()

this patch adds a helper to get the status if start_streaming()
was called successfully.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Cc: Pawel Osciak <pawel@osciak.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] media: davinci: vpif_capture: drop setting of vb2 buffer state to ACTIVE
Prabhakar Lad [Sat, 6 Sep 2014 15:26:48 +0000 (12:26 -0300)]
[media] media: davinci: vpif_capture: drop setting of vb2 buffer state to ACTIVE

this patch drops setting of vb2 buffer state to VB2_BUF_STATE_ACTIVE,
as any buffer queued to the driver is marked ACTIVE by the vb2 core.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] media: davinci: vpif_display: drop setting of vb2 buffer state to ACTIVE
Prabhakar Lad [Sat, 6 Sep 2014 15:26:47 +0000 (12:26 -0300)]
[media] media: davinci: vpif_display: drop setting of vb2 buffer state to ACTIVE

this patch drops setting of vb2 buffer state to VB2_BUF_STATE_ACTIVE,
as any buffer queued to the driver is marked ACTIVE by the vb2 core.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] videobuf: Allow reqbufs(0) to free current buffers
Hans de Goede [Sun, 31 Aug 2014 10:19:21 +0000 (07:19 -0300)]
[media] videobuf: Allow reqbufs(0) to free current buffers

All the infrastructure for this is already there, and despite our desires for
the old videobuf code to go away, it is currently still in use in 18 drivers.

Allowing reqbufs(0) makes these drivers behave consistent with modern drivers,
making live easier for userspace, see e.g. :
https://bugzilla.gnome.org/show_bug.cgi?id=735660

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] videobuf2-core: take mmap_sem before calling __qbuf_userptr
Hans Verkuil [Mon, 25 Aug 2014 11:57:59 +0000 (08:57 -0300)]
[media] videobuf2-core: take mmap_sem before calling __qbuf_userptr

(Changes since v2: dropped local variable as suggested by Laurent)

Commit f035eb4e976ef5a059e30bc91cfd310ff030a7d3 (videobuf2: fix lockdep warning)
unfortunately removed the mmap_sem lock that is needed around the call to
__qbuf_userptr. Amazingly nobody noticed this (especially me as the author)
until Jan Kara pointed this out to me.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Jan Kara <jack@suse.cz>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] drivers: media: i2c: adv7343_regs.h: Fix typo in #ifndef
Rasmus Villemoes [Fri, 22 Aug 2014 16:45:17 +0000 (13:45 -0300)]
[media] drivers: media: i2c: adv7343_regs.h: Fix typo in #ifndef

Test for definedness of the macro which is actually defined, and which
matches the name of the file.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] drivers: media: b2c2: flexcop.h: Fix typo in include guard
Rasmus Villemoes [Fri, 22 Aug 2014 16:41:56 +0000 (13:41 -0300)]
[media] drivers: media: b2c2: flexcop.h: Fix typo in include guard

Three trailing underscores is one too many.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] tvp7002: Don't update device->streaming if write to register fails
Axel Lin [Sat, 16 Aug 2014 06:57:30 +0000 (03:57 -0300)]
[media] tvp7002: Don't update device->streaming if write to register fails

This ensures device->streaming has correct status.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] radio-si470x-usb: use USB API functions rather than constants
Himangi Saraogi [Fri, 15 Aug 2014 16:21:15 +0000 (13:21 -0300)]
[media] radio-si470x-usb: use USB API functions rather than constants

This patch introduces the use of the function usb_endpoint_is_int_in.

The Coccinelle semantic patch that makes these changes is as follows:

@@ struct usb_endpoint_descriptor *epd; @@

- ((epd->bEndpointAddress & \(USB_ENDPOINT_DIR_MASK\|0x80\)) ==
-  \(USB_DIR_IN\|0x80\))
+ usb_endpoint_dir_in(epd)

@@ struct usb_endpoint_descriptor *epd; @@

- ((epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) ==
- \(USB_ENDPOINT_XFER_INT\|3\))
+ usb_endpoint_xfer_int(epd)

@@ struct usb_endpoint_descriptor *epd; @@

- (usb_endpoint_xfer_int(epd) && usb_endpoint_dir_in(epd))
+ usb_endpoint_is_int_in(epd)

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 <mchehab@osg.samsung.com>
10 years ago[media] tda18212: convert to RegMap API
Antti Palosaari [Mon, 4 Aug 2014 04:00:46 +0000 (01:00 -0300)]
[media] tda18212: convert to RegMap API

Use RegMap API to handle all the boring I2C register access
boilerplate stuff.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] tda18212: rename state from 'priv' to 'dev'
Antti Palosaari [Mon, 4 Aug 2014 02:40:23 +0000 (23:40 -0300)]
[media] tda18212: rename state from 'priv' to 'dev'

foo_dev seems to be most correct term for the structure holding data
of each device instance. It is most used term in Kernel codebase and also
examples from book Linux Device Drivers, Third Edition, uses it.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] tda18212: clean logging
Antti Palosaari [Mon, 4 Aug 2014 02:26:27 +0000 (23:26 -0300)]
[media] tda18212: clean logging

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: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] tda18212: convert driver to I2C binding
Antti Palosaari [Mon, 4 Aug 2014 02:05:31 +0000 (23:05 -0300)]
[media] tda18212: convert driver to I2C binding

Convert driver from DVB proprietary model to common I2C model.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] em28xx: convert tda18212 tuner to I2C client
Antti Palosaari [Mon, 4 Aug 2014 01:35:03 +0000 (22:35 -0300)]
[media] em28xx: convert tda18212 tuner to I2C client

Used tda18212 tuner is implemented as a I2C driver. Use em28xx
tuner I2C client for tda18212 driver.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] anysee: convert tda18212 tuner to I2C client
Antti Palosaari [Mon, 4 Aug 2014 00:47:10 +0000 (21:47 -0300)]
[media] anysee: convert tda18212 tuner to I2C client

Used tda18212 tuner is implemented as I2C driver. Implement I2C
client to anysee and use it for tda18212.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] tda18212: prepare for I2C client conversion
Antti Palosaari [Mon, 4 Aug 2014 01:43:26 +0000 (22:43 -0300)]
[media] tda18212: prepare for I2C client conversion

We need carry pointer to frontend via config struct
(I2C platform_data ptr) when I2C model is used. Add that pointer
first in order to keep build unbreakable during conversion.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9033: init DVBv5 statistics
Antti Palosaari [Sat, 6 Sep 2014 14:24:14 +0000 (11:24 -0300)]
[media] af9033: init DVBv5 statistics

We need to init supported stats here in order signal app which
stats are supported.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9035: remove I2C client differently
Antti Palosaari [Thu, 4 Sep 2014 21:35:59 +0000 (18:35 -0300)]
[media] af9035: remove I2C client differently

It crash kernel when device was removed while it was streaming.
That is because we removed driver and frontend thread was still
running. Use new callback which allows I2C driver removal just
after frontend is unregistered.

V2: fixed by reported by Daniel

Reported-by: Daniel Glöckner <daniel-gl@gmx.net>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] dvb-usb-v2: add tuner_detach callback
Antti Palosaari [Thu, 4 Sep 2014 21:31:40 +0000 (18:31 -0300)]
[media] dvb-usb-v2: add tuner_detach callback

Add tuner_detach callback in order to allow custom detach. It is
needed when tuner driver is implemented I2C client or some other
kernel bus, but not proprietary dvb_attach / dvb_detach.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] dvb-usb-v2: add frontend_detach callback
Antti Palosaari [Thu, 4 Sep 2014 20:04:44 +0000 (17:04 -0300)]
[media] dvb-usb-v2: add frontend_detach callback

Add frontend_detach callback in order to allow custom detach. It is
needed when demod driver is implemented I2C client or some other
kernel bus, but not proprietary dvb_attach / dvb_detach.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9033: remove all DVBv3 stat calculation logic
Antti Palosaari [Thu, 4 Sep 2014 02:30:44 +0000 (23:30 -0300)]
[media] af9033: remove all DVBv3 stat calculation logic

Statistics are now calculated for DVBv5 and those DVBv5 values are
returned for legacy DVBv3 calls also. So we could remove all old
statistics calculation logic.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9033: wrap DVBv3 BER to DVBv5 BER
Antti Palosaari [Thu, 4 Sep 2014 02:22:53 +0000 (23:22 -0300)]
[media] af9033: wrap DVBv3 BER to DVBv5 BER

DVBv5 BER is calculated anyway, so just return it for legacy
read_ber() API too.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9033: wrap DVBv3 UCB to DVBv5 UCB stats
Antti Palosaari [Thu, 4 Sep 2014 02:07:39 +0000 (23:07 -0300)]
[media] af9033: wrap DVBv3 UCB to DVBv5 UCB stats

Remove 'duplicate' DVBv3 read UCB implementation and return value,
calculated already for DVBv5 statistics.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9033: implement DVBv5 post-Viterbi BER
Antti Palosaari [Tue, 2 Sep 2014 11:29:46 +0000 (08:29 -0300)]
[media] af9033: implement DVBv5 post-Viterbi BER

Implement following DTV API commands:
DTV_STAT_POST_ERROR_BIT_COUNT
DTV_STAT_POST_TOTAL_BIT_COUNT

These will provide post-Viterbi bit error rate reporting.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9033: implement DVBv5 stat block counters
Antti Palosaari [Tue, 2 Sep 2014 11:01:10 +0000 (08:01 -0300)]
[media] af9033: implement DVBv5 stat block counters

Implement following API commands:
DTV_STAT_ERROR_BLOCK_COUNT
DTV_STAT_TOTAL_BLOCK_COUNT

These returns total and uncorrected error packets from outer FEC.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9033: wrap DVBv3 read SNR to DVBv5 CNR
Antti Palosaari [Tue, 2 Sep 2014 08:03:21 +0000 (05:03 -0300)]
[media] af9033: wrap DVBv3 read SNR to DVBv5 CNR

Remove 'duplicate' DVBv3 read SNR implementation and return value,
calculated already by DVBv5 CNR, from the cache.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9033: implement DVBv5 statistics for CNR
Antti Palosaari [Tue, 2 Sep 2014 07:24:41 +0000 (04:24 -0300)]
[media] af9033: implement DVBv5 statistics for CNR

Return CNR via DVBv5 statistics API.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9033: implement DVBv5 statistics for signal strength
Antti Palosaari [Tue, 2 Sep 2014 06:55:21 +0000 (03:55 -0300)]
[media] af9033: implement DVBv5 statistics for signal strength

Let the demod firmware estimate RF signal strength and return it
to the app as a dBm. To handle that, use thread which reads signal
strengths from firmware in 2 sec intervals when device is active.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] MAINTAINERS: IT913X driver filenames
Antti Palosaari [Mon, 1 Sep 2014 22:44:59 +0000 (19:44 -0300)]
[media] MAINTAINERS: IT913X driver filenames

I removed tuner_ prefix from the driver file names. Update
maintainers entry according to that.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9035: replace PCTV device model numbers with name
Antti Palosaari [Mon, 1 Sep 2014 03:38:01 +0000 (00:38 -0300)]
[media] af9035: replace PCTV device model numbers with name

Use device names for recent PCTV Systems devices:
PCTV AndroiDTV (78e)
PCTV microStick (79e)

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9033: remove I2C addr from config
Antti Palosaari [Mon, 1 Sep 2014 01:57:26 +0000 (22:57 -0300)]
[media] af9033: remove I2C addr from config

I2C driver address is passed as a i2c_new_device() parameter when
device is created. Thus no need to keep it in config struct.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9035: few small I2C master xfer changes
Antti Palosaari [Mon, 1 Sep 2014 01:17:12 +0000 (22:17 -0300)]
[media] af9035: few small I2C master xfer changes

Biggest problem of that function is complexity. Try reduce complexity:

* define macros to detect all 3 supported xfers
* remove duplicate message maximum size checks

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9033: clean up logging
Antti Palosaari [Mon, 1 Sep 2014 00:08:09 +0000 (21:08 -0300)]
[media] af9033: clean up logging

It uses I2C client so logging system prints module name
automatically. Function name is also added automatically, if it is
requested from dynamic debug by setting proper format.
Because of that, we could simplify logging in our driver.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9033: convert to I2C client
Antti Palosaari [Sun, 31 Aug 2014 23:57:05 +0000 (20:57 -0300)]
[media] af9033: convert to I2C client

Convert driver to kernel I2C model.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9033: rename 'state' to 'dev'
Antti Palosaari [Sun, 31 Aug 2014 05:18:34 +0000 (02:18 -0300)]
[media] af9033: rename 'state' to 'dev'

foo_dev seems to be most correct term for the structure holding data
of each device instance. It is most used term in Kernel codebase and also
examples from book Linux Device Drivers, Third Edition, uses it.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9033: fix firmware version logging
Antti Palosaari [Sun, 31 Aug 2014 05:03:05 +0000 (02:03 -0300)]
[media] af9033: fix firmware version logging

AF9030 and IT9130 series has different memory location for firmware
version. Choose correct location according to chip type.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] it913x: replace udelay polling with jiffies
Antti Palosaari [Sun, 31 Aug 2014 03:29:33 +0000 (00:29 -0300)]
[media] it913x: replace udelay polling with jiffies

udelay based I/O polling loop is a bad idea, especially system
performance point of view. Kernel jiffies are preferred solution
for such situations. Use it instead.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] it913x: refactor code largely
Antti Palosaari [Sun, 31 Aug 2014 02:52:48 +0000 (23:52 -0300)]
[media] it913x: refactor code largely

Refactor code largely.

Try to keep order of register read/write same as windows driver does as
it makes comparing sniffs easier.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] it913x: get rid of script loader and and private header file
Antti Palosaari [Thu, 28 Aug 2014 05:07:08 +0000 (02:07 -0300)]
[media] it913x: get rid of script loader and and private header file

Used script loader is quite useless and hides register numbers
making code hard to understand. Get rid of it and use standard
RegMap register write functions directly.

it913x_priv.h file leaves empty after that change and is also
removed.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] it913x: remove dead code
Antti Palosaari [Thu, 28 Aug 2014 04:45:52 +0000 (01:45 -0300)]
[media] it913x: remove dead code

Remove unused tuner set template.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] it913x: re-implement sleep
Antti Palosaari [Wed, 27 Aug 2014 06:59:27 +0000 (03:59 -0300)]
[media] it913x: re-implement sleep

Re-implement sleep. Based USB sniffs taken from the latest Hauppauge
windows driver version 07/10/2014, 14.6.23.32191.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] it913x: convert to RegMap API
Antti Palosaari [Wed, 27 Aug 2014 00:45:33 +0000 (21:45 -0300)]
[media] it913x: convert to RegMap API

Use RegMap API to cover I2C register access routines.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] it913x: rename 'state' to 'dev'
Antti Palosaari [Tue, 26 Aug 2014 23:11:08 +0000 (20:11 -0300)]
[media] it913x: rename 'state' to 'dev'

foo_dev seems to be most correct term for the structure holding data
of each device instance. It is most used term in Kernel and also
examples from book Linux Device Drivers, Third Edition, uses it.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] it913x: change reg read/write routines more common
Antti Palosaari [Tue, 26 Aug 2014 21:56:46 +0000 (18:56 -0300)]
[media] it913x: change reg read/write routines more common

Change register write and read routines to similar which are
typically used. We have to add processor core as a part of register
address in order to simplify register access. Chip has two cores,
called link and ofdm. As for now, use address bit 24 to address used
core. Bits 15:0 are register address in given core.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] it913x: convert to I2C driver
Antti Palosaari [Tue, 26 Aug 2014 20:14:16 +0000 (17:14 -0300)]
[media] it913x: convert to I2C driver

Change the it913x driver to use the I2C high lever tuner
binding model. As af9035 depends on it, add a code there
to do the binding.

[mchehab@osg.samsung.com: Merge 3 patches into one, because
 we don't want to break bisect due to the conversion]
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] it913x: rename tuner_it913x => it913x
Antti Palosaari [Tue, 26 Aug 2014 03:08:16 +0000 (00:08 -0300)]
[media] it913x: rename tuner_it913x => it913x

Remove tuner_ prefix from module name and file names. Prefix was
added due to file name conflict on media out-tree build system.
Demodulator having same name does not exists anymore. So lets
remove dumb prefix.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] it913x: make checkpatch.pl happy
Antti Palosaari [Sat, 9 Aug 2014 18:02:14 +0000 (15:02 -0300)]
[media] it913x: make checkpatch.pl happy

Correct issues reported by checkpatch.pl

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9033: make checkpatch.pl happy
Antti Palosaari [Sat, 9 Aug 2014 17:59:53 +0000 (14:59 -0300)]
[media] af9033: make checkpatch.pl happy

Correct issues reported by checkpatch.pl.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9035: make checkpatch.pl happy
Antti Palosaari [Sat, 9 Aug 2014 17:49:46 +0000 (14:49 -0300)]
[media] af9035: make checkpatch.pl happy

Correct issues reported by checkpatch.pl.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9035: remove AVerMedia eeprom override
Antti Palosaari [Sat, 9 Aug 2014 17:16:29 +0000 (14:16 -0300)]
[media] af9035: remove AVerMedia eeprom override

Reverts commit 3ab25123373270152a9fae98e3c48ef1b2a878c0
[media] af9035: override tuner for AVerMedia A835B devices

Original commit itself is correct, but it was replaced by more
general solution (commit 1cbbf90d0406913ad4b44194b07f4f41bde84e54).
This old solution was committed by a accident and is not needed
anymore.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] it913x: fix IT9135 AX sleep
Antti Palosaari [Sat, 9 Aug 2014 16:39:16 +0000 (13:39 -0300)]
[media] it913x: fix IT9135 AX sleep

Old IT9135 AX needs a little bit different register settings for
sleep than newer IT9135 BX. This has been broken always, as power
management of the whole driver, but it started to be problem as I
fixed clock. Earlier clock was disabled very first on sleep and
rest of the commands were skipped by the chip as no clock, leaving
tuner full power state. When I fixed clocks these PM bugs started
raising out as I/O errors.

Cc: Bimow Chen <Bimow.Chen@ite.com.tw>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] it913x: avoid division by zero on error case
Antti Palosaari [Sat, 9 Aug 2014 15:35:00 +0000 (12:35 -0300)]
[media] it913x: avoid division by zero on error case

Error on init leaves some internal divisor zero, which causes oops
later. Fix it by populating divisors even it fails.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] it913x: fix tuner sleep power leak
Antti Palosaari [Sat, 9 Aug 2014 03:15:05 +0000 (00:15 -0300)]
[media] it913x: fix tuner sleep power leak

IT913x tuner driver disables own clock, provided by demod core, as
very a first operation when tuner is put on *sleep*. That likely
causes failure of all the rest commands on sleep sequence, which
leads situation where tuner is not actually on sleep, but consuming
a lot of power.

I measured 102mA current consumption from the USB before change
and after change it was only 32mA. Used device was single tuner
IT9135 BX.

Second reason to remove that register from tuner driver is reason
it is simply on wrong driver (demod vs. tuner), breaking the
principle of correct driver.

Clock is now provided more correctly af9033 demod driver as a
config option.

Cc: Bimow Chen <Bimow.Chen@ite.com.tw>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9035: enable AF9033 demod clock source for IT9135
Antti Palosaari [Sat, 9 Aug 2014 03:08:57 +0000 (00:08 -0300)]
[media] af9035: enable AF9033 demod clock source for IT9135

Integrated RF tuner of IT9135 is connected to demod clock source
named dyn0_clk. Enable that clock source in order to provide stable
clock early enough.

Cc: Bimow Chen <Bimow.Chen@ite.com.tw>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] af9033: provide dyn0_clk clock source
Antti Palosaari [Sat, 9 Aug 2014 02:56:49 +0000 (23:56 -0300)]
[media] af9033: provide dyn0_clk clock source

AF903x/IT913x demod provides clock source(s). It seems that this
clock source is used for integrated RF tuner of IT913x. It is
enabled by default, but firmware disables it automatically when
suspend is requested (suspend_flag (0x004c) + trigger_ofsm
(0x0000)). Automatic disable behavior seems to be similar for both
AF903x and IT913x I tested, though there is no likely any real
clock user in a case of AF903x.

Cc: Bimow Chen <Bimow.Chen@ite.com.tw>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] get_dvb_firmware: Update firmware of ITEtech IT9135
Bimow Chen [Fri, 1 Aug 2014 09:19:58 +0000 (06:19 -0300)]
[media] get_dvb_firmware: Update firmware of ITEtech IT9135

IT9135 firmware update.

Signed-off-by: Bimow Chen <Bimow.Chen@ite.com.tw>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] coda: coda-bit: Include "<linux/slab.h>"
Fabio Estevam [Fri, 19 Sep 2014 11:32:30 +0000 (08:32 -0300)]
[media] coda: coda-bit: Include "<linux/slab.h>"

coda-bit uses kmalloc/kfree functions, so the slab header needs to be included
in order to fix the following build errors:

drivers/media/platform/coda/coda-bit.c: In function 'coda_fill_bitstream':
drivers/media/platform/coda/coda-bit.c:231:4: error: implicit declaration of function 'kmalloc' [-Werror=implicit-function-declaration]
drivers/media/platform/coda/coda-bit.c: In function 'coda_alloc_framebuffers':
drivers/media/platform/coda/coda-bit.c:312:3: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] tda18212: add support for slave chip version
Antti Palosaari [Thu, 31 Jul 2014 19:35:56 +0000 (16:35 -0300)]
[media] tda18212: add support for slave chip version

There is 2 different versions of that chip available, master and
slave. Slave is used only on dual tuner devices with master tuner.
Laser printing top of chip is 18212/M or 18212/S according to chip
version.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] si2168: avoid firmware loading if it has been loaded previously
Olli Salonen [Mon, 25 Aug 2014 18:07:04 +0000 (15:07 -0300)]
[media] si2168: avoid firmware loading if it has been loaded previously

Add a variable to keep track if firmware is loaded or not and skip parts of the
initialization if fw is already loaded. Resume from sleep with a different
command compared to initial power up and run command 85 after resume command.
This behaviour is observed when using manufacturer provided binary-only si2168
driver for TechnoTrend CT2-4400.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] si2157: avoid firmware loading if it has been loaded previously
Olli Salonen [Mon, 25 Aug 2014 18:07:03 +0000 (15:07 -0300)]
[media] si2157: avoid firmware loading if it has been loaded previously

Add a variable into state to keep track if firmware has been loaded or not.
Skip firmware loading in case it is already loaded (resume from sleep).

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] si2157: change command for sleep
Olli Salonen [Mon, 25 Aug 2014 18:07:02 +0000 (15:07 -0300)]
[media] si2157: change command for sleep

Instead of sending command 13 to the tuner, send command 16 when sleeping. This
behaviour is observed when using manufacturer provided binary-only Linux driver
for TechnoTrend CT2-4400 (Windows driver does not do power management).

The issue with command 13 is that firmware loading is necessary after that.
This is not an issue with tuners that do not require firmware, but starting
streaming after sleep on an Si2158 takes noticeable time as firmware is
loaded on resume.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] rtl2832_sdr: logging changes
Antti Palosaari [Mon, 25 Aug 2014 02:57:54 +0000 (23:57 -0300)]
[media] rtl2832_sdr: logging changes

Remove function name from debug logs. Logging system could add it
automatically.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] rtl2832_sdr: enhance sample rate debug calculation precision
Antti Palosaari [Mon, 25 Aug 2014 02:44:13 +0000 (23:44 -0300)]
[media] rtl2832_sdr: enhance sample rate debug calculation precision

Sample rate calculation gives a little bit too large results because
in real life there was around one milliseconds (~one usb packet) too
much data for given time. Calculate time more accurate in order to
provide better results.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] rtl2832_sdr: remove unneeded spinlock irq flags initialization
Antti Palosaari [Mon, 25 Aug 2014 02:37:57 +0000 (23:37 -0300)]
[media] rtl2832_sdr: remove unneeded spinlock irq flags initialization

There is no need to init flags before calling spin_lock_irqsave().
spin_lock_irqsave is macro which stores value to 'flags'

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] e4000: logging changes
Antti Palosaari [Mon, 25 Aug 2014 02:35:48 +0000 (23:35 -0300)]
[media] e4000: logging changes

Remove function name from debug logs. Logging system could add it
automatically.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] msi2500: remove unneeded spinlock irq flags initialization
Antti Palosaari [Mon, 25 Aug 2014 02:26:23 +0000 (23:26 -0300)]
[media] msi2500: remove unneeded spinlock irq flags initialization

There is no need to init flags before calling spin_lock_irqsave().
spin_lock_irqsave is macro which stores value to 'flags'.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] msi001: logging changes
Antti Palosaari [Mon, 25 Aug 2014 02:12:13 +0000 (23:12 -0300)]
[media] msi001: logging changes

Remove function name from debug logs. Logging system could add it
automatically.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] msi2500: logging changes
Antti Palosaari [Mon, 25 Aug 2014 01:54:06 +0000 (22:54 -0300)]
[media] msi2500: logging changes

Kernel logging system needs pointer to usb interface device in
order to print names and bus numbers properly. There was wrong
device pointer given and log printings wasn't correct.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] airspy: enhance sample rate debug calculation precision
Antti Palosaari [Sun, 24 Aug 2014 23:11:27 +0000 (20:11 -0300)]
[media] airspy: enhance sample rate debug calculation precision

Sample rate calculation gives a little bit too large results because
in real life there was around one milliseconds (~one usb packet) too
much data for given time. Calculate time more accurate in order to
provide better results.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] airspy: remove unneeded spinlock irq flags initialization
Antti Palosaari [Sun, 24 Aug 2014 22:27:43 +0000 (19:27 -0300)]
[media] airspy: remove unneeded spinlock irq flags initialization

There is no need to init flags before calling spin_lock_irqsave().
spin_lock_irqsave is a macro which stores value to 'flags'.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] airspy: logging changes
Antti Palosaari [Sun, 24 Aug 2014 22:14:32 +0000 (19:14 -0300)]
[media] airspy: logging changes

Kernel logging system needs pointer to usb interface device in
order to print names and bus numbers properly. There was wrong
device pointer given and log printings wasn't correct.

Remove some debug logging from v4l2 ioctl functions. v4l2 core debug
prints almost same information when enabled.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] airspy: coding style issues
Antti Palosaari [Sun, 24 Aug 2014 21:31:52 +0000 (18:31 -0300)]
[media] airspy: coding style issues

Fix issues reported by checkpatch.pl.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years ago[media] airspy: fix error handling on start streaming
Antti Palosaari [Mon, 25 Aug 2014 00:59:36 +0000 (21:59 -0300)]
[media] airspy: fix error handling on start streaming

Free all reserved USB buffers and URBs on failure. Return all queued
buffers to vb2 with state queued on error case.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
10 years agoMerge remote-tracking branch 'linus/master' into patchwork
Mauro Carvalho Chehab [Sun, 21 Sep 2014 19:40:04 +0000 (16:40 -0300)]
Merge remote-tracking branch 'linus/master' into patchwork

There are some patches that depends on media-v3.16-rc6.
So, merge back from upstream before applying them.

* linus/master: (1123 commits)
  drm/nouveau: ltc/gf100-: fix cbc issues on certain boards
  drm/bochs: add missing drm_connector_register call
  drm/cirrus: add missing drm_connector_register call
  staging: vt6655: buffer overflow in ioctl
  USB: storage: Add quirks for Entrega/Xircom USB to SCSI converters
  USB: storage: Add quirk for Ariston Technologies iConnect USB to SCSI adapter
  USB: storage: Add quirk for Adaptec USBConnect 2000 USB-to-SCSI Adapter
  USB: EHCI: unlink QHs even after the controller has stopped
  [SCSI] fix for bidi use after free
  [SCSI] fix regression that accidentally disabled block-based tcq
  [SCSI] libiscsi: fix potential buffer overrun in __iscsi_conn_send_pdu
  drm/radeon: Fix typo 'addr' -> 'entry' in rs400_gart_set_page
  drm/nouveau/runpm: fix module unload
  drm/radeon/px: fix module unload
  vgaswitcheroo: add vga_switcheroo_fini_domain_pm_ops
  drm/radeon: don't reset dma on r6xx-evergreen init
  drm/radeon: don't reset sdma on CIK init
  drm/radeon: don't reset dma on NI/SI init
  drm/radeon/dpm: fix resume on mullins
  drm/radeon: Disable HDP flush before every CS again for < r600
  ...

10 years agoMerge tag 'media-v3.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Sun, 21 Sep 2014 17:56:50 +0000 (10:56 -0700)]
Merge tag 'media-v3.17-rc6' of git://git./linux/kernel/git/mchehab/linux-media

Pull media fixes from Mauro Carvalho Chehab:
 "some media bug fixes:
   - a Kconfig dependency issue
   - some fixes for af9033/it913x demod to be more reliable and address
     a performance regression
   - cx18: fix an oops on devices with tda8290 tuner
   - two new USB IDs for af9035
   - a couple fixes on smapp driver"

* tag 'media-v3.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [media] af9035: new IDs: add support for PCTV 78e and PCTV 79e
  [media] af9033: feed clock to RF tuner
  [media] it913x: init tuner on attach
  [media] af9033: update IT9135 tuner inittabs
  [media] Kconfig: do not select SPI bus on sub-driver auto-select
  [media] cx18: fix kernel oops with tda8290 tuner
  [media] smiapp: Set sub-device owner
  [media] smiapp: Fix power count handling

10 years agoMerge tag 'staging-3.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sat, 20 Sep 2014 17:43:37 +0000 (10:43 -0700)]
Merge tag 'staging-3.17-rc6' of git://git./linux/kernel/git/gregkh/staging

Pull staging / IIO fixes from Greg KH:
 "Here are some IIO and Staging driver fixes for 3.17-rc6.  They are all
  pretty simple, and resolve reported issues"

* tag 'staging-3.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  staging: vt6655: buffer overflow in ioctl
  iio:magnetometer: bugfix magnetometers gain values
  iio: adc: at91: don't use the last converted data register
  iio: adc: xilinx-xadc: assign auxiliary channels address correctly
  iio: meter: ade7758: Fix indio_dev->trig assignment
  iio: inv_mpu6050: Fix indio_dev->trig assignment
  iio: gyro: itg3200: Fix indio_dev->trig assignment
  iio: st_sensors: Fix indio_dev->trig assignment
  iio: hid_sensor_hub: Fix indio_dev->trig assignment
  iio: adc: ad_sigma_delta: Fix indio_dev->trig assignment
  iio: accel: bma180: Fix indio_dev->trig assignment
  iio:trigger: modify return value for iio_trigger_get
  iio:inkern: fix overwritten -EPROBE_DEFER in of_iio_channel_get_by_name

10 years agoMerge tag 'usb-3.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Sat, 20 Sep 2014 17:42:56 +0000 (10:42 -0700)]
Merge tag 'usb-3.17-rc6' of git://git./linux/kernel/git/gregkh/usb

Pull USB fixes / quirks from Greg KH:
 "Here are some USB and PHY fixes and quirks for 3.17-rc6.  Nothing
  major, just a few things that have been reported"

* tag 'usb-3.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  USB: storage: Add quirks for Entrega/Xircom USB to SCSI converters
  USB: storage: Add quirk for Ariston Technologies iConnect USB to SCSI adapter
  USB: storage: Add quirk for Adaptec USBConnect 2000 USB-to-SCSI Adapter
  USB: EHCI: unlink QHs even after the controller has stopped
  phy: spear1340-miphy: fix driver dependencies
  phy: spear1310-miphy: fix driver dependencies
  phy: miphy365x: Fix off-by-one error

10 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Linus Torvalds [Sat, 20 Sep 2014 17:41:38 +0000 (10:41 -0700)]
Merge git://git./linux/kernel/git/nab/target-pending

Pull SCSI target fixes from Nicholas Bellinger:
 "Here are the target pending fixes for v3.17-rc6.

  Included are Sagi's long overdue fixes related to iser-target
  shutdown, along with a couple of fixes from Sebastian related to ALUA
  Referrals changes that when in during the v3.14 time-frame.

  Also included are a few iscsi-target fixes, most recently of which
  where found during Joern's Coverity scanning of target code"

* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  iscsi-target: avoid NULL pointer in iscsi_copy_param_list failure
  iscsi-target: Fix memory corruption in iscsit_logout_post_handler_diffcid
  target: Fix inverted logic in SE_DEV_ALUA_SUPPORT_STATE_STORE
  target: Fix user data segment multiplier in spc_emulate_evpd_b3()
  iscsi-target: Ignore ICF_GOT_LAST_DATAOUT during Data-Out ITT lookup
  Target/iser: Fix initiator_depth and responder_resources
  Target/iser: Avoid calling rdma_disconnect twice
  Target/iser: Don't put isert_conn inside disconnected handler
  Target/iser: Get isert_conn reference once got to connected_handler