Mauro Carvalho Chehab [Tue, 23 Dec 2014 15:48:07 +0000 (13:48 -0200)]
[media] cx23885: move CI/MAC registration to a separate function
As reported by smatch:
drivers/media/pci/cx23885/cx23885-dvb.c:2080 dvb_register() Function too hairy. Giving up.
This is indeed a too complex function, with lots of stuff inside.
Breaking this into two functions makes it a little bit less hairy.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Shuah Khan [Thu, 29 Jan 2015 16:41:32 +0000 (13:41 -0300)]
[media] media: au0828 - convert to use videobuf2
Convert au0828 to use videobuf2. Tested with NTSC.
Tested video and vbi devices with xawtv, tvtime,
and vlc. Ran v4l2-compliance to ensure there are
no failures.
Video compliance test results summary:
Total: 75, Succeeded: 75, Failed: 0, Warnings: 18
Vbi compliance test results summary:
Total: 75, Succeeded: 75, Failed: 0, Warnings: 0
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Reviewed-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Shuah Khan [Tue, 13 Jan 2015 02:56:55 +0000 (23:56 -0300)]
[media] media: fix au0828 compile error from au0828_boards initialization
au0828 picked up UNSET from videobuf-core.h and fails to compile
if videobuf-core.h isn't included. Change it to use -1U instead
to fix the problem.
drivers/media/usb/au0828/au0828-cards.c:47:17: error: ‘UNSET’ undeclared here (not in a function)
.tuner_type = UNSET,
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Shuah Khan [Sun, 21 Dec 2014 03:24:48 +0000 (00:24 -0300)]
[media] media: fix au0828_analog_register() to not free au0828_dev
au0828_analog_register() frees au0828_dev when it fails to
locate isoc endpoint. au0828_usb_probe() continues with dvb
and rc probe and registration assuming dev is still valid.
When au0828_analog_register() fails to locate isoc endpoint,
it should return without free'ing au0828_dev. Otherwise, the
probe will fail as dev is null when au0828_dvb_register() is
called.
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Lars-Peter Clausen [Fri, 23 Jan 2015 15:52:34 +0000 (12:52 -0300)]
[media] Add MAINTAINERS entry for the adv7180
Add myself as the maintainer for the adv7180 video subdev driver.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Lars-Peter Clausen [Fri, 23 Jan 2015 15:52:33 +0000 (12:52 -0300)]
[media] adv7180: Add fast switch support
In fast switch mode the adv7180 (and similar) can lock onto a new signal
faster when switching between different inputs. As a downside though it is
no longer able to auto-detect the incoming format.
The fast switch mode is exposed as a boolean v4l control that allows
userspace applications to either enable or disable fast switch mode.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Federico Vaga <federico.vaga@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Lars-Peter Clausen [Fri, 23 Jan 2015 15:52:32 +0000 (12:52 -0300)]
[media] adv7180: Add I2P support
Some of the devices supported by this driver have a interlaced-to-
progressive converter which can optionally be enabled. This patch adds
support for enabling and disabling the I2P converter on such devices.
I2P mode can be enabled by selecting V4L2_FIELD_NONE instead of
V4L2_FIELD_INTERLACED for the format.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Lars-Peter Clausen [Fri, 23 Jan 2015 15:52:31 +0000 (12:52 -0300)]
[media] adv7180: Add support for the adv7280-m/adv7281-m/adv7281-ma/adv7282-m
This patch adds support for the adv7280-m/adv2781-m/adv7281-ma/adv7282-m
devices to the adv7180 driver. They are very similar to the
adv7280/adv7281/adv7282 but instead of parallel video out they feature a
MIPI CSI2 transmitter.
The CSI2 transmitter is configured via a separate I2C address, so we need to
register a dummy device for it.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Lars-Peter Clausen [Fri, 23 Jan 2015 15:52:30 +0000 (12:52 -0300)]
[media] adv7180: Add support for the adv7280/adv7281/adv7282
This patch adds support for the adv7280/adv7281/adv7282 devices to the
adv7180 driver. They are very similar to the adv7182, the main difference
from the drivers point of view are some different tuning constants for
improved video performance.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Lars-Peter Clausen [Fri, 23 Jan 2015 15:52:29 +0000 (12:52 -0300)]
[media] adv7180: Add support for the adv7182
This patch adds support for the adv7182 to the adv7180 driver. The adv7182
is similar to the adv7180, the main difference from the driver's point of
view is how the video input and how the input format are selected.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Lars-Peter Clausen [Fri, 23 Jan 2015 15:52:28 +0000 (12:52 -0300)]
[media] adv7180: Prepare for multi-chip support
The adv7180 is part of a larger family of device, which have all a very
similar register map layout. This patch prepares the adv7180 driver for
support for multiple different devices. For now the only difference we care
about is the number of input channel configurations. Also the way the input
format is configured slightly differs between some devices.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Lars-Peter Clausen [Fri, 23 Jan 2015 15:52:27 +0000 (12:52 -0300)]
[media] adv7180: Consolidate video mode setting
We have basically the same code to set the video standard in init_device()
and adv7180_s_std(). Factor this out into a common helper function.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Lars-Peter Clausen [Fri, 23 Jan 2015 15:52:26 +0000 (12:52 -0300)]
[media] adv7180: Add media controller support
Add media controller support to the adv7180 driver by registering a media
entity instance for it as well as implementing pad ops for configuring the
format.
As there currently don't seem to be any users of the video ops format
operations those are removed as well in this patch.
Also set the V4L2_SUBDEV_FL_HAS_DEVNODE flag for the subdevice so it is
possible to create a subdevice device node.
Since the driver now depends on VIDEO_V4L2_SUBDEV_API all drivers which
select the driver need to depend on that symbol as well.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Lars-Peter Clausen [Fri, 23 Jan 2015 15:52:25 +0000 (12:52 -0300)]
[media] adv7180: Reset the device before initialization
Reset the device when initializing it so it is in a good known state and the
assumed register settings matches the actual register settings.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Lars-Peter Clausen [Fri, 23 Jan 2015 15:52:24 +0000 (12:52 -0300)]
[media] adv7180: Do implicit register paging
The ad7180 has multiple register pages which can be switched between by
writing to a register. Currently the driver manually switches between pages
whenever a register outside of the default register map is accessed and
switches back after it has been accessed. This is a bit tedious and also
potential source for bugs.
This patch adds two helper functions that take care of switching between
pages and reading/writing the register. The register numbers for registers
are updated to encode both the page (in the upper 8-bits) and the register
(in the lower 8-bits) numbers.
Having multiple pages means that a register access is not a single atomic
i2c_smbus_write_byte_data() or i2c_smbus_read_byte_data() call and we need
to make sure that concurrent register access does not race against each
other.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Lars-Peter Clausen [Fri, 23 Jan 2015 15:52:23 +0000 (12:52 -0300)]
[media] adv7180: Cleanup register define naming
Consistently prefix register defines with ADV7180_REG. Also remove the "ADI"
from register names, the ADV7180 prefix should provide enough of a namespace
separation.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Lars-Peter Clausen [Fri, 23 Jan 2015 15:52:21 +0000 (12:52 -0300)]
[media] adv7180: Pass correct flags to request_threaded_irq()
Most IRQ controllers support different types of interrupts. The adv7180
generates falling edge interrupts, so make sure to pass IRQF_TRIGGER_FALLING
to request_threaded_irq() so the IRQ controller is configured for the
correct mode.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Lars-Peter Clausen [Fri, 23 Jan 2015 15:52:20 +0000 (12:52 -0300)]
[media] adv7180: Do not request the IRQ again during resume
Currently the IRQ is requested from within the init_device() function. This
function is not only called during device probe, but also during resume
causing the driver to try to request the IRQ again. Move requesting the IRQ
from init_device() to the probe function to make sure that it is only
requested once.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Arnd Bergmann [Thu, 29 Jan 2015 16:12:05 +0000 (13:12 -0300)]
[media] davinci: add V4L2 dependencies
The davinci media drivers use videobuf2, which they enable through
a 'select' statement. If one of these drivers is built-in, but
the v4l2 core is a loadable modules, we end up with a link
error:
drivers/built-in.o: In function `vb2_fop_mmap':
:(.text+0x113e84): undefined reference to `video_devdata'
drivers/built-in.o: In function `vb2_ioctl_create_bufs':
:(.text+0x114710): undefined reference to `video_devdata'
drivers/built-in.o: In function `vb2_ioctl_reqbufs':
:(.text+0x114ed8): undefined reference to `video_devdata'
drivers/built-in.o: In function `vb2_ioctl_querybuf':
:(.text+0x115530): undefined reference to `video_devdata'
To solve this, we need to add a dependency on VIDEO_V4L2,
which enforces that the davinci drivers themselves can only
be loadable modules if V4L2 is not built-in, and they do
not cause the videobuf2 code to be built-in.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Thu, 29 Jan 2015 11:22:37 +0000 (08:22 -0300)]
[media] vivid: use consistent colorspace/Y'CbCr Encoding strings
Keep the colorspace and encoding names consistent with what is
used elsewhere (primarily the utilities in v4l-utils.git).
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Arnd Bergmann [Wed, 28 Jan 2015 21:17:44 +0000 (18:17 -0300)]
[media] siano: fix Kconfig dependencies
The USB and MMC front-ends to the siano driver both only make
sense when combined with the SMS_SIANO_MDTV driver. That driver
already requires RC_CORE to not be a module, so we also need
to add that dependency here.
drivers/built-in.o: In function `smssdio_remove':
:(.text+0x155bd8): undefined reference to `smscore_putbuffer'
:(.text+0x155bdc): undefined reference to `smscore_unregister_device'
drivers/built-in.o: In function `smssdio_interrupt':
:(.text+0x155e4c): undefined reference to `smsendian_handle_rx_message'
:(.text+0x155e50): undefined reference to `smscore_onresponse'
:(.text+0x155e54): undefined reference to `smscore_getbuffer'
:(.text+0x155e58): undefined reference to `smscore_putbuffer'
drivers/built-in.o: In function `smssdio_sendrequest':
:(.text+0x155f20): undefined reference to `smsendian_handle_tx_message'
drivers/built-in.o: In function `smssdio_probe':
:(.text+0x15610c): undefined reference to `sms_get_board'
:(.text+0x156114): undefined reference to `smscore_register_device'
:(.text+0x156118): undefined reference to `smscore_set_board_id'
:(.text+0x156128): undefined reference to `smscore_unregister_device'
:(.text+0x156140): undefined reference to `smscore_start_device'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Arnd Bergmann [Wed, 28 Jan 2015 21:17:42 +0000 (18:17 -0300)]
[media] radio/aimslab: use mdelay instead of udelay
Large udelay values are not allowed on the ARM architecture
and result in a build error like
ERROR: "__bad_udelay" [drivers/media/radio/radio-aimslab.ko] undefined!
This changes the aimslab radio driver to use an equivalent mdelay
statement.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Arnd Bergmann [Wed, 28 Jan 2015 21:17:41 +0000 (18:17 -0300)]
[media] timberdale: do not select TIMB_DMA
The timberdale media driver requires the use of the respective
dma engine driver, but that may not be enabled, causing a
Kconfig warning:
warning: (VIDEO_TIMBERDALE) selects TIMB_DMA which has unmet direct dependencies (DMADEVICES && MFD_TIMBERDALE)
This fixes the dependency by removing the inappropriate 'select'
statement and replacing it with a direct dependency on the
drivers that provide the services this needs.
Fixes:
7155043c2d027 ("[media] enable COMPILE_TEST for media drivers")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Prabhakar Lad [Mon, 26 Jan 2015 14:50:15 +0000 (11:50 -0300)]
[media] media: am437x: fix sparse warnings
This patch fixes following spare warnings:
drivers/media/platform/am437x/am437x-vpfe.c:66:28: warning: symbol 'vpfe_standards' was not declared. Should it be static?
drivers/media/platform/am437x/am437x-vpfe.c:2202:57: warning: incorrect type in argument 2 (different address spaces)
drivers/media/platform/am437x/am437x-vpfe.c:2202:57: expected void [noderef] <asn:1>*params
drivers/media/platform/am437x/am437x-vpfe.c:2202:57: got void *param
include/linux/spinlock.h:364:9: warning: context imbalance in 'vpfe_start_streaming' - unexpected unlock
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Nicholas Mc Guire [Thu, 22 Jan 2015 10:39:11 +0000 (07:39 -0300)]
[media] pvrusb2: use msecs_to_jiffies for conversion
This is only an API consolidation and should make things more readable
Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Ismael Luceno [Tue, 20 Jan 2015 14:43:50 +0000 (11:43 -0300)]
[media] MAINTAINERS: Update solo6x10 entry
Re-add Ismael Luceno as co-maintainer (with personal email address).
Signed-off-by: Ismael Luceno <ismael@iodev.co.uk>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mauro Carvalho Chehab [Mon, 2 Feb 2015 12:52:26 +0000 (10:52 -0200)]
[media] cx231xx: don't use dev it not allocated
changeset
5eeb3014827f added a fixup at the error check
code. However, it introduced a new error:
drivers/media/usb/cx231xx/cx231xx-cards.c:1586 cx231xx_usb_probe() error: we previously assumed 'dev' could be null (see line 1430)
This happens when dev = kmalloc() fails. So, instead of relying
on it to succeed, just change the parameter of clear_bit() from
'dev->devno' to 'nr'.
Cc: Alexey Khoroshilov <khoroshilov@ispras.ru>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Alexey Khoroshilov [Fri, 16 Jan 2015 22:55:26 +0000 (19:55 -0300)]
[media] cx231xx: fix usbdev leak on failure paths in cx231xx_usb_probe()
Commit
b7085c086475 ("cx231xx: convert from pr_foo to dev_foo")
moves usb_get_dev(interface_to_usbdev(interface)) to the beginning
of cx231xx_usb_probe() to use udev->dev in dev_err(),
but it does not make sure usbdev is put on all failure paths.
Later dev_err(udev->dev) was replaced by dev_err(d).
So the patch moves usb_get_dev() below (before the first use)
and fixes another failure path.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
William Towle [Mon, 26 Jan 2015 17:08:40 +0000 (14:08 -0300)]
[media] rcar_vin: move buffer management to .stop_streaming handler
This commit moves the "buffer in use" logic from the .buf_cleanup
handler into .stop_streaming, based on advice that this is its
proper logical home.
By ensuring the list of pointers in priv->queue_buf[] is managed
as soon as possible, we avoid warnings concerning buffers in ACTIVE
state when the system cleans up after streaming stops. This fixes a
problem with modification of buffers after their content has been
cleared for passing to userspace.
After the refactoring, the buf_init and buf_cleanup functions were
found to contain only initialisation/release steps as are carried out
elsewhere if omitted; these functions and references were removed.
Signed-off-by: William Towle <william.towle@codethink.co.uk>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Ian Molton [Mon, 26 Jan 2015 17:08:39 +0000 (14:08 -0300)]
[media] rcar_vin: helper function for streaming stop
The code that tests that capture from a stream has stopped is
presently insufficient and the potential for a race condition
exists where frame capture may generate an interrupt between
requesting the capture process halt and freeing buffers.
This patch refactors code out of rcar_vin_videobuf_release() and
into rcar_vin_wait_stop_streaming(), and ensures there are calls
in places where we need to know that capturing has finished.
Signed-off-by: Ian Molton <ian.molton@codethink.co.uk>
Signed-off-by: William Towle <william.towle@codethink.co.uk>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Josh Wu [Tue, 25 Nov 2014 08:54:28 +0000 (05:54 -0300)]
[media] ov2640: use the v4l2 size definitions
Reuse the v4l2 size definitions from v4l2-image-sizes.h.
So we can remove the rudundent definitions from ov2640.c.
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Guennadi Liakhovetski [Sun, 1 Feb 2015 15:06:17 +0000 (12:06 -0300)]
[media] soc-camera: remove redundant code
A hunk, removing this code has been lost between versions 6 and 7 of
patch "soc-camera: add V4L2-async support." The code is harmless, but
redundant.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Lad, Prabhakar [Wed, 26 Nov 2014 22:42:27 +0000 (19:42 -0300)]
[media] soc_camera: use vb2_ops_wait_prepare/finish helper
This patch drops driver specific wait_prepare() and
wait_finish() callbacks from vb2_ops and instead uses
the the helpers vb2_ops_wait_prepare/finish() provided
by the vb2 core, the lock member of the queue needs
to be initalized to a mutex so that vb2 helpers
vb2_ops_wait_prepare/finish() can make use of it.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Cc: Josh Wu <josh.wu@atmel.com>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Philipp Zabel [Fri, 23 Jan 2015 16:51:35 +0000 (13:51 -0300)]
[media] coda: simplify check in coda_buf_queue
Now that the bitstream buffer is only allocated for the BIT decoder
case, we can use bitstream.size to check for bitstream ringbuffer
operation.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Philipp Zabel [Fri, 23 Jan 2015 16:51:34 +0000 (13:51 -0300)]
[media] coda: allocate bitstream ringbuffer only for BIT decoder
The BIT encoder does not use a per-context bitstream ringbuffer as it encodes
directly into the videobuf2 capture queue's buffers. Avoid allocation of the
bitstream ringbuffer for encoder contexts.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Philipp Zabel [Fri, 23 Jan 2015 16:51:33 +0000 (13:51 -0300)]
[media] coda: add support for contexts that do not use the BIT processor
In preparation for CODA9 JPEG support, allow contexts that
control hardware units directly, without the BIT processor.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Philipp Zabel [Fri, 23 Jan 2015 16:51:32 +0000 (13:51 -0300)]
[media] coda: free context buffers under buffer mutex
Make sure the buffer_mutex lock is taken in coda_bit_release
while coda_free_framebuffers and coda_free_context_buffers
are called.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Philipp Zabel [Fri, 23 Jan 2015 16:51:31 +0000 (13:51 -0300)]
[media] coda: make seq_end_work optional
In preparation for CODA9 JPEG support, which doesn't have to call
SEQ_END on the BIT processor.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Philipp Zabel [Fri, 23 Jan 2015 16:51:30 +0000 (13:51 -0300)]
[media] coda: switch BIT decoder source queue to vmalloc
Since we have to copy from input buffers into the bitstream ringbuffer
with the CPU, there is no need for contiguous DMA buffers on the decoder
input side.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Philipp Zabel [Fri, 23 Jan 2015 16:51:29 +0000 (13:51 -0300)]
[media] coda: add coda_estimate_sizeimage and use it in set_defaults
Call coda_estimate_sizeimage from both try_fmt and set_defaults to
avoid this v4l2-compliance warning on the h.264 decoder video device:
G_FMT: 1920x1088,
32315559, 1, 1920, 1048576, 3, 0, 0,
feedcafe
TRY/S_FMT: 1920x1088,
32315559, 1, 1920, 3133440, 3, 0, 0,
feedcafe
fail: v4l2-test-formats.cpp(948): Video Capture: S_FMT(G_FMT) != G_FMT
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Philipp Zabel [Fri, 23 Jan 2015 16:51:28 +0000 (13:51 -0300)]
[media] coda: don't ever use subsampling ping-pong buffers as reconstructed reference buffers
On i.MX6, two subsampling ping-pong buffers are used for motion estimation and
deblocking They should not be counted as framebuffers, or they will be also used
to store reconstructed frames, causing visible artifacts in P-frames.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Philipp Zabel [Fri, 23 Jan 2015 16:51:27 +0000 (13:51 -0300)]
[media] coda: issue seq_end_work during stop_streaming
This patch queues seq_end_work and flushes the queue during stop_streaming
and clears the ctx->initialized flag. This allows to start streaming again
after stopping streaming without releasing the context.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Philipp Zabel [Fri, 23 Jan 2015 16:51:26 +0000 (13:51 -0300)]
[media] coda: remove unused isequence, reset qsequence in stop_streaming
The isequence counter is never used, qsequence counts the buffers queued into
the bit decoder bitstream ringbuffer. It needs to be reset in stop_streaming.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Markus Pargmann [Fri, 23 Jan 2015 16:51:25 +0000 (13:51 -0300)]
[media] coda: fix width validity check when starting to decode
Compare rounded up width to fit into bytesperline.
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Philipp Zabel [Fri, 23 Jan 2015 16:51:24 +0000 (13:51 -0300)]
[media] coda: clear RET_DEC_PIC_SUCCESS flag in prepare_decode
To make sure a set RET_DEC_PIC_SUCCESS flag is not a leftover from
a previous successful run, clear it in prepare_decode.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Philipp Zabel [Fri, 23 Jan 2015 16:51:23 +0000 (13:51 -0300)]
[media] coda: initialize SRAM on probe
Zeroing the SRAM on probe helps with debugging SRAM contents.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Philipp Zabel [Fri, 23 Jan 2015 16:51:22 +0000 (13:51 -0300)]
[media] coda: properly clear f_cap in coda_s_fmt_vid_out
Properly zero the structure on the stack before using it.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Philipp Zabel [Fri, 23 Jan 2015 16:51:21 +0000 (13:51 -0300)]
[media] coda: fix try_fmt_vid_out colorspace setting
v4l2-compliance complains about invalid colorspace settings being accepted
on the output side. This patch only allows REC709 and JPEG.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Philipp Zabel [Fri, 23 Jan 2015 16:51:20 +0000 (13:51 -0300)]
[media] coda: fix job_ready debug reporting for bitstream decoding
Clarify whether job_ready returns false because the context is on hold, waiting
for new input buffers, whether there are not enough input buffers to fill two
into the bitstream, or whether there is not enough data in the bitstream buffer
for the bitstream reader hardware to read a whole frame.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Lucas Stach [Fri, 23 Jan 2015 16:51:19 +0000 (13:51 -0300)]
[media] coda: adjust sequence offset after unexpected decoded frame
If userspace doesn't properly separate the bitstream input into
individual frames (which may happen for example on slightly
corrupted streams) the CODA hardware may decode more frames
than we expect. We already log an error in this case, but it's
also necessary to adjust the sequence offset. Otherwise we
spam the log with a sequence number mismatch on every frame
frame after the unexpected one.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Philipp Zabel [Fri, 23 Jan 2015 16:51:18 +0000 (13:51 -0300)]
[media] coda: move meta out of padding
Handle an empty buffer metadata list without crashing. This can happen
if the decoder is fed a broken stream, or multiple compressed frames in
a single queued buffer.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Philipp Zabel [Fri, 23 Jan 2015 16:51:17 +0000 (13:51 -0300)]
[media] coda: remove context debugfs entry last
Do not remove the per-context debugfs directory before the
per-buffer debugfs entries contained therein.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Philipp Zabel [Fri, 23 Jan 2015 16:51:15 +0000 (13:51 -0300)]
[media] coda: fix encoder rate control parameter masks
This patch fixes the ENC_SEQ_RC_PARA initial delay and bitrate masks.
These bit fields are 15 bit wide, not 7 bit.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Fabian Frederick [Mon, 29 Dec 2014 14:29:41 +0000 (11:29 -0300)]
[media] s5p-mfc: remove unnecessary version.h inclusion
Based on versioncheck.
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Fabian Frederick [Mon, 29 Dec 2014 14:29:40 +0000 (11:29 -0300)]
[media] s5p-g2d: remove unnecessary version.h inclusion
Based on versioncheck.
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Nicolas Dufresne [Mon, 15 Dec 2014 21:10:59 +0000 (18:10 -0300)]
[media] media-doc: Fix MFC display delay control doc
The V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE control
is a boolean but was documented as a integer. The documentation was
also slightly miss-leading.
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Nicolas Dufresne [Mon, 15 Dec 2014 21:10:58 +0000 (18:10 -0300)]
[media] s5p-mfc-dec: Don't use encoder stop command
The decoder should handle V4L2_DEC_CMD_STOP to trigger drain,
but it currently expecting V4L2_ENC_CMD_STOP.
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Nicolas Dufresne [Mon, 15 Dec 2014 21:10:57 +0000 (18:10 -0300)]
[media] s5p-mfc-v6+: Use display_delay_enable CID
The MFC driver has two controls, DISPLAY_DELAY and DISPLAY_DELAY_ENABLE
that allow forcing the decoder to return a decoded frame sooner
regardless of the order. The added support for firmware version 6 and
higher was not taking into account the DISPLAY_DELAY_ENABLE boolean.
Instead it had a comment stating that DISPLAY_DELAY should be set to a
negative value to disable it. This is not possible since the control
range is from 0 to 65535. This feature was also supposed to be disabled
by default in order to produce frames in display order.
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Tue, 23 Dec 2014 12:20:53 +0000 (09:20 -0300)]
[media] Documentation/video4linux: remove obsolete text files
Remove obsolete text files for drivers that have been removed.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Tue, 23 Dec 2014 12:17:09 +0000 (09:17 -0300)]
[media] bw/c-qcam, w9966, pms: remove deprecated staging drivers
These drivers haven't been tested in a long, long time. The hardware is
ancient and hopelessly obsolete. These drivers also need to be converted
to newer media frameworks but due to the lack of hardware that's going
to be impossible. In addition, cheaper and vastly better hardware is
available today.
These drivers are already deprecated, so now remove them altogether.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Tue, 23 Dec 2014 12:14:37 +0000 (09:14 -0300)]
[media] vino/saa7191: remove deprecated drivers
These drivers haven't been tested in a long, long time. The hardware is
ancient and hopelessly obsolete. These drivers also need to be converted
to newer media frameworks but due to the lack of hardware that's going
to be impossible.
So these drivers are a prime candidate for removal. If someone is
interested in working on these drivers to prevent their removal, then
please contact the linux-media mailinglist.
These drivers are already deprecated, so now remove them altogether.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Tue, 23 Dec 2014 12:11:48 +0000 (09:11 -0300)]
[media] tlg2300: remove deprecated staging driver
This driver hasn't been tested in a long, long time. The company that made
this chip has gone bust many years ago and hardware using this chip is next
to impossible to find.
This driver needs to be converted to newer media frameworks but due to the
lack of hardware that's going to be impossible. Since cheap alternatives are
easily available, there is little point in keeping this driver alive.
This driver is already deprecated, so now remove it altogether.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Sat, 6 Dec 2014 21:15:18 +0000 (18:15 -0300)]
[media] si2157: change firmware variable name and type
Rename firmware variable from fw_file to fw_name and change its
type from u8 to const char as request_firmware() input is.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Sat, 6 Dec 2014 21:12:39 +0000 (18:12 -0300)]
[media] si2157: print chip version
Print chip version once using log level into when init() is called.
Remove cold/warm state printing as those are not very useful.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Sat, 6 Dec 2014 20:25:24 +0000 (17:25 -0300)]
[media] si2157: print firmware version
Firmware version could be printed similarly than si2168 driver does.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Sat, 6 Dec 2014 18:13:31 +0000 (15:13 -0300)]
[media] si2157: add own goto label for kfree() on probe error
Use own goto label for error case mem free is needed, even kfree could
be called with NULL. I think it is better to have it, even not required.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Sat, 6 Dec 2014 18:07:45 +0000 (15:07 -0300)]
[media] si2157: trivial ID table changes
- Rename ID table.
- Remove magic numbers from ID table driver data field.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Sat, 6 Dec 2014 17:51:17 +0000 (14:51 -0300)]
[media] si2157: change firmware download error handling
Rename firmare download error path goto label. Remove firmware NULL
set as NULL value is not needed anymore, due to recent change which
started using goto labels for firmware error handling.
Cc: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Sat, 6 Dec 2014 17:40:06 +0000 (14:40 -0300)]
[media] si2157: carry pointer to client instead of state in tuner_priv
Carry struct i2c_client pointer in tuner_priv. This driver is I2C driver,
which is represented as a struct i2c_client, so better to carry this top
level structure for each routine in order to unify things.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Sat, 6 Dec 2014 17:04:05 +0000 (14:04 -0300)]
[media] si2157: simplify si2157_cmd_execute() error path
Remove if () from firmware command error path as there should not be
any error prone conditional logic there. Use goto labels instead.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Fri, 5 Dec 2014 20:46:30 +0000 (17:46 -0300)]
[media] si2157: rename device state variable from 's' to 'dev'
'dev' is likely most common name in kernel for structure containing
device state instance, so rename it in order to keep things
consistent.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Sat, 6 Dec 2014 20:53:16 +0000 (17:53 -0300)]
[media] si2168: change firmware variable name and type
Rename firmware variable from fw_file to fw_name and change its type
from u8 to const char as request_firmware() input defines.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Sat, 6 Dec 2014 20:43:27 +0000 (17:43 -0300)]
[media] si2168: print chip version
Print chip version once using log level into when init() is called.
Remove cold/warm state printing as those are not very useful.
old printing:
si2168 6-0064: found a 'Silicon Labs Si2168' in cold state
si2168 6-0064: downloading firmware from file 'dvb-demod-si2168-b40-01.fw'
si2168 6-0064: firmware version: 4.0.11
si2168 6-0064: found a 'Silicon Labs Si2168' in warm state
new printing:
si2168 6-0064: found a 'Silicon Labs Si2168-B40'
si2168 6-0064: downloading firmware from file 'dvb-demod-si2168-b40-01.fw'
si2168 6-0064: firmware version: 4.0.11
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Fri, 5 Dec 2014 20:22:42 +0000 (17:22 -0300)]
[media] si2168: remove unneeded fw variable initialization
commit
034e1ec0ce299b9e90056793dcb3187e7add6b62
si2168: One function call less in si2168_init() after error detection
That commit added goto label for error path to release firmware,
but forgets to remove variable NULL set. Remove those now.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Fri, 5 Dec 2014 20:08:22 +0000 (17:08 -0300)]
[media] si2168: enhance firmware download routine
All known old firmware firmware formats are downloaded using 8 byte
chunks. Reject firmware if it could not be divided to 8 byte chunks
and because of that we could simplify some calculations. Now both
supported firmware download routines are rather similar.
Cc: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Fri, 5 Dec 2014 19:02:42 +0000 (16:02 -0300)]
[media] si2168: add own goto label for kzalloc failure
Use own label for kzalloc failure in which does not call kfree().
kfree() could be called with NULL, but it is still better to have
own label which skips unnecessary kfree().
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Fri, 5 Dec 2014 18:57:03 +0000 (15:57 -0300)]
[media] si2168: change stream id debug log formatter
Change formatter from signed to unsigned as stream_id is 32bit
unsigned variable.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Fri, 5 Dec 2014 18:04:12 +0000 (15:04 -0300)]
[media] si2168: change firmware version print from debug to info
Even firmware version is not needed to know, it is still interesting
and useful to know some cases. Due to that increase its printing to
info log level.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Fri, 5 Dec 2014 17:54:14 +0000 (14:54 -0300)]
[media] si2168: rename few things
Rename some goto labels and more. No functionality changes.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Fri, 5 Dec 2014 17:30:44 +0000 (14:30 -0300)]
[media] si2168: simplify si2168_cmd_execute() error path
Remove if () from firmware command error path as there should not be
any error prone conditional logic there. Use goto labels instead.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Tue, 25 Nov 2014 20:53:21 +0000 (17:53 -0300)]
[media] si2168: get rid of own struct i2c_client pointer
We don't need that anymore as same pointer is passed to each
routine via struct dvb_frontend private field.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Tue, 25 Nov 2014 20:31:43 +0000 (17:31 -0300)]
[media] si2168: carry pointer to client instead of state
Carry struct i2c_client pointer inside struct dvb_frontend private
pointer. This driver is I2C driver, which is represented as a
struct i2c_client, so better to carry this top level structure for
each routine in order to unify things. This allows further
simplification.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Tue, 25 Nov 2014 19:46:16 +0000 (16:46 -0300)]
[media] si2168: rename device state variable from 's' to 'dev'
'dev' is most common name in kernel for structure containing device
state instance, so rename it.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Tue, 25 Nov 2014 19:26:49 +0000 (16:26 -0300)]
[media] si2168: define symbol rate limits
w_scan complains about missing symbol rate limits:
This dvb driver is *buggy*: the symbol rate limits are undefined - please report to linuxtv.org
Chip supports 1 to 7.2 MSymbol/s on DVB-C.
Cc: stable@vger.kernel.org
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Michael Ira Krufky [Sun, 21 Dec 2014 21:54:50 +0000 (18:54 -0300)]
[media] lgdt3305: add support for fixed tp clock mode
Add support for controlling TP clock mode for VSB and QAM annex-B/C mode.
Gated clock mode is the default value, and does not support QAM annex-C.
The patch enables setting this control to fixed clock mode.
Signed-off-by: Michael Ira Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Michael Ira Krufky [Sun, 21 Dec 2014 21:48:19 +0000 (18:48 -0300)]
[media] lgdt3305: we only need to pass state into lgdt3305_mpeg_mode_polarity()
Simplify the code a little bit by removing some uneeded arguments
to lgdt3305_mpeg_mode_polarity().
Signed-off-by: Michael Ira Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Luca Bonissi [Mon, 26 Jan 2015 10:38:17 +0000 (07:38 -0300)]
[media] gspca_vc032x: Fix wrong bytesperline
I found a problem on vc032x gspca usb webcam subdriver: "bytesperline"
property is wrong for YUYV and YVYU formats.
With recent v4l-utils library (>=0.9.1), that uses "bytesperline" for
pixel format conversion, the result is a wrong jerky image.
Patch tested on my laptop (USB webcam Logitech Orbicam 046d:0892).
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=91181
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans de Goede [Thu, 15 Jan 2015 10:42:36 +0000 (07:42 -0300)]
[media] gspca: Fix underflow in vidioc_s_parm()
"n" is a user controlled integer. The code here doesn't handle the case
where "n" is negative and this causes a static checker warning.
drivers/media/usb/gspca/gspca.c:1571 vidioc_s_parm()
warn: no lower bound on 'n'
parm.capture.readbuffers is unsigned, so make n unsigned too, fixing this.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Joe Howse [Mon, 29 Dec 2014 15:00:03 +0000 (12:00 -0300)]
[media] gspca: Add high-speed modes for PS3 Eye camera
Add support in the PS3 Eye driver for QVGA capture at higher
frame rates: 187, 150, and 137 FPS. This functionality is valuable
because the PS3 Eye is popular for computer vision projects and no
other camera in its price range supports such high frame rates.
Correct a QVGA mode that was listed as 40 FPS. It is really 37 FPS
(half of 75 FPS).
Tests confirm that the nominal frame rates are achieved.
Signed-off-by: Joe Howse <josephhowse@nummist.com>
Tested-by: Antonio Ospite <ao2@ao2.it>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antonio Ospite [Fri, 11 Jul 2014 12:56:57 +0000 (09:56 -0300)]
[media] gspca_stv06xx: enable button found on some Quickcam Express variant
Signed-off-by: Antonio Ospite <ao2@ao2.it>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Mon, 4 Aug 2014 10:29:59 +0000 (07:29 -0300)]
[media] pwc: fix WARN_ON
If start_streaming fails, then the buffers must be given back to vb2 with state
QUEUED, not ERROR. Otherwise a WARN_ON will be generated.
In the disconnect it is pointless to call pwc_cleanup_queued_bufs() as stop_streaming()
will be called anyway.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans de Goede [Thu, 20 Nov 2014 15:10:47 +0000 (12:10 -0300)]
[media] rc: sunxi-cir: Add support for the larger fifo found on sun5i and sun6i
Add support for the larger fifo found on sun5i and sun6i, having a separate
compatible for the ir found on sun5i & sun6i also is useful if we ever want
to add ir transmit support, because the sun5i & sun6i version do not have
transmit support.
Note this commits also adds checking for the end-of-packet interrupt flag
(which was already enabled), as the fifo-data-available interrupt flag only
gets set when the trigger-level is exceeded. So far we've been getting away
with not doing this because of the low trigger-level, but this is something
which we should have done since day one.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans de Goede [Thu, 20 Nov 2014 14:59:04 +0000 (11:59 -0300)]
[media] rc: sunxi-cir: Add support for an optional reset controller
On sun6i the cir block is attached to the reset controller, add support
for de-asserting the reset if a reset controller is specified in dt.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Mauro Carvalho Chehab [Thu, 29 Jan 2015 20:22:04 +0000 (18:22 -0200)]
[media] gspca/touptek: Fix a few CodingStyle issues
Checkpatch complained about a few issues, like FSF address. Also,
multi-line comments are not following the Kernel CodingStyle.
While not too late, let's fix those issues.
Cc: John McMaster <johndmcmaster@gmail.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
John McMaster [Mon, 1 Dec 2014 02:27:53 +0000 (23:27 -0300)]
[media] gspca_touptek: Add support for ToupTek UCMOS series USB cameras
Adds support for AmScope MU800 / ToupTek UCMOS08000KPB USB microscope camera.
Signed-off-by: John McMaster <johndmcmaster@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil [Tue, 27 Jan 2015 16:46:17 +0000 (13:46 -0300)]
[media] vivid: Y offset should depend on quant. range
When converting to or from Y'CbCr and R'G'B' the Y offset depends
on the quantization range: it's 0 for full and 16 for limited range.
But in the code it was hardcoded to 16. This messed up the brightness
of the generated pattern.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Sakari Ailus [Tue, 27 Jan 2015 10:18:49 +0000 (07:18 -0300)]
[media] smiapp: Don't compile of_read_number() if CONFIG_OF isn't defined
of_read_number() is defined in of.h but does not return an error code, so
that non-of implementation could simply return an error.
Temporarily work around this until of_read_number() can be replaced by
of_property_read_u64_array().
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Tue, 2 Dec 2014 14:23:49 +0000 (11:23 -0300)]
[media] rtl28xxu: change module unregister order
We must unregister frontend first and after that driver itself. That
order went wrong after demod drivers were switched to kernel I2C
drivers, causing crashes.
Tested-by: Benjamin Larsson <benjamin@southpole.se>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Tue, 2 Dec 2014 14:00:23 +0000 (11:00 -0300)]
[media] rtl28xxu: switch rtl2832 demod attach to I2C binding
As rtl2832 driver support now I2C binding we will switch to that one.
Tested-by: Benjamin Larsson <benjamin@southpole.se>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari [Tue, 2 Dec 2014 13:55:17 +0000 (10:55 -0300)]
[media] rtl2832: convert driver to I2C binding
Convert that driver to I2C driver model.
Legacy DVB binding is left also for later removal...
Tested-by: Benjamin Larsson <benjamin@southpole.se>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>