platform/kernel/linux-rpi.git
13 years ago[media] s5p-csis: Rework the system suspend/resume helpers
Sylwester Nawrocki [Thu, 7 Jul 2011 15:13:25 +0000 (12:13 -0300)]
[media] s5p-csis: Rework the system suspend/resume helpers

Do not resume the device during system resume if it was idle
before system suspend, as this causes resume from suspend
to RAM failures on Exynos4. For this purpose runtime PM and
system sleep helpers are separated.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] s5p-csis: Handle all available power supplies
Sylwester Nawrocki [Wed, 29 Jun 2011 16:08:49 +0000 (13:08 -0300)]
[media] s5p-csis: Handle all available power supplies

On the SoCs this driver is intended to support the are three separate
pins to supply the MIPI-CSIS subsystem: 1.1V or 1.2V, 1.8V and power
supply for an internal PLL.
This patch adds support for two separate voltage supplies to cover
properly board configurations where PMIC requires to configure
independently each external supply of the MIPI-CSI device. The 1.8V
and PLL supply are assigned a single "vdd18" regulator supply name
as it seems more reasonable than creating separate regulator supplies
for them.

While at here stop using the 'fixed_phy_vdd' platform_data field.
It has been introduced for boards where the MIPI-CSIS supplies are
not controllable. However it is not needed as those boards can use
the dummy regulator.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] s5p-fimc: Add runtime PM support in the mem-to-mem driver
Sylwester Nawrocki [Fri, 2 Sep 2011 09:25:32 +0000 (06:25 -0300)]
[media] s5p-fimc: Add runtime PM support in the mem-to-mem driver

Add runtime PM and system sleep support in the memory-to-memory
driver. It's required to enable the FIMC operation on Exynos4
SoCs. This patch prevents system boot failure when the driver
is compiled in, as it now tries to access its I/O memory without
first enabling the corresponding power domain.

The camera capture device suspend/resume is not fully covered,
the capture device is just powered on/off during the video
node open/close. However this enables it's normal operation
on Exynos4 SoCs.

[mchehab@redhat.com: fix a small checkpatch error]
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] media: vb2: change queue initialization order
Marek Szyprowski [Mon, 29 Aug 2011 11:51:49 +0000 (08:51 -0300)]
[media] media: vb2: change queue initialization order

This patch changes the order of operations during stream on call. Now the
buffers are first queued to the driver and then the start_streaming method
is called.

This resolves the most common case when the driver needs to know buffer
addresses to enable dma engine and start streaming. Additional parameter
to start_streaming method have been added to simplify drivers code. The
driver are now obliged to check if the number of queued buffers is high
enough to enable hardware streaming. If not - it can return an error. In
such case all the buffers that have been pre-queued are invalidated.

This patch also updates all videobuf2 clients to work properly with the
changed order of operations.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Pawel Osciak <pawel@osciak.com>
CC: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
CC: Hans Verkuil <hverkuil@xs4all.nl>
CC: Tomasz Stanislawski <t.stanislaws@samsung.com>
CC: Sylwester Nawrocki <s.nawrocki@samsung.com>
CC: Kamil Debski <k.debski@samsung.com>
CC: Jonathan Corbet <corbet@lwn.net>
CC: Josh Wu <josh.wu@atmel.com>
CC: Hans de Goede <hdegoede@redhat.com>
CC: Paul Mundt <lethal@linux-sh.org>
Tested-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] media: vb2: fix userptr VMA release seq
Yu Tang [Tue, 30 Aug 2011 05:31:54 +0000 (02:31 -0300)]
[media] media: vb2: fix userptr VMA release seq

Align vb2 user pointer VMA release sequence with munmap.
Do vm_ops->vm_close before release file.

Signed-off-by: Yu Tang <ytang5@marvell.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] media: vb2: dma contig allocator: use dma_addr instread of paddr
Marek Szyprowski [Mon, 29 Aug 2011 06:20:56 +0000 (03:20 -0300)]
[media] media: vb2: dma contig allocator: use dma_addr instread of paddr

Use the correct 'dma_addr' name for the buffer address. 'paddr' suggested
that this is the physical address in system memory. For most ARM platforms
these two are the same, but this is not a generic rule. 'dma_addr' will
also point better to dma-mapping api.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Pawel Osciak <pawel@osciak.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] media: vb2: change plane sizes array to unsigned int[]
Marek Szyprowski [Wed, 24 Aug 2011 09:43:36 +0000 (06:43 -0300)]
[media] media: vb2: change plane sizes array to unsigned int[]

Plane sizes array was declared as unsigned long[], while unsigned int is
more than enough for storing size of the video buffer. This patch reduces
the size of the array by definiting it as unsigned int[].

Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] media: vb2: fix handling MAPPED buffer flag
Marek Szyprowski [Wed, 24 Aug 2011 09:49:35 +0000 (06:49 -0300)]
[media] media: vb2: fix handling MAPPED buffer flag

MAPPED flag was set for the buffer only if all it's planes were mapped and
relied on a simple mapping counter. This assumption is really bogus,
especially because the buffers may be mapped multiple times. Also the
meaning of this flag for muliplane buffers was not really useful. This
patch fixes this issue by setting the MAPPED flag for the buffer if any of
it's planes is in use (what means that has been mapped at least once), so
MAPPED flag can be used as 'in_use' indicator.

Reported-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Pawel Osciak <pawel@osciak.com>
Tested-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] media: vb2: add a check if queued userptr buffer is large enough
Marek Szyprowski [Wed, 24 Aug 2011 09:36:26 +0000 (06:36 -0300)]
[media] media: vb2: add a check if queued userptr buffer is large enough

Videobuf2 accepted any userptr buffer without verifying if its size is
large enough to store the video data from the driver. The driver reports
the minimal size of video data once in queue_setup and expects that
videobuf2 provides buffers that match these requirements. This patch
adds the required check.

Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Pawel Osciak <pawel@osciak.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] media: mem2mem: eliminate possible NULL pointer dereference
Andrzej Pietrasiewicz [Thu, 25 Aug 2011 10:21:21 +0000 (07:21 -0300)]
[media] media: mem2mem: eliminate possible NULL pointer dereference

This patch removes the possible NULL pointer dereference in mem2mem
code.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
CC: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] media: v4l: remove single to multiplane conversion
Tomasz Stanislawski [Fri, 1 Jul 2011 09:25:46 +0000 (06:25 -0300)]
[media] media: v4l: remove single to multiplane conversion

This patch removes an implicit conversion between multi and single plane
formats from V4L2 framework. The conversion is to be performed by libv4l2.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] v4l2-ioctl: more -ENOTTY fixes
Hans Verkuil [Tue, 9 Aug 2011 12:32:06 +0000 (09:32 -0300)]
[media] v4l2-ioctl: more -ENOTTY fixes

  explicitly instead of using a macro.
  ioctls and the ENUMSTD, S_STD and G_PARM ioctls.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] ivtv: fill in service_set
Hans Verkuil [Fri, 29 Jul 2011 10:21:33 +0000 (07:21 -0300)]
[media] ivtv: fill in service_set

The service_set field of struct v4l2_sliced_vbi_cap was never filled in.
The v4l2-compliance tool complained about this, so this is now fixed.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] vivi: fill in colorspace
Hans Verkuil [Fri, 29 Jul 2011 10:19:46 +0000 (07:19 -0300)]
[media] vivi: fill in colorspace

The colorspace was never filled in, causing complaints from v4l2-compliance.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] dvb_frontend: fix compile warning
Hans Verkuil [Sat, 27 Aug 2011 14:30:25 +0000 (11:30 -0300)]
[media] dvb_frontend: fix compile warning

Andreas Oberritter <obi@linuxtv.org> has looked at this and agreed that it is
safe to remove the 'timeout' variable.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] si470x: fix compile warning
Hans Verkuil [Sat, 27 Aug 2011 14:25:31 +0000 (11:25 -0300)]
[media] si470x: fix compile warning

Tobias Lorenz <tobias.lorenz@gmx.net> has looked at this and agreed that the
'buf' variable could be removed.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] vpx3220, bt819: fix compiler warnings
Hans Verkuil [Thu, 25 Aug 2011 13:52:53 +0000 (10:52 -0300)]
[media] vpx3220, bt819: fix compiler warnings

Same status/res mixup.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] drxd_hard: fix compiler warnings
Hans Verkuil [Thu, 25 Aug 2011 13:47:15 +0000 (10:47 -0300)]
[media] drxd_hard: fix compiler warnings

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] mantis: fix compiler warnings
Hans Verkuil [Thu, 25 Aug 2011 13:40:07 +0000 (10:40 -0300)]
[media] mantis: fix compiler warnings

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] az6027: fix compiler warnings
Hans Verkuil [Thu, 25 Aug 2011 13:36:59 +0000 (10:36 -0300)]
[media] az6027: fix compiler warnings

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] tvaudio: fix compiler warnings
Hans Verkuil [Thu, 25 Aug 2011 13:24:16 +0000 (10:24 -0300)]
[media] tvaudio: fix compiler warnings

This is indeed a bug: balance and volume must be used to set the left and right
channel volume. Fixed.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] af9005-fe: fix compiler warning
Hans Verkuil [Thu, 25 Aug 2011 13:17:39 +0000 (10:17 -0300)]
[media] af9005-fe: fix compiler warning

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] mxl5005s: fix compiler warning
Hans Verkuil [Thu, 25 Aug 2011 13:10:32 +0000 (10:10 -0300)]
[media] mxl5005s: fix compiler warning

Removed the unused Xtal_Int variable. That made it also possible to remove a
related function. However, the code of that function has been preserved in a
comment describing an equation. Without that function that comment would
have been hard to understand.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] ddbridge: fix compiler warnings
Hans Verkuil [Thu, 25 Aug 2011 12:59:16 +0000 (09:59 -0300)]
[media] ddbridge: fix compiler warnings

'off' was unused and 'ret' really had to be used to return -EFAULT.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] saa7146: fix compiler warning
Hans Verkuil [Thu, 25 Aug 2011 12:54:30 +0000 (09:54 -0300)]
[media] saa7146: fix compiler warning

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] wl128x: fix compiler warning + wrong write() return
Hans Verkuil [Thu, 25 Aug 2011 12:43:49 +0000 (09:43 -0300)]
[media] wl128x: fix compiler warning + wrong write() return

The fix is to check for ret and return -EFAULT if non-zero.

I also noticed that write() didn't return the number of bytes written.
Fixed as well.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] mt20xx.c: fix compiler warnings
Hans Verkuil [Thu, 25 Aug 2011 12:36:42 +0000 (09:36 -0300)]
[media] mt20xx.c: fix compiler warnings

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] radio-si4713.c: fix compiler warning
Hans Verkuil [Thu, 25 Aug 2011 12:14:57 +0000 (09:14 -0300)]
[media] radio-si4713.c: fix compiler warning

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] dvb-usb: refactor MFE code for individual streaming config per frontend
Michael Krufky [Tue, 6 Sep 2011 12:31:57 +0000 (09:31 -0300)]
[media] dvb-usb: refactor MFE code for individual streaming config per frontend

refactor MFE code to allow for individual streaming configuration
for each frontend

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] dvb-usb: add ATSC support for the Hauppauge WinTV-Aero-M
Michael Krufky [Mon, 29 Aug 2011 03:05:35 +0000 (00:05 -0300)]
[media] dvb-usb: add ATSC support for the Hauppauge WinTV-Aero-M

Adds new driver, mxl111sf, to support the WinTV-Aero-M

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Reviewed-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] drxd: fix divide error
Edward Sheldrake [Fri, 26 Aug 2011 15:59:30 +0000 (12:59 -0300)]
[media] drxd: fix divide error

Fix division by zero in drxd triggered by running "femon" before any DVB
tuning has been done (by "scandvb" or anything else).

Signed-off-by: Edward Sheldrake <ejsheldrake@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] gspca: Use current logging styles
Joe Perches [Sun, 21 Aug 2011 22:56:57 +0000 (19:56 -0300)]
[media] gspca: Use current logging styles

Add pr_fmt.
Convert usb style logging macros to pr_<level>.
Remove now unused old usb style logging macros.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] DVB: dvb_frontend: check function pointers on reinitialize
Andreas Oberritter [Wed, 24 Aug 2011 17:33:52 +0000 (14:33 -0300)]
[media] DVB: dvb_frontend: check function pointers on reinitialize

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] t613: Use current logging styles
Joe Perches [Sun, 21 Aug 2011 22:56:56 +0000 (19:56 -0300)]
[media] t613: Use current logging styles

Add pr_fmt.
Convert usb style logging macros to pr_<level>.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] sn9c20x: Use current logging styles
Joe Perches [Sun, 21 Aug 2011 22:56:55 +0000 (19:56 -0300)]
[media] sn9c20x: Use current logging styles

Add pr_fmt.
Convert usb style logging macros to pr_<level>.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] pac207: Use current logging styles
Joe Perches [Sun, 21 Aug 2011 22:56:54 +0000 (19:56 -0300)]
[media] pac207: Use current logging styles

Add pr_fmt.
Convert usb style logging macros to pr_<level>.
Coalesce formats.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] finepix: Use current logging styles
Joe Perches [Sun, 21 Aug 2011 22:56:53 +0000 (19:56 -0300)]
[media] finepix: Use current logging styles

Add pr_fmt.
Convert usb style logging macros to pr_<level>.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] m5602: Use current logging styles
Joe Perches [Sun, 21 Aug 2011 22:56:52 +0000 (19:56 -0300)]
[media] m5602: Use current logging styles

Add pr_fmt and convert usb style logging macro uses to pr_<level>.
Coalesce format strings.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] gl860: Use current logging styles
Joe Perches [Sun, 21 Aug 2011 22:56:51 +0000 (19:56 -0300)]
[media] gl860: Use current logging styles

Add pr_fmt.
Convert err macro use to pr_err.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] et61x251: Use current logging styles
Joe Perches [Sun, 21 Aug 2011 22:56:50 +0000 (19:56 -0300)]
[media] et61x251: Use current logging styles

Add pr_fmt and convert printks to pr_<level>
Remove explicit prefixes from logging messages.
One of the prefixes was defective, a copy/paste error.
Use ##__VA_ARGS__ for variadic macros.
Whitespace neatening.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] bt8xx: Use current logging styles
Joe Perches [Sun, 21 Aug 2011 22:56:48 +0000 (19:56 -0300)]
[media] bt8xx: Use current logging styles

This converts some messages that were emitted at
KERN_INFO to KERN_DEBUG.  All of these messages
were guarded by bttv_debug tests.

Add pr_fmt.
Convert printks to pr_<level>
Convert printks without KERN_<level> to appropriate pr_<level>.
Removed embedded prefixes when pr_fmt was added.
Whitespace cleanups when around other conversions.
Macros coded with if statements should be do { if... } while (0)
so the macros can be used in other if tests.
Use ##__VA_ARGS__ for variadic macro as well.
Coalesce format strings.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] winbond-cir: Use current logging styles
Joe Perches [Sun, 21 Aug 2011 22:56:47 +0000 (19:56 -0300)]
[media] winbond-cir: Use current logging styles

Add pr_fmt, convert printks to pr_<level>.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] ene_ir: Use current logging styles
Joe Perches [Sun, 21 Aug 2011 22:56:46 +0000 (19:56 -0300)]
[media] ene_ir: Use current logging styles

Add pr_fmt.
Convert ene_warn and ene_notice to pr_<level>.
Use pr_debug in __dbg macro and a little neatening.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] rc-core.h: Surround macro with do {} while (0)
Joe Perches [Sun, 21 Aug 2011 22:56:45 +0000 (19:56 -0300)]
[media] rc-core.h: Surround macro with do {} while (0)

Macros coded with if statements should be do { if... } while (0)
so the macros can be used in other if tests.

Use ##__VA_ARGS__ for variadic macro as well.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] saa7146: Use current logging styles
Joe Perches [Sun, 21 Aug 2011 22:56:44 +0000 (19:56 -0300)]
[media] saa7146: Use current logging styles

Standardize the mechanisms to emit logging messages.

A few other modules used an #include from saa7146,
convert those at the same time.

Add pr_fmt.
Convert printks to pr_<level>
Convert printks without KERN_<level> to appropriate pr_<level>.
Convert logging macros requiring multiple parentheses to normal style.
Removed embedded prefixes when pr_fmt was added.
Whitespace cleanups when around other conversions.
Use printf extension %pM to print mac address.
Coalesce format strings.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Michael Hunold <michael@mihu.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] em28xx: don't sleep on disconnect
Chris Rankin [Sat, 20 Aug 2011 19:01:26 +0000 (16:01 -0300)]
[media] em28xx: don't sleep on disconnect

The DVB framework will try to power-down an adapter that no-one is using
any more, but this assumes that the adapter is still connected to the
machine. That's not always true for a USB adapter, so disable the sleep
operations when the adapter has been physically unplugged.

This prevents I2C write failures with error -19 from appearing
occasionally in the dmesg log.

Signed-off-by: Chris Rankin <rankincj@yahoo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] em28xx: move printk lines outside mutex lock
Chris Rankin [Sat, 20 Aug 2011 11:31:05 +0000 (08:31 -0300)]
[media] em28xx: move printk lines outside mutex lock

There's no reason to still be holding the device list mutex for either of these
printk statements.

Signed-off-by: Chris Rankin <rankincj@yahoo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] em28xx: clean up resources should init fail
Chris Rankin [Sat, 20 Aug 2011 11:28:17 +0000 (08:28 -0300)]
[media] em28xx: clean up resources should init fail

This patch ensures that the em28xx_init_dev() function cleans up after itself,
in the event that it fails. This isimportant because the struct em28xx will be
deallocated if em28xx_init_dev() returns an error.

[mchehab@redhat.com: Fix merge conflicts and simplify the goto labels]
Signed-off-by: Chris Rankin <rankincj@yahoo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] em28xx: use atomic bit operations for devices-in-use mask
Chris Rankin [Sat, 20 Aug 2011 11:21:03 +0000 (08:21 -0300)]
[media] em28xx: use atomic bit operations for devices-in-use mask

Use atomic bit operations for the em28xx_devused mask, to prevent an
unlikely race condition should two adapters be plugged in
simultaneously. The operations also clearer than explicit bit
manipulation anyway.

Signed-off-by: Chris Rankin <rankincj@yahoo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] em28xx: pass correct buffer size to snprintf
Chris Rankin [Sat, 20 Aug 2011 11:08:34 +0000 (08:08 -0300)]
[media] em28xx: pass correct buffer size to snprintf

snprintf()'s size parameter includes space for the terminating '\0' character.

Signed-off-by: Chris Rankin <rankincj@yahoo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] DVB: increment minor version after addition of SYS_TURBO
Andreas Oberritter [Tue, 16 Aug 2011 14:04:07 +0000 (11:04 -0300)]
[media] DVB: increment minor version after addition of SYS_TURBO

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] DVB: dvb_frontend: remove static assignments from dtv_property_cache_sync()
Andreas Oberritter [Tue, 16 Aug 2011 14:04:06 +0000 (11:04 -0300)]
[media] DVB: dvb_frontend: remove static assignments from dtv_property_cache_sync()

  dtv_property_cache_init().
  dtv_property_process_get().
  overwritten with invalid values, leading to partially incorrect
  results when calling FE_GET_PROPERTY.

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] drivers/media: do not use EXTRA_CFLAGS
Arnaud Lacombe [Mon, 15 Aug 2011 05:07:08 +0000 (02:07 -0300)]
[media] drivers/media: do not use EXTRA_CFLAGS

Usage of these flags has been deprecated for nearly 4 years by:

    commit f77bf01425b11947eeb3b5b54685212c302741b8
    Author: Sam Ravnborg <sam@neptun.(none)>
    Date:   Mon Oct 15 22:25:06 2007 +0200

        kbuild: introduce ccflags-y, asflags-y and ldflags-y

Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
line use. By default, gmake(1) do not override command line setting, so this is
likely to result in build failure or unexpected behavior.

Replace their usage by Kbuild's `{as,cc,ld}flags-y'.

Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: linux-media@vger.kernel.org
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] Add missing OK key to PCTV IR keymap
Chris Rankin [Sun, 14 Aug 2011 12:18:46 +0000 (09:18 -0300)]
[media] Add missing OK key to PCTV IR keymap

Hi,

The following patch adds the IR code for the missing "OK" key to the Pinnacle
PCTV HD map. This map is now used by the PCTV 290e DVB-T2 device, whose remote
control has 26 buttons.

Signed-off-by: Chris Rankin <rankincj@yahoo.com>
Reviewed-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] drivers/media/video/zr364xx.c: add missing cleanup code
Julia Lawall [Fri, 12 Aug 2011 11:40:08 +0000 (08:40 -0300)]
[media] drivers/media/video/zr364xx.c: add missing cleanup code

It seems just as necessary to free cam->vdev and cam in this error case as
in the next one.

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] MAINTAINERS: add entries for s5p-mfc and s5p-tv drivers
Marek Szyprowski [Wed, 10 Aug 2011 09:32:29 +0000 (06:32 -0300)]
[media] MAINTAINERS: add entries for s5p-mfc and s5p-tv drivers

Both driver has been merged to v3.1-rc1, so add its authors as maintainers.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] ddbridge: fix ddb_ioctl()
Dan Carpenter [Tue, 9 Aug 2011 15:52:38 +0000 (12:52 -0300)]
[media] ddbridge: fix ddb_ioctl()

There were a several problems in this function:

1) Potential integer overflow in the comparison:
if (fio.write_len + fio.read_len > 1028) {

2) If the user gave bogus values for write_len and read_len then
   returning -EINVAL is more appropriate than returning -ENOMEM.

3) wbuf was set to the address of an array and could never be NULL
   so I removed the pointless NULL check.

4) The call to vfree(wbuf) was improper.  That array is part of a
   larger struct and isn't allocated by itself.

5) flashio() can't actually fail, but we may as well add error
   handling in case this changes later.

6) In the default case where an ioctl is not implemented then
   returning -ENOTTY is more appropriate than returning -EFAULT.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] CXD2820R: Replace i2c message translation with repeater gate control
Steve Kerrison [Tue, 9 Aug 2011 10:16:21 +0000 (07:16 -0300)]
[media] CXD2820R: Replace i2c message translation with repeater gate control

This patch implements an i2c_gate_ctrl op for the cxd2820r. Thanks to Robert
Schlabbach for identifying the register address and field to set.

The old i2c intercept code that prefixed messages with a passthrough byte has
been removed and the PCTV nanoStick T2 290e entry in em28xx-dvb has been
updated appropriately.

Tested for DVB-T2 use; I would appreciate it if somebody with DVB-C capabilities
could test it as well - from inspection I cannot see any problems.

This is patch v2. It fixes some schoolboy style errors and removes superfluous
i2c entries in cxd2820r.h.

Signed-off-by: Steve Kerrison <steve@stevekerrison.com>
Acked-by: Antti Palosaari <crope@iki.fi>
Tested-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] DVB: Change API version in documentation: 3 -> 5.4
Andreas Oberritter [Sat, 3 Sep 2011 17:26:34 +0000 (14:26 -0300)]
[media] DVB: Change API version in documentation: 3 -> 5.4

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] DVB: improve documentation for satellite delivery systems
Andreas Oberritter [Sat, 3 Sep 2011 17:26:33 +0000 (14:26 -0300)]
[media] DVB: improve documentation for satellite delivery systems

- Move voltage and tone to DVB-S.
- Add turbo code.
- In DVB-S2 and turbo code sections, refer to DVB-S, as both
  are extensions to DVB-S.
- Add modulation to DVB-S2.

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] DVB: gp8psk-fe: use SYS_TURBO
Andreas Oberritter [Mon, 8 Aug 2011 14:54:37 +0000 (11:54 -0300)]
[media] DVB: gp8psk-fe: use SYS_TURBO

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] DVB: dvb_frontend: Fix compatibility criteria for satellite receivers
Andreas Oberritter [Mon, 8 Aug 2011 14:54:36 +0000 (11:54 -0300)]
[media] DVB: dvb_frontend: Fix compatibility criteria for satellite receivers

  identify a satellite receiver by its 'delivery_system' instead of
  'modulation', which may overlap between different delivery systems.

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] DVB: Add SYS_TURBO for north american turbo code FEC
Andreas Oberritter [Mon, 8 Aug 2011 14:54:35 +0000 (11:54 -0300)]
[media] DVB: Add SYS_TURBO for north american turbo code FEC

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] dib9000: return error code on failure
Dan Carpenter [Sat, 6 Aug 2011 08:01:51 +0000 (05:01 -0300)]
[media] dib9000: return error code on failure

The ret = -EIO needs to be before the goto.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] dib7000p: return error code on allocation failure
Dan Carpenter [Sat, 6 Aug 2011 08:00:34 +0000 (05:00 -0300)]
[media] dib7000p: return error code on allocation failure

The goto needs to be moved after the assignment.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] dvb-core, tda18271c2dd: define get_if_frequency() callback
Mauro Carvalho Chehab [Sat, 3 Sep 2011 14:40:02 +0000 (11:40 -0300)]
[media] dvb-core, tda18271c2dd: define get_if_frequency() callback

Tuners in general convert a high frequency carrier into an Intermediate
Frequency (IF).

Digital tuners like tda18271, xc3028, etc. generally allow changing the IF
frequency, although they generally have recommented settings for the IF.
Analog tuners, have a fixed IF frequency, that depends on the physical
characteristics of some analog components.

For digital tuners, it makes sense to have ways to configure IF,
via the tuner's configuration structure, like what's done inside the
tda18271-fe maps.

The demods need to know what IF is used by the tuner, as it will need
to convert internally from IF into baseband. Currently, the bridge driver
needs to fill a per-demod configuration struct for it, or pass it via
a dvb_attach parameter.

The tda18271 datasheet recommends to use different IF's for different
delivery system types and for different bandwidths.

The DRX-K demod also needs to know the IF frequency in order to work,
just like all other demods. However, as it accepts different delivery
systems (DVB-C and DVB-T), the IF may change if the standard and/or
bandwidth is changed.

So, the usual procedure of passing it via a config struct doesn't work.

One might try to code it as two separate IF frequencies, or even as a
table in function of the delivery system and the bandwidth, but this
will be messy.

So, it is better and simpler to just add a new callback for it and
require the tuners that can be used with MFE frontends like drx-k
to implement a new callback to return the used IF.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Antti Palosaari <crope@iki.fi>
13 years ago[media] em28xx: add em28xx_ prefix to functions
Jarod Wilson [Thu, 14 Jul 2011 22:06:08 +0000 (19:06 -0300)]
[media] em28xx: add em28xx_ prefix to functions

Makes it more straight-forward to follow stack traces if the functions
don't have generic names. Using this as a crutch while trying to better
understand the lockdep warnings I get when loading the em28xx driver.

CC: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] redrat3: remove unused dev struct members
Jarod Wilson [Thu, 14 Jul 2011 22:04:49 +0000 (19:04 -0300)]
[media] redrat3: remove unused dev struct members

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] videobuf2: Do not unconditionally map S/G buffers into kernel space
Jonathan Corbet [Thu, 14 Jul 2011 21:10:44 +0000 (18:10 -0300)]
[media] videobuf2: Do not unconditionally map S/G buffers into kernel space

The one in-tree videobuf2-dma-sg driver (mmp-camera) has no need for a
kernel-space mapping of the buffers; one suspects that most other drivers
would not either.  The videobuf2-dma-sg module does the right thing if
buf->vaddr == NULL - it maps the buffer on demand if somebody needs it.  So
let's not map the buffer at allocation time; that will save a little CPU
time and a lot of address space in the vmalloc range.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] DVB: dvb_frontend: update locking in dvb_frontend_{add, get_event}
Andreas Oberritter [Thu, 4 Aug 2011 15:33:15 +0000 (12:33 -0300)]
[media] DVB: dvb_frontend: update locking in dvb_frontend_{add, get_event}

  - fepriv->parameters_out isn't protected by events->mtx, so
    move the call to fe->ops.get_frontend out of the locked area.
  - move the assignment of e->status into the locked area.

  - use direct assignment instead of memcpy.

  - use mutex_lock instead of mutex_lock_interruptible, because
    all code paths protected by this mutex won't block.

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] DVB: dvb_frontend: clear stale events on FE_SET_FRONTEND
Andreas Oberritter [Thu, 4 Aug 2011 15:33:14 +0000 (12:33 -0300)]
[media] DVB: dvb_frontend: clear stale events on FE_SET_FRONTEND

  the first event after an attempt to tune.

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] DVB: dvb_frontend: avoid possible race condition on first event
Andreas Oberritter [Thu, 4 Aug 2011 15:33:13 +0000 (12:33 -0300)]
[media] DVB: dvb_frontend: avoid possible race condition on first event

  enqueued before the frontend thread wakes up.

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] DVB: dvb_frontend: fix stale parameters on initial frontend event
Andreas Oberritter [Thu, 4 Aug 2011 15:33:12 +0000 (12:33 -0300)]
[media] DVB: dvb_frontend: fix stale parameters on initial frontend event

  Modify it to use the data given by the user.

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] drivers/media/video/hexium_gemini.c: delete useless initialization
Julia Lawall [Thu, 4 Aug 2011 10:29:33 +0000 (07:29 -0300)]
[media] drivers/media/video/hexium_gemini.c: delete useless initialization

Delete nontrivial initialization that is immediately overwritten by the
result of an allocation function.

The semantic match that makes this change is as follows:

// <smpl>
@@
type T;
identifier i;
expression e;
@@

(
T i = \(0\|NULL\|ERR_PTR(...)\);
|
-T i = e;
+T i;
)
... when != i
i = \(kzalloc\|kcalloc\|kmalloc\)(...);

// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] tm6000: Don't try to use a non-existing interface
Mauro Carvalho Chehab [Thu, 1 Sep 2011 05:57:02 +0000 (02:57 -0300)]
[media] tm6000: Don't try to use a non-existing interface

> [34883.426065] tm6000 #0: registered device video0
> [34883.430591] Trident TVMaster TM5600/TM6000/TM6010 USB2 board (Load status: 0)
> [34883.437763] usbcore: registered new interface driver tm6000
> [34884.608372] BUG: unable to handle kernel NULL pointer dereference at 00000002
> [34884.615514] IP: [<f8c4ceea>] tm6000_reset+0xd7/0x11c [tm6000]

The dev->int_in USB interfaces is used by some devices for the
Remote Controller. Not all devices seem to define this interface,
so, tm6000_reset should not try to set the interface to it on
such devices.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] tm6000: Enable radio mode for Cinergy Hybrid XE
Thierry Reding [Thu, 4 Aug 2011 07:14:18 +0000 (04:14 -0300)]
[media] tm6000: Enable radio mode for Cinergy Hybrid XE

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] tm6000: Enable audio clock in radio mode
Thierry Reding [Thu, 4 Aug 2011 07:14:17 +0000 (04:14 -0300)]
[media] tm6000: Enable audio clock in radio mode

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] tm6000: Plug memory leak on PCM free
Thierry Reding [Thu, 4 Aug 2011 07:14:16 +0000 (04:14 -0300)]
[media] tm6000: Plug memory leak on PCM free

When releasing hardware resources, the DMA buffer allocated to the PCM
device needs to be freed to prevent a memory leak.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] tm6000: Do not use video buffers in radio mode
Thierry Reding [Thu, 4 Aug 2011 07:14:15 +0000 (04:14 -0300)]
[media] tm6000: Do not use video buffers in radio mode

If the radio device is opened there is no need to initialize the video
buffer queue because it is not used.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] tm6000: Execute lightweight reset on close
Thierry Reding [Thu, 4 Aug 2011 07:14:13 +0000 (04:14 -0300)]
[media] tm6000: Execute lightweight reset on close

When the last user closes the device, perform a lightweight reset of the
device to bring it into a well-known state.

Note that this is not always enough with the TM6010, which sometimes
needs a hard reset to get into a working state again.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] tm6000: Initialize isochronous transfers only once
Thierry Reding [Thu, 4 Aug 2011 07:14:12 +0000 (04:14 -0300)]
[media] tm6000: Initialize isochronous transfers only once

This fixes a memory leak where isochronous buffers would be set up for
each video buffer, while it is sufficient to set them up only once per
device.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] tm6000: Properly count device usage
Thierry Reding [Thu, 4 Aug 2011 07:14:11 +0000 (04:14 -0300)]
[media] tm6000: Properly count device usage

When the USB device is disconnected, the device usage bit is not cleared
properly. This leads to errors when a device is unplugged and replugged
several times until all TM6000_MAXBOARDS bits are used and keeps the
driver from binding to the device.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] tm6000: Add locking for USB transfers
Thierry Reding [Thu, 4 Aug 2011 07:14:10 +0000 (04:14 -0300)]
[media] tm6000: Add locking for USB transfers

This commit introduces the usb_lock mutex to ensure that a USB request
always gets the proper response. While this is currently not really
necessary it will become important as there are more users.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] tm6000: Rework standard register tables
Thierry Reding [Thu, 4 Aug 2011 07:14:09 +0000 (04:14 -0300)]
[media] tm6000: Rework standard register tables

This commit uses sentinel entries to terminate the TV standard register
tables instead of hard-coding their size, allowing further entries to be
added more easily. It is also more space-efficient if the tables have a
varying number of entries.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] tm6000: Disable video interface in radio mode
Thierry Reding [Thu, 4 Aug 2011 07:14:08 +0000 (04:14 -0300)]
[media] tm6000: Disable video interface in radio mode

Video data is useless in radio mode, so the corresponding interface can
be safely disabled. This should reduce the amount of isochronous traffic
noticeably.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] tm6000: Rename active interface register
Thierry Reding [Thu, 4 Aug 2011 07:14:07 +0000 (04:14 -0300)]
[media] tm6000: Rename active interface register

The register ACTIVE_VIDEO_IF register should be named ACTIVE_IF since it
controls more than just the video interface.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] tm6000: Flesh out the IRQ callback
Thierry Reding [Thu, 4 Aug 2011 07:14:06 +0000 (04:14 -0300)]
[media] tm6000: Flesh out the IRQ callback

This brings the IRQ callback implementation more in line with how other
drivers do it.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] tm6000: Implement I2C flush callback
Thierry Reding [Thu, 4 Aug 2011 07:14:03 +0000 (04:14 -0300)]
[media] tm6000: Implement I2C flush callback

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] tm6000: Use correct input in radio mode
Thierry Reding [Thu, 4 Aug 2011 07:14:02 +0000 (04:14 -0300)]
[media] tm6000: Use correct input in radio mode

In radio mode, the correct input is rinput. The pseudo index 5 is used
but cannot be used to index the vinput array because that only has 3
elements.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] tm6000: Miscellaneous cleanups
Thierry Reding [Thu, 4 Aug 2011 07:14:01 +0000 (04:14 -0300)]
[media] tm6000: Miscellaneous cleanups

This commit fixes a number of coding style issues as well as some issues
reported by checkpatch and sparse.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] tuner/xc2028: Fix frequency offset for radio mode
Mauro Carvalho Chehab [Wed, 31 Aug 2011 18:12:45 +0000 (15:12 -0300)]
[media] tuner/xc2028: Fix frequency offset for radio mode

In radio mode, no frequency offset should be used.

Instead of taking Thierry's patch that creates a separate function
to calculate the digital offset, it seemed better to just keep
everything at the same place.

Reported-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] tuner/xc2028: Add I2C flush callback
Thierry Reding [Thu, 4 Aug 2011 07:13:59 +0000 (04:13 -0300)]
[media] tuner/xc2028: Add I2C flush callback

When loading the firmware, complete each chunk by sending an I2C flush
command to the frontend. Some devices like the tm6000 seem to require
this to properly flush the I2C buffers.

The current code in tm6000 executes the flush command once after each
I2C transfer, which slows down the firmware loading especially when
loading large BASE type images.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] omap3isp: ccdc: Use generic frame sync event instead of private HS_VS event
Sakari Ailus [Wed, 15 Jun 2011 18:58:48 +0000 (15:58 -0300)]
[media] omap3isp: ccdc: Use generic frame sync event instead of private HS_VS event

The ccdc block in the omap3isp produces events whenever it starts receiving
a new frame. A private HS_VS event was used for this previously. Now, the
generic V4L2_EVENT_FRAME_SYNC event is being used for the purpose.

This patch also provides the frame sequence number to user space.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] v4l: events: Define V4L2_EVENT_FRAME_SYNC
Sakari Ailus [Mon, 18 Jul 2011 11:40:03 +0000 (08:40 -0300)]
[media] v4l: events: Define V4L2_EVENT_FRAME_SYNC

Define a frame sync event to tell user space when the reception of a frame
starts.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] ttusb2: add support for the dvb-t part of CT-3650 v3
Jose Alberto Reguero [Mon, 8 Aug 2011 10:35:35 +0000 (07:35 -0300)]
[media] ttusb2: add support for the dvb-t part of CT-3650 v3

Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] cx88: notch filter control fixes
istvan_v@mailbox.hu [Sun, 31 Jul 2011 09:53:29 +0000 (06:53 -0300)]
[media] cx88: notch filter control fixes

This patch reduces the number of available choices for the notch filter type control
so that the standard-specific filter types cannot be selected. It is now limited to
being either 0 (4xFsc, the default) or 1 (square pixel optimized).
The patch also removes the initialization of this control from cx88_reset(), since
that is already done by init_controls(), which is called by cx8800_initdev().

Signed-off-by: Istvan Varga <istvan_v@mailbox.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] tda18212: Use standard logging, remove tda18212_priv.h
Joe Perches [Sun, 31 Jul 2011 07:30:10 +0000 (04:30 -0300)]
[media] tda18212: Use standard logging, remove tda18212_priv.h

Use the more current logging styles with pr_fmt.
Remove now unnecessary private include.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] tda18271: Use printk extension %pV
Joe Perches [Sun, 31 Jul 2011 04:37:10 +0000 (01:37 -0300)]
[media] tda18271: Use printk extension %pV

Deduplicate printk formats to save ~20KB text.

$ size drivers/media/common/tuners/tda18271*o.*
   text    data     bss     dec     hex filename
  10747      56    1920   12723    31b3 drivers/media/common/tuners/tda18271-common.o.new
  18889      56    3112   22057    5629 drivers/media/common/tuners/tda18271-common.o.old
  20561     204    4264   25029    61c5 drivers/media/common/tuners/tda18271-fe.o.new
  31093     204    6000   37297    91b1 drivers/media/common/tuners/tda18271-fe.o.old
   3681    6760     440   10881    2a81 drivers/media/common/tuners/tda18271-maps.o.new
   5631    6760     680   13071    330f drivers/media/common/tuners/tda18271-maps.o.old

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] af9015: use logic or instead of sum numbers
Antti Palosaari [Thu, 28 Jul 2011 22:17:59 +0000 (19:17 -0300)]
[media] af9015: use logic or instead of sum numbers

Style issue.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] af9015: map remote for Leadtek WinFast DTV2000DS
Antti Palosaari [Thu, 28 Jul 2011 22:15:38 +0000 (19:15 -0300)]
[media] af9015: map remote for Leadtek WinFast DTV2000DS

Thanks to Thomas Gutzler for reporting this.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Cc: Thomas Gutzler <thomas.gutzler@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>