]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
12 years agoMerge /home/v4l/v4l/for_upstream
Mauro Carvalho Chehab [Thu, 19 Apr 2012 20:32:37 +0000 (17:32 -0300)]
Merge /home/v4l/v4l/for_upstream

* /home/v4l/v4l/for_upstream:
  [media] xc5000: support 32MHz & 31.875MHz xtal using the 41.024.5 firmware

12 years ago[media] xc5000: support 32MHz & 31.875MHz xtal using the 41.024.5 firmware
Michael Krufky [Mon, 16 Apr 2012 17:59:32 +0000 (14:59 -0300)]
[media] xc5000: support 32MHz & 31.875MHz xtal using the 41.024.5 firmware

Rather than loading firmware specific for the xtal frequency, just use
the standard firmware and set the xtal frequency after firmware upload.

The modified firmware will never be released, so we're better off
merging this now rather than waiting for v3.5.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoMerge /home/v4l/v4l/for_upstream
Mauro Carvalho Chehab [Thu, 19 Apr 2012 18:41:11 +0000 (15:41 -0300)]
Merge /home/v4l/v4l/for_upstream

* /home/v4l/v4l/for_upstream:
  [media] V4L: mt9m032: fix compilation breakage
  [media] V4L: DocBook: Fix typos in the multi-plane formats description
  [media] V4L: mt9m032: fix two dead-locks

12 years ago[media] V4L: mt9m032: fix compilation breakage
Guennadi Liakhovetski [Wed, 18 Apr 2012 06:59:01 +0000 (03:59 -0300)]
[media] V4L: mt9m032: fix compilation breakage

Fix the following compilation failure:

linux-2.6/drivers/media/video/mt9m032.c: In function '__mt9m032_get_pad_crop':
linux-2.6/drivers/media/video/mt9m032.c:337: error: implicit declaration of function 'v4l2_subdev_get_try_crop'
linux-2.6/drivers/media/video/mt9m032.c:337: warning: return makes pointer from integer without a cast
linux-2.6/drivers/media/video/mt9m032.c: In function '__mt9m032_get_pad_format':
linux-2.6/drivers/media/video/mt9m032.c:359: error: implicit declaration of function 'v4l2_subdev_get_try_format'
linux-2.6/drivers/media/video/mt9m032.c:359: warning: return makes pointer from integer without a cast
linux-2.6/drivers/media/video/mt9m032.c: In function 'mt9m032_probe':
linux-2.6/drivers/media/video/mt9m032.c:767: error: 'struct v4l2_subdev' has no member named 'entity'
linux-2.6/drivers/media/video/mt9m032.c:826: error: 'struct v4l2_subdev' has no member named 'entity'
linux-2.6/drivers/media/video/mt9m032.c: In function 'mt9m032_remove':
linux-2.6/drivers/media/video/mt9m032.c:842: error: 'struct v4l2_subdev' has no member named 'entity'
make[4]: *** [drivers/media/video/mt9m032.o] Error 1

by adding a dependency on VIDEO_V4L2_SUBDEV_API.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] V4L: DocBook: Fix typos in the multi-plane formats description
Sylwester Nawrocki [Mon, 9 Apr 2012 12:31:56 +0000 (09:31 -0300)]
[media] V4L: DocBook: Fix typos in the multi-plane formats description

Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] V4L: mt9m032: fix two dead-locks
Guennadi Liakhovetski [Sun, 8 Apr 2012 19:31:24 +0000 (16:31 -0300)]
[media] V4L: mt9m032: fix two dead-locks

Fix a copy-paste typo and a nested locking function call in mt9m032.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoMerge /home/v4l/v4l/for_upstream
Mauro Carvalho Chehab [Wed, 18 Apr 2012 21:17:57 +0000 (18:17 -0300)]
Merge /home/v4l/v4l/for_upstream

* /home/v4l/v4l/for_upstream:
  [media] rc-core: set mode for winbond-cir
  [media] drxk: Does not unlock mutex if sanity check failed in scu_command()
  [media] dvb_frontend: Fix a regression when switching back to DVB-S

12 years ago[media] rc-core: set mode for winbond-cir
David Härdeman [Sun, 8 Apr 2012 09:13:04 +0000 (06:13 -0300)]
[media] rc-core: set mode for winbond-cir

Setting the correct mode is required by rc-core or scancodes won't be
generated (which isn't very user-friendly).

This one-line fix should be suitable for 3.4-rc2.

Signed-off-by: David Härdeman <david@hardeman.nu>
Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] drxk: Does not unlock mutex if sanity check failed in scu_command()
Alexey Khoroshilov [Thu, 5 Apr 2012 21:53:20 +0000 (18:53 -0300)]
[media] drxk: Does not unlock mutex if sanity check failed in scu_command()

If sanity check fails in scu_command(), goto error leads to unlock of
an unheld mutex. The check should not fail in reality, but it nevertheless
worth fixing.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_frontend: Fix a regression when switching back to DVB-S
Mauro Carvalho Chehab [Tue, 17 Apr 2012 21:32:19 +0000 (18:32 -0300)]
[media] dvb_frontend: Fix a regression when switching back to DVB-S

There are some softwares (Kaffeine and likely xine) that uses a
DVBv5 call to switch to DVB-S2, but expects that a DVBv3 call to
switch back to DVB-S. Well, this is not right, as a DVBv3 call
doesn't know anything about delivery systems.

However, as, by accident, this used to work, we need to restore its
behavior, in order to avoid regressions with those softwares.

Reported on this Fedora 16 bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=812895

Reported-by: Dieter Roever <Dieter.Roever@gmx.de>
Cc: stable@kernel.org # for version 3.3
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoMerge /home/v4l/v4l/patchwork
Mauro Carvalho Chehab [Wed, 11 Apr 2012 21:26:58 +0000 (18:26 -0300)]
Merge /home/v4l/v4l/patchwork

* /home/v4l/v4l/patchwork:
  [media] kernel:kfifo: export __kfifo_max_r symbol
  [media] Default bt878 contrast value
  [media] ati_remote: add support for Medion X10 Digitainer remote
  [media] ati_remote: allow specifying a default keymap selector function
  [media] V4L: JPEG class documentation corrections
  [media] s5p-tv: mark const init data with __initconst instead of __initdata
  [media] V4L: OV5642:remove redundant code to set cropping w/h

12 years ago[media] kernel:kfifo: export __kfifo_max_r symbol
Srinivas Kandagatla [Wed, 11 Apr 2012 08:01:56 +0000 (05:01 -0300)]
[media] kernel:kfifo: export __kfifo_max_r symbol

kfifo_avail expands to __kfifo_max_r which is not an exported symbol.
Any kernel module using kfifo_avail will result in build failures
because of this.
This patch just exports __kfifo_max_r symbol to fix such problems in
future.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Acked-by: Stefani Seibold <stefani@seibold.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] Default bt878 contrast value
Alan McIvor [Mon, 2 Apr 2012 00:11:08 +0000 (21:11 -0300)]
[media] Default bt878 contrast value

The default_value for the Bt878 V4L2_CID_CONTRAST control is currently
set to 32768. Internally this gets translated to an analog input
circuit gain of 1.19. However, the default gain should be 1.0. This
patch alters the default value to 27648 which corresponds to a gain of
1.0. It also alters the probe routine so that the correct value is
written on board initialisation.

[mchehab@redhat.com: behavior confirmed via Fusion 878a datasheet]
Signed-off-by: Alan McIvor <alan.mcivor@reveal.co.nz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] ati_remote: add support for Medion X10 Digitainer remote
Anssi Hannula [Sun, 1 Apr 2012 19:41:46 +0000 (16:41 -0300)]
[media] ati_remote: add support for Medion X10 Digitainer remote

Add support for another Medion X10 remote. This was apparently
originally used with the Medion Digitainer box, but is now sold
separately without any Digitainer labeling.

A peculiarity of this remote is a scrollwheel in place of up/down
buttons. Each direction is mapped to 8 different scancodes, each
corresponding to 1..8 notches, allowing multiple notches to the same
direction to be transmitted in a single scancode. The driver transforms
the multi-notch scancodes to multiple events of the single-notch
scancode.
(0x70..0x77 = 1..8 notches down, 0x78..0x7f = 1..8 notches up)

Since the scrollwheel scancodes are the same that are used for mouse on
some other X10 (ati_remote) remotes, the driver will now check whether
the active keymap has a keycode defined for the single-notch scancode
when a mouse/scrollwheel scancode (0x70..0x7f) is received. If set,
scrollwheel is assumed, otherwise mouse is assumed.

This remote ships with a different receiver than the already supported
Medion X10 remote, but they share the same USB ID. The only difference
in the USB descriptors is that the Digitainer receiver has the Remote
Wakeup bit set in bmAttributes of the Configuration Descriptor.
Therefore that is used to select the default keymap.

Thanks to Stephan Raue from OpenELEC (www.openelec.tv) for providing me
both a Medion X10 Digitainer remote+receiver and an already supported
Medion X10 remote+receiver. Thanks to Martin Beyss for providing some
useful information about the remote (including the "Digitainer" name).
This patch has been tested by both of them and myself.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Tested-by: Stephan Raue <stephan@openelec.tv>
Tested-by: Martin Beyss <Martin.Beyss@rwth-aachen.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] ati_remote: allow specifying a default keymap selector function
Anssi Hannula [Sun, 1 Apr 2012 19:41:45 +0000 (16:41 -0300)]
[media] ati_remote: allow specifying a default keymap selector function

Currently the ati_remote default keymap is selected directly based on
the USB device id.

Add support for instead specifying a function returning the default
keymap, allowing more complex selection logic to be added when needed.

This will be used for Medion X10 remotes in a following commit.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] V4L: JPEG class documentation corrections
Sylwester Nawrocki [Sat, 31 Mar 2012 08:43:55 +0000 (05:43 -0300)]
[media] V4L: JPEG class documentation corrections

This patch fixes following compilation warning:
Error: no ID for constraint linkend: v4l2-jpeg-chroma-subsampling.

and adds missing JPEG control class at the Table A.58.

Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-tv: mark const init data with __initconst instead of __initdata
Uwe Kleine-König [Fri, 30 Mar 2012 19:05:03 +0000 (16:05 -0300)]
[media] s5p-tv: mark const init data with __initconst instead of __initdata

As long as there is no other non-const variable marked __initdata in the
same compilation unit it doesn't hurt. If there were one however
compilation would fail with

error: $variablename causes a section type conflict

because a section containing const variables is marked read only and so
cannot contain non-const variables.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Tomasz Stanislawski <t.stanislaws@samsung.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-media@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] V4L: OV5642:remove redundant code to set cropping w/h
Liu Ying [Fri, 30 Mar 2012 08:41:27 +0000 (05:41 -0300)]
[media] V4L: OV5642:remove redundant code to set cropping w/h

This patch contains code change only to remove redundant
code to set priv->crop_rect.width/height in probe function.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
Acked-by: Chris Lalancette <clalancette@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoMerge /home/v4l/v4l/patchwork
Mauro Carvalho Chehab [Wed, 11 Apr 2012 00:01:14 +0000 (21:01 -0300)]
Merge /home/v4l/v4l/patchwork

* /home/v4l/v4l/patchwork: (65 commits)
  [media] media: tvp5150: Fix mbus format
  [media] em28xx: Make em28xx-input.c a separate module
  [media] em28xx: Change scope of em28xx-input local functions to static
  [media] em28xx: Move em28xx_register_i2c_ir() to em28xx-input.c
  [media] em28xx: Move ir/rc related initialization to em28xx_ir_init()
  [media] em28xx: Export em28xx_[read,write]_reg functions as SYMBOL_GPL
  [media] staging/media/as102: Don't call release_firmware() on uninitialized variable
  [media] em28xx: Remove redundant dev->ctl_input set
  [media] radio-gemtek: add PnP support for AOpen FX-3D/Pro Radio
  [media] radio-isa: PnP support for the new ISA radio framework
  [media] v4l: Mark VIDIOC_SUBDEV_G_CROP and VIDIOC_SUBDEV_S_CROP obsolete
  [media] v4l: Add subdev selections documentation
  [media] v4l: Add subdev selections documentation: svg and dia files
  [media] em28xx: clean-up several unused parametrs in struct em28xx_usb_isoc_ctl
  [media] em28xx-dvb: stop URBs when stopping the streaming
  [media] usb: gadget/uvc: Remove non-required locking from 'uvc_queue_next_buffer' routine
  [media] mm/drivers: use vm_flags_t for vma flags
  [media] uvcvideo: remove unneeded access_ok() check
  [media] [3.3.0] ir-raw: remove BUG_ON in ir_raw_event_thread
  [media] i.MX2: eMMa-PrP: Allow userptr IO mode
  ...

12 years agoMerge /home/v4l/v4l/for_upstream
Mauro Carvalho Chehab [Tue, 10 Apr 2012 23:52:53 +0000 (20:52 -0300)]
Merge /home/v4l/v4l/for_upstream

* /home/v4l/v4l/for_upstream:
  [media] ir-raw: Check available elements in kfifo before adding

12 years ago[media] media: tvp5150: Fix mbus format
Javier Martin [Mon, 26 Mar 2012 12:17:46 +0000 (09:17 -0300)]
[media] media: tvp5150: Fix mbus format

According to p.14 fig 3-3 of the datasheet (SLES098A)
this decoder transmits data in UYVY format.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] em28xx: Make em28xx-input.c a separate module
Ezequiel García [Mon, 26 Mar 2012 12:13:35 +0000 (09:13 -0300)]
[media] em28xx: Make em28xx-input.c a separate module

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
[mchehab@redhat.com: Changed the default to follow the em28xx selection]
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] em28xx: Change scope of em28xx-input local functions to static
Ezequiel García [Mon, 26 Mar 2012 12:13:34 +0000 (09:13 -0300)]
[media] em28xx: Change scope of em28xx-input local functions to static

This functions are no longer used from another file,
so they should be declared as static.
Also is it necessary to move some of them before they
are used, since they are no longer header-declared.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] em28xx: Move em28xx_register_i2c_ir() to em28xx-input.c
Ezequiel García [Mon, 26 Mar 2012 12:13:33 +0000 (09:13 -0300)]
[media] em28xx: Move em28xx_register_i2c_ir() to em28xx-input.c

This function is only used in em28xx-input.c so it
makes no sense to have it anywhere but in em28xx-input.c.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] em28xx: Move ir/rc related initialization to em28xx_ir_init()
Ezequiel García [Mon, 26 Mar 2012 12:13:32 +0000 (09:13 -0300)]
[media] em28xx: Move ir/rc related initialization to em28xx_ir_init()

Moving this helps isolating em28xx_input and will help
converting it into a separate module.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] em28xx: Export em28xx_[read,write]_reg functions as SYMBOL_GPL
Ezequiel García [Mon, 26 Mar 2012 12:13:31 +0000 (09:13 -0300)]
[media] em28xx: Export em28xx_[read,write]_reg functions as SYMBOL_GPL

Those functions will be needed by em28xx-input module, to be
added on the next patches.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] staging/media/as102: Don't call release_firmware() on uninitialized variable
Jesper Juhl [Sat, 24 Mar 2012 21:39:18 +0000 (18:39 -0300)]
[media] staging/media/as102: Don't call release_firmware() on uninitialized variable

If, in drivers/staging/media/as102/as102_fw.c::as102_fw_upload(), the call
cmd_buf = kzalloc(MAX_FW_PKT_SIZE, GFP_KERNEL);
should fail and return NULL so that we jump to the 'error:' label,
then we'll end up calling 'release_firmware(firmware);' with
'firmware' still uninitialized - not good.

The easy fix is to just initialize 'firmware' to NULL when we declare
it, since release_firmware() deals gracefully with being passed NULL
pointers.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] em28xx: Remove redundant dev->ctl_input set
Ezequiel García [Fri, 23 Mar 2012 21:09:34 +0000 (18:09 -0300)]
[media] em28xx: Remove redundant dev->ctl_input set

dev->ctl_input() is always set before a call to video_mux(),
but then video_mux() sets it again with the same value.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] radio-gemtek: add PnP support for AOpen FX-3D/Pro Radio
Ondrej Zary [Thu, 22 Mar 2012 17:53:29 +0000 (14:53 -0300)]
[media] radio-gemtek: add PnP support for AOpen FX-3D/Pro Radio

Add PnP support to radio-gemtek for AOpen FX-3D/Pro Radio card
(AD1816 + Gemtek radio).

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] radio-isa: PnP support for the new ISA radio framework
Ondrej Zary [Thu, 22 Mar 2012 17:53:01 +0000 (14:53 -0300)]
[media] radio-isa: PnP support for the new ISA radio framework

Add PnP support to the new ISA radio framework.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l: Mark VIDIOC_SUBDEV_G_CROP and VIDIOC_SUBDEV_S_CROP obsolete
Sakari Ailus [Sat, 7 Jan 2012 09:23:36 +0000 (06:23 -0300)]
[media] v4l: Mark VIDIOC_SUBDEV_G_CROP and VIDIOC_SUBDEV_S_CROP obsolete

These two IOCTLS are obsoleted by VIDIOC_SUBDEV_G_SELECTION and
VIDIOC_SUBDEV_S_SELECTION. Mark them obsolete.

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] v4l: Add subdev selections documentation
Sakari Ailus [Mon, 12 Dec 2011 21:17:25 +0000 (18:17 -0300)]
[media] v4l: Add subdev selections documentation

Add documentation for V4L2 subdev selection API. This changes also
experimental V4L2 subdev API so that scaling now works through selection API
only.

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] v4l: Add subdev selections documentation: svg and dia files
Sakari Ailus [Thu, 2 Feb 2012 12:30:00 +0000 (09:30 -0300)]
[media] v4l: Add subdev selections documentation: svg and dia files

Add svga and dia files for V4L2 subdev selections documentation.

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] em28xx: clean-up several unused parametrs in struct em28xx_usb_isoc_ctl
Gianluca Gennari [Thu, 22 Mar 2012 14:13:55 +0000 (11:13 -0300)]
[media] em28xx: clean-up several unused parametrs in struct em28xx_usb_isoc_ctl

Get rid of several unused parameters in struct em28xx_usb_isoc_ctl.

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] em28xx-dvb: stop URBs when stopping the streaming
Gianluca Gennari [Thu, 22 Mar 2012 11:48:17 +0000 (08:48 -0300)]
[media] em28xx-dvb: stop URBs when stopping the streaming

Stop the URBs in em28xx_stop_streaming(), so that em28xx_irq_callback()
cannot be called after the streaming has stopped.

This should eliminate the crashes reported by Antti Palosaari and the warnings
reported by Andy Furniss.

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] usb: gadget/uvc: Remove non-required locking from 'uvc_queue_next_buffer...
Bhupesh Sharma [Thu, 22 Mar 2012 03:50:37 +0000 (00:50 -0300)]
[media] usb: gadget/uvc: Remove non-required locking from 'uvc_queue_next_buffer' routine

This patch removes the non-required spinlock acquire/release calls on
'queue_irqlock' from 'uvc_queue_next_buffer' routine.

This routine is called from 'video->encode' function (which translates to either
'uvc_video_encode_bulk' or 'uvc_video_encode_isoc') in 'uvc_video.c'.
As, the 'video->encode' routines are called with 'queue_irqlock' already held,
so acquiring a 'queue_irqlock' again in 'uvc_queue_next_buffer' routine causes
a spin lock recursion.

Signed-off-by: Bhupesh Sharma <bhupesh.sharma@st.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mm/drivers: use vm_flags_t for vma flags
Konstantin Khlebnikov [Wed, 21 Mar 2012 05:56:33 +0000 (02:56 -0300)]
[media] mm/drivers: use vm_flags_t for vma flags

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: linux-media@vger.kernel.org
Cc: devel@driverdev.osuosl.org
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: John Stultz <john.stultz@linaro.org>
Cc: "Arve Hjønnevåg" <arve@android.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] uvcvideo: remove unneeded access_ok() check
Dan Carpenter [Wed, 21 Mar 2012 05:35:23 +0000 (02:35 -0300)]
[media] uvcvideo: remove unneeded access_ok() check

copy_in_user() already checks for write permission, so we don't need to
do it here.  This was added in 1a5e4c867c "[media] uvcvideo: Implement
compat_ioctl32 for custom ioctls".

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] [3.3.0] ir-raw: remove BUG_ON in ir_raw_event_thread
Srinivas Kandagatla [Tue, 20 Mar 2012 17:05:40 +0000 (14:05 -0300)]
[media] [3.3.0] ir-raw: remove BUG_ON in ir_raw_event_thread

This patch removes BUG_ON in ir_raw_event_thread which IMO is a
over-kill, and this kills the ir_raw_event_thread too. With a bit of
additional logic in this patch, we nomore need to kill this thread.
Other disadvantage of having a BUG-ON is,
wake_up_process(dev->raw->thread) called on dead thread via
ir_raw_event_handle will result in total lockup in SMP system.

Advantage of this patch is ir-raw event thread is left in a usable state
even if the fifo does not have enough bytes.

This patch sets the thread into TASK_INTERRUPTIBLE if raw-fifo has less
then sizeof(struct ir_raw_event) bytes.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] i.MX2: eMMa-PrP: Allow userptr IO mode
Javier Martin [Tue, 20 Mar 2012 14:33:59 +0000 (11:33 -0300)]
[media] i.MX2: eMMa-PrP: Allow userptr IO mode

Userptr can be very useful if this device
is requested to use video buffers allocated
by another processing device. So that
buffers don't need to be copied.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] lirc: delete unused init/exit function prototypes
Gianluca Gennari [Tue, 20 Mar 2012 13:10:39 +0000 (10:10 -0300)]
[media] lirc: delete unused init/exit function prototypes

The lirc sasem and imon drivers now use the module_usb_driver macro, so the old
init/exit function prototypes are useless.

This patch eliminates this warnings:

media_build/v4l/lirc_imon.c:74:19: warning: 'imon_init' declared 'static' but never defined [-Wunused-function]
media_build/v4l/lirc_imon.c:75:20: warning: 'imon_exit' declared 'static' but never defined [-Wunused-function]
media_build/v4l/lirc_sasem.c:84:19: warning: 'sasem_init' declared 'static' but never defined [-Wunused-function]
media_build/v4l/lirc_sasem.c:85:20: warning: 'sasem_exit' declared 'static' but never defined [-Wunused-function]

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] ir-raw: Check available elements in kfifo before adding
Srinivas Kandagatla [Tue, 20 Mar 2012 12:18:59 +0000 (09:18 -0300)]
[media] ir-raw: Check available elements in kfifo before adding

This patch adds an additional availability check in ir_raw_event_store
before adding an ir_raw_event into kfifo. The reason to do this is,
Kfifo_alloc allocates fifo of size rounded down to 2. Which in this
case makes sizeof ir_raw_event*MAX_IR_EVENT_SIZE = 6144 to 4096 bytes.
Then again 4096 is not perfectly divisable by sizeof ir_raw_event(12).
So before adding any element to kfifo checking howmany elements can be
inserted into fifo is safe.

This patch will make sure it inserts only sizeof(ev) into kfifo.

Without this patch ir_raw_event_thread will trigger a bug.

 kernel BUG at drivers/media/rc/ir-raw.c:65!
 Internal error: Oops - undefined instruction: 0 [#1] PREEMPT SMP
 Modules linked in:
 CPU: 0    Not tainted  (3.2.2_stm24_0208-b2000+ #31)
 PC is at ir_raw_event_thread+0xa4/0x10c
 LR is at ir_raw_event_thread+0xa4/0x10c
 pc : [<c01e0ef4>]    lr : [<c01e0ef4>]    psr: 60000013
 sp : df1d1f78  ip : df1d0000  fp : 00000004
 r10: 00000000  r9 : c041389c  r8 : c0413848
 r7 : df1d1f7c  r6 : df1b6ecc  r5 : df1b6ec0  r4 : df1d0000
 r3 : 0000000c  r2 : df1d1f6c  r1 : c0360798  r0 : 0000002f
 Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
 Control: 10c53c7d  Table: 5ece804a  DAC: 00000015
 Process rc0 (pid: 577, stack limit = 0xdf1d02f0)

This bug was identified as part of
https://bugzilla.stlinux.com/show_bug.cgi?id=17387 triage.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-fimc: Handle sub-device interdependencies using deferred probing
Sylwester Nawrocki [Wed, 21 Mar 2012 12:58:09 +0000 (09:58 -0300)]
[media] s5p-fimc: Handle sub-device interdependencies using deferred probing

In this driver there are several entities associated with separate
platform or I2C client devices, which may get probed in random order.

When the platform device bound to the media device driver is probed
all other entity drivers need to be already in place and initialized.
If any of them is not, fail the media device probe and return an error
indicating we need to be retried once any new driver gets registered.
The media device driver probe will not succeed until there are available
all needed sub-drivers, as specified in the platform data.

While at it, make sure the s5p-csis module (MIPI-CSI receiver driver)
does not get unloaded when in use, by guarding its usage with
try_module_get/module_put.

This patch is a prerequisite for adding the device tree support.
It now also allows again to unbind/bind the driver at runtime from
user space via sysfs.

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>
12 years ago[media] s5p-fimc: Remove unneeded fields from struct fimc_dev
Sylwester Nawrocki [Sat, 17 Mar 2012 21:31:33 +0000 (18:31 -0300)]
[media] s5p-fimc: Remove unneeded fields from struct fimc_dev

irq is used only locally and num_clocks is constant, so remove them.

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>
12 years ago[media] s5p-fimc: Refactor hardware setup for m2m transaction
Sylwester Nawrocki [Mon, 19 Mar 2012 13:02:41 +0000 (10:02 -0300)]
[media] s5p-fimc: Refactor hardware setup for m2m transaction

Remove redundant H/W setup logic by merging fimc_prepare_config()
and the device_run() callback.

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>
12 years ago[media] s5p-fimc: Simplify locking by removing the context data structure spinlock
Sylwester Nawrocki [Mon, 19 Mar 2012 16:11:40 +0000 (13:11 -0300)]
[media] s5p-fimc: Simplify locking by removing the context data structure spinlock

Access to the memory-to-memory video node is serialized through a
mutex so now there is no point in having per device context structure
spinlock.

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>
12 years ago[media] s5p-fimc: Reinitialize the pipeline properly after VIDIOC_STREAMOFF
Sylwester Nawrocki [Fri, 16 Mar 2012 14:47:51 +0000 (11:47 -0300)]
[media] s5p-fimc: Reinitialize the pipeline properly after VIDIOC_STREAMOFF

This patch prevents blocking on DQBUF at a video capture node in some
conditions, after STREAOMOFF/STREAMON sequence. The ST_CAPT_SUSPEND
flag should not be set during normal stream off, otherwise the
capture engine is not properly enabled at stream on.

Reported-by: Bernard Debbasch <b.debbasch@ssi.samsung.com>
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>
12 years ago[media] s5p-fimc: Don't use platform data for CSI data alignment configuration
Sylwester Nawrocki [Wed, 21 Mar 2012 09:21:30 +0000 (06:21 -0300)]
[media] s5p-fimc: Don't use platform data for CSI data alignment configuration

The MIPI-CSI2 data alignment parameter can be derived from media bus
pixel code, so it can be now dropped from the platform data structure.
This is a prerequisite for adding the device tree support. Once this
patch is merged the corresponding fields will be removed from the
drivers' public headers and corresponding board files.

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>
12 years ago[media] v4l: Support s_crop and g_crop through s/g_selection
Sakari Ailus [Mon, 14 Nov 2011 18:30:24 +0000 (15:30 -0300)]
[media] v4l: Support s_crop and g_crop through s/g_selection

Fall back to s_selection if s_crop isn't implemented by a driver. Same for
g_selection / g_crop.

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] v4l: Check pad number in get try pointer functions
Sakari Ailus [Thu, 16 Feb 2012 01:57:22 +0000 (22:57 -0300)]
[media] v4l: Check pad number in get try pointer functions

Unify functions to get try pointers and validate the pad number accessed by
the user.

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] v4l: vdev_to_v4l2_subdev() should have return type "struct v4l2_subdev *"
Sakari Ailus [Thu, 16 Feb 2012 01:58:12 +0000 (22:58 -0300)]
[media] v4l: vdev_to_v4l2_subdev() should have return type "struct v4l2_subdev *"

vdev_to_v4l2_subdev() should return struct v4l2_subdev *, not void *. Fix
this.

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] v4l: VIDIOC_SUBDEV_S_SELECTION and VIDIOC_SUBDEV_G_SELECTION IOCTLs
Sakari Ailus [Fri, 14 Oct 2011 17:14:26 +0000 (14:14 -0300)]
[media] v4l: VIDIOC_SUBDEV_S_SELECTION and VIDIOC_SUBDEV_G_SELECTION IOCTLs

Add support for VIDIOC_SUBDEV_S_SELECTION and VIDIOC_SUBDEV_G_SELECTION
IOCTLs. They replace functionality provided by VIDIOC_SUBDEV_S_CROP and
VIDIOC_SUBDEV_G_CROP IOCTLs and also add new functionality (composing).

VIDIOC_SUBDEV_G_CROP and VIDIOC_SUBDEV_S_CROP continue to be supported.

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] vivi: Add an integer menu test control
Sakari Ailus [Fri, 5 Aug 2011 09:38:05 +0000 (06:38 -0300)]
[media] vivi: Add an integer menu test control

Add an integer menu test control for the vivi driver.

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] v4l: Document integer menu controls
Sakari Ailus [Sat, 6 Aug 2011 19:13:47 +0000 (16:13 -0300)]
[media] v4l: Document integer menu controls

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] v4l: Introduce integer menu controls
Sakari Ailus [Thu, 4 Aug 2011 16:51:11 +0000 (13:51 -0300)]
[media] v4l: Introduce integer menu controls

Create a new control type called V4L2_CTRL_TYPE_INTEGER_MENU. Integer menu
controls are just like menu controls but the menu items are 64-bit integers
rather than strings.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mxl111sf: remove an unused variable
Dan Carpenter [Fri, 23 Mar 2012 07:35:33 +0000 (04:35 -0300)]
[media] mxl111sf: remove an unused variable

We don't use this any more after 3be5bb71fb "[media] mxl111sf: fix error
on stream stop in mxl111sf_ep6_streaming_ctrl()" and it makes GCC
complain.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] af9035: disable frontend0 I2C-gate control
Antti Palosaari [Fri, 6 Apr 2012 10:09:23 +0000 (07:09 -0300)]
[media] af9035: disable frontend0 I2C-gate control

Seems like tuners used for frontend0 are not behind demodulator
I2C-gate thus gate control is not needed. Disable it for sure as
it can cause problems some situations.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] af9035: reorganise USB ID and device list
Antti Palosaari [Fri, 6 Apr 2012 00:58:09 +0000 (21:58 -0300)]
[media] af9035: reorganise USB ID and device list

Add and rename "Afatech AF9035 reference design" as a first
device in the list since it sounds logical to keep reference
design IDs on top of the list.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] af9035: minor changes for af9035_fc0011_tuner_callback()
Antti Palosaari [Fri, 6 Apr 2012 00:52:21 +0000 (21:52 -0300)]
[media] af9035: minor changes for af9035_fc0011_tuner_callback()

Change function to use same logic than existing functions.
Debugs log writings are done in error case, earlier it was
just returning error code.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] af9035: add AVerMedia Twinstar (A825) [07ca:0825]
Pierangelo Terzulli [Fri, 6 Apr 2012 00:26:18 +0000 (21:26 -0300)]
[media] af9035: add AVerMedia Twinstar (A825) [07ca:0825]

[crope@iki.fi: applied manually since erroneous patch]
Signed-off-by: Pierangelo Terzulli <pierigno@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] af9033: do some minor changes for .get_frontend()
Antti Palosaari [Fri, 6 Apr 2012 00:14:32 +0000 (21:14 -0300)]
[media] af9033: do some minor changes for .get_frontend()

Minor functionality and style changes.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] af9033: implement get_frontend
Gianluca Gennari [Thu, 5 Apr 2012 15:47:19 +0000 (12:47 -0300)]
[media] af9033: implement get_frontend

Implement the get_frontend function.
The code is derived from the old af9033 driver by Antti Palosaari.

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] af9035: initial support for IT9135 chip
Antti Palosaari [Thu, 5 Apr 2012 23:28:51 +0000 (20:28 -0300)]
[media] af9035: initial support for IT9135 chip

AF9035 code needed for IT9135 chip support. Needs still small
changes for AF9033 and totally new tuner driver in order to
get that chip version working.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] fc0011: Reduce number of retries
Michael Büsch [Tue, 3 Apr 2012 08:05:03 +0000 (05:05 -0300)]
[media] fc0011: Reduce number of retries

Now that i2c transfers are fixed, 3 retries are enough.

Signed-off-by: Michael Buesch <m@bues.ch>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] af9035: Use usleep_range() in fc0011 support code
Michael Büsch [Tue, 3 Apr 2012 08:11:30 +0000 (05:11 -0300)]
[media] af9035: Use usleep_range() in fc0011 support code

Use usleep_range() instead of msleep() to improve power saving opportunities.

Signed-off-by: Michael Buesch <m@bues.ch>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] fc0011: use usleep_range()
Michael Büsch [Tue, 3 Apr 2012 08:08:45 +0000 (05:08 -0300)]
[media] fc0011: use usleep_range()

Use usleep_range() instead of msleep() to improve power saving opportunities.

Signed-off-by: Michael Buesch <m@bues.ch>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] af9035: fix and enhance I2C adapter
Antti Palosaari [Mon, 2 Apr 2012 23:18:59 +0000 (20:18 -0300)]
[media] af9035: fix and enhance I2C adapter

There was a bug I2C adapter writes and reads one byte too much.
As the most I2C clients has auto-increment register addressing
this leads next register from the target register overwritten by
garbage data.

As a change remove whole register address byte usage and write
data directly to the I2C bus without saying what are register
address bytes to firmware.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Cc: Michael Buesch <m@bues.ch>
Cc: Hans-Frieder Vogt <hfvogt@gmx.net>
Cc: Gianluca Gennari <gennarone@gmail.com>
Tested-by: Michael Buesch <m@bues.ch>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] af9035: use module_usb_driver macro
Gianluca Gennari [Mon, 2 Apr 2012 20:25:17 +0000 (17:25 -0300)]
[media] af9035: use module_usb_driver macro

Let's save a few lines of code using the module_usb_driver macro.

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] af9035: add support for the tda18218 tuner
Gianluca Gennari [Mon, 2 Apr 2012 20:25:14 +0000 (17:25 -0300)]
[media] af9035: add support for the tda18218 tuner

Add basic support for the tda18218 tuner and the AVerMedia A835 devices.

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] af9035: add USB id for 07ca:a867
Gianluca Gennari [Mon, 2 Apr 2012 20:25:13 +0000 (17:25 -0300)]
[media] af9035: add USB id for 07ca:a867

New USB id for the Avermedia A867 stick (Sky Digital Key with blue led).

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] af9035: add Avermedia Volar HD (A867R) support
Hans-Frieder Vogt [Mon, 2 Apr 2012 17:18:16 +0000 (14:18 -0300)]
[media] af9035: add Avermedia Volar HD (A867R) support

Support of AVerMedia AVerTV HD Volar, with tuner MxL5007t.

Signed-off-by: Hans-Frieder Vogt <hfvogt@gmx.net>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] af9035: Add Afatech USB PIDs
Michael Büsch [Mon, 2 Apr 2012 15:34:52 +0000 (12:34 -0300)]
[media] af9035: Add Afatech USB PIDs

Add some generic Afatech USB PIDs used by "Cabstone" sticks and others.

Signed-off-by: Michael Buesch <m@bues.ch>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] af9035: Add fc0011 tuner support
Michael Büsch [Mon, 2 Apr 2012 15:18:36 +0000 (12:18 -0300)]
[media] af9035: Add fc0011 tuner support

This adds Fitipower fc0011 tuner support to the af9035 driver.

Signed-off-by: Michael Buesch <m@bues.ch>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] Add fc0011 tuner driver
Michael Büsch [Mon, 2 Apr 2012 15:14:32 +0000 (12:14 -0300)]
[media] Add fc0011 tuner driver

This adds support for the Fitipower fc0011 DVB-t tuner.

Signed-off-by: Michael Buesch <m@bues.ch>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] af9035: fix warning
Gianluca Gennari [Mon, 2 Apr 2012 23:32:58 +0000 (20:32 -0300)]
[media] af9035: fix warning

On a 32 bit system:

af9035.c: In function 'af9035_download_firmware':
af9035.c:446:3: warning: format '%lu' expects argument of type 'long unsigned
int', but argument 3 has type 'unsigned int' [-Wformat]

%zu avoids any warning on both 32 and 64 bit systems.

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] af9035: Add USB read checksumming
Michael Büsch [Sun, 1 Apr 2012 19:33:48 +0000 (16:33 -0300)]
[media] af9035: Add USB read checksumming

This adds USB message read checksumming to protect against
device and bus errors.
It also adds a read length check to avoid returning garbage from
the buffer, if the device truncated the message.

Signed-off-by: Michael Buesch <m@bues.ch>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] af9035: i2c read fix
Hans-Frieder Vogt [Sun, 1 Apr 2012 17:11:29 +0000 (14:11 -0300)]
[media] af9035: i2c read fix

Enable i2c read requests.

I2C read fix (necessary e.g. for mxl5007t tuner, because it
sends a 2 bytes for a read request, thus msg[0].len != msg[1].len).

Signed-off-by: Hans-Frieder Vogt <hfvogt@gmx.net>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] af9035: add log writing if unsupported Xtal freq is given
Antti Palosaari [Sun, 1 Apr 2012 17:13:36 +0000 (14:13 -0300)]
[media] af9035: add log writing if unsupported Xtal freq is given

Supports currently only 12 MHz Xtals. It is better to print log
and not to attach frontend in that case.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] af9033: implement .read_snr()
Antti Palosaari [Sun, 1 Apr 2012 15:50:02 +0000 (12:50 -0300)]
[media] af9033: implement .read_snr()

Returns values as 0.1 dB resolution as preferred nowadays.
Actual resolution is 1 dB.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] af9033: correct debug print
Antti Palosaari [Sun, 1 Apr 2012 14:14:59 +0000 (11:14 -0300)]
[media] af9033: correct debug print

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] af9035: add missing error check
Antti Palosaari [Sun, 1 Apr 2012 14:06:23 +0000 (11:06 -0300)]
[media] af9035: add missing error check

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] af9035: reimplement firmware downloader
Antti Palosaari [Sun, 1 Apr 2012 04:32:23 +0000 (01:32 -0300)]
[media] af9035: reimplement firmware downloader

Big thanks to Daniel Glöckner <daniel-gl@gmx.net> for
revealing firmware structure on Linux Media mailing
list.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Cc: Daniel Glöckner <daniel-gl@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] af9035: enhancement for unknown tuner ID handling
Antti Palosaari [Fri, 30 Mar 2012 20:15:16 +0000 (17:15 -0300)]
[media] af9035: enhancement for unknown tuner ID handling

* do not attach frontend when tuner is not supported
* fix unkown tuner ID log write format
* add prefix for dvb-usb log writings

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] Afatech AF9035 DVB USB driver
Antti Palosaari [Fri, 30 Mar 2012 12:10:08 +0000 (09:10 -0300)]
[media] Afatech AF9035 DVB USB driver

AF9035 is integrated DVB USB interface and DVB-T demodulator.
Integrated demodulator is AF9033 and its driver is attached
runtime as a own module.

Driver currently supports only one device,
TerraTec Cinergy T Stick [0ccd:0093].

TerraTec Cinergy T Stick is based of Afatech AF9035 +
Infineon TUA 9001 silicon tuner.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] Afatech AF9033 DVB-T demodulator driver
Antti Palosaari [Fri, 30 Mar 2012 11:21:25 +0000 (08:21 -0300)]
[media] Afatech AF9033 DVB-T demodulator driver

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] Infineon TUA 9001 silicon tuner driver
Antti Palosaari [Fri, 30 Mar 2012 09:37:26 +0000 (06:37 -0300)]
[media] Infineon TUA 9001 silicon tuner driver

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoMerge /home/v4l/v4l/patchwork
Mauro Carvalho Chehab [Mon, 9 Apr 2012 13:19:25 +0000 (10:19 -0300)]
Merge /home/v4l/v4l/patchwork

* /home/v4l/v4l/patchwork: (5978 commits)
  pwc: Add support for control events
  [media] radio-rtrack2: add missing slab.h
  [media] pwc: poll(): Check that the device has not beem claimed for streaming already
  [media] vivi: let vb2_poll handle events
  [media] videobuf2-core: also test for pending events
  [media] videobuf: only start streaming in poll() if so requested by the poll mask
  [media] videobuf2: only start streaming in poll() if so requested by the poll mask
  [media] ivtv: only start streaming in poll() if polling for input
  poll: add poll_requested_events() and poll_does_not_wait() functions
  crc32: select an algorithm via Kconfig
  crc32: add self-test code for crc32c
  crypto: crc32c should use library implementation
  crc32: bolt on crc32c
  crc32: add note about this patchset to crc32.c
  crc32: optimize loop counter for x86
  crc32: add slice-by-8 algorithm to existing code
  crc32: make CRC_*_BITS definition correspond to actual bit counts
  crc32: fix mixing of endian-specific types
  crc32: miscellaneous cleanups
  crc32: simplify unit test code
  ...

12 years ago[media] uvcvideo: Fix race-related crash in uvc_video_clock_update()
Laurent Pinchart [Tue, 27 Mar 2012 08:51:00 +0000 (05:51 -0300)]
[media] uvcvideo: Fix race-related crash in uvc_video_clock_update()

The driver frees the clock samples buffer before stopping the video
buffers queue. If a DQBUF call arrives in-between,
uvc_video_clock_update() will be called with a NULL clock samples
buffer, leading to a crash. This occurs very frequently when using the
webcam with the flash browser plugin.

Move clock initialization/cleanup to uvc_video_enable() in order to free
the clock samples buffer after the queue is stopped. Make sure the clock
is reset at resume time to avoid miscalculating timestamps.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] Drivers/media/radio: Fix build error
Hans Verkuil [Sun, 1 Apr 2012 18:24:48 +0000 (15:24 -0300)]
[media] Drivers/media/radio: Fix build error

On Sunday, April 01, 2012 21:09:34 Tracey Dent wrote:
> radio-maxiradio depends on SND_FM801_TEA575X_BOOL to build or will
> result in an build error such as:
>
> Kernel: arch/x86/boot/bzImage is ready  (#1)
> ERROR: "snd_tea575x_init" [drivers/media/radio/radio-maxiradio.ko] undefined!
> ERROR: "snd_tea575x_exit" [drivers/media/radio/radio-maxiradio.ko] undefined!
> WARNING: modpost: Found 6 section mismatch(es).
> To see full details build your kernel with:
> 'make CONFIG_DEBUG_SECTION_MISMATCH=y'
> make[1]: *** [__modpost] Error 1
> make: *** [modules] Error 2
>
> Select CONFIG_SND_TEA575X to fixes problem and enable
> the driver to be built as desired.
>
> v2:
> instead of selecting CONFIG_SND_FM801_TEA575X_BOOL, select
> CONFIG_SND_TEA575X, which in turns selects CONFIG_SND_FM801_TEA575X_BOOL
> and any other dependencies for it to build.

No, this is the correct patch:

RADIO_MAXIRADIO should be treated just like RADIO_SF16FMR2, I just didn't
realize at the time that it had to be added as a SND_TEA575X dependency.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Shea Levy <shea@shealevy.com>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_frontend: fix compiler warning
Hans Petter Selasky [Tue, 27 Mar 2012 15:53:19 +0000 (12:53 -0300)]
[media] dvb_frontend: fix compiler warning

has_get_frontend() should return a boolean, not a pointer.

Signed-off-by: Hans Petter Selasky <hselasky@c2i.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] it913x: fix firmware loading errors
Malcolm Priestley [Sun, 25 Mar 2012 09:57:49 +0000 (06:57 -0300)]
[media] it913x: fix firmware loading errors

On some systems the device does not respond or give obscure values after cold,
warm or firmware reboot.

This patch retries to get chip version and type 5 times. If it
fails it applies chip version 0x1 and type 0x9135.

This patch does not fix warm cycle problems from other operating
systems and indeed the reverse applies. Users should power off cold boot.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] ivtv: Fix AUDIO_(BILINGUAL_)CHANNEL_SELECT regression
Hans Verkuil [Sat, 31 Mar 2012 08:18:19 +0000 (05:18 -0300)]
[media] ivtv: Fix AUDIO_(BILINGUAL_)CHANNEL_SELECT regression

When I converted ivtv to the new decoder API I introduced a regression in the
support of the old channel select API.

Thanks to Martin Dauskardt for reporting this.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_frontend: regression fix: userspace ABI broken for xine
Chris Rankin [Fri, 6 Apr 2012 21:38:18 +0000 (18:38 -0300)]
[media] dvb_frontend: regression fix: userspace ABI broken for xine

The commit e399ce77e6e has broken the DVB ABI for xine:

The problem is that xine is expecting every event after a successful
FE_SET_FRONTEND ioctl to have a non-zero frequency parameter, regardless
of whether the tuning process has LOCKed yet. What used to happen is
that the events inherited the initial tuning parameters from the
FE_SET_FRONTEND call. However, the fepriv->parameters_out struct is now
not initialised until the status contains the FE_HAS_LOCK bit.

You might argue that this behaviour is intentional, except that if an
application other than xine uses the DVB adapter and manages to set the
parameters_out.frequency field to something other than zero, then xine
no longer has any problems until either the adapter is replugged or the
kernel modules reloaded. This can only mean that the
fepriv->parameters_out struct still contains the (stale) tuning
information from the previous application.

Signed-off-by: Chris Rankin <rankincj@yahoo.com>
Cc: stable@kernel.org # for kernel version 3.3
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agopwc: Add support for control events
Hans de Goede [Tue, 27 Mar 2012 16:57:55 +0000 (18:57 +0200)]
pwc: Add support for control events

Since the pwc driver already uses v4l2-device, v4l2-fh, and the control
framework, all that is needed is hooking up event subscription.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] radio-rtrack2: add missing slab.h
Hans Verkuil [Tue, 27 Mar 2012 08:39:21 +0000 (05:39 -0300)]
[media] radio-rtrack2: add missing slab.h

Missed this one, this patch should solve this issue:

http://www.spinics.net/lists/linux-media/msg45880.html

Slab.h was added to all the other isa drivers, but not radio-rtrack2.c.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] pwc: poll(): Check that the device has not beem claimed for streaming already
Hans de Goede [Sun, 9 Oct 2011 13:28:27 +0000 (10:28 -0300)]
[media] pwc: poll(): Check that the device has not beem claimed for streaming already

Some apps which use read() start the streaming through a call to poll(),
this means that if another app has already claimed the device for streaming
(through for example a s_fmt, or a reqbufs), that the poll should fail instead
of getting passed through to vb2_poll.

We only check for this when the app is polling for reads, so that ctrl events
still work.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] vivi: let vb2_poll handle events
Hans Verkuil [Wed, 13 Jul 2011 07:28:27 +0000 (04:28 -0300)]
[media] vivi: let vb2_poll handle events

The vb2_poll function now tests for events and sets POLLPRI accordingly.
So there it is no longer necessary to test for it in the vivi driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] videobuf2-core: also test for pending events
Hans Verkuil [Wed, 13 Jul 2011 07:26:52 +0000 (04:26 -0300)]
[media] videobuf2-core: also test for pending events

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] videobuf: only start streaming in poll() if so requested by the poll mask
Hans Verkuil [Wed, 13 Jul 2011 07:03:52 +0000 (04:03 -0300)]
[media] videobuf: only start streaming in poll() if so requested by the poll mask

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] videobuf2: only start streaming in poll() if so requested by the poll mask
Hans Verkuil [Wed, 13 Jul 2011 07:01:30 +0000 (04:01 -0300)]
[media] videobuf2: only start streaming in poll() if so requested by the poll mask

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>