1
0
Fork 0
Commit Graph

300753 Commits (86b0905516460b87542686248690337e1d703544)

Author SHA1 Message Date
Marek Szyprowski c1bf9c654a [media] v4l: s5p-tv: fix plane size calculation
Fix plane size calculation.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 09:00:13 -03:00
Hans Verkuil 9d5934446a [media] w9966: convert to the latest frameworks
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 08:44:00 -03:00
Hans Verkuil c551af62e5 [media] arv: use latest frameworks
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 08:43:42 -03:00
Hans Verkuil 34caed8b3a [media] c-qcam: convert to the latest frameworks
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 08:43:18 -03:00
Hans Verkuil 5fa1a89d37 [media] bw-qcam: update to latest frameworks
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 08:42:58 -03:00
Hans Verkuil 75916fd279 [media] V4L2: Mark the DV Preset API as deprecated
The DV Preset API will be phased out in favor of the more flexible DV Timings
API. Mark the preset API accordingly in the header and documentation.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 08:31:52 -03:00
Hans Verkuil f2b9e8acaa [media] Feature removal: remove invalid DV presets
Formats V4L2_DV_1080I25, V4L2_DV_1080I30 and V4L2_DV_1080I29_97
do not exist, so these presets are bogus. Remove them in 3.6.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 08:31:12 -03:00
Hans Verkuil eb8305b159 [media] tvp7002: add support for the new dv timings API
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 08:30:09 -03:00
Hans Verkuil f00dc30422 [media] v4l2-dv-timings.h: definitions for CEA-861 and VESA DMT timings
This header contains the timings for the common CEA-861 and all VESA
DMT formats for use with the V4L2 dv_timings API.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 08:27:44 -03:00
Hans Verkuil 5d7758eed2 [media] v4l2 framework: add support for the new dv_timings ioctls
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 08:22:30 -03:00
Hans Verkuil 7dcc606b2a [media] V4L2 spec: document the new V4L2 DV timings ioctls
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 08:18:03 -03:00
Hans Verkuil 06bba75d2a [media] videodev2.h: add enum/query/cap dv_timings ioctls
These new ioctls make it possible for the dv_timings API to replace
the dv_preset API eventually.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-18 16:36:27 -03:00
Ezequiel García dedb8cb1d6 [media] em28xx: Fix memory leak on driver defered resource release
When the device is physically unplugged but there are still
open file handles, resource release is defered until last
opened handle is closed.
This patch fixes a missing em28xx_fh struct release.
Tested by compilation only.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-18 15:51:07 -03:00
Masahiro Nakai 61282daf50 [media] V4L2: mt9t112: fixup JPEG initialization workaround
It has been indicated on Atmark Techno Web page
http://armadillo.atmark-techno.com/faq/a800eva-dont-work-camera

Signed-off-by: Masahiro Nakai <nakai@atmark-techno.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 16:15:35 -03:00
Kuninori Morimoto 2564f67bc8 [media] V4L2: sh_mobile_ceu: manage lower 8bit bus
CAMCR::DTIF feild controls camera bus as upper8bit/16bit/lower8bit.
This patch manages unmanaged lower 8bit bus

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 16:15:14 -03:00
Guennadi Liakhovetski fec0f72f5f [media] V4L: sh_mobile_ceu_camera: don't fail TRY_FMT
VIDIOC_TRY_FMT shouldn't fail if the user requests an unsupported pixel
format. Instead the driver should replace it with a supported one. Fix the
sh_mobile_ceu_camera driver accordingly.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 16:14:42 -03:00
Guennadi Liakhovetski 9633c0867f [media] V4L: soc-camera: switch to using the existing .enum_framesizes()
The recently introduced .enum_mbus_fsizes() v4l2-subdev video operation is
a duplicate of the .enum_framesizes() operation, introduced earlier. Switch
soc-camera over to using the original one.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 16:14:23 -03:00
Guennadi Liakhovetski 67e86524b9 [media] V4L: mx2-camera: avoid overflowing 32-bits
In mx2_camera_try_fmt(), when applying i.MX25 restrictions to frame sizes,
the height is checked to be <= 0xffff. But later an integer multiplication
height * 4 * 0x3ffff is performed, which will overflow even for bounded
height values. This patch switches to using 64-bit multiplication and
division to avoid overflowing.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 16:14:01 -03:00
Laurent Pinchart fc13baff74 [media] sh_mobile_ceu_camera: Support user-configurable line stride
In image mode, the CEU allows configurable line strides up to 8188
pixels.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
[g.liakhovetski@gmx.de: unify sh_mobile_ceu_set_rect() in data-fetch mode]
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 16:13:22 -03:00
Laurent Pinchart 914f05c811 [media] soc-camera: Support user-configurable line stride
Add a capabilities field to the soc_camera_host structure to flag hosts
that support user-configurable line strides. soc_camera_try_fmt() then
passes the user-provided bytesperline and sizeimage format fields to
such hosts, and expects the host to check (and fix if needed) the
values.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
[g.liakhovetski@gmx.de: fix a typo in mx2_camera.c]
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 16:12:54 -03:00
Laurent Pinchart b0a461ff1b [media] mx2_camera: Use soc_mbus_image_size() instead of manual computation
Use the new soc_mbus_image_size() function to compute the image size.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 16:11:23 -03:00
Laurent Pinchart bed8d80330 [media] soc-camera: Honor user-requested bytesperline and sizeimage
Compute the bytesperline and sizeimage values when trying/setting
formats or when allocating buffers by taking the user-requested values
into account.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 16:11:07 -03:00
Laurent Pinchart 8929c96378 [media] soc-camera: Add soc_mbus_image_size
The function returns the minimum size of an image for a given number of
bytes per line (as per the V4L2 specification), width and format.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 16:10:20 -03:00
Laurent Pinchart 4e0e620ce7 [media] soc-camera: Fix bytes per line computation for planar formats
The V4L2 specification defines bytesperline for planar formats as the
number of bytes per line for the largest plane. Modify
soc_mbus_bytes_per_line() accordingly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 16:10:03 -03:00
Laurent Pinchart ad3b81faa1 [media] soc-camera: Add plane layout information to struct soc_mbus_pixelfmt
To compute the value of the v4l2_pix_format::bytesperline field, we need
information about planes layout for planar formats. The new enum
soc_mbus_layout conveys that information.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 16:09:41 -03:00
Laurent Pinchart 1c0f95eec6 [media] soc_camera: Use soc_camera_device::bytesperline to compute line sizes
Instead of computing the line sizes, use the previously negotiated
soc_camera_device::bytesperline value.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 16:09:02 -03:00
Laurent Pinchart 2b61d46e2c [media] soc_camera: Use soc_camera_device::sizeimage to compute buffer sizes
Instead of computing the buffer size manually in the videobuf queue
setup and buffer prepare callbacks, use the previously negotiated
soc_camera_device::sizeimage value.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 16:08:22 -03:00
Laurent Pinchart 584943aa06 [media] mx2_camera: Fix sizeimage computation in try_fmt()
The try_fmt() handler restricts the image width based on the hardware
limits and updates the bytesperline value, but doesn't update sizeimage.
Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 16:07:12 -03:00
Guennadi Liakhovetski 9ce3ce4d4a [media] V4L: mem2mem: fix alignment in mem2mem-testdev
Fix a trivial alignment calculation issue.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 13:38:33 -03:00
Sakari Ailus b89225a1c8 [media] smiapp: Remove smiapp-debug.h in favour of dynamic debug
Remove smiapp-debug.h and let people use CONFIG_DYNAMIC_DEBUG instead. The
option only affected to when debug information was being printed.

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 12:06:58 -03:00
Jim Cromie 272ed119d7 [media] cx231xx: replace open-coded ARRAY_SIZE with macro
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 11:41:13 -03:00
Sylwester Nawrocki 579e92ffac [media] V4L: JPEG class documentation corrections
This patch fixes following compilation warning:
Error: no ID for constraint linkend: v4l2-jpeg-chroma-subsampling.

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

Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 11:41:00 -03:00
Antti Palosaari bc050e6702 [media] af9015: various small changes and clean-ups
Clean-up dvb_usb_device_properties and fix errors
reported by checkpatch.pl.

Some other very minor changes. Functionality remains
untouched.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 10:46:13 -03:00
Mauro Carvalho Chehab f9b26cd8e2 [media] smiapp: fix compilation breakage
The usage of ../*.h breaks out-of-tree compilation and likely breaks
compilation when O= argument is used. Instead of doing that,
just add the include path via Makefile.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 10:36:09 -03:00
Javier Martin d509835e32 [media] media: mx2_camera: Fix mbus format handling
Remove MX2_CAMERA_SWAP16 and MX2_CAMERA_PACK_DIR_MSB flags
so that the driver can negotiate with the attached sensor
whether the mbus format needs convertion from UYUV to YUYV
or not.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 09:42:17 -03:00
Javier Martin 5ff203b5d8 [media] i.MX27: visstrim_m10: Remove use of MX2_CAMERA_SWAP16
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 09:41:14 -03:00
Javier Martin 002eaf90a2 [media] media: tvp5150: Fix mbus format
According to p.14 fig 3-3 of the datasheet (SLES098A)
this decoder transmits data in UYVY format.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 09:39:32 -03:00
Alexey Khoroshilov 1eaef48b42 [media] dib9000: get rid of Dib*Lock macros
The patch replaces Dib*Lock macros with direct calls to mutex functions
as soon as they just make the driver code harder to review
(per request of Mauro).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 09:36:51 -03:00
Antti Palosaari 943a903459 [media] rtl28xxu: dynamic USB ID support
DVB USB core refuses to	load driver when current USB ID
does not match IDs on driver table. Due to that dynamic
IDs does not work. Replace reference design ID by dynamic
ID in .probe() in order to get it working.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 09:35:28 -03:00
Antti Palosaari 662f9602bd [media] get_dvb_firmware: add dvb-demod-drxk-pctv.fw
Firmware for the PCTV QuatroStick nano (520e).

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 09:34:33 -03:00
Santosh Nayak 26a11eb176 [media] dib0700: Return -EINTR and unlock mutex if locking attempts fails
In 'dib0700_i2c_xfer_new()' and 'dib0700_i2c_xfer_legacy()'
we are taking two locks:
                1. i2c_mutex
                2. usb_mutex
If attempt to take 'usb_mutex' lock fails then the previously taken
lock 'i2c_mutex' should be unlocked and -EINTR should be returned so
that caller can take appropriate action.

If locking attempt was interrupted by a signal then
we should return -EINTR. At present we are returning '0' for
such scenarios  which is wrong.

Replace -EAGAIN by -EINTR as a return type for the the scenario
where locking attempt was interrupted by signal.

Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 09:32:31 -03:00
Gianluca Gennari b115f40094 [media] cxd2820r: tweak search algorithm behavior
MPIS based STBs running 3.x kernels and the Enigma2 OS are not able to tune
DVB-T channels with the PCTV 290e using the current cxd2820r driver.
DVB-T2 channels instead work properly.

This patch fixes the problem by changing the condition to break out from the
wait lock loop in the "search" function of the cxd2820r demodulator from
FE_HAS_SIGNAL to FE_HAS_LOCK.

As a consequence, the "search" function of the demodulator driver now returns
DVBFE_ALGO_SEARCH_SUCCESS only if the frequency lock is successfully acquired.

This behavior seems consistent with other demodulator drivers (e.g. stv090x,
hd29l2, stv0900, stb0899, mb86a16).

This patch has been successfully tested with DVB-T and DVB-T2 signals,
on both PC and the mipsel STB running Enigma2.
No apparent side effect has been observed on PC applications like Kaffeine.
DVB-C is not available in my country so it's not tested.

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 09:28:49 -03:00
Gianluca Gennari 38f0fe23dc [media] em28xx-dvb: enable LNA for cxd2820r in DVB-T mode
Enable the LNA amplifier also for DVB-T (like for DVB-T2 and DVB-C);
this greatly improves reception of weak signals without affecting the reception
of the strong ones.

Experimental data (collected with the mipsel STB) on the weakest frequencies
available in my area:

LNA OFF:

MUX          level   BER     picture

RAI mux 4    72%     32000   corrupted
TIMB 2       75%     14      OK
TVA Vicenza  68%     32000   corrupted
RAI mux 2    78%     14      OK

LNA ON:

MUX          level   BER     picture

RAI mux 4    73%     1500    OK
TIMB 2       76%     0       OK
TVA Vicenza  69%     0       OK
RAI mux 2    79%     0       OK

Moreover, with LNA enabled, the PCTV 290e was able to pick up 2 new frequencies
matching the integrated tuner of my Panasonic G20 TV, which is really good.

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 09:26:53 -03:00
Mauro Carvalho Chehab 626f95a3e1 [media] saa7134: remove unused log_err() macro
As reported by Masanari, this macro is using "KERN_ERR"
instead of "KERN_ERROR". That would lead into a compilation
breakage, if this macro were used somewhere inside the driver.

Instead of fixing the macro, as originally proposed, let's just
remove the dead code.

Reported-by: Masanari Iida <standby24x7@gmail.com>

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 09:13:28 -03:00
Ezequiel García 92a0144225 [media] staging: easycap: Split easycap_delete() into several pieces
The patch splits easycap_delete(), which is in charge of
buffer deallocation, into smaller functions each
deallocating a specific kind of buffer.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 09:00:48 -03:00
Ezequiel García df8c4b7232 [media] staging: easycap: Clean comment style in easycap_delete()
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 09:00:10 -03:00
Ezequiel García cf32b65d05 [media] staging: easycap: Clean comment style in easycap_usb_disconnect()
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 08:59:57 -03:00
Ezequiel García de6ffc5e5a [media] staging: easycap: Split audio buffer and urb allocation
When the device is probed, this driver allocates
audio buffers, and audio urbs.
This patch just split this into separate functions,
which helps clearing the currently gigantic probe function.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 08:59:40 -03:00
Ezequiel García 217d55f2ba [media] staging: easycap: Push video registration to easycap_register_video()
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 08:59:22 -03:00
Ezequiel García 751869e6ef [media] staging: easycap: Initialize 'ntsc' parameter before usage
This parameter is now initialized at init_easycap(),
this way we assure it won't be used uninitialized.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-15 08:56:36 -03:00