platform/kernel/linux-starfive.git
12 years ago[media] media: gpio-ir-recv: add allowed_protos for platform data
Du, Changbin [Tue, 3 Jul 2012 09:27:19 +0000 (06:27 -0300)]
[media] media: gpio-ir-recv: add allowed_protos for platform data

It's better to give platform code a chance to specify the allowed
protocols to use.

[mchehab@redhat.com: fix merge conflict with a patch that made
 half of this change]
Signed-off-by: Du, Changbin <changbin.du@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-jpeg: Use module_platform_driver in jpeg-core.c file
Sachin Kamat [Tue, 3 Jul 2012 08:54:33 +0000 (05:54 -0300)]
[media] s5p-jpeg: Use module_platform_driver in jpeg-core.c file

module_platform_driver makes the code simpler by eliminating module_init
and module_exit calls.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] saa7134: fix spelling of detach in label
Peter Meerwald [Mon, 2 Jul 2012 20:27:41 +0000 (17:27 -0300)]
[media] saa7134: fix spelling of detach in label

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx88-blackbird: replace ioctl by unlocked_ioctl
Hans Verkuil [Fri, 25 May 2012 15:30:18 +0000 (12:30 -0300)]
[media] cx88-blackbird: replace ioctl by unlocked_ioctl

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx88: don't use current_norm
Hans Verkuil [Fri, 25 May 2012 15:15:30 +0000 (12:15 -0300)]
[media] cx88: don't use current_norm

current_norm can only be used if there is a single device node since it is
local to the device node. In this case multiple device nodes share a single
tuner.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx88: fix a number of v4l2-compliance violations
Hans Verkuil [Fri, 25 May 2012 15:04:10 +0000 (12:04 -0300)]
[media] cx88: fix a number of v4l2-compliance violations

- missing COMPRESSED flag for MPEG formats
- set colorspace
- set sizeimage
- add tuner index checks
- setup the frequency ranges correctly
- add missing g_chip_ident ioctl
- fix audmode handling
- don't handle vbi formats on a video node and vice versa.

cx88 now passes the v4l2-compliance tests.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx88: support control events
Hans Verkuil [Fri, 11 May 2012 14:25:03 +0000 (11:25 -0300)]
[media] cx88: support control events

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx88: add priority support
Hans Verkuil [Fri, 11 May 2012 13:57:59 +0000 (10:57 -0300)]
[media] cx88: add priority support

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx88: move fmt, width and height to cx8800_dev
Hans Verkuil [Fri, 11 May 2012 13:45:18 +0000 (10:45 -0300)]
[media] cx88: move fmt, width and height to cx8800_dev

These are global properties and do not belong in the filehandle struct.

Note: the overlay related fields were just removed: they weren't used at all.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx88: remove radio and type from cx8800_fh
Hans Verkuil [Fri, 11 May 2012 13:33:25 +0000 (10:33 -0300)]
[media] cx88: remove radio and type from cx8800_fh

This information is available elsewhere already.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx88: convert cx88-blackbird to the control framework
Hans Verkuil [Mon, 2 Jul 2012 11:47:11 +0000 (08:47 -0300)]
[media] cx88: convert cx88-blackbird to the control framework

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx88: each device node gets the right controls
Hans Verkuil [Fri, 11 May 2012 12:07:45 +0000 (09:07 -0300)]
[media] cx88: each device node gets the right controls

radio only sees audio controls, video sees video and audio and vbi
sees none.

Also disable the chroma_agc control if secam is selected.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx88: first phase to convert cx88 to the control framework
Hans Verkuil [Sun, 10 Jun 2012 10:39:52 +0000 (07:39 -0300)]
[media] cx88: first phase to convert cx88 to the control framework

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx88: fix querycap
Hans Verkuil [Wed, 9 May 2012 19:23:07 +0000 (16:23 -0300)]
[media] cx88: fix querycap

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2-framework.txt: Update the locking documentation
Hans Verkuil [Mon, 2 Jul 2012 08:43:34 +0000 (05:43 -0300)]
[media] v4l2-framework.txt: Update the locking documentation

This documents the new queue->lock and how to use it. It also removes the
documentation of v4l2_disable_ioctl_locking: this is only used in gspca and
will be removed once gspca has been converted to vb2.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] pwc: v4l2-compliance fixes
Hans Verkuil [Sun, 10 Jun 2012 07:34:10 +0000 (04:34 -0300)]
[media] pwc: v4l2-compliance fixes

- add device_caps
- set colorspace
- s_parm should support a fps of 0 (== reset to nominal fps)

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] pwc: use the new vb2 helpers
Hans Verkuil [Mon, 2 Jul 2012 08:51:58 +0000 (05:51 -0300)]
[media] pwc: use the new vb2 helpers

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2-dev.c: also add debug support for the fops
Hans Verkuil [Sat, 9 Jun 2012 15:13:29 +0000 (12:13 -0300)]
[media] v4l2-dev.c: also add debug support for the fops

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] vivi: add create_bufs/preparebuf support
Hans Verkuil [Fri, 22 Jun 2012 08:53:31 +0000 (05:53 -0300)]
[media] vivi: add create_bufs/preparebuf support

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] vivi: use vb2 helper functions
Hans Verkuil [Fri, 22 Jun 2012 08:53:02 +0000 (05:53 -0300)]
[media] vivi: use vb2 helper functions

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] vivi: embed struct video_device instead of allocating it
Hans Verkuil [Sat, 9 Jun 2012 14:27:43 +0000 (11:27 -0300)]
[media] vivi: embed struct video_device instead of allocating it

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] vivi: remove pointless g/s_std support
Hans Verkuil [Fri, 22 Jun 2012 08:49:33 +0000 (05:49 -0300)]
[media] vivi: remove pointless g/s_std support

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] videobuf2-core: add helper functions
Hans Verkuil [Mon, 2 Jul 2012 08:59:18 +0000 (05:59 -0300)]
[media] videobuf2-core: add helper functions

Add helper functions to make it easier to adapt drivers to vb2.

These helpers take care of core locking and check if the filehandle is the
owner of the queue.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2-dev/ioctl.c: add vb2_queue support to video_device
Hans Verkuil [Fri, 22 Jun 2012 10:29:35 +0000 (07:29 -0300)]
[media] v4l2-dev/ioctl.c: add vb2_queue support to video_device

This prepares struct video_device for easier integration with vb2.

It also introduces a new lock that protects the vb2_queue. It is up
to the driver to use it or not. And the driver can associate an owner
filehandle with the queue to check whether queuing requests are
permitted for the calling filehandle.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] Spec: document CREATE_BUFS behavior if count == 0
Hans Verkuil [Fri, 22 Jun 2012 08:47:30 +0000 (05:47 -0300)]
[media] Spec: document CREATE_BUFS behavior if count == 0

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] vb2-core: add support for count == 0 in create_bufs
Hans Verkuil [Fri, 22 Jun 2012 08:44:14 +0000 (05:44 -0300)]
[media] vb2-core: add support for count == 0 in create_bufs

This also fixes incorrect error handling in create_bufs: the return code
of __vb2_queue_alloc is the number of allocated buffers, and not a
traditional error code.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] vb2-core: refactor reqbufs/create_bufs
Hans Verkuil [Wed, 27 Jun 2012 20:10:30 +0000 (17:10 -0300)]
[media] vb2-core: refactor reqbufs/create_bufs

Split off the memory and type validation. This is done both from reqbufs
and create_bufs, and will also be done by vb2 helpers in a later patch.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx18: don't mess with vfd->debug
Hans Verkuil [Sat, 9 Jun 2012 13:54:19 +0000 (10:54 -0300)]
[media] cx18: don't mess with vfd->debug

This is now controlled by sysfs.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] ivtv: don't mess with vfd->debug
Hans Verkuil [Sat, 9 Jun 2012 13:48:53 +0000 (10:48 -0300)]
[media] ivtv: don't mess with vfd->debug

This is now controlled by sysfs.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2-ioctl: remove v4l_(i2c_)print_ioctl
Hans Verkuil [Fri, 22 Jun 2012 09:38:06 +0000 (06:38 -0300)]
[media] v4l2-ioctl: remove v4l_(i2c_)print_ioctl

v4l_i2c_print_ioctl wasn't used and v4l_print_ioctl could be replaced by
v4l_printk_ioctl.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2-dev.c: add debug sysfs entry
Hans Verkuil [Fri, 22 Jun 2012 09:37:38 +0000 (06:37 -0300)]
[media] v4l2-dev.c: add debug sysfs entry

Since this could theoretically change the debug value while in the middle
of v4l2-ioctl.c, we make a copy of vfd->debug to ensure consistent debug
behavior.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2-ioctl.c: finalize table conversion
Hans Verkuil [Fri, 22 Jun 2012 09:35:01 +0000 (06:35 -0300)]
[media] v4l2-ioctl.c: finalize table conversion

Implement the default case which finalizes the table conversion and allows
us to remove the last part of the switch.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2-ioctl.c: use the new table for the remaining ioctls
Hans Verkuil [Sat, 9 Jun 2012 15:55:52 +0000 (12:55 -0300)]
[media] v4l2-ioctl.c: use the new table for the remaining ioctls

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2-ioctl.c: use the new table for preset/timings ioctls
Hans Verkuil [Sat, 9 Jun 2012 13:09:07 +0000 (10:09 -0300)]
[media] v4l2-ioctl.c: use the new table for preset/timings ioctls

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2-ioctl.c: use the new table for debug ioctls
Hans Verkuil [Sat, 9 Jun 2012 13:06:25 +0000 (10:06 -0300)]
[media] v4l2-ioctl.c: use the new table for debug ioctls

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2-ioctl.c: use the new table for compression ioctls
Hans Verkuil [Sat, 9 Jun 2012 13:02:49 +0000 (10:02 -0300)]
[media] v4l2-ioctl.c: use the new table for compression ioctls

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2-ioctl.c: use the new table for selection ioctls
Hans Verkuil [Sat, 9 Jun 2012 14:57:46 +0000 (11:57 -0300)]
[media] v4l2-ioctl.c: use the new table for selection ioctls

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2-ioctl.c: use the new table for control ioctls
Hans Verkuil [Sat, 9 Jun 2012 15:54:02 +0000 (12:54 -0300)]
[media] v4l2-ioctl.c: use the new table for control ioctls

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2-ioctl.c: use the new table for queuing/parm ioctls
Hans Verkuil [Fri, 22 Jun 2012 09:23:59 +0000 (06:23 -0300)]
[media] v4l2-ioctl.c: use the new table for queuing/parm ioctls

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2-ioctl.c: use the new table for std/tuner/modulator ioctls
Hans Verkuil [Fri, 22 Jun 2012 09:17:48 +0000 (06:17 -0300)]
[media] v4l2-ioctl.c: use the new table for std/tuner/modulator ioctls

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2-ioctl.c: use the new table for overlay/streamon/off ioctls
Hans Verkuil [Sat, 9 Jun 2012 15:50:15 +0000 (12:50 -0300)]
[media] v4l2-ioctl.c: use the new table for overlay/streamon/off ioctls

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2-ioctl.c: use the new table for format/framebuffer ioctls
Hans Verkuil [Fri, 22 Jun 2012 09:12:57 +0000 (06:12 -0300)]
[media] v4l2-ioctl.c: use the new table for format/framebuffer ioctls

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2-ioctl.c: use the new table for priority ioctls
Hans Verkuil [Sat, 9 Jun 2012 12:27:10 +0000 (09:27 -0300)]
[media] v4l2-ioctl.c: use the new table for priority ioctls

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2-ioctl.c: use the new table for querycap and i/o ioctls
Hans Verkuil [Fri, 22 Jun 2012 09:09:54 +0000 (06:09 -0300)]
[media] v4l2-ioctl.c: use the new table for querycap and i/o ioctls

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2-ioctl.c: remove an unnecessary #ifdef
Hans Verkuil [Sat, 9 Jun 2012 13:00:51 +0000 (10:00 -0300)]
[media] v4l2-ioctl.c: remove an unnecessary #ifdef

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2-ioctl.c: v4l2-ioctl: add debug and callback/offset functionality
Hans Verkuil [Fri, 22 Jun 2012 09:04:16 +0000 (06:04 -0300)]
[media] v4l2-ioctl.c: v4l2-ioctl: add debug and callback/offset functionality

Add the necessary plumbing to make it possible to replace the switch by a
table driven implementation.

The ioctls ops can either be called directly, or by calling a small function
that does some additional work if needed.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2-ioctl.c: introduce INFO_FL_CLEAR to replace switch
Hans Verkuil [Sat, 9 Jun 2012 11:55:31 +0000 (08:55 -0300)]
[media] v4l2-ioctl.c: introduce INFO_FL_CLEAR to replace switch

The switch statement that determines how much data should be copied from
userspace is replaced by a table lookup.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2-ioctl.c: move a block of code down, no other changes
Hans Verkuil [Mon, 4 Jun 2012 08:23:40 +0000 (05:23 -0300)]
[media] v4l2-ioctl.c: move a block of code down, no other changes

A block of code is moved down in the code to make later changes easier.
Do just the move without other changes to keep the diff readable for the
upcoming patch.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] bttv-cards.c: Allow radio for CHP05x/CHP06x
Thomas Betker [Sun, 1 Jul 2012 13:22:08 +0000 (10:22 -0300)]
[media] bttv-cards.c: Allow radio for CHP05x/CHP06x

Add ".has_radio = 1" for BTTV_BOARD_MAGICTVIEW061 because there are
some CHP05x/CHP06x boards with a radio tuner.

I still have an analog Askey Magic TView card (CHP051, PCI 144f:3002)
which I use for radio only. This worked fine with kernel 2.6.37
(openSUSE 11.4), but no longer works with kernel 3.1.10 (openSUSE 12.1).

The reason apparently is that ".has_radio = 1" is missing in
bttv-cards.c for BTTV_BOARD_MAGICTVIEW061; when I add this line and
recompile the kernel, radio is working again. The line is still missing
in the latest git tree, for which I have generated the attached patch.

I can't test what will happen for CHP05x/CHP06x devices without radio;
however, it seems that other cards also have the problem that there are
some boards with radio and some without, so I hope that this can be
sorted out.

Signed-off-by: Thomas Betker <thomas.betker@freenet.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[PATCH] media: add Analog Devices ADV7393 video encoder driver
Benoît Thébaudeau [Thu, 28 Jun 2012 15:12:13 +0000 (12:12 -0300)]
[PATCH] media: add Analog Devices ADV7393 video encoder driver

Add ADV7393 I²C-based video encoder driver. This driver has been tested on
custom hardware. It has been tested for composite output. It is derived from the
ADV7343 driver.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] [V3] stv090x: variable 'no_signal' set but not used
Mauro Carvalho Chehab [Fri, 6 Jul 2012 18:11:15 +0000 (15:11 -0300)]
[media] [V3] stv090x: variable 'no_signal' set but not used

Remove variable and ignore return value of stv090x_chk_signal().

Tested by compilation only.

[mchehab@redhat.com: instead of reverting and applying V3,
 applied just the diff patch, for the sake of a cleaner history]
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Reviewed-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] uvcvideo: Fix alternate setting selection
Laurent Pinchart [Thu, 21 Jun 2012 09:35:04 +0000 (06:35 -0300)]
[media] uvcvideo: Fix alternate setting selection

The alternate setting number is not equal to the alternate setting index
in the interface alternate settings table. Use the alternate setting
number from the interface descriptor when calling usb_set_interface().

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] uvcvideo: Fix frame drop in bulk video stream
Jayakrishnan [Fri, 9 Mar 2012 13:10:49 +0000 (10:10 -0300)]
[media] uvcvideo: Fix frame drop in bulk video stream

When video endpoint is configured as bulk, a ZLP is sent after every
video frames with size as multiple of 512 bytes. This is done so that
host can detect end of transfer and pass data for processing.
Still, frames that are multiple of 16K in size gets dropped. The ZLP
sent by camera is ignored by uvc_video_decode_bulk(). The makes sure
that the ZLP is not part of a video frame before ignoring it. If ZLP
follows a video frame, then it triggers completion callback.

[mchehab@redhat.com: Fix a small CodingStyle issue]
Signed-off-by: Jayakrishnan Memana <jayakrishnan.memana@maxim-ic.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] uvcvideo: Document the struct uvc_xu_control_query query field
Laurent Pinchart [Mon, 14 May 2012 07:34:34 +0000 (04:34 -0300)]
[media] uvcvideo: Document the struct uvc_xu_control_query query field

Several developers have reported that the lack of macros for the struct
uvc_xu_control_query query field in uvcvideo.h was confusing and forced
them to look at the driver source code to find out what applications
were supposed to pass in that field.

Add a comment to the header to clarify the expected usage of the query
field.

Reported-by: Paulo Assis <pj.assis@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] drxk: Improve logging
Martin Blumenstingl [Wed, 4 Jul 2012 20:38:23 +0000 (17:38 -0300)]
[media] drxk: Improve logging

This patch simply fixes some logging calls:
- Use KERN_INFO when printing the chip status.
- Add a missing space when logging the drxk_gate_ctrl call.
- Use the same logging text as always if the scu_command in GetQAMLockStatus fails.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agofixupSigned-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Fri, 6 Jul 2012 17:53:51 +0000 (14:53 -0300)]
fixupSigned-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

12 years ago[media] drxk: Make the QAM demodulator command parameters configurable
Martin Blumenstingl [Wed, 4 Jul 2012 20:36:55 +0000 (17:36 -0300)]
[media] drxk: Make the QAM demodulator command parameters configurable

Currently there are two different implementations (in the firmware) for
the QAM demodulator command: one takes 4 and the other takes 2
parameters. The driver shows an error in dmesg When using the
4-parameter command with firmware that implements the 2-parameter
command. Unfortunately this happens every time when chaning the
frequency (on DVB-C).

This patch simply makes configurable, how many command parameters will
be used. All existing drxk_config instances using the "drxk_a3.mc" were
updated because this firmware is the only loadable firmware where the
QAM demodulator command takes 4 parameters. Some firmwares in the ROM
might also use it. The drxk instances in the em28xx-dvb driver were also
updated to silence the warnings.

If no qam_demod_parameter_count is given in the drxk_config struct, then
the correct number of parameters will be auto-detected.

[mchehab@redhat.com: Fix a small CodingStyle issue at one comment]
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] drxk: fix a '&' vs '|' bug
Dan Carpenter [Tue, 26 Jun 2012 07:40:38 +0000 (04:40 -0300)]
[media] drxk: fix a '&' vs '|' bug

IQM_AF_CLKNEG_CLKNEGDATA__M is 0x2 and
IQM_AF_CLKNEG_CLKNEGDATA_CLK_ADC_DATA_POS is 0.  (clkNeg | 0x2) is never
equal to zero so the condition can never be true.

I consulted with Ralph Metzler and the '|' should be changed to a '&'.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
CC: Ralph Metzler <rjkm@metzlerbros.de>
Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tuner-xc2028: tag the usual firmwares to help dracut
Mauro Carvalho Chehab [Tue, 26 Jun 2012 18:34:22 +0000 (15:34 -0300)]
[media] tuner-xc2028: tag the usual firmwares to help dracut

When tuner-xc2028 is not compiled as a module, dracut will
need to copy the firmware inside the initfs image.

So, use MODULE_FIRMWARE() to indicate such need.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] uvc/Kconfig: Fix INPUT/EVDEV dependencies
Mauro Carvalho Chehab [Fri, 6 Jul 2012 13:41:53 +0000 (10:41 -0300)]
[media] uvc/Kconfig: Fix INPUT/EVDEV dependencies

USB_VIDEO_CLASS_INPUT_EVDEV should be dependent on the UVC
selection, as otherwise, when UVC is unselected, this dependent
config still appears.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] rc/Kconfig: Move a LIRC sub-option to the right place
Mauro Carvalho Chehab [Fri, 6 Jul 2012 12:21:13 +0000 (09:21 -0300)]
[media] rc/Kconfig: Move a LIRC sub-option to the right place

The IR to LIRC option were at the wrong sub-menu. Move it to the right
place.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] Kconfig: Split the core support options from the driver ones
Mauro Carvalho Chehab [Fri, 6 Jul 2012 12:12:59 +0000 (09:12 -0300)]
[media] Kconfig: Split the core support options from the driver ones

Better arrange the remote controller driver items to happen after the
core support, on their proper menus, and making clerarer what is media
core options and what is media driver options.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx231xx: don't DMA to random addresses
David Dillow [Mon, 18 Jun 2012 03:15:21 +0000 (00:15 -0300)]
[media] cx231xx: don't DMA to random addresses

Commit 7a6f6c29d264cdd2fe0eb3d923217eed5f0ad134 (cx231xx: use
URB_NO_TRANSFER_DMA_MAP) was intended to avoid mapping the DMA buffer
for URB twice. This works for the URBs allocated with usb_alloc_urb(),
as those are allocated from cohernent DMA pools, but the flag was also
added for the VBI and audio URBs, which have a manually allocated area.
This leaves the random trash in the structure after allocation as the
DMA address, corrupting memory and preventing VBI and audio from
working. Letting the USB core map the buffers solves the problem.

Signed-off-by: David Dillow <dave@thedillows.org>
Cc: Sri Deevi <srinivasa.deevi@conexant.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx231xx: use TRANSFER_TYPE enum for cleanup
David Dillow [Mon, 18 Jun 2012 03:20:06 +0000 (00:20 -0300)]
[media] cx231xx: use TRANSFER_TYPE enum for cleanup

Most calls to cx231xx_capture_start() already use the values from
TRANSFER_TYPE, but cx231xx_capture_start() and
cx231xx_initialize_stream_xfer() were hand coding the values.
Use the named values (81 is never passed in), and simplify
cx231xx_capture_start(), as the switch statements were identical and
pcb_config->config_num is a u8, so any non-zero config got the same
result.

Signed-off-by: David Dillow <dave@thedillows.org>
Cc: Sri Deevi <srinivasa.deevi@conexant.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] get_dvb_firmware: add logic to get sms1xx-hcw* firmware
Mauro Carvalho Chehab [Fri, 6 Jul 2012 01:35:55 +0000 (22:35 -0300)]
[media] get_dvb_firmware: add logic to get sms1xx-hcw* firmware

The firmwares are there at the same place for a long time. However,
each time I need to remember where it is, I need to seek at the net.

The better is to just add a logic at the get_dvb_firmare script,
in order to obtain it from a reliable source.

Cc: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2-compat-ioctl32: fix compilation breakage
Mauro Carvalho Chehab [Fri, 6 Jul 2012 00:48:58 +0000 (21:48 -0300)]
[media] v4l2-compat-ioctl32: fix compilation breakage

changeset 2b719d7baf (v4l: drop v4l2_buffer.input and V4L2_BUF_FLAG_INPUT)
broke compilation on x86_64:

v4l2-compat-ioctl32.c: In function 'get_v4l2_buffer32':
v4l2-compat-ioctl32.c:391:4: error: expected ')' before 'return'
...
v4l2-compat-ioctl32.c: In function 'put_v4l2_buffer32':
v4l2-compat-ioctl32.c:475:4: error: expected ')' before 'return'
...

Add the missing close parenthesis character.

Cc: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] staging: solo6x10: Fix TODO file with proper maintainer
Ezequiel García [Thu, 21 Jun 2012 18:52:03 +0000 (15:52 -0300)]
[media] staging: solo6x10: Fix TODO file with proper maintainer

Mauro Carvalho Chehab is the current maintainer of staging/media.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: only show V4L devices based on device type selection
Mauro Carvalho Chehab [Mon, 28 May 2012 11:17:49 +0000 (08:17 -0300)]
[media] media: only show V4L devices based on device type selection

After this patch, the MEDIA*_SUPPORT will be used as a filter,
exposing only devices that are pertinent to one of the 3
V4L types: webcam/grabber, radio, analog TV.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: Remove VIDEO_MEDIA Kconfig option
Mauro Carvalho Chehab [Mon, 28 May 2012 11:17:48 +0000 (08:17 -0300)]
[media] media: Remove VIDEO_MEDIA Kconfig option

In the past, it was possible to have either DVB or V4L2 core
as module and the other as builtin. Such config never make much
sense, and created several issues in order to make the Kconfig
dependency to work, as all drivers that depend on both (most
TV drivers) would need to be compiled as 'm'. Due to that,
the VIDEO_MEDIA config option were added.

Instead of such weird approach, let's just use the MEDIA_SUPPORT
=y or =m to select if the media subsystem core will be either
builtin or module, simplifying the building system logic.

Also, fix the tuners configuration, by enabling them only if
a tuner is required. So, if just webcam/grabbers support is
selected, no tuner option will be selected. Also, if only digital
TV is selected, no analog tuner support is selected.

That removes the need of using EXPERT customise options, when
analog TV is not selected.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: reorganize the main Kconfig items
Mauro Carvalho Chehab [Mon, 28 May 2012 11:17:47 +0000 (08:17 -0300)]
[media] media: reorganize the main Kconfig items

Change the main items to:

<m> Multimedia support  --->
   [ ]   Cameras/video grabbers support
   [ ]   Analog TV support
   [ ]   Digital TV support
   [ ]   AM/FM radio receivers/transmitters support
   [ ]   Remote Controller support

This provides an interface that is clearer to end users that
are compiling the Kernel, and will allow the building system
to automatically unselect drivers for unused functions.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] videobuf-core.h: remove input fields
Mauro Carvalho Chehab [Thu, 5 Jul 2012 21:01:55 +0000 (18:01 -0300)]
[media] videobuf-core.h: remove input fields

Now that the input fields got removed from the userspace API,
there's no sense to keep there at the VB struct. Remove it.

Cc: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l: drop v4l2_buffer.input and V4L2_BUF_FLAG_INPUT
Sakari Ailus [Wed, 2 May 2012 12:40:03 +0000 (09:40 -0300)]
[media] v4l: drop v4l2_buffer.input and V4L2_BUF_FLAG_INPUT

Remove input field in struct v4l2_buffer and flag V4L2_BUF_FLAG_INPUT which
tells the former is valid. The flag is used by no driver currently.

Also change the documentation accordingly.

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>
12 years ago[media] xc5000: Add support for DMB-TH and ISDB-T
Mauro Carvalho Chehab [Thu, 5 Jul 2012 17:07:59 +0000 (14:07 -0300)]
[media] xc5000: Add support for DMB-TH and ISDB-T

xc5000 is just a tuner, not a decoder, so both DMB-TH and ISDB-T should
work properly there: it is just a matter of teaching the driver what
saw filter should be used and how to calculate the center frequency.

Requested-by: Choi Wing Chan <chanchoiwing@gmail.com>
Cc: Steven Toth <stoth@linuxtv.org>
Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tvp5150: fix kernel crash if chip is unavailable
Dmitry Lifshitz [Wed, 13 Jun 2012 10:49:30 +0000 (07:49 -0300)]
[media] tvp5150: fix kernel crash if chip is unavailable

tvp5150 driver probe function doesn't check if the chip is present.
Thus the driver can be loaded without having a device.
This is dangerous and can cause kernel crash like this:

Kernel BUG at c03c0964 [verbose debug info unavailable]
Internal error: Oops - BUG: 0 [#1] PREEMPT ARM
Modules linked in:
CPU: 0    Tainted: G        W     (3.4.0-cm-t3730+ #2)
PC is at media_entity_create_link+0xe4/0xf4
LR is at isp_register_entities+0x228/0x2f4
pc : [<c03c0964>]    lr : [<c03f3b30>]    psr: 60000013
sp : cf02de50  ip : 00000000  fp : c079405c
r10: 00000000  r9 : 00000000  r8 : cf33c800
r7 : c0794834  r6 : 00000000  r5 : 00000000  r4 : cf365b48
r3 : 00000000  r2 : cf365b48  r1 : 00000000  r0 : cf33c800
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c5387d  Table: 80004019  DAC: 00000015
Process swapper (pid: 1, stack limit = 0xcf02c2f0)
Stack: (0xcf02de50 to 0xcf02e000)
de40:                                     cf360000 cf366f28 cf366218 c0794834
de60: cf365b48 00000000 cf33c800 c03f3b30 00000000 00000000 cf360890 cf3668a0
de80: 00000003 cf360000 c0785a58 00000000 cf360528 00000000 00000000 00003fff
dea0: cf360500 c03f4cdc c06cc1f4 cf360000 c0785a58 c0d27808 c07d55ec c0785a58
dec0: c031f0e0 c07d55ec c0776900 000000bb 00000000 c032040c c03203f4 c031ef0c
dee0: c0785a58 c07d55ec c0785a8c c031f0e0 c075e670 c031f0c8 cf02deb8 c0785a58
df00: c07d55ec c031f174 c07d55ec 00000000 cf02df18 c031d7a0 cf01d4a8 cf068b10
df20: 00000000 c07d55ec c07c74d0 cf34bcc0 00000000 c031ded8 c0672340 c054cd38
df40: 00000000 c07e68c0 c07d55ec 00000000 00000000 c075e670 c0776900 000000bb
df60: 00000000 c031f770 c07e68c0 00000007 c07e68c0 00000000 c075e670 c0008790
df80: 000000bb 00000006 00000006 c066e650 cf02dfa4 c07689b8 c07689b8 00000007
dfa0: c07e68c0 c073f2e8 c07689c0 000000bb 00000000 c073f2bc 00000006 00000006
dfc0: c073f2e8 00000000 c077649c c077649c c00150cc 00000013 00000000 00000000
dfe0: 00000000 c073f3cc cf02dfe8 00000000 c073f368 c00150cc 00000000 00000000
[<c03c0964>] (media_entity_create_link+0xe4/0xf4) from [<c03f3b30>] (isp_register_entities+0x228/0x2f4)
[<c03f3b30>] (isp_register_entities+0x228/0x2f4) from [<c03f4cdc>] (isp_probe+0x7ac/0x9b8)
[<c03f4cdc>] (isp_probe+0x7ac/0x9b8) from [<c032040c>] (platform_drv_probe+0x18/0x1c)
[<c032040c>] (platform_drv_probe+0x18/0x1c) from [<c031ef0c>] (really_probe+0x64/0x1d8)
[<c031ef0c>] (really_probe+0x64/0x1d8) from [<c031f0c8>] (driver_probe_device+0x48/0x60)
[<c031f0c8>] (driver_probe_device+0x48/0x60) from [<c031f174>] (__driver_attach+0x94/0x98)
[<c031f174>] (__driver_attach+0x94/0x98) from [<c031d7a0>] (bus_for_each_dev+0x54/0x80)
[<c031d7a0>] (bus_for_each_dev+0x54/0x80) from [<c031ded8>] (bus_add_driver+0xac/0x2a8)
[<c031ded8>] (bus_add_driver+0xac/0x2a8) from [<c031f770>] (driver_register+0x78/0x180)
[<c031f770>] (driver_register+0x78/0x180) from [<c0008790>] (do_one_initcall+0x34/0x184)
[<c0008790>] (do_one_initcall+0x34/0x184) from [<c073f2bc>] (do_basic_setup+0x9c/0xc8)
[<c073f2bc>] (do_basic_setup+0x9c/0xc8) from [<c073f3cc>] (kernel_init+0x64/0xec)
[<c073f3cc>] (kernel_init+0x64/0xec) from [<c00150cc>] (kernel_thread_exit+0x0/0x8)
Code: e1c812b6 e8bd87f0 e7f001f2 eafffffe (e7f001f2)

---[ end trace 3ed3c618b26ff3e8 ]---
Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

This patch fixes the tvp5150_read() function to return an error in case
the I2C transaction fails.
tvp5150_probe() and other relevant driver callbacks changed to check the
status of the I2C read operations.
In case of a read error throw an error message with v4l2_err()
instead of v4l2_dbg().

[mchehab@redhat.com: Fix a small typo breaking compilation]
Signed-off-by: Dmitry Lifshitz <lifshitz@compulab.co.il>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l: mem2mem_testdev: Add horizontal and vertical flip
Tomasz Moń [Tue, 12 Jun 2012 09:43:49 +0000 (06:43 -0300)]
[media] v4l: mem2mem_testdev: Add horizontal and vertical flip

Add horizontal and vertical flip to the mem2mem_testdev driver.
Flip modes can be enabled either separately or simultaneously.

Signed-off-by: Tomasz Moń <desowin@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: remove unused element datawidth from struct mt9m111
Peter Meerwald [Wed, 20 Jun 2012 21:30:58 +0000 (18:30 -0300)]
[media] media: remove unused element datawidth from struct mt9m111

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] a8293: use Kernel dev_* logging
Antti Palosaari [Mon, 2 Jul 2012 08:13:58 +0000 (05:13 -0300)]
[media] a8293: use Kernel dev_* logging

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] a8293: fix register 00 init value
Antti Palosaari [Mon, 2 Jul 2012 07:45:53 +0000 (04:45 -0300)]
[media] a8293: fix register 00 init value

Value 0x00 was written instead of 0x10 which was aim.

Bit4 is overcurrent disable timer - ODT. According to datasheet ODT
functions are always enabled but setting it 1 is still recommended.

Thanks to Aubin Constans to pointing that bug.

Reported-by: Aubin Constans <aconstans@wyplay.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tda10071: convert Kernel dev_* logging
Antti Palosaari [Mon, 2 Jul 2012 06:46:46 +0000 (03:46 -0300)]
[media] tda10071: convert Kernel dev_* logging

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tda10071: use decimal numbers for indexes and lengths
Antti Palosaari [Sun, 1 Jul 2012 18:59:13 +0000 (15:59 -0300)]
[media] tda10071: use decimal numbers for indexes and lengths

Dan asked "Btw, why are the sizes specified in hex instead of
decimal here?". After looking code, I agree also decimal
presentation is clearer. So lets change those.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tda10071: fix DiSEqC message len check
Antti Palosaari [Sun, 1 Jul 2012 18:29:15 +0000 (15:29 -0300)]
[media] tda10071: fix DiSEqC message len check

Message length check was wrong which could cause garbage sent to LNB,
but only in case garbage got from the userspace application.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] rtl28xxu: support Terratec Noxon DAB/DAB+ stick
Thomas Mair [Fri, 18 May 2012 17:47:44 +0000 (14:47 -0300)]
[media] rtl28xxu: support Terratec Noxon DAB/DAB+ stick

Signed-off-by: Hans-Frieder Vogt <hfvogt@gmx.net>
Signed-off-by: Thomas Mair <thomas.mair86@googlemail.com>
Acked-by: Antti Palosaari <crope@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] rtl28xxu: support Delock USB 2.0 DVB-T
Thomas Mair [Fri, 18 May 2012 17:47:43 +0000 (14:47 -0300)]
[media] rtl28xxu: support Delock USB 2.0 DVB-T

Signed-off-by: Thomas Mair <thomas.mair86@googlemail.com>
Acked-by: Antti Palosaari <crope@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] rtl28xxu: renamed rtl2831_rd/rtl2831_wr to rtl28xx_rd/rtl28xx_wr
Thomas Mair [Fri, 18 May 2012 17:47:42 +0000 (14:47 -0300)]
[media] rtl28xxu: renamed rtl2831_rd/rtl2831_wr to rtl28xx_rd/rtl28xx_wr

Signed-off-by: Thomas Mair <thomas.mair86@googlemail.com>
Acked-by: Antti Palosaari <crope@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] rtl28xxu: support for the rtl2832 demod driver
Thomas Mair [Fri, 18 May 2012 17:47:41 +0000 (14:47 -0300)]
[media] rtl28xxu: support for the rtl2832 demod driver

This only adds support for the Terratec Cinergy T Stick Black device.

Changes from previous patches:
- fixed compiler warnings
- added fc0013 tuner handling to this patch

Signed-off-by: Thomas Mair <thomas.mair86@googlemail.com>
Acked-by: Antti Palosaari <crope@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] rtl2832: save some data space by using a macro instead of a table
Mauro Carvalho Chehab [Thu, 5 Jul 2012 15:16:26 +0000 (12:16 -0300)]
[media] rtl2832: save some data space by using a macro instead of a table

Instead of using a table for reg bitmask, use a macro. This should save
some data segment space.

Cc: Thomas Mair <thomas.mair86@googlemail.com>
Cc: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] RTL2832 DVB-T demodulator driver
Thomas Mair [Fri, 18 May 2012 17:47:40 +0000 (14:47 -0300)]
[media] RTL2832 DVB-T demodulator driver

Changelog for ver. 0.5:
- fixed code style and naming errors

Changelog for ver. 0.4:
- removed statistics as their calculation was wrong
- fixed bug in Makefile
- indentation and code style improvements

Signed-off-by: Thomas Mair <thomas.mair86@googlemail.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] ene_ir: Fix driver initialisation
Luis Henriques [Tue, 19 Jun 2012 14:29:49 +0000 (11:29 -0300)]
[media] ene_ir: Fix driver initialisation

commit 9ef449c6b31bb6a8e6dedc24de475a3b8c79be20 ("[media] rc: Postpone ISR
registration") fixed an early ISR registration on several drivers.  It did
however also introduced a bug by moving the invocation of pnp_port_start()
to the end of the probe function.

This patch fixes this issue by moving the invocation of pnp_port_start() to
an earlier stage in the probe function.

Cc: stable@vger.kernel.org
Cc: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tuner, xc2028: add support for get_afc()
Mauro Carvalho Chehab [Wed, 4 Jul 2012 05:33:55 +0000 (02:33 -0300)]
[media] tuner, xc2028: add support for get_afc()

Implement API support to return AFC frequency shift, as this device
supports it. The only other driver that implements it is tda9887,
and the frequency there is reported in Hz. So, use Hz also for this
tuner.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tuner-xc2028: Fix signal strength report
Mauro Carvalho Chehab [Wed, 4 Jul 2012 05:00:00 +0000 (02:00 -0300)]
[media] tuner-xc2028: Fix signal strength report

There are several bugs at the signal strength algorithm:

- It is using logical OR, instead of bit OR;
- It doesn't wait up to 18 ms as it should;
- the strength range is not ok.

Rework on it, in order to make it work.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tuner-core: call has_signal for both TV and radio
Mauro Carvalho Chehab [Wed, 4 Jul 2012 04:54:07 +0000 (01:54 -0300)]
[media] tuner-core: call has_signal for both TV and radio

If g_tuner is called and the tuner is able to return the signal strength
via has_signal(), call the tunner callback to retrieve such data for all
tuner types, not only for radio ones.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tuner-xc2028: use request_firmware_nowait()
Mauro Carvalho Chehab [Sat, 30 Jun 2012 12:08:54 +0000 (09:08 -0300)]
[media] tuner-xc2028: use request_firmware_nowait()

Change the firmware logic to use request_firmware_nowait(), and
to preserve the loaded firmwares in memory, to reduce the risk
of troubles with buggy userspace apps.

With this change, while the firmware is being loaded, the driver
will return -EAGAIN to any calls. If, for some reason, firmware
failed to be loaded from userspace, it will return -ENODEV.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] drxk: prevent doing something wrong when init is not ok
Mauro Carvalho Chehab [Fri, 29 Jun 2012 18:45:04 +0000 (15:45 -0300)]
[media] drxk: prevent doing something wrong when init is not ok

If firmware is not loaded for some reason, or if it is not ready
yet, it makes no sense to honour to any DVB callbacks.

So, return -EAGAIN, as the error condition may be temporary.
If the device doesn't initialize, either because it requires a
firmware or because there's an error during init_drxk, returns
-ENODEV, to indicate such error, on all DVB callbacks.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] drxk: Lock I2C bus during firmware load
Mauro Carvalho Chehab [Fri, 29 Jun 2012 17:43:32 +0000 (14:43 -0300)]
[media] drxk: Lock I2C bus during firmware load

Don't allow other devices at the same I2C bus to use it during
firmware load, in order to prevent using the device while it is
not on a sane state.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] drxk: pass drxk priv struct instead of I2C adapter to i2c calls
Mauro Carvalho Chehab [Fri, 29 Jun 2012 17:24:18 +0000 (14:24 -0300)]
[media] drxk: pass drxk priv struct instead of I2C adapter to i2c calls

As it will be using the unlocked version of i2c_transfer during
firmware loads, make sure that the priv state routine will be
used on all I2C calls, in preparation for the next patch that
will implement an exclusive lock mode to be used during firmware
load, at drxk_init.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] drxk: change it to use request_firmware_nowait()
Mauro Carvalho Chehab [Thu, 21 Jun 2012 12:36:38 +0000 (09:36 -0300)]
[media] drxk: change it to use request_firmware_nowait()

The firmware blob may not be available when the driver probes.

Instead of blocking the whole kernel use request_firmware_nowait() and
continue without firmware.

This shouldn't be that bad on drx-k devices, as they all seem to have an
internal firmware. So, only the firmware update will take a little longer
to happen.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] i2c: Export an unlocked flavor of i2c_transfer
Jean Delvare [Fri, 29 Jun 2012 10:47:19 +0000 (07:47 -0300)]
[media] i2c: Export an unlocked flavor of i2c_transfer

Some drivers (in particular for TV cards) need exclusive access to
their I2C buses for specific operations. Export an unlocked flavor
of i2c_transfer to give them full control.

The unlocked flavor has the following limitations:
* Obviously, caller must hold the i2c adapter lock.
* No debug messages are logged. We don't want to log messages while
  holding a rt_mutex.
* No check is done on the existence of adap->algo->master_xfer. It
  is thus the caller's responsibility to ensure that the function is
  OK to call.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoMerge branch 'v4l_for_linus' into staging/for_v3.6
Mauro Carvalho Chehab [Wed, 27 Jun 2012 11:57:09 +0000 (08:57 -0300)]
Merge branch 'v4l_for_linus' into staging/for_v3.6

* v4l_for_linus: (44 commits)
  [media] smia: Fix compile failures
  [media]  Fix VIDIOC_DQEVENT docbook entry
  [media] s5p-fimc: Fix control creation function
  [media] s5p-mfc: Fix checkpatch error in s5p_mfc_shm.h file
  [media] s5p-mfc: Fix setting controls
  [media] v4l/s5p-mfc: added image size align in VIDIOC_TRY_FMT
  [media] v4l/s5p-mfc: corrected encoder v4l control definitions
  [media] v4l: mem2mem_testdev: Fix race conditions in driver
  [media] s5p-mfc: Bug fix of timestamp/timecode copy mechanism
  [media] cxd2820r: Fix an incorrect modulation type bitmask
  [media] em28xx: Show a warning if the board does not support remote controls
  [media] em28xx: Add remote control support for Terratec's Cinergy HTC Stick HD
  [media] USB: Staging: media: lirc: initialize spinlocks before usage
  [media] Revert "[media] media: mx2_camera: Fix mbus format handling"
  [media] bw-qcam: driver and pixfmt documentation fixes
  [media] cx88: fix firmware load on big-endian systems
  [media] cx18: support big-endian systems
  [media] ivtv: fix support for big-endian systems
  [media] tuner-core: return the frequency range of the correct tuner
  [media] v4l2-dev.c: fix g_parm regression in determine_valid_ioctls()
  ...

Conflicts:
Documentation/DocBook/media/v4l/vidioc-create-bufs.xml
drivers/media/video/em28xx/em28xx-cards.c

12 years ago[media] media: gpio-ir-recv: switch to module_platform_driver
Benoît Thébaudeau [Mon, 18 Jun 2012 18:03:06 +0000 (15:03 -0300)]
[media] media: gpio-ir-recv: switch to module_platform_driver

Cc: Ravi Kumar V <kumarrav@codeaurora.org>
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: gpio-ir-recv: add map name
Benoît Thébaudeau [Mon, 18 Jun 2012 18:02:44 +0000 (15:02 -0300)]
[media] media: gpio-ir-recv: add map name

Make it possible for gpio-ir-recv users to choose a map name.

Cc: Ravi Kumar V <kumarrav@codeaurora.org>
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>