]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/log
mirror_ubuntu-eoan-kernel.git
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>
12 years ago[media] media: gpio-ir-recv: fix missing udev by-path entry
Benoît Thébaudeau [Mon, 18 Jun 2012 18:02:20 +0000 (15:02 -0300)]
[media] media: gpio-ir-recv: fix missing udev by-path entry

Add missing information so that udev can create an entry for gpio-ir-recv under
/dev/input/by-path/ .

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] radio-sf16fmi: Use LM7000 driver
Ondrej Zary [Wed, 13 Jun 2012 20:25:44 +0000 (17:25 -0300)]
[media] radio-sf16fmi: Use LM7000 driver

Convert radio-sf16fmi to use generic LM7000 driver.
Tested with SF16-FMI, SF16-FMP and SF16-FMD.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] radio-aimslab: Use LM7000 driver
Ondrej Zary [Wed, 13 Jun 2012 20:25:39 +0000 (17:25 -0300)]
[media] radio-aimslab: Use LM7000 driver

Convert radio-aimslab to use generic LM7000 driver.
Tested with Reveal RA300.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] radio: Add Sanyo LM7000 tuner driver
Ondrej Zary [Wed, 13 Jun 2012 20:25:32 +0000 (17:25 -0300)]
[media] radio: Add Sanyo LM7000 tuner driver

Add very simple driver for Sanyo LM7000 AM/FM tuner chip. Only FM is supported
as there is no known HW with AM implemented.

This will be used by radio-aimslab and radio-sf16fmi.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoRevert "[media] radio: Add Sanyo LM7000 tuner driver"
Mauro Carvalho Chehab [Mon, 25 Jun 2012 14:06:59 +0000 (11:06 -0300)]
Revert "[media] radio: Add Sanyo LM7000 tuner driver"

This reverts commit 4ecbb69414c61af3594209e081d6e834ea68a16d.

As requested by Hans Verkuil:
> You accidentally merged the wrong first version of the lm7000 patch series.
>
> These are the correct second version patches:
>
> http://patchwork.linuxtv.org/patch/11689/
> http://patchwork.linuxtv.org/patch/11690/
> http://patchwork.linuxtv.org/patch/11691/
>
> The second version is much simpler and doesn't require the creation of a whole
> new driver.

Requested-by: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoRevert "[media] radio-aimslab: Use LM7000 driver"
Mauro Carvalho Chehab [Mon, 25 Jun 2012 14:06:54 +0000 (11:06 -0300)]
Revert "[media] radio-aimslab: Use LM7000 driver"

This reverts commit bece083a6b2b242c7ab74117640396e1bd851e49.

As requested by Hans Verkuil:
> You accidentally merged the wrong first version of the lm7000 patch series.
>
> These are the correct second version patches:
>
> http://patchwork.linuxtv.org/patch/11689/
> http://patchwork.linuxtv.org/patch/11690/
> http://patchwork.linuxtv.org/patch/11691/
>
> The second version is much simpler and doesn't require the creation of a whole
> new driver.

Requested-by: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoRevert "[media] radio-sf16fmi: Use LM7000 driver"
Mauro Carvalho Chehab [Mon, 25 Jun 2012 14:05:15 +0000 (11:05 -0300)]
Revert "[media] radio-sf16fmi: Use LM7000 driver"

This reverts commit 1e70a6cf7e965bafd89bf363772eb1a4b8e35934.

As requested by Hans Verkuil:
> You accidentally merged the wrong first version of the lm7000 patch series.
>
> These are the correct second version patches:
>
> http://patchwork.linuxtv.org/patch/11689/
> http://patchwork.linuxtv.org/patch/11690/
> http://patchwork.linuxtv.org/patch/11691/
>
> The second version is much simpler and doesn't require the creation of a whole
> new driver.

Requested-by: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tvaudio: rename getmode and setmode
Daniel Glöckner [Sun, 17 Jun 2012 10:53:42 +0000 (07:53 -0300)]
[media] tvaudio: rename getmode and setmode

This is basically s/getmode/getrxsubchans/ and s/setmode/setaudmode/
with some whitespace adjustment in affected lines to please the eye.
The rename is done to point out their relation to the rxsubchans and
audmode fields of struct v4l2_tuner.

I also corrected a commented out call to v4l_dbg in one of the lines.

Signed-off-by: Daniel Glöckner <daniel-gl@gmx.net>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5h1420: Unused variable clock_setting
Peter Senna Tschudin [Thu, 14 Jun 2012 16:58:16 +0000 (13:58 -0300)]
[media] s5h1420: Unused variable clock_setting

The switch/case was setting clock_setting that is not being used. Both switch/case and the variable definition were removed.

Currently clock is being calculated by the formula:
(state->fclk/1000000 - 8)

Tested by compilation only.

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] stv090x: variable 'no_signal' set but not used
Peter Senna Tschudin [Thu, 14 Jun 2012 16:58:15 +0000 (13:58 -0300)]
[media] stv090x: variable 'no_signal' set but not used

Tested by compilation only.

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] stv0367: variable 'tps_rcvd' set but not used
Peter Senna Tschudin [Thu, 14 Jun 2012 16:58:14 +0000 (13:58 -0300)]
[media] stv0367: variable 'tps_rcvd' set but not used

Tested by compilation only.

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] saa7164: Variable set but not used
Peter Senna Tschudin [Thu, 14 Jun 2012 16:58:12 +0000 (13:58 -0300)]
[media] saa7164: Variable set but not used

In function saa7164_api_i2c_read variable regval was set but not used.

Tested by compilation only.

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] pvrusb2: Variables set but not used
Peter Senna Tschudin [Thu, 14 Jun 2012 16:58:10 +0000 (13:58 -0300)]
[media] pvrusb2: Variables set but not used

Tested by compilation only.

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx231xx: Paranoic stack memory save
Peter Senna Tschudin [Thu, 14 Jun 2012 16:58:09 +0000 (13:58 -0300)]
[media] cx231xx: Paranoic stack memory save

Saves 255 bytes of stack memory on cx231xx_usb_probe() by removing a char array.

Tested by compilation only.

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] [trivial] v4l drivers: typo, change ctruct to struct in comment
Peter Meerwald [Wed, 13 Jun 2012 13:48:11 +0000 (10:48 -0300)]
[media] [trivial] v4l drivers: typo, change ctruct to struct in comment

Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] stradis: remove unused V4L1 headers
Paul Bolle [Wed, 13 Jun 2012 07:47:19 +0000 (04:47 -0300)]
[media] stradis: remove unused V4L1 headers

Commit 39c3d488452ae206cfc8afda0db041ee55d01c3c ("[media] cpia, stradis:
remove deprecated V4L1 drivers") removed the last file including these
five headers. Apparently it was just an oversight to keep them in the
tree. They can safely be removed now.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] em28xx: Improve support for the Terratec Cinergy HTC Stick HD
Martin Blumenstingl [Tue, 12 Jun 2012 21:19:28 +0000 (18:19 -0300)]
[media] em28xx: Improve support for the Terratec Cinergy HTC Stick HD

The windows driver used different values for the GPIOs and analog
decoder configuration. The values from the windows driver are now
used.
It also seems that the windows driver has LNA always disabled.
Thus we are doing the same (using the same flags as on windows).

I (only) tested with DVB-T and it worked quite well.

[mchehab@redhat.com: Fix merge conflicts and tested with DVB-C]
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] em28xx: Add the DRX-K at I2C address 0x29 to the list of known I2C devices
Martin Blumenstingl [Tue, 12 Jun 2012 21:19:27 +0000 (18:19 -0300)]
[media] em28xx: Add the DRX-K at I2C address 0x29 to the list of known I2C devices

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] Add support for downloading the firmware of the Terratec Cinergy HTC Stick...
Martin Blumenstingl [Tue, 12 Jun 2012 21:19:26 +0000 (18:19 -0300)]
[media] Add support for downloading the firmware of the Terratec Cinergy HTC Stick HD's firmware

As of June 2012 it uses the same firmware as the Hauppauge WinTV HVR 930C.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] radio-sf16fmi: Use LM7000 driver
Ondrej Zary [Tue, 12 Jun 2012 17:38:07 +0000 (14:38 -0300)]
[media] radio-sf16fmi: Use LM7000 driver

Convert radio-sf16fmi to use generic LM7000 driver.
Tested with SF16-FMI, SF16-FMP and SF16-FMD.

radio.");
@@ -48,37 +50,40 @@ struct fmi
  bool mute;
  unsigned long curfreq; /* freq in kHz */
  struct mutex lock;
+ struct lm7000 lm;
 };

 static struct fmi fmi_card;
 static struct pnp_dev *dev;
 bool pnp_attached;

-/* freq is in 1/16 kHz to internal number, hw precision is 50 kHz */
-/* It is only useful to give freq in interval of 800 (=0.05Mhz),
- * other bits will be truncated, e.g 92.7400016 -> 92.7, but
- * 92.7400017 -> 92.75
- */
-#define RSF16_ENCODE(x) ((x) / 800 + 214)
 #define RSF16_MINFREQ (87 * 16000)
 #define RSF16_MAXFREQ (108 * 16000)

-static void outbits(int bits, unsigned int data, int io)
+#define FMI_BIT_TUN_CE (1 << 0)
+#define FMI_BIT_TUN_CLK (1 << 1)
+#define FMI_BIT_TUN_DATA (1 << 2)
+#define FMI_BIT_VOL_SW (1 << 3)
+#define FMI_BIT_TUN_STRQ (1 << 4)
+
+void fmi_set_pins(struct lm7000 *lm, u8 pins)
 {
- while (bits--) {
- if (data & 1) {
- outb(5, io);
- udelay(6);
- outb(7, io);
- udelay(6);
- } else {
- outb(1, io);
- udelay(6);
- outb(3, io);
- udelay(6);
- }
- data >>= 1;
- }

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] radio-aimslab: Use LM7000 driver
Ondrej Zary [Tue, 12 Jun 2012 17:38:00 +0000 (14:38 -0300)]
[media] radio-aimslab: Use LM7000 driver

Convert radio-aimslab to use generic LM7000 driver.
Tested with Reveal RA300.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] radio: Add Sanyo LM7000 tuner driver
Ondrej Zary [Tue, 12 Jun 2012 17:37:54 +0000 (14:37 -0300)]
[media] radio: Add Sanyo LM7000 tuner driver

Add very simple driver for Sanyo LM7000 AM/FM tuner chip. Only FM is supported
as there is no known HW with AM implemented.

This will be used by radio-aimslab and radio-sf16fmi.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] em28xx: Make a few drxk_config structs static
Ezequiel García [Tue, 12 Jun 2012 12:53:41 +0000 (09:53 -0300)]
[media] em28xx: Make a few drxk_config structs static

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] em28xx: Remove unused AC97 register definitions
Ezequiel García [Mon, 11 Jun 2012 18:17:24 +0000 (15:17 -0300)]
[media] em28xx: Remove unused AC97 register definitions

There is a specific header sound/ac97_codec.h that defines these.
All drivers should use it instead of rolling its own set of macros.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] em28xx: Rename AC97 registers to use sound/ac97_codec.h definitions
Ezequiel García [Mon, 11 Jun 2012 18:17:23 +0000 (15:17 -0300)]
[media] em28xx: Rename AC97 registers to use sound/ac97_codec.h definitions

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] em28xx: Fix wrong AC97 mic register usage
Ezequiel García [Mon, 11 Jun 2012 18:17:22 +0000 (15:17 -0300)]
[media] em28xx: Fix wrong AC97 mic register usage

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] zr364xx: add suspend/resume support
Hans Verkuil [Fri, 8 Jun 2012 09:43:59 +0000 (06:43 -0300)]
[media] zr364xx: add suspend/resume support

And fix initial control setup.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] zr364xx: allow multiple opens
Hans Verkuil [Sat, 2 Jun 2012 11:50:31 +0000 (08:50 -0300)]
[media] zr364xx: allow multiple opens

This driver allowed only one open filehandle. This is against the spec, so
fix the driver by assigning proper ownership when streaming.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] zr364xx: add support for control events
Hans Verkuil [Sat, 2 Jun 2012 10:57:29 +0000 (07:57 -0300)]
[media] zr364xx: add support for control events

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] zr364xx: fix querycap and fill in colorspace
Hans Verkuil [Sat, 2 Jun 2012 10:50:30 +0000 (07:50 -0300)]
[media] zr364xx: fix querycap and fill in colorspace

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] zr364xx: convert to the control framework
Hans Verkuil [Sat, 2 Jun 2012 10:44:15 +0000 (07:44 -0300)]
[media] zr364xx: convert 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] zr364xx: introduce v4l2_device
Hans Verkuil [Sat, 2 Jun 2012 10:16:49 +0000 (07:16 -0300)]
[media] zr364xx: introduce v4l2_device

Implement struct v4l2_device: use the core lock and use the v4l2_device
release() callback.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] zr364xx: embed video_device and register it at the end of probe
Hans Verkuil [Sat, 2 Jun 2012 09:32:48 +0000 (06:32 -0300)]
[media] zr364xx: embed video_device and register it at the end of probe

Embed the video_device struct instead of allocating it and register it as
the last thing in probe().

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] V4L2 Spec: fix typo: NTSC -> NRSC
Hans Verkuil [Thu, 31 May 2012 08:09:08 +0000 (05:09 -0300)]
[media] V4L2 Spec: fix typo: NTSC -> NRSC

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] V4L2 spec: clarify a few modulator issues
Hans Verkuil [Mon, 28 May 2012 10:42:54 +0000 (07:42 -0300)]
[media] V4L2 spec: clarify a few modulator issues

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] S_HW_FREQ_SEEK: set capability flags and return ENODATA instead of EAGAIN
Hans Verkuil [Sun, 27 May 2012 10:25:06 +0000 (07:25 -0300)]
[media] S_HW_FREQ_SEEK: set capability flags and return ENODATA instead of EAGAIN

Set the new capability flags in G_TUNER and return ENODATA if no channels
were found.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2 spec: document the new v4l2_tuner capabilities
Hans Verkuil [Mon, 28 May 2012 10:30:28 +0000 (07:30 -0300)]
[media] v4l2 spec: document the new v4l2_tuner capabilities

Update the spec with the new capabilities and specify new error codes for
S_HW_FREQ_SEEK.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] videodev2.h: add new hwseek capability bits
Hans Verkuil [Sun, 27 May 2012 09:54:29 +0000 (06:54 -0300)]
[media] videodev2.h: add new hwseek capability bits

Tell the application whether the hardware seek is bounded and/or wraps around.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tvaudio: don't report mono when stereo is received
Daniel Glöckner [Sun, 10 Jun 2012 00:43:58 +0000 (21:43 -0300)]
[media] tvaudio: don't report mono when stereo is received

The V4L2 spec says reporting mono and stereo at the same time means
the hardware can not distinguish between the two. So when we can,
we should report only one of them.

Signed-off-by: Daniel Glöckner <daniel-gl@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tvaudio: support V4L2_TUNER_MODE_LANG1_LANG2
Daniel Glöckner [Sun, 10 Jun 2012 00:43:57 +0000 (21:43 -0300)]
[media] tvaudio: support V4L2_TUNER_MODE_LANG1_LANG2

Many of the audio decoders handled by the driver support this mode,
so the driver should support it as well.

Coding style errors are done to blend into the surrounding code.

Signed-off-by: Daniel Glöckner <daniel-gl@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tvaudio: obey V4L2 tuner audio matrix
Daniel Glöckner [Sun, 10 Jun 2012 00:43:56 +0000 (21:43 -0300)]
[media] tvaudio: obey V4L2 tuner audio matrix

V4L2 specifies the audio mode to use for combinations of possible
(rxsubchans) and requested (audmode) audio modes. Up to now tvaudio
has made these decisions automatically based on the possible audio
modes from setting of the frequency until VIDIOC_S_TUNER was called.
It then forced the hardware to use the mode requested by the user.
With this patch it continues to adjust the audio mode while taking
the requested mode into account.

Signed-off-by: Daniel Glöckner <daniel-gl@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tvaudio: use V4L2_TUNER_SUB_* for bitfields
Daniel Glöckner [Sun, 10 Jun 2012 00:43:55 +0000 (21:43 -0300)]
[media] tvaudio: use V4L2_TUNER_SUB_* for bitfields

The V4L2_TUNER_MODE_* constants are not suited for use in bitfields.

Signed-off-by: Daniel Glöckner <daniel-gl@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tvaudio: don't use thread for TA8874Z
Daniel Glöckner [Sun, 10 Jun 2012 00:43:54 +0000 (21:43 -0300)]
[media] tvaudio: don't use thread for TA8874Z

Judging from the data sheet it will automatically switch to the next
best audio mode in accordance with the V4L2 tuner audio matrix.

Signed-off-by: Daniel Glöckner <daniel-gl@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tvaudio: remove watch_stereo
Daniel Glöckner [Sun, 10 Jun 2012 00:43:53 +0000 (21:43 -0300)]
[media] tvaudio: remove watch_stereo

It is never read and only assigned 0.

Signed-off-by: Daniel Glöckner <daniel-gl@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tvaudio: use V4L2_TUNER_MODE_SAP for TDA985x SAP
Daniel Glöckner [Sun, 10 Jun 2012 00:43:52 +0000 (21:43 -0300)]
[media] tvaudio: use V4L2_TUNER_MODE_SAP for TDA985x SAP

As V4L2_TUNER_MODE_SAP == V4L2_TUNER_MODE_LANG2, we make
V4L2_TUNER_MODE_LANG1 equal to V4L2_TUNER_MODE_STEREO.

Signed-off-by: Daniel Glöckner <daniel-gl@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tvaudio: fix tda8425_setmode
Daniel Glöckner [Sun, 10 Jun 2012 00:43:51 +0000 (21:43 -0300)]
[media] tvaudio: fix tda8425_setmode

The passed audio mode is not a bitfield.

Signed-off-by: Daniel Glöckner <daniel-gl@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tvaudio: fix TDA9873 constants
Daniel Glöckner [Sun, 10 Jun 2012 00:43:50 +0000 (21:43 -0300)]
[media] tvaudio: fix TDA9873 constants

These constants were unused so far but need | instead of &.

Signed-off-by: Daniel Glöckner <daniel-gl@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] saa7146: Variable set but not used
Peter Senna Tschudin [Sat, 9 Jun 2012 13:13:58 +0000 (10:13 -0300)]
[media] saa7146: Variable set but not used

In function fops_open variable type was set but not used. Tested by compilation only.

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Acked-by: Michael Hunold <michael@mihu.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] em28xx: Make em28xx_ir_change_protocol a static function
Ezequiel García [Sat, 9 Jun 2012 07:24:42 +0000 (04:24 -0300)]
[media] em28xx: Make em28xx_ir_change_protocol a static function

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] staging: solo6x10: fix | vs &
Dan Carpenter [Sat, 9 Jun 2012 06:47:32 +0000 (03:47 -0300)]
[media] staging: solo6x10: fix | vs &

The test here is never true because '&' was used instead of '|'.  It was
the same as:

if (status & ((1<<16) & (1<<17)) ...

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] videobuf2: correct the #ifndef text mistake in videobuf2-dma-contig.h
Albert Wang [Thu, 7 Jun 2012 08:42:24 +0000 (05:42 -0300)]
[media] videobuf2: correct the #ifndef text mistake in videobuf2-dma-contig.h

It should be a mistake due to copy & paste in header file
  Correct it in videobuf2-dma-config.h for avoiding duplicate include it

Change-Id: I1f71fcec2889c033c7db380c58d9a1369c5afb35

Signed-off-by: Albert Wang <twang13@marvell.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] smia: Fix compile failures
Alan Cox [Thu, 14 Jun 2012 12:54:07 +0000 (09:54 -0300)]
[media] smia: Fix compile failures

Fix compile of smia code.

Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=43337

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] Fix VIDIOC_DQEVENT docbook entry
Hans Verkuil [Sat, 9 Jun 2012 09:59:45 +0000 (06:59 -0300)]
[media]  Fix VIDIOC_DQEVENT docbook entry

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-fimc: Fix control creation function
Kamil Debski [Fri, 15 Jun 2012 16:40:32 +0000 (13:40 -0300)]
[media] s5p-fimc: Fix control creation function

Fixed the size of the V4L2_CID_COLORFX control cluster.
Prior to this fix V4L2_CID_ROTATE was also icluded in
the cluster preventing application from enabling rotation.

Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-mfc: Fix checkpatch error in s5p_mfc_shm.h file
Sachin Kamat [Mon, 11 Jun 2012 09:58:42 +0000 (06:58 -0300)]
[media] s5p-mfc: Fix checkpatch error in s5p_mfc_shm.h file

Fixes the following error:
ERROR: open brace '{' following enum go on the same line
+enum MFC_SHM_OFS
+{

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-mfc: Fix setting controls
Kamil Debski [Thu, 14 Jun 2012 08:58:07 +0000 (05:58 -0300)]
[media] s5p-mfc: Fix setting controls

Fixed s_ctrl function when setting the following controls:
- V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER
- V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l/s5p-mfc: added image size align in VIDIOC_TRY_FMT
Andrzej Hajda [Tue, 12 Jun 2012 12:46:26 +0000 (09:46 -0300)]
[media] v4l/s5p-mfc: added image size align in VIDIOC_TRY_FMT

Image size for MFC encoder should have size between
8x4 and 1920x1080 with even width and height.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l/s5p-mfc: corrected encoder v4l control definitions
Andrzej Hajda [Tue, 12 Jun 2012 10:12:58 +0000 (07:12 -0300)]
[media] v4l/s5p-mfc: corrected encoder v4l control definitions

Patch corrects definition of H264 level control and
changes bare numbers to enums in two other cases.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l: mem2mem_testdev: Fix race conditions in driver
Tomasz Moń [Fri, 8 Jun 2012 07:47:34 +0000 (04:47 -0300)]
[media] v4l: mem2mem_testdev: Fix race conditions in driver

The mem2mem_testdev allows multiple instances to be opened in parallel.
Source and destination queue data are being shared between all
instances, which can lead to kernel oops due to race conditions (most
likely to happen inside device_run()).

Attached patch fixes mentioned problem by storing queue data per device
context.

Signed-off-by: Tomasz Moń <desowin@gmail.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-mfc: Bug fix of timestamp/timecode copy mechanism
Kamil Debski [Fri, 8 Jun 2012 07:46:38 +0000 (04:46 -0300)]
[media] s5p-mfc: Bug fix of timestamp/timecode copy mechanism

Fixed the code copying timecode/timestamp to corresponding
frames between OUTPUT and CAPTURE.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] lirc_sir: make device registration work
Jarod Wilson [Mon, 4 Jun 2012 16:05:24 +0000 (13:05 -0300)]
[media] lirc_sir: make device registration work

For one, the driver device pointer needs to be filled in, or the lirc core
will refuse to load the driver. And we really need to wire up all the
platform_device bits. This has been tested via the lirc sourceforge tree
and verified to work, been sitting there for months, finally getting
around to sending it. :\

CC: Josh Boyer <jwboyer@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] DVB: stb0899: speed up getting BER values
Klaus Schmidinger [Sat, 2 Jun 2012 14:04:17 +0000 (11:04 -0300)]
[media] DVB: stb0899: speed up getting BER values

stb0899_read_ber() takes 500ms (half a second!) to deliver the current
BER value. Apparently it takes 5 subsequent readings, with a 100ms pause
between them (and even before the first one). This is a real performance
brake if an application freqeuently reads the BER of several devices.
The attached patch reduces this to a single reading, with no more pausing.
I didn't observe any negative side effects of this change.

Signed-off-by: Klaus Schmidinger <Klaus.Schmidinger@tvdr.de>
Cc: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: video: bt8xx: Remove duplicated pixel format entry
volokh [Thu, 31 May 2012 06:08:51 +0000 (03:08 -0300)]
[media] media: video: bt8xx: Remove duplicated pixel format entry

Signed-off-by: Volokh Konstantin <volokh84@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cxd2820r: Fix an incorrect modulation type bitmask
Janne Huttunen [Wed, 30 May 2012 08:28:46 +0000 (05:28 -0300)]
[media] cxd2820r: Fix an incorrect modulation type bitmask

Fix an incorrect modulation type bitmask. This allows QAM256 also to be
correctly reported.

Signed-off-by: Janne Huttunen <jahuttun@gmail.com>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] em28xx: Show a warning if the board does not support remote controls
Martin Blumenstingl [Wed, 30 May 2012 18:47:40 +0000 (15:47 -0300)]
[media] em28xx: Show a warning if the board does not support remote controls

This simply shows a little warning if the board does not have remote
control support. This should make it easier for users to see if they
have misconfigured their system or if the driver simply does not have
rc-support for their card (yet).

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] em28xx: Add remote control support for Terratec's Cinergy HTC Stick HD
Martin Blumenstingl [Tue, 29 May 2012 20:19:27 +0000 (17:19 -0300)]
[media] em28xx: Add remote control support for Terratec's Cinergy HTC Stick HD

The Cinergy HTC Stick HD uses the same remote control as the TerraTec
Cinergy XS products. Thus the same keymap could be re-used.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] USB: Staging: media: lirc: initialize spinlocks before usage
Sasha Levin [Sat, 26 May 2012 18:25:26 +0000 (15:25 -0300)]
[media] USB: Staging: media: lirc: initialize spinlocks before usage

Initialize the spinlock for each hardware time.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-fimc: Add missing static storage class specifiers
Sachin Kamat [Sat, 26 May 2012 14:11:54 +0000 (11:11 -0300)]
[media] s5p-fimc: Add missing static storage class specifiers

Fixes the following sparse warnings:

drivers/media/video/s5p-fimc/fimc-lite-reg.c:218:6: warning: symbol
'flite_hw_set_out_order' was not declared. Should it be static?

drivers/media/video/s5p-fimc/fimc-mdevice.c:183:5: warning: symbol '__fimc_pipeline_shutdown' was not declared. Should it be static?
drivers/media/video/s5p-fimc/fimc-mdevice.c:1013:12: warning: symbol 'fimc_md_init' was not declared. Should it be static?
drivers/media/video/s5p-fimc/fimc-mdevice.c:1024:13: warning: symbol 'fimc_md_exit' was not declared. Should it be static?

drivers/media/video/s5p-fimc/fimc-core.c:466:5: warning: symbol 'fimc_set_color_effect' was not declared. Should it be static?

drivers/media/video/s5p-fimc/fimc-capture.c:1163:5: warning: symbol 'enclosed_rectangle' was not declared. Should it be static?

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] videobuf-dma-contig: use gfp_t for GFP flags
Dan Carpenter [Thu, 24 May 2012 14:56:41 +0000 (11:56 -0300)]
[media] videobuf-dma-contig: use gfp_t for GFP flags

Sparse complains if about using unsigned long.
videobuf-dma-contig.c:47:67: warning: restricted gfp_t degrades to integer
videobuf-dma-contig.c:47:65: warning: incorrect type in argument 2 (different base types)
videobuf-dma-contig.c:47:65:    expected restricted gfp_t [usertype] gfp_mask
videobuf-dma-contig.c:47:65:    got unsigned long

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] gspca: Maintainer change
Jean-Francois Moine [Thu, 24 May 2012 10:29:41 +0000 (07:29 -0300)]
[media] gspca: Maintainer change

Hans de Goede accepted to be the new gspca maintainer.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] Revert "[media] media: mx2_camera: Fix mbus format handling"
Guennadi Liakhovetski [Fri, 25 May 2012 21:06:33 +0000 (18:06 -0300)]
[media] Revert "[media] media: mx2_camera: Fix mbus format handling"

This reverts commit d509835e32bd761a2b7b446034a273da568e5573. That commit
breaks support for the generic pass-through mode in the driver for formats,
not natively supported by it. Besides due to a merge conflict it also breaks
driver compilation:

drivers/media/video/mx2_camera.c: In function 'mx2_camera_set_bus_param':
drivers/media/video/mx2_camera.c:937: error: 'pixfmt' undeclared (first use in this function)
drivers/media/video/mx2_camera.c:937: error: (Each undeclared identifier is reported only once
drivers/media/video/mx2_camera.c:937: error: for each function it appears in.)

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l: Correct create_bufs documentation
Sakari Ailus [Thu, 31 May 2012 22:51:05 +0000 (19:51 -0300)]
[media] v4l: Correct create_bufs documentation

Patch id 6016af82eafcb6e086a8f2a2197b46029a843d68 ("[media] v4l2: use __u32
rather than enums in ioctl() structs") unintentionally changes the type of
the format field in struct v4l2_create_buffers from struct v4l2_format to
__u32. Revert that change.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] bw-qcam: driver and pixfmt documentation fixes
Hans Verkuil [Wed, 6 Jun 2012 04:46:50 +0000 (01:46 -0300)]
[media] bw-qcam: driver and pixfmt documentation fixes

Fix the documentation of the Y4 and Y6 formats.
Fix a poll() issue, add support for enum_frmsizes, set the proper
parent device and fix a few compliance issues.

Tested with an actual Connectix B&W parallel port webcam, both on a
little-endian and a big-endian platform. This driver has never been
so good, doing 320x240 at 1 frame per second :-)

I know, nobody cares, but still it is cool that linux can still support
this old webcam.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>