Michael Krufky [Tue, 6 Jul 2010 21:23:53 +0000 (18:23 -0300)]
[media] cx231xx: add support for Hauppauge EXETER
Add support for various Hauppauge EXETER designs.
Note by DJH: fixed a few minor 'make checkpatch' warnings before commit.
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Palash Bandyopadhyay [Tue, 6 Jul 2010 21:12:25 +0000 (18:12 -0300)]
[media] cx231xx: Added support for Carraera, Shelby, RDx_253S and VIDEO_GRABBER
Added support for new cx231xx boards - Carraera, Shelby, RDx_253S and
VIDEO_GRABBER.
[mchehab@redhat.com: Fix a merge conflict with BKL removal patches]
Signed-off-by: Palash Bandyopadhyay <palash.bandyopadhyay@conexant.com>
Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Palash Bandyopadhyay [Tue, 6 Jul 2010 19:40:58 +0000 (16:40 -0300)]
[media] s5h1432: Add new s5h1432 driver
Introduce a new driver for the s5h1432
Signed-off-by: Palash Bandyopadhyay <palash.bandyopadhyay@conexant.com>
Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Ruslan Pisarev [Mon, 27 Sep 2010 13:01:36 +0000 (10:01 -0300)]
[media] Staging: cx25821: fix braces and space coding style issues
Errors found by the checkpatch.pl tool.
[mchehab@redhat.com: merged a series of CodingStyle cleanup patches for cx25851. They're all from the same author, and patches the same driver]
Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Cc: Palash Bandyopadhyay <Palash.Bandyopadhyay@conexant.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Ruslan Pisarev [Mon, 27 Sep 2010 13:00:24 +0000 (10:00 -0300)]
[media] Staging: cx25821: remove spaces after parenthesis
fix "ERROR: space prohibited after that open parenthesis '('"
This is a patch to the cx25821-audio-upstream.h file that fixed up a
space errors found by the checkpatch.pl tools.
Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Daniel Drake [Fri, 24 Sep 2010 17:17:47 +0000 (14:17 -0300)]
[media] cafe_ccic: Implement VIDIOC_ENUM_FRAMEINTERVALS and ENUM_FRAMESIZES
This allows GStreamer to pick appropriate framerates and resolutions
based on desired capture parameters.
Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Daniel Drake [Fri, 24 Sep 2010 17:17:37 +0000 (14:17 -0300)]
[media] ov7670: implement VIDIOC_ENUM_FRAMESIZES
GStreamer uses this.
Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jonathan Corbet [Fri, 24 Sep 2010 17:17:29 +0000 (14:17 -0300)]
[media] ov7670: implement VIDIOC_ENUM_FRAMEINTERVALS
Inquiring minds (and gstreamer) want to know.
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Daniel Drake [Fri, 24 Sep 2010 17:17:17 +0000 (14:17 -0300)]
[media] cafe_ccic: Fix hang in command write processing
This patch, which basically reverts
6d77444ac, fixes an occasional
on-boot or on-capture hang on the XO-1 laptop.
It seems like the cafe hardware is flakier than we thought and that in
some cases, the commands get executed but are never reported as completed
(even if we substantially increase the delays before reading registers).
Reintroduce the 1-second CAFE_SMBUS_TIMEOUT to catch and avoid this
strange hardware bug.
Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Pete Eberlein [Thu, 23 Sep 2010 17:43:41 +0000 (14:43 -0300)]
[media] go7007: MJPEG buffer overflow
The go7007 driver has a potential buffer overflow and pointer corruption
bug which causes a crash while capturing MJPEG. The motion detection
(MODET) active_map array can be overflowed by JPEG frame data that
emulates a MODET start code. The active_map overflow overwrites the
active_buf pointer, causing a crash.
The JPEG data that emulated MODET start code was being removed from the
output, resulting in garbled JPEG frames. Therefore ignore MODET start
codes when MODET is not enabled.
Signed-off-by: Pete Eberlein <pete@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Thu, 7 Oct 2010 12:42:43 +0000 (09:42 -0300)]
[media] staging/tm6000: Fix a warning message
I added a code to the driver to force it to produce a warning. This
were intended to remind me about a very bad hack. I never found a way
to workaround. So, instead of those warnings:
drivers/staging/tm6000/tm6000-core.c: In function ‘tm6000_init_analog_mode’:
drivers/staging/tm6000/tm6000-core.c:328: warning: ISO C90 forbids mixed declarations and code
Let's document the issue and hope if someone with the support of the vendor
might fix it.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Thu, 7 Oct 2010 12:36:43 +0000 (09:36 -0300)]
[media] lirc_igorplugusb: Fix a compilation waring
drivers/staging/lirc/lirc_igorplugusb.c: In function ‘usb_remote_probe’:
drivers/staging/lirc/lirc_igorplugusb.c:393: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 3 has type ‘unsigned int’
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Thu, 7 Oct 2010 12:31:33 +0000 (09:31 -0300)]
[media] videobuf-dma-sg: Use min_t(size_t, PAGE_SIZE ..)
As pointed by Laurent:
I think min_t(size_t, PAGE_SIZE, size) is the preferred way.
Thanks-to: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Geert Uytterhoeven [Thu, 30 Sep 2010 19:55:07 +0000 (16:55 -0300)]
[media] lirc: Make struct file_operations pointer const
struct file_operations was made const in the drivers, but not in struct
lirc_driver:
drivers/staging/lirc/lirc_it87.c:365: warning: initialization discards qualifiers from pointer target type
drivers/staging/lirc/lirc_parallel.c:571: warning: initialization discards qualifiers from pointer target type
drivers/staging/lirc/lirc_serial.c:1073: warning: initialization discards qualifiers from pointer target type
drivers/staging/lirc/lirc_sir.c:482: warning: initialization discards qualifiers from pointer target type
drivers/staging/lirc/lirc_zilog.c:1284: warning: assignment discards qualifiers from pointer target type
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Sat, 9 Oct 2010 19:43:40 +0000 (16:43 -0300)]
V4L/DVB: Fix a merge conflict that affects unlock_ioctl
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Thu, 7 Oct 2010 01:54:33 +0000 (22:54 -0300)]
V4L/DVB: tm6000: Fix warnings due to a small array size
drivers/staging/tm6000/tm6000-stds.c:101: warning: excess elements in array initializer
drivers/staging/tm6000/tm6000-stds.c:101: warning: (near initialization for ‘tv_stds[0].common’)
drivers/staging/tm6000/tm6000-stds.c:160: warning: excess elements in array initializer
drivers/staging/tm6000/tm6000-stds.c:160: warning: (near initialization for ‘tv_stds[1].common’)
drivers/staging/tm6000/tm6000-stds.c:219: warning: excess elements in array initializer
drivers/staging/tm6000/tm6000-stds.c:219: warning: (near initialization for ‘tv_stds[2].common’)
drivers/staging/tm6000/tm6000-stds.c:336: warning: excess elements in array initializer
drivers/staging/tm6000/tm6000-stds.c:336: warning: (near initialization for ‘tv_stds[4].common’)
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Thu, 7 Oct 2010 01:02:58 +0000 (22:02 -0300)]
V4L/DVB: saa7134-input can't be a module right now
There are some symbols at saa7134-input that are used on saa7134
and vice-versa. Due to that, module install fails.
So, partially revert commit
9f495cf7d691c99bf7bdcec9f35fcfdad2cf9ae9.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Thu, 7 Oct 2010 00:57:04 +0000 (21:57 -0300)]
V4L/DVB: videobuf-dma-sg: Fix a warning due to the usage of min(PAGE_SIZE, arg)
drivers/media/video/videobuf-dma-sg.c: In function ‘videobuf_pages_to_sg’:
drivers/media/video/videobuf-dma-sg.c:119: warning: comparison of distinct pointer types lacks a cast
drivers/media/video/videobuf-dma-sg.c:120: warning: comparison of distinct pointer types lacks a cast
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-François Moine [Fri, 1 Oct 2010 11:06:51 +0000 (08:06 -0300)]
V4L/DVB: gspca - sonixj: Have 0c45:6130 handled by sonixj instead of sn9c102
The driver sn9c102 does not know about the sensor mi0360b.
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-François Moine [Fri, 1 Oct 2010 10:54:30 +0000 (07:54 -0300)]
V4L/DVB: gspca - sonixj: Bad detection of the end of image
The 'end of image' block may be splitted between two ISOC packets.
This case was not tested, so, some images could be lost and concatenated
to previous one(s), raising 'frame overflow' errors.
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-François Moine [Fri, 1 Oct 2010 10:51:24 +0000 (07:51 -0300)]
V4L/DVB: gspca - sonixj: Add sensor mi0360b
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-François Moine [Fri, 1 Oct 2010 10:37:15 +0000 (07:37 -0300)]
V4L/DVB: gspca - mr97310a: Declare static the constant tables
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-François Moine [Fri, 1 Oct 2010 10:33:26 +0000 (07:33 -0300)]
V4L/DVB: gspca - many subdrivers: Handle the buttons when CONFIG_INPUT=m
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jarkko Nikula [Tue, 21 Sep 2010 08:49:42 +0000 (05:49 -0300)]
V4L/DVB: radio-si4713: Release i2c adapter in driver cleanup paths
Call to i2c_put_adapter was missing in radio_si4713_pdriver_probe and
radio_si4713_pdriver_remove.
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Dmitri Belimov [Mon, 20 Sep 2010 20:07:15 +0000 (17:07 -0300)]
V4L/DVB: tm6000+audio
I rework my last patch for audio and now audio works well. This patch
can be submited to GIT tree Quality of audio now is good for SECAM-DK.
For other standard I set some value from datasheet need some tests.
1. Fix pcm buffer overflow
2. Rework pcm buffer fill method
3. Swap bytes in audio stream
4. Change some registers value for TM6010
5. Change pcm buffer size
Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Matthew Garrett [Thu, 16 Sep 2010 18:00:04 +0000 (15:00 -0300)]
V4L/DVB: uvc: Enable USB autosuspend by default on uvcvideo
We've been doing this for a while in Fedora without any complaints.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Sun, 26 Sep 2010 03:39:26 +0000 (00:39 -0300)]
V4L/DVB: tda18271: Add some hint about what tda18217 reg ID returned
Instead of doing:
[ 82.581639] tda18271 4-0060: creating new instance
[ 82.588411] Unknown device detected @ 4-0060, device not supported.
[ 82.594695] tda18271_attach: [4-0060|M] error -22 on line 1272
[ 82.600530] tda18271 4-0060: destroying instance
Print:
[ 468.740392] Unknown device (0) detected @ 4-0060, device not supported.
for the error message, to help detecting what's going wrong with the
device.
This helps to detect when the driver is using the wrong I2C bus (or have
the i2g gate switch pointing to the wrong place), on devices like cx231xx
that just return 0 on reads to a non-existent i2c device.
Reviewed-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Thu, 30 Sep 2010 12:29:37 +0000 (09:29 -0300)]
V4L/DVB: v4l2-common: Move v4l2_find_nearest_format from videodev2.h to v4l2-common.h
This function is an internal API and belongs in v4l2-common.h, not
videodev.h. The return pointer and probe argument should be const as well.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Thu, 30 Sep 2010 12:18:52 +0000 (09:18 -0300)]
V4L/DVB: videobuf: add ext_lock argument to the queue init functions (part 2)
Missed a few init functions on non-Intel platforms the first time :-(
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-François Moine [Sat, 25 Sep 2010 09:12:44 +0000 (06:12 -0300)]
V4L/DVB: gspca - sonixj: Propagate USB errors to higher level
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-François Moine [Sat, 25 Sep 2010 08:36:11 +0000 (05:36 -0300)]
V4L/DVB: gspca - spca505: Remove the eeprom write commands of NxUltra
With a null request byte, these commands prevented the next commands
to be executed.
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-François Moine [Sat, 25 Sep 2010 06:23:34 +0000 (03:23 -0300)]
V4L/DVB: gspca - cpia1: Fix compilation warning when gspca debug disabled
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-François Moine [Sat, 25 Sep 2010 06:20:45 +0000 (03:20 -0300)]
V4L/DVB: gspca - benq: Remove useless module load/unload messages
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-François Moine [Sat, 25 Sep 2010 06:19:33 +0000 (03:19 -0300)]
V4L/DVB: gspca - benq: Display error messages when gspca debug disabled
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Tue, 17 Aug 2010 17:29:51 +0000 (14:29 -0300)]
V4L/DVB: soc-camera: allow only one video queue per device
Multiple user-space application instances can open the same video device, but
it only makes sense for one of them to manage the videobuffer queue and set
video format of the device. Restrict soc-camera respectively.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Guennadi Liakhovetski [Fri, 27 Aug 2010 16:41:44 +0000 (13:41 -0300)]
V4L/DVB: V4L2: add a generic function to find the nearest discrete format to the required one
Many video drivers implement a fixed set of frame formats and thus face a task
of finding the best match for a user-requested format. Implementing this in a
generic function has also an advantage, that different drivers with similar
supported format sets will select the same format for the user, which improves
consistency across drivers.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Michael Grzeschik [Fri, 27 Aug 2010 12:39:05 +0000 (09:39 -0300)]
V4L/DVB: mx2_camera: add informative camera clock frequency printout
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Baruch Siach [Tue, 27 Jul 2010 12:06:10 +0000 (09:06 -0300)]
V4L/DVB: mx2_camera: implement forced termination of active buffer for mx25
This allows userspace to terminate a capture without waiting for the current
frame to complete.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Baruch Siach [Tue, 27 Jul 2010 12:06:09 +0000 (09:06 -0300)]
V4L/DVB: mx2_camera: fix comment typo
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Michael Grzeschik [Mon, 9 Aug 2010 14:57:04 +0000 (11:57 -0300)]
V4L/DVB: mx2_camera: remove emma limitation for RGB565
In the current source status the emma has no limitation for any PIXFMT
since the data is parsed raw and unprocessed into the memory.
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Michael Grzeschik [Tue, 3 Aug 2010 10:57:41 +0000 (07:57 -0300)]
V4L/DVB: mt9m111: register cleanup hex to dec bitoffset
Signed-off-by: Philipp Wiesner <p.wiesner@phytec.de>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 19 Sep 2010 09:00:54 +0000 (06:00 -0300)]
V4L/DVB: cpia2: remove V4L1 support from this driver
V4L1 is deprecated and will be removed completely soon.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Thu, 30 Sep 2010 11:41:49 +0000 (08:41 -0300)]
V4L/DVB: em28xx: fix a compilation warning
drivers/media/video/em28xx/em28xx-video.c: In function ‘vidioc_s_register’:
drivers/media/video/em28xx/em28xx-video.c:1617: warning: unused variable ‘rc’
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 26 Sep 2010 11:01:18 +0000 (08:01 -0300)]
V4L/DVB: radio-mr800: remove BKL
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 26 Sep 2010 10:45:15 +0000 (07:45 -0300)]
V4L/DVB: em28xx: the default std was not passed on to the subdevs
The initial em28xx std (PAL) was not passed on to the subdevs. This led to
these tvp5150 kernel log errors when running v4l2-ctl --all:
tvp5150 0-005c: VBI can't be configured without knowing number of lines
The reason was that tvp5150 was still using its own internal default: STD_ALL.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 26 Sep 2010 10:34:45 +0000 (07:34 -0300)]
V4L/DVB: em28xx: remove BKL
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Mon, 20 Sep 2010 21:25:55 +0000 (18:25 -0300)]
V4L/DVB: vivi: remove BKL
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 26 Sep 2010 12:01:26 +0000 (09:01 -0300)]
V4L/DVB: videobuf: add queue argument to videobuf_waiton()
videobuf_waiton() must unlock and relock ext_lock if it has to wait.
For that to happen it needs the videobuf_queue pointer.
Don't attempt to unlock/relock q->ext_lock unless it was locked in the
first place.
vb->state has to be protected by a spinlock to be safe.
This patch is based on code from Mauro Carvalho Chehab <mchehab@redhat.com>.
[mchehab@redhat.com: add extra argument to a few missing places]
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Mon, 20 Sep 2010 20:39:46 +0000 (17:39 -0300)]
V4L/DVB: videobuf: add ext_lock argument to the queue init functions
Add an ext_lock argument to the videobuf init functions. This allows
drivers to pass the vdev->lock pointer (or any other externally held lock)
to videobuf. For now all drivers just pass NULL.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Mon, 20 Sep 2010 20:24:30 +0000 (17:24 -0300)]
V4L/DVB: videobuf: prepare to make locking optional in videobuf
Currently videobuf uses the vb_lock mutex to lock its data structures.
But this locking will (optionally) move into the v4l2 core, which means
that in that case vb_lock shouldn't be used since the external lock is already
held.
Prepare for this by adding a pointer to such an external mutex and
don't lock if that pointer is set.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 26 Sep 2010 11:47:38 +0000 (08:47 -0300)]
V4L/DVB: v4l2: add core serialization lock
Drivers can optionally set a pointer to a mutex in struct video_device.
The core will use that to lock before calling open, read, write, unlocked_ioctl,
poll, mmap or release.
Updated the documentation as well and ensure that v4l2-event knows about the
lock: it will unlock it before doing a blocking wait on an event and relock it
afterwards.
Ensure that the 'video_is_registered' check is done when the lock is held:
a typical disconnect will take the lock as well before unregistering the
device nodes, so to prevent race conditions the video_is_registered check
should also be done with the lock held.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 26 Sep 2010 11:20:13 +0000 (08:20 -0300)]
V4L/DVB: v4l2-dev: remove get_unmapped_area
The get_unmapped_area file operation is unused. Remove.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 26 Sep 2010 11:16:56 +0000 (08:16 -0300)]
V4L/DVB: v4l2-dev: after a disconnect any ioctl call will be blocked
Until now all fops except release and (unlocked_)ioctl returned an error
after the device node was unregistered. Extend this as well to the ioctl
fops. There is nothing useful that an application can do here and it
complicates the driver code unnecessarily.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Thu, 30 Sep 2010 11:26:28 +0000 (08:26 -0300)]
V4L/DVB: Deprecate stradis driver
The driver author seems to not worked on this driver since its conversion
from 2.2 to 2.4. Nobody is known to have a stradis hardware for testing. As
it still uses V4L1 API, BKL and probably some other old stuff, someone would
need to work on it to preserve the driver. Instead of investing time and
efforts to keep porting it to work with new API's, it seems better to just
drop the driver.
So, let's move it to drivers/staging and label it to die at 2.6.38, if nobody
cares enough to port parallel port support to gspca or to create a new driver
that uses the same gspca-cpia sub-driver.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Thu, 30 Sep 2010 11:25:42 +0000 (08:25 -0300)]
V4L/DVB: Deprecate cpia driver (used for parallel port webcams)
cpia driver were re-written inside gspca driver, for USB devices. The only
functionality that were not migrated is the support for parallel port,
as:
1) the developer didn't find any hardware;
2) it doesn't seem important to keep support for a parallel port webcam,
as this is an obsolete technology;
3) the changes at gspca for it to work with parallel port would be very large;
4) this driver still uses BKL.
So, let's move it to drivers/staging and label it to die at 2.6.38, if nobody
cares enough to port parallel port support to gspca or to create a new driver
that uses the same gspca-cpia sub-driver.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Wed, 15 Sep 2010 12:23:20 +0000 (09:23 -0300)]
V4L/DVB: cx88: Remove BKL
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Wed, 15 Sep 2010 11:22:09 +0000 (08:22 -0300)]
V4L/DVB: bttv: use unlocked ioctl
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Wed, 15 Sep 2010 11:18:31 +0000 (08:18 -0300)]
V4L/DVB: bttv: fix driver lock and remove explicit calls to BKL
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Sat, 18 Sep 2010 11:35:57 +0000 (08:35 -0300)]
V4L/DVB: bttv: Fix mutex unbalance at bttv_poll
Don't do double mutex_unlock when reading a stream at bttv_poll.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Tue, 14 Sep 2010 15:19:51 +0000 (12:19 -0300)]
V4L/DVB: bttv-driver: document functions using mutex_lock
There are a few ancillary static routines used by ioctl functions
that takes bttv lock internally. As we'll be adding the same lock
for all ioctl's that need, we need to properly document them, to
avoid doing double locks
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Wed, 15 Sep 2010 11:35:45 +0000 (08:35 -0300)]
V4L/DVB: radio-si470x: use unlocked ioctl
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Tue, 14 Sep 2010 12:56:22 +0000 (09:56 -0300)]
V4L/DVB: radio-si470x: remove the BKL lock used internally at the driver
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Anatolij Gustschin [Wed, 15 Sep 2010 21:31:09 +0000 (18:31 -0300)]
V4L/DVB: v4l: fsl-viu.c: add slab.h include to fix compile breakage
mpc512x kernel configurations without SPI support do not build:
drivers/media/video/fsl-viu.c: In function 'viu_open':
drivers/media/video/fsl-viu.c:1248: error: implicit declaration of function 'kzalloc'
drivers/media/video/fsl-viu.c:1248: warning: assignment makes pointer from integer without a cast
drivers/media/video/fsl-viu.c: In function 'viu_release':
drivers/media/video/fsl-viu.c:1335: error: implicit declaration of function 'kfree'
If CONFIG_SPI is enabled, the slab.h will be included in
linux/spi/spi.h which is included by media/v4l2-common.h
and the fsl_viu.c driver builds.
Let's incluce linux/slab.h directly to fix the build breakage.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Arnd Bergmann [Tue, 14 Sep 2010 19:35:06 +0000 (16:35 -0300)]
V4L/DVB: dvb/bt8xx: kill the big kernel lock
The bt8xx driver only uses the big kernel lock in its dst_ca_ioctl
function and never to serialize against other code, so we can
trivially replace it with a private mutex.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Arnd Bergmann [Tue, 14 Sep 2010 19:35:07 +0000 (16:35 -0300)]
V4L/DVB: dvb-core: kill the big kernel lock
The dvb core only uses the big kernel lock in the open
and ioctl functions, which means it can be replaced with
a dvb specific mutex. Fortunately, all the ioctl functions
go through dvb_usercopy, so we can move the serialization
in there.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Joe Perches [Mon, 13 Sep 2010 22:07:14 +0000 (19:07 -0300)]
V4L/DVB: drivers/media/video/zoran: Don't use initialized char array
Just fill the array as necessary and terminate with 0
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andy Shevchenko [Sat, 11 Sep 2010 17:33:28 +0000 (14:33 -0300)]
V4L/DVB: media: cx23885: use '%pM' format to print MAC address
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean Delvare [Fri, 10 Sep 2010 13:36:37 +0000 (10:36 -0300)]
V4L/DVB: cx22702: Simplify cx22702_set_tps()
Code in function cx22702_set_tps() can be slightly simplified.
Apparently gcc was smart enough to optimize it anyway, but it can't
hurt to make the code more readable.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean Delvare [Fri, 10 Sep 2010 13:35:12 +0000 (10:35 -0300)]
V4L/DVB: cx22702: Some things never change
The init sequence never changes so it can be marked const. Likewise,
cx22702_ops is a template and can thus be made read-only.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean Delvare [Fri, 10 Sep 2010 13:33:42 +0000 (10:33 -0300)]
V4L/DVB: cx22702: Avoid duplicating code in branches
Calling the same functions in if/else or switch/case branches is
inefficient. Refactor the code for a smaller binary and increased
readability.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Thu, 30 Sep 2010 03:56:08 +0000 (00:56 -0300)]
V4L/DVB: Fix Kconfig dependencies for VIDEO_IR
warning: (VIDEO_GO7007 && STAGING && !STAGING_EXCLUDE_BUILD && VIDEO_DEV && PCI && I2C && INPUT && BKL && SND || VIDEO_CX25821 && STAGING && !STAGING_EXCLUDE_BUILD && DVB_CORE && VIDEO_DEV && PCI && I2C && INPUT && BKL) selects VIDEO_IR which has unmet direct dependencies (IR_CORE)
warning: (VIDEO_CX25821 && STAGING && !STAGING_EXCLUDE_BUILD && DVB_CORE && VIDEO_DEV && PCI && I2C && INPUT && BKL) selects VIDEO_IR which has unmet direct dependencies (IR_CORE)
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Wed, 29 Sep 2010 17:41:52 +0000 (14:41 -0300)]
V4L/DVB: saa7134: split RC code into a different module
This allows the removal of CONFIG_INPUT from saa7134, and
helps to create a better Kconfig dependency hierarchy.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Wed, 29 Sep 2010 16:46:23 +0000 (13:46 -0300)]
V4l/DVB: saa7134: properly mark some functions as static
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 15 Sep 2010 19:07:08 +0000 (16:07 -0300)]
V4L/DVB: tvaudio: remove obsolete tda8425 initialization
The tda8425 initialization function sets up the inputmap for riva boards.
After some digging I discovered that this was for the V4L rivatv driver
that is found on sourceforge. This driver hasn't been maintained since the
last 5 years and will no longer work with the current v4l framework.
So we can safely remove this.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean Delvare [Fri, 10 Sep 2010 13:32:21 +0000 (10:32 -0300)]
V4L/DVB: cx22702: Drop useless initializations to 0
These variables are either unconditionally set right afterward, or
already set to 0 by kzalloc.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean Delvare [Fri, 10 Sep 2010 17:03:07 +0000 (14:03 -0300)]
V4L/DVB: cx22702: Clean up register access functions
* Avoid temporary variables.
* Optimize success paths.
* Make error messages consistently verbose.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Thomas Gleixner [Tue, 7 Sep 2010 14:33:27 +0000 (11:33 -0300)]
V4L/DVB: dvb: Convert "mutex" to semaphore
Get rid of init_MUTEX[_LOCKED]() and use sema_init() instead.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jarod Wilson [Fri, 17 Sep 2010 21:12:31 +0000 (18:12 -0300)]
V4L/DVB: IR/lirc_dev: check for valid irctl in unregister path
Prompted by Red Hat bugzilla #633023
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jarod Wilson [Wed, 15 Sep 2010 03:28:41 +0000 (00:28 -0300)]
V4L/DVB: IR/imon: set up mce-only devices w/mce keytable
Currently, they get set up with the pad keytable, which they can't
actually use at all. Also add another variant of volume scancodes from
another 0xffdc device, and properly set up the 0x9e 0xffdc device as an
iMON VFD w/MCE proto IR.
Based on data and a prior patch from Anders Eriksson on the lirc list.
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jarod Wilson [Wed, 15 Sep 2010 18:56:03 +0000 (15:56 -0300)]
V4L/DVB: IR/imon: protect ictx's kc and last_keycode w/spinlock
Lest we get our keycodes wrong... Thus far, in practice, I've not found
it to actually matter, but its one of the issues raised in
https://bugzilla.kernel.org/show_bug.cgi?id=16351 that wasn't addressed
by converting to using native IR keydown/up functions.
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
David Härdeman [Wed, 15 Sep 2010 18:42:07 +0000 (15:42 -0300)]
V4L/DVB: imon: split mouse events to a separate input dev
This is a stab at separating the mouse (and front panel/knob) events
out to a separate input device. This is necessary in preparation for
the next patch which makes the rc-core input dev opaque to rc
drivers.
I can't verify the correctness of the patch beyond the fact that it
compiles without warnings. The driver has resisted most of my
attempts at understanding it properly...for example, the double calls
to le64_to_cpu() and be64_to_cpu() which are applied in
imon_incoming_packet() and imon_panel_key_lookup() would amount
to a bswab64() call, irregardless of the cpu endianness, and I think
the code wouldn't have worked on a big-endian machine...
- Minor alterations to apply with minimal core IR changes
- Use timer for imon keys too, since its entirely possible for the
receiver to miss release codes (either by way of another key being
pressed while the first is held or by the remote pointing away from
the recevier when the key is release. yes, I know, its ugly).
- Bump driver version number, since this is a fairly significant change
(for the much much better).
Tested successfully w/an imon knob receiver.
Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jarod Wilson [Wed, 15 Sep 2010 18:31:12 +0000 (15:31 -0300)]
V4L/DVB: IR: export ir_keyup so imon driver can use it directly
The imon driver currently reimplements its own version of ir_keyup
(along with key release timer functionality also already present in the
core IR code). A follow-up imon patch will make use of ir_keyup and the
IR stack's key release code.
Trivial extraction from David Härdeman's pending rc-core merge and
device interface abstraction patchset to facilitate merging a patch
based on his imon input dev split patch ahead of the larger churn, which
is slated for post-2.6.37-rc1 (after Dmitry's large keycode patches are
merged in mainline).
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Thu, 23 Sep 2010 04:23:10 +0000 (01:23 -0300)]
V4L/DVB: saa7134: get rid of I2C_HW_SAA7134
The only reason for keeping I2C_HW_SAA7134 is to allow setting a
per-device polling interval. Just move this info to the platform
data, allowing drivers to change it per device, where needed.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Thu, 23 Sep 2010 03:51:44 +0000 (00:51 -0300)]
V4L/DVB: Remove the usage of I2C_HW_B_CX2388x on ir-kbd-i2c.c
Move the cx88 specific initialization for Hauppauge XVR remotes
into cx88-input, removing the need for test it inside ir-kbd-i2c.
The reference at cx88 for this symbol, at:
drivers/media/video/cx88/cx88-i2c.c: core->i2c_adap.id = I2C_HW_B_CX2388x;
drivers/media/video/cx88/cx88-vp3054-i2c.c: vp3054_i2c->adap.id = I2C_HW_B_CX2388x;
Can't be removed yet, since lirc-i2c still uses it.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Thu, 23 Sep 2010 02:24:04 +0000 (23:24 -0300)]
V4L/DVB: bttv: Move PV951 IR to the right driver
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Fri, 17 Sep 2010 18:07:28 +0000 (15:07 -0300)]
V4L/DVB: usbvision: remove BKL from usbvision
Removed the BKL from usbvision.
There was an initialization bug as well where the i2c bus was registered twice.
Although when the BKL was present no oops was generated, I did run into
other i2c problems. Now that I protect against duplicate i2c registration
that bug is now gone as well.
But trying to disconnect the USB cable while someone is still using the device
still leads to a crash.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 15 Sep 2010 19:36:07 +0000 (16:36 -0300)]
V4L/DVB: v4l: remove obsolete include/media/v4l2-i2c-drv.h file
The include/media/v4l2-i2c-drv.h header was used to be able to compile drivers
in the v4l-dvb hg repository for legacy kernels (mainly pre-2.6.26) without
creating an #ifdef mess.
The hg repository dropped support for kernels < 2.6.26 so we can remove this
header. All i2c drivers that used it have now been converted to use proper
i2c code. The header was a hack, but it did its job well. So I would call
this an honorable removal. :-)
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 15 Sep 2010 19:18:11 +0000 (16:18 -0300)]
V4L/DVB: tm6000: removed unused i2c adapter ID
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 15 Sep 2010 19:16:20 +0000 (16:16 -0300)]
V4L/DVB: ir-kbd-i2c: remove obsolete I2C_HW_B_CX2341X test
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 15 Sep 2010 19:14:57 +0000 (16:14 -0300)]
V4L/DVB: saa7146/tuner: remove mxb hack
Remove a hack in the tuner code for the mxb board. This hack is no longer
needed since the tuner is now probed on its correct address as specified
by the mxb driver.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 15 Sep 2010 18:59:53 +0000 (15:59 -0300)]
V4L/DVB: v4l: remove unused i2c-id.h headers
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 15 Sep 2010 18:53:43 +0000 (15:53 -0300)]
V4L/DVB: s2250: remove obsolete v4l2-i2c-drv.h header
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 15 Sep 2010 18:52:25 +0000 (15:52 -0300)]
V4L/DVB: au8522_decoder: remove obsolete v4l2-i2c-drv.h header
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 15 Sep 2010 18:51:04 +0000 (15:51 -0300)]
V4L/DVB: ks0127: remove obsolete v4l2_i2c_drv.h header
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 15 Sep 2010 18:49:56 +0000 (15:49 -0300)]
V4L/DVB: adv7170: remove obsolete v4l2-i2c-drv.h header
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 15 Sep 2010 18:48:49 +0000 (15:48 -0300)]
V4L/DVB: cx25840: remove obsolete v4l2-i2c-drv.h header
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 15 Sep 2010 18:47:42 +0000 (15:47 -0300)]
V4L/DVB: saa7127: remove obsolete v4l2-i2c-drv.h header
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 15 Sep 2010 18:46:37 +0000 (15:46 -0300)]
V4L/DVB: upd64083: remove obsolete v4l2-i2c-drv.h header
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 15 Sep 2010 18:45:20 +0000 (15:45 -0300)]
V4L/DVB: tvp5150: remove obsolete v4l2-i2c-drv.h header
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 15 Sep 2010 18:44:11 +0000 (15:44 -0300)]
V4L/DVB: vpx3220: remove obsolete v4l2-i2c-drv.h header
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>