Commit Graph

11119 Commits (0d60b281dc7fd2ae7ec6463f916138fd2d182bee)

Author SHA1 Message Date
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
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
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
Hans Verkuil fb661a7869 [media] stv0367.c: fix compiler warning
drivers/media/dvb/frontends/stv0367.c: In function 'stv0367ter_lock_algo':
drivers/media/dvb/frontends/stv0367.c:1315:2: warning: cast from pointer to integer of different size

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

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:53:59 -03:00
Hans Verkuil aa40d19497 [media] tuner-xc2028.c: fix compile warning
drivers/media/common/tuners/tuner-xc2028.c: In function 'generic_set_freq':
drivers/media/common/tuners/tuner-xc2028.c:936:15: warning: comparison between 'enum tuner_mode' and 'enum v4l2_tuner_type'

Argument type was enum tuner_mode, but should have been enum v4l2_tuner_type.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:53:58 -03:00
Laurent Pinchart 4b0ec19e02 [media] omap3isp: Add set performance callback in isp platform data
Replace the omap_pm_set_min_bus_tput() with a callback to board code.
This makes the omap3isp driver compilable as a module, and lets board
code manage OMAP PM details depending on board requirements.

Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:53:55 -03:00
Laurent Pinchart 7e8970e1d5 [media] omap3isp: Kconfig and Makefile
Add the OMAP3 ISP driver to the kernel build system.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:53:54 -03:00
David Cohen 68e342b306 [media] omap3isp: Statistics
The OMAP3 ISP statistics entities compute histogram and H3A statistics
information from capture images.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: David Cohen <dacohen@gmail.com>
Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
Signed-off-by: Vimarsh Zutshi <vimarsh.zutshi@gmail.com>
Signed-off-by: Tuukka Toivonen <tuukkat76@gmail.com>
Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
Signed-off-by: Antti Koskipaa <akoskipa@gmail.com>
Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
Signed-off-by: RaniSuneela <r-m@ti.com>
Signed-off-by: Atanas Filipov <afilipov@mm-sol.com>
Signed-off-by: Gjorgji Rosikopulos <grosikopulos@mm-sol.com>
Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Nayden Kanchev <nkanchev@mm-sol.com>
Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Dominic Curran <dcurran@ti.com>
Signed-off-by: Ilkka Myllyperkio <ilkka.myllyperkio@sofica.fi>
Signed-off-by: Pallavi Kulkarni <p-kulkarni@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:53:52 -03:00
Laurent Pinchart de1135d44f [media] omap3isp: CCDC, preview engine and resizer
The OMAP3 ISP CCDC, preview engine and resizer entities perform image
processing and scaling.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: David Cohen <dacohen@gmail.com>
Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
Signed-off-by: Vimarsh Zutshi <vimarsh.zutshi@gmail.com>
Signed-off-by: Tuukka Toivonen <tuukkat76@gmail.com>
Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
Signed-off-by: Antti Koskipaa <akoskipa@gmail.com>
Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
Signed-off-by: RaniSuneela <r-m@ti.com>
Signed-off-by: Atanas Filipov <afilipov@mm-sol.com>
Signed-off-by: Gjorgji Rosikopulos <grosikopulos@mm-sol.com>
Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Nayden Kanchev <nkanchev@mm-sol.com>
Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Dominic Curran <dcurran@ti.com>
Signed-off-by: Ilkka Myllyperkio <ilkka.myllyperkio@sofica.fi>
Signed-off-by: Pallavi Kulkarni <p-kulkarni@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:53:51 -03:00
Laurent Pinchart 121e9f1c4c [media] omap3isp: CCP2/CSI2 receivers
The OMAP3 ISP CCP2 and CSI2 receivers provide an interface to connect
serial MIPI sensors to the device.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: David Cohen <dacohen@gmail.com>
Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
Signed-off-by: Vimarsh Zutshi <vimarsh.zutshi@gmail.com>
Signed-off-by: Tuukka Toivonen <tuukkat76@gmail.com>
Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
Signed-off-by: Antti Koskipaa <akoskipa@gmail.com>
Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
Signed-off-by: RaniSuneela <r-m@ti.com>
Signed-off-by: Atanas Filipov <afilipov@mm-sol.com>
Signed-off-by: Gjorgji Rosikopulos <grosikopulos@mm-sol.com>
Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Nayden Kanchev <nkanchev@mm-sol.com>
Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Dominic Curran <dcurran@ti.com>
Signed-off-by: Ilkka Myllyperkio <ilkka.myllyperkio@sofica.fi>
Signed-off-by: Pallavi Kulkarni <p-kulkarni@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:53:50 -03:00
Laurent Pinchart ad614acb7e [media] omap3isp: Video devices and buffers queue
The OMAP3 ISP video devices and buffers queue modules implement the V4L2
API on all the ISP video nodes.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: David Cohen <dacohen@gmail.com>
Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
Signed-off-by: Vimarsh Zutshi <vimarsh.zutshi@gmail.com>
Signed-off-by: Tuukka Toivonen <tuukkat76@gmail.com>
Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
Signed-off-by: Antti Koskipaa <akoskipa@gmail.com>
Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
Signed-off-by: RaniSuneela <r-m@ti.com>
Signed-off-by: Atanas Filipov <afilipov@mm-sol.com>
Signed-off-by: Gjorgji Rosikopulos <grosikopulos@mm-sol.com>
Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Nayden Kanchev <nkanchev@mm-sol.com>
Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Dominic Curran <dcurran@ti.com>
Signed-off-by: Ilkka Myllyperkio <ilkka.myllyperkio@sofica.fi>
Signed-off-by: Pallavi Kulkarni <p-kulkarni@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:53:47 -03:00
Sakari Ailus 448de7e785 [media] omap3isp: OMAP3 ISP core
The Image Signal Processor provides the system interface and the
processing capability to connect RAW or YUV image-sensor modules to the
OMAP3.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: David Cohen <dacohen@gmail.com>
Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
Signed-off-by: Vimarsh Zutshi <vimarsh.zutshi@gmail.com>
Signed-off-by: Tuukka Toivonen <tuukkat76@gmail.com>
Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
Signed-off-by: Antti Koskipaa <akoskipa@gmail.com>
Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
Signed-off-by: RaniSuneela <r-m@ti.com>
Signed-off-by: Atanas Filipov <afilipov@mm-sol.com>
Signed-off-by: Gjorgji Rosikopulos <grosikopulos@mm-sol.com>
Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Nayden Kanchev <nkanchev@mm-sol.com>
Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Dominic Curran <dcurran@ti.com>
Signed-off-by: Ilkka Myllyperkio <ilkka.myllyperkio@sofica.fi>
Signed-off-by: Pallavi Kulkarni <p-kulkarni@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:53:46 -03:00
Laurent Pinchart c30b46e58b [media] v4l: subdev: Generic ioctl support
Instead of returning an error when receiving an ioctl call with an
unsupported command, forward the call to the subdev core::ioctl handler.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:53:45 -03:00
Antti Koskipaa f6a5cb1be8 [media] v4l: v4l2_subdev userspace crop API
This patch adds the VIDIOC_SUBDEV_S_CROP and G_CROP ioctls to the
userland API. CROPCAP is not implemented because it's redundant.

Signed-off-by: Antti Koskipaa <akoskipa@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:53:33 -03:00
Laurent Pinchart 35c3017a29 [media] v4l: v4l2_subdev userspace frame interval API
The three new ioctl VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL,
VIDIOC_SUBDEV_G_FRAME_INTERVAL and VIDIOC_SUBDEV_S_FRAME_INTERVAL can be
used to enumerate and configure a subdev's frame rate from userspace.

Two new video::g/s_frame_interval subdev operations are introduced to
support those ioctls. The existing video::g/s_parm operations are
deprecated and shouldn't be used anymore.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:53:32 -03:00
Laurent Pinchart 333c8b9778 [media] v4l: v4l2_subdev userspace format API
Add a userspace API to get, set and enumerate the media format on a
subdev pad.

The format at the output of a subdev usually depends on the format at
its input(s). The try format operation is thus not suitable for probing
format at individual pads, as it can't modify the device state and thus
can't remember the format tried at the input to compute the output
format.

To fix the problem, pass an extra argument to the get/set format
operations to select the 'try' or 'active' format.

The try format is used when probing the subdev. Setting the try format
must not change the device configuration but can store data for later
reuse. Data storage is provided at the file-handle level so applications
probing the subdev concurently won't interfere with each other.

The active format is used when configuring the subdev. It's identical to
the format handled by the usual get/set operations.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:53:31 -03:00
Laurent Pinchart f0beea8f46 [media] v4l: subdev: Add new file operations
V4L2 sub-devices store pad formats and crop settings in the file handle.
To let drivers initialize those settings properly, add an open operation
that is called when the subdev is opened as well as a corresponding
close operation.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:53:27 -03:00
Stanimir Varbanov 7cd5a16b22 [media] v4l: Create v4l2 subdev file handle structure
Used for storing subdev information per file handle and hold V4L2 file
handle.

Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
Signed-off-by: Antti Koskipaa <akoskipa@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:53:26 -03:00
Laurent Pinchart 076704332c [media] v4l: Rename V4L2_MBUS_FMT_GREY8_1X8 to V4L2_MBUS_FMT_Y8_1X8
For consistency with the V4L2_MBUS_FMT_Y10_1X10 format.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:53:23 -03:00
Laurent Pinchart 61f5db549d [media] v4l: Make v4l2_subdev inherit from media_entity
V4L2 subdevices are media entities. As such they need to inherit from
(include) the media_entity structure.

When registering/unregistering the subdevice, the media entity is
automatically registered/unregistered. The entity is acquired on device
open and released on device close.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:53:20 -03:00
Laurent Pinchart 2c0ab67be1 [media] v4l: Make video_device inherit from media_entity
V4L2 devices are media entities. As such they need to inherit from
(include) the media_entity structure.

When registering/unregistering the device, the media entity is
automatically registered/unregistered. The entity is acquired on device
open and released on device close.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:53:19 -03:00
Laurent Pinchart 95db3a60e0 [media] v4l: Add a media_device pointer to the v4l2_device structure
The pointer will later be used to register/unregister media entities
when registering/unregistering a v4l2_subdev or a video_device.

With the introduction of media devices, device drivers need to store a
pointer to a driver-specific structure in the device's drvdata.
v4l2_device can't claim ownership of the drvdata anymore.

To maintain compatibility with drivers that rely on v4l2_device storing
a pointer to itself in the device's drvdata, v4l2_device_register() will
keep doing so if the drvdata is NULL.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:53:18 -03:00
Laurent Pinchart e02188c90f [media] media: Pipelines and media streams
Drivers often need to associate pipeline objects to entities, and to
take stream state into account when configuring entities and links. The
pipeline API helps drivers manage that information.

When starting streaming, drivers call media_entity_pipeline_start(). The
function marks all entities connected to the given entity through
enabled links, either directly or indirectly, as streaming. Similarly,
when stopping the stream, drivers call media_entity_pipeline_stop().

The media_entity_pipeline_start() function takes a pointer to a media
pipeline and stores it in every entity in the graph. Drivers should
embed the media_pipeline structure in higher-level pipeline structures
and can then access the pipeline through the media_entity structure.

Link configuration will fail with -EBUSY by default if either end of the
link is a streaming entity, unless the link is marked with the
MEDIA_LNK_FL_DYNAMIC flag.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:53:17 -03:00
Laurent Pinchart 97548ed4c4 [media] media: Links setup
Create the following ioctl and implement it at the media device level to
setup links.

- MEDIA_IOC_SETUP_LINK: Modify the properties of a given link

The only property that can currently be modified is the ENABLED link
flag to enable/disable a link. Links marked with the IMMUTABLE link flag
can not be enabled or disabled.

Enabling or disabling a link has effects on entities' use count. Those
changes are automatically propagated through the graph.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:53:16 -03:00
Laurent Pinchart 1651333b09 [media] media: Entities, pads and links enumeration
Create the following two ioctls and implement them at the media device
level to enumerate entities, pads and links.

- MEDIA_IOC_ENUM_ENTITIES: Enumerate entities and their properties
- MEDIA_IOC_ENUM_LINKS: Enumerate all pads and links for a given entity

Entity IDs can be non-contiguous. Userspace applications should
enumerate entities using the MEDIA_ENT_ID_FLAG_NEXT flag. When the flag
is set in the entity ID, the MEDIA_IOC_ENUM_ENTITIES will return the
next entity with an ID bigger than the requested one.

Only forward links that originate at one of the entity's source pads are
returned during the enumeration process.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:53:14 -03:00
Laurent Pinchart 140d88165c [media] media: Media device information query
Create the following ioctl and implement it at the media device level to
query device information.

- MEDIA_IOC_DEVICE_INFO: Query media device information

The ioctl and its data structure are defined in the new kernel header
linux/media.h available to userspace applications.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:53:13 -03:00
Laurent Pinchart 503c3d829e [media] media: Entity use count
Due to the wide differences between drivers regarding power management
needs, the media controller does not implement power management.
However, the media_entity structure includes a use_count field that
media drivers can use to track the number of users of every entity for
power management needs.

The use_count field is owned by media drivers and must not be touched by
entity drivers. Access to the field must be protected by the media
device graph_mutex lock.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:53:12 -03:00
Sakari Ailus a5ccc48a7c [media] media: Entity graph traversal
Add media entity graph traversal. The traversal follows enabled links by
depth first. Traversing graph backwards is prevented by comparing the next
possible entity in the graph with the previous one. Multiply connected
graphs are thus not supported.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Vimarsh Zutshi <vimarsh.zutshi@gmail.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:53:11 -03:00
Laurent Pinchart 53e269c102 [media] media: Entities, pads and links
As video hardware pipelines become increasingly complex and
configurable, the current hardware description through v4l2 subdevices
reaches its limits. In addition to enumerating and configuring
subdevices, video camera drivers need a way to discover and modify at
runtime how those subdevices are connected. This is done through new
elements called entities, pads and links.

An entity is a basic media hardware building block. It can correspond to
a large variety of logical blocks such as physical hardware devices
(CMOS sensor for instance), logical hardware devices (a building block
in a System-on-Chip image processing pipeline), DMA channels or physical
connectors.

A pad is a connection endpoint through which an entity can interact with
other entities. Data (not restricted to video) produced by an entity
flows from the entity's output to one or more entity inputs. Pads should
not be confused with physical pins at chip boundaries.

A link is a point-to-point oriented connection between two pads, either
on the same entity or on different entities. Data flows from a source
pad to a sink pad.

Links are stored in the source entity. To make backwards graph walk
faster, a copy of all links is also stored in the sink entity. The copy
is known as a backlink and is only used to help graph traversal.

The entity API is made of three functions:

- media_entity_init() initializes an entity. The caller must provide an
array of pads as well as an estimated number of links. The links array
is allocated dynamically and will be reallocated if it grows beyond the
initial estimate.

- media_entity_cleanup() frees resources allocated for an entity. It
must be called during the cleanup phase after unregistering the entity
and before freeing it.

- media_entity_create_link() creates a link between two entities. An
entry in the link array of each entity is allocated and stores pointers
to source and sink pads.

When a media device is unregistered, all its entities are unregistered
automatically.

The code is based on Hans Verkuil <hverkuil@xs4all.nl> initial work.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:53:10 -03:00
Laurent Pinchart 176fb0d108 [media] media: Media device
The media_device structure abstracts functions common to all kind of
media devices (v4l2, dvb, alsa, ...). It manages media entities and
offers a userspace API to discover and configure the media device
internal topology.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:53:09 -03:00
Laurent Pinchart cf4b9211b5 [media] media: Media device node support
The media_devnode structure provides support for registering and
unregistering character devices using a dynamic major number. Reference
counting is handled internally, making device drivers easier to write
without having to solve the open/disconnect race condition issue over
and over again.

The code is based on video/v4l2-dev.c.

[mchehab@redhat.com: Remove linux/smp_lock.h include to not break compilation on bisect]
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:52:22 -03:00
Sakari Ailus 02adb1cc76 [media] v4l: subdev: Events support
Provide v4l2_subdevs with v4l2_event support. Subdev drivers only need very
little to support events.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: David Cohen <dacohen@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:42 -03:00
Laurent Pinchart ea8aa4349e [media] v4l: subdev: Control ioctls support
Pass the control-related ioctls to the subdev driver through the control
framework.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:42 -03:00
Laurent Pinchart 3dd5ee0801 [media] v4l: subdev: Uninline the v4l2_subdev_init function
The function isn't small or performance sensitive enough to be inlined.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:42 -03:00
Laurent Pinchart 2096a5dcf9 [media] v4l: subdev: Add device node support
Create a device node named subdevX for every registered subdev.

As the device node is registered before the subdev core::s_config
function is called, return -EGAIN on open until initialization
completes.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Vimarsh Zutshi <vimarsh.zutshi@gmail.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:42 -03:00
Laurent Pinchart fc0a807985 [media] v4l: Share code between video_usercopy and video_ioctl2
The two functions are mostly identical. They handle the copy_from_user
and copy_to_user operations related with V4L2 ioctls and call the real
ioctl handler.

Create a __video_usercopy function that implements the core of
video_usercopy and video_ioctl2, and call that function from both.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:41 -03:00
Justin P. Mattock b251e61847 [media] drivers:media:cx231xx.h remove one to many l's in the word
The patch below removes an extra "l" in the word.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:41 -03:00
Justin P. Mattock f41e4e9940 [media] drivers:media:cx23418.h remove one to many l's in the word
The patch below removes an extra "l" in the word.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:41 -03:00
Igor M. Liplianin fd5466d1df [media] dw2102: prof 1100 corrected
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:41 -03:00
Igor M. Liplianin b16af29a56 [media] dw2102: i2c transfer corrected for yet another cards
Related to Acorp DS120 and some revisions of DVBWorld DW2102.
If you read three or more registers at one time, you get wrong value for third etc.
Actually, it didn't affect the driver as it reads registers only by one at a time.
But it needs to correct.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:40 -03:00
Igor M. Liplianin a84adf4007 [media] dw2102: i2c transfer corrected for some cards
Prof 7500 and TeVii s630, s660, s480 works better now

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:40 -03:00
Igor M. Liplianin e86e4dfa5a [media] dw2102: remove unnecessary delays for i2c transfer for some cards
Prof 7500 and TeVii s630, s660, s480 works faster now

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:40 -03:00
Igor M. Liplianin 5265ea54bf [media] dw2102: X3M TV SPC1400HD added
The card consist of PCI to USB bridge and USB DVB-S2 receiver.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:40 -03:00
Igor M. Liplianin 738e8ff90f [media] ds3000: wrong hardware tune function implemented
It is taken from another tree, where it is modified.
Patch to fix that

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:40 -03:00
Abylay Ospan 3b30e0a871 [media] stv0900: Update status when LOCK is missed
Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:40 -03:00
Igor M. Liplianin 38cdbce763 [media] stv0900: speed up DVB-S searching
Simptoms:
After zapping DVB-S2 channel searching for DVB-S tooks long time.
Now it takes less than a second.

Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:39 -03:00
Igor M. Liplianin 050b648e63 [media] cx23885, altera-ci: remove operator return <value> in void procedure
Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:39 -03:00
Dan Carpenter b00aff6a36 [media] dib9000: fix return type in dib9000_mbx_send_attr()
dib9000_mbx_send_attr() returns an int.  It doesn't work to save
negative error codes in an unsigned char, so I've made "ret" an int
type.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:39 -03:00
Dan Carpenter ed54c0e33c [media] dib8000: fix small memory leak on error
kfree(state) if fe allocation fails.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:39 -03:00
Matti Aaltonen 96a9cc681e [media] V4L2: WL1273 FM Radio: TI WL1273 FM radio driver
This module implements V4L2 controls for the Texas Instruments
WL1273 FM Radio and handles the communication with the chip.

Signed-off-by: Matti J. Aaltonen <matti.j.aaltonen@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:39 -03:00
Randy Dunlap 1b149bbe91 [media] media/radio/wl1273: fix build errors
RADIO_WL1273 needs to make sure that the mfd core is built to avoid
build errors:

ERROR: "mfd_add_devices" [drivers/mfd/wl1273-core.ko] undefined!
ERROR: "mfd_remove_devices" [drivers/mfd/wl1273-core.ko] undefined!

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Matti Aaltonen <matti.j.aaltonen@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:38 -03:00
Daniel Drake 0522921c0f [media] via-camera: Add suspend/resume support
Add suspend/resume support to the via-camera driver, so that the video
continues streaming over a suspend-resume cycle.

Originally implemented by Jon Corbet.

[mchehab@redhat.com: fix a small CodingStyle issue]
Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:37 -03:00
Lukas Max Fisch 498e677cfd [media] Technisat AirStar TeleStick 2
Based on staging 2.6.39.

This patch is based on Veit Berwig's work.

Signed-off-by: Lukas Fisch <lukas.fisch@gmail.com>
Thanks-to: Veit Berwig <veit.Berwig@fimi.landsh.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:36 -03:00
Dan Carpenter 07988007f8 [media] stv090x: handle allocation failures
kmalloc() can fail so check whether state->internal is NULL.
append_internal() can return NULL on allocation failures so check that.
Also if we hit the error condition later in the function then there is
a memory leak and we need to call remove_dev() to fix it.

Also Oliver Endriss pointed out an additional leak that I missed in the
first version of this patch.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:36 -03:00
Manjunatha Halli 57f05bfa2e [media] drivers:media:radio: Update Kconfig and Makefile for wl128x FM driver
Signed-off-by: Manjunatha Halli <manjunatha_halli@ti.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:36 -03:00
Manjunatha Halli a68793d2da [media] drivers:media:radio: wl128x: Kconfig & Makefile for wl128x driver
Signed-off-by: Manjunatha Halli <manjunatha_halli@ti.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:36 -03:00
Manjunatha Halli 8b7a186c9b [media] drivers:media:radio: wl128x: FM driver TX sources
This has implementation for FM TX functionality.
It communicates with FM V4l2 module and FM common module.

Signed-off-by: Manjunatha Halli <manjunatha_halli@ti.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:36 -03:00
Manjunatha Halli 59da522a4e [media] drivers:media:radio: wl128x: FM driver RX sources
This has implementation for FM RX functionality.
It communicates with FM V4l2 module and FM common module

Signed-off-by: Manjunatha Halli <manjunatha_halli@ti.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:36 -03:00
Manjunatha Halli e8454ff7b9 [media] drivers:media:radio: wl128x: FM Driver Common sources
These are the sources for the common interfaces required by the
FM V4L2 driver for TI WL127x and WL128x chips.

These implement the FM channel-8 protocol communication with the
chip. This makes use of the Shared Transport as its transport.

Signed-off-by: Manjunatha Halli <manjunatha_halli@ti.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:35 -03:00
Manjunatha Halli 7e38849631 [media] drivers:media:radio: wl128x: FM Driver V4L2 sources
This module interfaces V4L2 subsystem and FM common module.
It registers itself with V4L2 as Radio module.

Signed-off-by: Manjunatha Halli <manjunatha_halli@ti.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:35 -03:00
Manjunatha Halli 8d19824ba2 [media] drivers:media:radio: wl128x: FM Driver common header file
These are common headers used in FM submodules (FM V4L2,
FM common, FM Rx,and FM TX).

Signed-off-by: Manjunatha Halli <manjunatha_halli@ti.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:35 -03:00
Paul Cassella 7fd4b41f05 [media] ivtv: yuv: handle get_user_pages() -errno returns
get_user_pages() may return -errno, such as -EFAULT.  So don't blindly use
its return value as an offset into dma->map[] for the next get_user_pages()
call.  Since we'll give up and return an error if either fails, don't even
make the second call if the first failed to give us exactly what we were
looking for.

The old code would also call put_page() on as many elements of dma->map[]
as we'd asked for, regardless of how many were valid.

[Andy Walls modified this patch to return -EFAULT instead of -EINVAL
as Paul's observation "I'm not sure -EINVAL is the best return code vs
-EFAULT or -ENOMEM, [...]" was correct.  The return value bubbles up
as a return code for write(), for which the V4L2 API spec indicates
EINVAL is incorrect and EFAULT is correct.]

Signed-off-by: Paul Cassella <fortytwo-ivtv@maneteren.bigw.org>
Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:35 -03:00
Andy Walls 0d44b1235c [media] ivtv: Fix sparse warning regarding a user pointer in ivtv_write_vbi_from_user()
Fix the first, botched attempt at preventing direct use of a user pointer in
ivtv_write_vbi().

Reported-by: Dr. David Alan Gilbert <linux@treblig.org>
Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:35 -03:00
Paul Cassella 793e71b667 [media] ivtv: udma: handle get_user_pages() returning fewer pages than we asked for
get_user_pages() may return fewer page than we ask for.  As we give up and
return an error in this case, we need to put_page() each of the pages we
did get.

[Andy Walls modified the patch, only removing the braces in the 'for'
statement, to eliminate a checkpatch warning.]

Signed-off-by: Paul Cassella <fortytwo-ivtv@manetheren.bigw.org>
Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:33 -03:00
Igor M. Liplianin 0cb73639cf [media] cx88: add support for TeVii S464 PCI card
The card uses ds3000 demod from Montage.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:27 -03:00
Igor M. Liplianin dcc8a12223 [media] ds3000: hardware tune algorithm
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:27 -03:00
Igor M. Liplianin a5bf834b4a [media] ds3000: add carrier offset calculation
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:27 -03:00
Igor M. Liplianin cb8f74da10 [media] ds3000: remove unnecessary dnxt, dcur structures
All necessary parameters already stored in frontend cache.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:27 -03:00
Igor M. Liplianin 18a73f36a2 [media] ds3000: clean up in tune procedure
Variable 'retune' does not make sense.
Loop is not needed for only one try.
Remove unnecessary dprintk's.
Remove a lot of debug messages and delays.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:27 -03:00
Igor M. Liplianin 2f30fb49c3 [media] dw2102: Copyright, cards list updated
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:27 -03:00
Igor M. Liplianin e8f5055ac8 [media] dw2102: add support for the TeVii S480 PCIe
The card consists of a PCI-e to USB Host Controller and
two TeVii S660 equivalent cards.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:27 -03:00
Igor M. Liplianin 5a530cbeca [media] dw2102: fix TeVii s660 remote control
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:26 -03:00
Igor M. Liplianin 52c506e09c [media] dw2102: corrections for TeVii s660 LNB power control
There are two TeVii s660 modifications with different LNB power control
implementations. It is safe to call both methods for each card.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:26 -03:00
Igor M. Liplianin 69519c3eff [media] dw2102: unnecessary NULL's removed
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:26 -03:00
Igor M. Liplianin d3210b5f96 [media] dw2102: Prof 1100 initialization fix
RC keys structure for Prof 1100 already defined, so remove extra initialization.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:26 -03:00
Igor M. Liplianin 4e59df8f25 [media] dw2102: Prof 7500 remote fix
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:26 -03:00
Igor M. Liplianin fa8bae102f [media] dw2102: Prof 7500: Lock LED implemented
Code changed for dw2102, stv0900 in order to achieve that.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:26 -03:00
Igor M. Liplianin 2adc591fb7 [media] dw2102: Add Terratec Cinergy S2 USB HD
MarkusF wrote:
I accidently got a Terratec Cinergy S2 USB HD (instead of a Terratec Cinergy S2 PCI HD).
I found in the windows driver, that the driver is for the usb ids:
0CCD:00A8
1F4D:3000
The dvb-s2 usb adapter has the id 0CCD-00A8.
So I patches your driver and added the usb id, where the 1F4D:3000 is
and it worked (after I downloaded the firmware dvb-fe-ds3000.fw).
w_scan found the channels and vdr is working fine.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:25 -03:00
Igor M. Liplianin d2ffc447ca [media] dw2102: add support for Geniatech SU3000 USB DVB-S2 card
The card uses ds3000 demod from Montage.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:25 -03:00
Igor M. Liplianin 195288da53 [media] dw2102: use separate firmwares for Prof 1100, TeVii S630, S660
Before this patch we can use only one card type from list due to
sharing one firmware name. Now it's fixed.
Also driver tries to attach only appropriate demod for this cards.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:23 -03:00
Igor M. Liplianin feb16e9833 [media] dw2102: Extend keymap parameter for not used remote
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:22 -03:00
Jesper Juhl ba0fd56a4f [media] TTUSB DVB: ttusb_boot_dsp() needs to release_firmware() or it leaks memory
In drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c:ttusb_boot_dsp() we
need to call release_firmware(fw) before returning or we'll leak - no
matter if we succeed or fail.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:22 -03:00
Mike Isely 19a0a296f2 [media] pvrusb2: Use sysfs_attr_init() where appropriate
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:22 -03:00
Mike Isely 058caa8784 [media] pvrusb2: Minor VBI tweak to help potential CC support
pvrusb2: Declare closed-caption setup for line 21 - this is needed for
sliced VBI capture support.  (However none of that works right now
anyway.)

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:22 -03:00
Servaas Vandenberghe 6188a0f151 [media] pvrusb2: width and height maximum values
pvrusb2: The origin of the capability bounds rectangle may differ from
(left=0,top=0) so the calculation should use absolute coordinates,
here below, or use relative coordinates like
cropl_val-cap->bounds.left and cropt_val-cap->bounds.top.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:22 -03:00
Mike Isely 35fa5d4c48 [media] pvrusb2: Fix a few missing default control values, for cropping
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:22 -03:00
Mike Isely 4cfe3319a1 [media] pvrusb2: Minor cosmetic code tweak
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:21 -03:00
Mike Isely 9bf98321b4 [media] pvrusb2: Handle change of mode before handling change of video standard
pvrusb2: Recognize and handle mode change before dealing with changes
related to the video standard.  Even though the video standard should
only matter when in analog mode, doing this way is technically cleaner
in case there's other stuff that might depend on both.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:21 -03:00
Malcolm Priestley 2b74334d12 [media] dvb_pll: DVB-S incorrect tune settings for dw2102/dm1105/cx88/opera1
This tuner PLL has missing initialisation settings resulting in
haphazard tuning. The PLL LPF was set to just 22000 symbol rate.

Basically, the module is a Sharp BS2F7HZ0194 (STV0299+IX2410)

I have had problems implementing the PLL in a new driver and
did not want to break the IX2410 out of the PLL.

This applies to DW2102, DM1105, CX88 and OPERA1 drivers.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:21 -03:00
Stefan Richter 92374e886c [media] firedtv: drop obsolete backend abstraction
Since the drivers/ieee1394/ backend was removed from firedtv, its I/O no
longer needs to be abstracted as exchangeable backend methods.

Also, ieee1394 variants of module and device probe and removal are no
longer there.  Move module probe and removal into firedtv-fw.c where
device probe and removal are implemented.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:21 -03:00
Vasiliy Kulikov 14ddc3188d [media] video: sn9c102: world-wirtable sysfs files
Don't allow everybody to change video settings.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:21 -03:00
Igor M. Liplianin b9bf2eafaa [media] ds3000: don't load firmware during demod init
Speed up tuning, as firmware is not necessary to load every attempt to tune

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:20 -03:00
Igor M. Liplianin caa687c805 [media] ds3000: loading firmware in bigger chunks
Decrease firmware loading time. Before it is ~4000 i2c calls,
now it is ~256 i2c calls to load ds3000 firmware.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:20 -03:00
Igor M. Liplianin 2a66bf370c [media] ds3000: decrease mpeg clock output
TeVii s480 works fine with that on DVB-S2 channels

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:20 -03:00
Igor M. Liplianin a0ea298d57 [media] ds3000: fill in demod init function
Make some initializations in init, not in tune function

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:19 -03:00
Lawrence Rust 6951803c24 [media] Add proper audio support for Nova-S Plus with wm8775 ADC
This patch adds audio DMA capture and ALSA mixer elements for the line
input jack of the Hauppauge Nova-S-plus DVB-S PCI card.  The Nova-S-plus
has a WM8775 ADC that is currently not detected.  This patch enables
this chip and exports volume, balance mute and ALC elements for ALSA
mixer controls.

[mchehab@redhat.com: Changed the patch to only talk with wm8775 if board
info says so. Also, added platform_data support, to avoid changing the
behaviour for other boards, and fixed CodingStyle]

[awalls@md.metrocast.net: Changed patch to make the WM8775_GID defintion
bridge driver private and let the bridge driver set the value of
v4l2_subdev.grp_id.]

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Andy Walls <awalls@md.metrocast.net>
2011-03-21 20:32:19 -03:00
Dmitri Belimov 724dcbfa9c [media] xc5000: add set_config and other
Add one more radio input, usefull for tm6010
Add control output amplitude.
Add set_config function for configure tuner when TV card hasn't dvb part.

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:19 -03:00
Thomas Weber d1303567f7 [media] omap24xxcam: Fix compilation
Add linux/sched.h because of missing declaration of TASK_NORMAL.

This patch fixes the following error:

drivers/media/video/omap24xxcam.c: In function
'omap24xxcam_vbq_complete':
drivers/media/video/omap24xxcam.c:415: error: 'TASK_NORMAL' undeclared
(first use in this function)
drivers/media/video/omap24xxcam.c:415: error: (Each undeclared
identifier is reported only once
drivers/media/video/omap24xxcam.c:415: error: for each function it
appears in.)

Signed-off-by: Thomas Weber <weber@corscience.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:19 -03:00
Peter Huewe 61ca1500c5 [media] video/saa7164: Fix sparse warning: Using plain integer as NULL pointer
This patch fixes the warning "Using plain integer as NULL pointer",
generated by sparse, by replacing
	if (var == 0)
with
	if (!var)
after an allocation
and all other offending 0s with NULL.

KernelVersion: linus' tree-1f0324c

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:19 -03:00
Hans Verkuil 7ee9e64a3d [media] cx18: fix kernel oops when setting MPEG control before capturing
The cxhdl->priv field was not set initially, only after capturing started.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:19 -03:00
Igor M. Liplianin 2f2710bd4e [media] cx23885, altera-ci: enable all PID's less than 0x20 in hardware PID filter
It takes too long time to scan due to low symbol rate PID's
like PAT, PMT, CAT, NIT.
For that matter we enabled permanently all PID's
less 0x20 in hardware PID filter for NetUP Dual DVB-T/C CI RF card
to combine rates.

Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:18 -03:00
Igor M. Liplianin 702dd7903b [media] cx23885: disable MSI for NetUP cards, otherwise CI is not working
Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:18 -03:00
Igor M. Liplianin 10d0dcd73c [media] cx23885: implement num_fds_portb, num_fds_portc parameters for cx23885_board structure
This is needed for multifrontend support.
NetUP Dual DVB-T/C CI RF card has frontends connected to port B & C
Each frontend has two switchable cores - DVB-T & DVB-C

Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:18 -03:00
Igor M. Liplianin 557f48d572 [media] cx23885: implement tuner_bus parameter for cx23885_board structure
There is two external I2C buses in cx23885 chip.
Currently, analog tuners supported for second I2C bus only
In NetUP Dual DVB-T/C CI RF card tuners connected to first bus
So, in order to support analog tuners sitting on first bus
we need modifications.

Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:18 -03:00
Igor M. Liplianin 78db854757 [media] Initial commit to support NetUP Dual DVB-T/C CI RF card
The card based on cx23885 PCI-e brige. Altera FPGA for CI,
multistandard demods stv0367 from STM for QAM & OFDM,  Xcieve xc5000 tuners
and additional cx25840 for second analog input.

Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:18 -03:00
Igor M. Liplianin e80edce1ab [media] xc5000: add support for DVB-C tuning
Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:17 -03:00
Igor M. Liplianin 17cce932e8 [media] Support for stv0367 multi-standard demodulator
The STV0367 is a multi-standard demodulator which is
capable of processing DVB-T as well as DVB-C signals.
It is fully compliant with DVB-T and DVB-C
recommendations for broadcast services.

Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:17 -03:00
Igor M. Liplianin 349bcf02e3 [media] Altera FPGA based CI driver module
An Altera FPGA CI module for NetUP Dual DVB-T/C RF CI card.

Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:16 -03:00
Peter Huewe f72cfd859b [media] video/cx231xx: Fix sparse warning: Using plain integer as NULL pointer
This patch fixes the warning "Using plain integer as NULL pointer",
generated by sparse, by replacing the offending 0s with NULL.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Reviewed-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:16 -03:00
Andrew Chew 9bd060e492 [media] V4L: Initial submit of OV9740 driver
This soc_camera driver is for Omnivision's OV9740 sensor.  This initial
submission provides support for YUV422 output at 1280x720 (720p), which is
the sensor's native resolution.  640x480 (VGA) is also supported, with
cropping and scaling performed by the sensor's ISP.

This driver is heavily based off of the existing OV9640 driver.

Signed-off-by: Andrew Chew <achew@nvidia.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:16 -03:00
Guennadi Liakhovetski 787d0f9d5c [media] V4l: sh_mobile_ceu_camera: fix cropping offset calculation
Use the correct scales to calculate cropping offsets.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:15 -03:00
Guennadi Liakhovetski 379fa5d356 [media] V4L: mx3_camera: convert to videobuf2
Now that soc-camera supports videobuf API v1 and v2, camera-host drivers
can be converted to videobuf2 individually. This patch converts the
mx3_camera driver.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:15 -03:00
Guennadi Liakhovetski a616898d6d [media] V4L: sh_mobile_ceu_camera: convert to videobuf2
Convert the sh_mobile_ceu_camera driver to the videobuf2 API.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:15 -03:00
Guennadi Liakhovetski 592c2aba26 [media] V4L: soc-camera: extend to also support videobuf2
Extend soc-camera core to also support the videobuf2 API.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:15 -03:00
Guennadi Liakhovetski bd94f58828 [media] V4L: add missing EXPORT_SYMBOL* statements to vb2
videobuf2-memops and videobuf2-core can be compiled as modules, in which
case 3 more symbols from videobuf2-memops.c have to be exported.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:14 -03:00
Guennadi Liakhovetski 353c2129fd [media] V4L: omap1_camera: join split format lines
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:14 -03:00
Alberto Panizzo a48be1d626 [media] V4L: mx3_camera: fix capture issues for non 8-bit per pixel formats
If the camera was set to output formats like RGB565 YUYV or SBGGR10,
the resulting image was scrambled due to erroneous interpretations of
horizontal parameter's units.

This patch in fourcc_to_ipu_pix, eliminate also the pixel formats mappings
that, first are not used within mainline code and second, standing at
the datasheets, they will not work properly:

The IPU internal bus support only the following data formatting
(44.1.1.3 Data Flows and Formats):
 1 YUV 4:4:4 or RGB-8 bits per color component
 2 YUV 4:4:4 or RGB-10 bits per color component
 3 Generic data (from sensor to the system memory only)

And format conversions are done:
 - from memory: unpacking from other formats to IPU supported ones
 - to memory: packing in the inverse order.

So, assigning a packing/unpacking strategy to the IPU for those formats
will produce a packing to memory and not the inverse.

Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:14 -03:00
Anatolij Gustschin 44facdc8c4 [media] V4L: mx3_camera: correct 'sizeimage' value reporting
The 'pix->width' field may be updated in mx3_camera_set_fmt() to
fulfill the IPU stride line alignment requirements. If this update
takes place, the 'fmt.pix.sizeimage' field in the struct v4l2_format
stucture returned by VIDIOC_S_FMT is wrong. We need to update the
'pix->sizeimage' field in the mx3_camera_set_fmt() function to fix
this issue.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:14 -03:00
Mathias Krause 5bccd60852 [media] V4L: omap1_camera: fix use after free
Even though clk_put() is a no-op on most architectures it is not for
some ARM implementations. To not fail on those, release the clock timer
before freeing the surrounding structure.

This bug was spotted by the semantic patch tool coccinelle using the
script found at scripts/coccinelle/free/kfree.cocci.

More information about semantic patching is available at
http://coccinelle.lip6.fr/

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:14 -03:00
Alberto Panizzo 48a3c77338 [media] V4L: soc_mediabus: add a method to obtain the number of samples per pixel
Add a function to calculate the number of samples on the media-bus,
required to retrieve one pixel of a certain format.

Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:13 -03:00
Anatolij Gustschin 7fdbd85bce [media] V4L: soc-camera: start stream after queueing the buffers
Some camera systems have strong requirement for capturing
an exact number of frames after starting the stream and do
not tolerate losing captured frames. By starting the stream
after the videobuf has queued the buffers, we ensure that
no frame will be lost.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:13 -03:00
Qing Xu ed5b65dc36 [media] V4L: soc-camera: add enum-frame-size ioctl
add vidioc_enum_framesizes implementation, follow default_g_parm()
and g_mbus_fmt() method

Signed-off-by: Qing Xu <qingx@marvell.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:13 -03:00
Hans Verkuil d63044401a [media] saa7134-empress: add missing MPEG controls
Reported by, and based on a patch from, Martin Dauskardt.

The AUDIO_AC3_BITRATE control is still missing from this list, but such
optional controls are a bit hard to handle. This will be fixed automatically
when we switch to the control framework.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Reported-by: Martin Dauskardt <martin.dauskardt@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:12 -03:00
Hans Verkuil e68044e235 [media] firedtv: remove obsolete ieee1394 backend code
drivers/ieee1394/ has been removed in Linux 2.6.37.  The corresponding
backend code in firedtv is no longer built in now and can be deleted.
Firedtv continues to work with drivers/firewire/.

Also, fix a Kconfig menu comment:  Removal of CONFIG_IEEE1394 made the
"Supported FireWire (IEEE 1394) Adapters" comment disappear; bring it back
with corrected dependency.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:12 -03:00
Hans Verkuil 7ee40aadab [media] v4l: removal of old, obsolete ioctls
Some ioctl's were defined wrong on 2.6.2 and 2.6.6, using the wrong
type of R/W arguments. They were fixed, but the old ioctl names are
still there, maintained to avoid breaking binary compatibility:

There's no sense on preserving those forever, as it is very doubtful
that someone would try to use a such old binary with a modern kernel.
Removing them will allow us to remove some magic done at the V4L ioctl
handler.

Note that any application compiled with a videodev2.h from 2.6.7 or later
will be using the correct ioctls.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:12 -03:00
Hans de Goede 76fafe78df [media] gspca_cpia1: Don't allow the framerate divisor to go above 2
Having a framerate divisor of 3 is not really necesarry and leads to
various troubles (frames going missing, compression issues) when allowed.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:11 -03:00
Hans de Goede 49b61ec9b5 [media] gspca: Add new vicam subdriver
This is a complete rewrite of the old v4l1 vicam subdriver, featuring
multiple resolutions, gain + exposure control and still has less code.

Oh and it is a v4l2 driver rather then v4l1 ofcourse :)

Many thanks to Devin Heitmueller <dheitmueller@kernellabs.com> for
donating his 3com homeconnect to me, which made this rewrite possible.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:10 -03:00
Hans de Goede bcc6f66906 [media] gspca_sn9c20x: Add another MSI laptop to the sn9c20x upside down list
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:32:10 -03:00