Commit Graph

234516 Commits

Author SHA1 Message Date
Pawel Osciak 950720840f [media] Update Pawel Osciak's e-mail address
Signed-off-by: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:55:05 -03:00
Pawel Osciak f0e3b646cc [media] Make 2.6.39 not 2.6.38 the version when Multi-planar API was added
Multi-planar API was added to 2.6.39 version of Video for Linux 2 API.

Signed-off-by: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:55:04 -03:00
Antti Palosaari 6ed9d56086 [media] af9013: reimplement firmware download
Split FW download packages smarter way and bug free. Implementation is
based of Andrea Merello's example he provided for tda18218 driver.
Count remaining FW bytes down in loop instead of division and modulo
combination used earlier.

Thanks to: Andrea Merello <andrea.merello@gmail.com>

Signed-off-by: Antti Palosaari <crope@iki.fi>
Cc: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:55:02 -03:00
Antti Palosaari 109a29900a [media] af9013: download FW earlier in attach()
Quick test shows that FW must be running before other checks
so make it happen earlier.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:55:01 -03:00
Antti Palosaari 582e565cae [media] af9015: reimplement firmware download
Split FW download packages smarter way and bug free. Implementation is
based of Andrea Merello's example he provided for tda18218 driver.
Count remaining FW bytes down in loop instead of division and modulo
combination used earlier.

Thanks-to: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Cc: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:58 -03:00
Antti Palosaari 04599c2b1f [media] af9015: map remote for TerraTec Cinergy T Stick RC
Map rc-terratec-slim-2 for TerraTec Cinergy T Stick RC device.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Cc: Martin Groszhauser <mgroszhauser@gmail.com>
Cc: TerraTux <TerraTux@terratec.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:57 -03:00
Antti Palosaari 638b53f80c [media] add TerraTec remote
Remote used for TerraTec Cinergy T Stick RC.
Keytable from Martin Groszhauser <mgroszhauser@gmail.com>

Signed-off-by: Antti Palosaari <crope@iki.fi>
Cc: Martin Groszhauser <mgroszhauser@gmail.com>
Cc: TerraTux <TerraTux@terratec.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:55 -03:00
Antti Palosaari 1e8750c2ac [media] af9015: small RC change
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:53 -03:00
Ian Armstrong c1e13971b1 [media] af9015: enhance RC
Patch from Ian Armstrong.

I've encountered a couple of problems with the current af9015 driver as
supplied with the 2.6.37 kernel, that the attached patch appears to fix. (I've
generated this patch against the current v4l-dvb git).

Some key-presses are lost. A key-press is only generated upon 'valid' data
(buf[14] == (u8) ~buf[15]), but the buffer is wiped before this check.
Sometimes the 15th byte has not been set at the time of read, so the data
isn't valid & ignored. On the next poll the 15th byte has been set, but the
rest of the data was wiped previously, so the data is still invalid & the key
is lost.

Weird repeat error, where an old key press is sometimes repeated in error. ie.
button sequence '1 (pause) 2 (pause) 3 (pause) 4' generates output like '1
(pause) 2 (pause) 23 (pause) 4'. The current driver zeroes the data for the
key pushed, but sometimes this data is already zero but with other bytes set
suggesting a repeat code. This results in the last key being incorrectly
repeated.

This patch attempts to reduce the risk of a missed key-press & also stop the
random repeat of an old key-press when a new key is pressed.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:52 -03:00
Jean-François Moine ce5b2acce6 [media] gspca - nw80x: New subdriver for Divio based webcams
[mchehab@redhat.com: Fix a few CodingStyle issues]
Tested-by: Kjell Claesson <kjell.claesson@epost.tidanet.se>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:51 -03:00
Jean-François Moine 59929cefa5 [media] gspca - main: Cleanup source
- change copyright and erroneous comment
- small code optimization
- have constant the device template

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:50 -03:00
Jean-François Moine 58c92d37e7 [media] gspca - ov519: Add exposure and autogain controls for ov2610/2610ae
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:49 -03:00
Jean-François Moine 7d47b789ce [media] gspca - jeilinj / stv06xx: Fix some warnings
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:48 -03:00
Jean-François Moine 75b79ffcc3 [media] gspca - sonixb: Clenup source
- update copyright and module author
- set the sensor table as constant

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:47 -03:00
Hans de Goede f0baad866b [media] gspca - sonixb: Update inactive flags to reflect autogain setting
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:46 -03:00
Jean-François Moine f51a8caafe [media] gspca - sonixb: Use the new control mechanism
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:44 -03:00
Jean-François Moine fa85bb6f9b [media] gspca: New file autogain_functions.h
This file contains functions for the auto gain.
It must be used with the new control mechanism.

Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:43 -03:00
Jean-François Moine 4e5144eef4 [media] gspca - zc3xx: Cleanup source
- change some comments and copyright
- change an erroneous register name
- change hdcs2020b to hdcs2020

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:41 -03:00
Jean-François Moine 170960fa9a [media] gspca - zc3xx: Remove double definition
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:40 -03:00
Hans de Goede c2f644aeeb [media] gspca_cpia1: Add support for button
Not only the qx3 microscope has a button, but some cameras too. Tested
with the Trust sp@cecam 100 (and with a creative and ezcam without button).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:39 -03:00
Xiaochen Wang c05df8b32a [media] pvrusb2: check kmalloc return value
allows the driver to proceed and initialize the below two values
 even if the kmalloc() fails.
        hdw->std_info_enum.def.type_enum.value_names
        hdw->std_info_enum.def.type_enum.count

Signed-off-by: Xiaochen Wang <wangxiaochen0@gmail.com>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:37 -03:00
Mike Isely 228ee5928b [media] pvrusb2: Remove dead code
This was caught via a compiler warning.  Amazingly enough this bit of
benign dreck dates all the way back to 2008.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:36 -03:00
Mike Isely 43823c0224 [media] pvrusb2: Implement support for Terratec Grabster AV400
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:35 -03:00
Hans Verkuil 34fd68bc03 [media] Fix 'ID nv12mt already defined' error
DocBook validation fix.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:34 -03:00
Hans Verkuil 6e5b55fbda [media] V4L DocBook: update V4L2 version
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:32 -03:00
Hans Verkuil 665bf368fd [media] V4L doc fixes
The xmlto validation produced a number of errors that are now fixed.
Sadly, the DocBook/Makefile still adds --skip-validation to xmlto, so
these errors are missed during a normal compile.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:31 -03:00
Andrzej Pietrasiewicz 941f896071 [media] v4l2: vb2-dma-sg: fix potential security hole
Memory allocated by alloc_page() function might contain some potentially
important data from other system processes. The patch adds a flag to
zero the allocated page before giving it to videobuf2 (and then to
userspace).

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@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>
2011-03-22 04:54:30 -03:00
Marek Szyprowski 72f1fc33a7 [media] v4l2: vb2: simplify __vb2_queue_free function
__vb2_queue_free function doesn't really return anything useful. This patch
removes support for the return value to simplify the code.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:29 -03:00
Marek Szyprowski 31901a078a [media] v4l2: vb2: one more fix for REQBUFS()
Return immediately if the target number of buffers is the same as
the current one and memory access type doesn't change.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:28 -03:00
Andrzej Pietrasiewicz a9bb36aa0d [media] v4l2: vb2-dma-sg: fix memory leak
This patch fixes two minor memory leaks in videobuf2-dma-sg module. They
might happen only in case some other operations (like memory allocation)
failed.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@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>
2011-03-22 04:54:27 -03:00
Marek Szyprowski 29e3fbd8ed [media] v4l2: vb2: fix queue reallocation and REQBUFS(0) case
This patch fixes 2 minor bugs in videobuf2 core:
1. Queue should be reallocated if one change the memory access
method without changing the number of buffers.
2. In case of REQBUFS(0), the request should not be passed to the
driver.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:23 -03:00
Kamil Debski bd08a0cd5f [media] v4l: Documentation for the NV12MT format
Added documentation for V4L2_PIX_FMT_NV12MT format. This is a YUV 4:2:0
format with macro block size of 64x32 and specific order of macro blocks
in the memory.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:22 -03:00
Sylwester Nawrocki 91707b8b27 [media] s5p-fimc: Fix G_FMT ioctl handler
Use pix_mp member of struct v4l2_format to return a format
description rather than pix. Also fill in the plane_fmt array.
This is a missing bit of conversion to the multiplanar API.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:20 -03:00
Sylwester Nawrocki 1e00469599 [media] s5p-fimc: Use dynamic debug
Use pr_debug instead of printk so it is possible to control
debug traces at runtime.
E.g. to enable debug trace in file fimc-core.c use command:
echo -n 'file fimc-core.c +p' > /sys/kernel/debug/dynamic_debug/control
or
echo -n 'file fimc-core.c -p' > /sys/kernel/debug/dynamic_debug/control
to disable.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:19 -03:00
Sylwester Nawrocki e0eec9af8b [media] s5p-fimc: Add a platform data entry for MIPI-CSI data alignment
Allow the MIPI-CSI data alignment to be defined in the board setup
as it may be different across various camera sensors.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:18 -03:00
Sylwester Nawrocki 117182d183 [media] s5p-fimc: Allow defining number of sensors at runtime
Add num_clients field to struct s5p_fimc_isp_info to define exactly
size of clients array which simplifies a bit the sensors management.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:16 -03:00
Sylwester Nawrocki 4ecbf5d1d2 [media] s5p-fimc: Prevent hanging on device close and fix the locking
Rework the locking in m2m driver to assure proper operation on SMP systems.

When job_abort or stop_streaming was called to immediately shutdown
a memory-to-memory transaction video buffers scheduled for processing
were never returned to vb2 and v4l2_m2m_job_finish was not called
which led to hanging.

Correct this and also return the unprocessed buffers to vb2 marking
them as erroneous, in case the end of frame interrupt do not occur.

Reported-by: Sewoon Park <seuni.park@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:15 -03:00
Sylwester Nawrocki a0f8caefaf [media] s5p-fimc: Prevent oops when i2c adapter is not available
Prevent invalid pointer dereference on error path.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:14 -03:00
Sungchun Kang 8ec737ffcc [media] s5p-fimc: fix ISR and buffer handling for fimc-capture
In some cases fimc H/W did not stop although there were no output
buffers available. So the capture deactivation interrupt routine
is modified and the state of ST_CAPT_RUN is cleared only
in the LAST-IRQ call.

After LAST-IRQ is generated, H/W pointer will be skipped by 1 frame.
(reference by user manual) So, S/W pointer should be increased too.

Reviewed-by Jonghun Han <jonghun.han@samsung.com>
Signed-off-by: Sungchun Kang <sungchun.kang@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:13 -03:00
Abylay Ospan 4174ebf5eb [media] Force xc5000 firmware loading for NetUP Dual DVB-T/C CI RF card
Two xc5000 tuners connected to same i2c bus.
Experiments shows that situation when one tuner is not initialized
while other is tuned to channel causes TS errors.

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:12 -03:00
Abylay Ospan 8af81ddb12 [media] Fix CI code for NetUP Dual DVB-T/C CI RF card
CI reset takes several seconds on some CAM,
so there is no need to lock mutex all that time.
Also we need not to preserve CI's reset bits in
CIBUSCTRL register, they are handled automatically by FPGA.
Set it to 0 explicitly in order to not reset wrong CAM.

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:11 -03:00
Abylay Ospan 78db66e5b2 [media] stv0367: implement uncorrected blocks counter
Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:10 -03:00
Abylay Ospan 01a475df3d [media] stv0367: change default value for AGC register
Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:08 -03:00
Abylay Ospan d164460f89 [media] cx23885: Altera FPGA CI interface reworked
It decreases I2C traffic.

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:07 -03:00
Mauro Carvalho Chehab 1039752353 [media] cpia2: Fix some gcc 4.6 warnings when debug is disabled
cpia2_core.c:529:14: warning: variable 'dir' set but not used [-Wunused-but-set-variable]
cpia2_core.c:526:5: warning: variable 'block_index' set but not used [-Wunused-but-set-variable]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:06 -03:00
Mauro Carvalho Chehab 972d724caf [media] several drivers: Fix a few gcc 4.6 warnings
au0828-dvb.c:99:6: warning: variable 'ptr' set but not used [-Wunused-but-set-variable]
au0828-video.c:1180:25: warning: variable 'maxheight' set but not used [-Wunused-but-set-variable]
au0828-video.c:1180:15: warning: variable 'maxwidth' set but not used [-Wunused-but-set-variable]
bttv-input.c:196:16: warning: variable 'current_jiffies' set but not used [-Wunused-but-set-variable]

Those variables are not used at all, so just remove them.

Cc: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:05 -03:00
Hans Verkuil fa9448d9bd [media] altera-ci.h: add missing inline
Functions defined in a header should be static inline. This prevents
compile warnings like:

	'altera_ci_tuner_reset' defined but not used

(Actually appeared in the media backwards compatibility build).

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:04 -03:00
Hans Verkuil d6972cc8a3 [media] cx88-alsa: fix compiler warning
drivers/media/video/cx88/cx88-alsa.c: In function 'cx88_audio_initdev':
drivers/media/video/cx88/cx88-alsa.c:881:20: warning: 'core' may be used uninitialized in this function

The compiler doesn't understand that snd_cx88_create fills in the core
pointer. So just initialize it to NULL.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:03 -03:00
Hans Verkuil cfa746b39c [media] fmdrv_common.c: fix compiler warning
drivers/media/radio/wl128x/fmdrv_common.c: In function 'recv_tasklet':
drivers/media/radio/wl128x/fmdrv_common.c:274:4: warning: format '%d' expects type 'int', but argument 4 has type 'long unsigned int'

The result of sizeof() should be printed with %zu.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:02 -03:00
Hans Verkuil 3920d6b34d [media] altera-ci.c: fix compiler warnings
drivers/media/video/cx23885/altera-ci.c: In function 'altera_hw_filt_init':
drivers/media/video/cx23885/altera-ci.c:671:2: warning: cast from pointer to integer of different size
drivers/media/video/cx23885/altera-ci.c: In function 'altera_ci_init':
drivers/media/video/cx23885/altera-ci.c:739:2: warning: cast from pointer to integer of different size

Use %p instead of 0x%x to print addresses.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:54:00 -03:00