Randy Dunlap [Fri, 7 May 2010 18:22:26 +0000 (15:22 -0300)]
V4L/DVB: vivi and mem2mem_testdev need slab.h to build
Fix vivi and mem2mem_testdev build errors: need to #include <linux/slab.h>:
drivers/media/video/vivi.c:1144: error: implicit declaration of function 'kfree'
drivers/media/video/vivi.c:1156: error: implicit declaration of function 'kzalloc'
drivers/media/video/vivi.c:1156: warning: assignment makes pointer from integer without a cast
drivers/media/video/mem2mem_testdev.c:862: error: implicit declaration of function 'kzalloc'
drivers/media/video/mem2mem_testdev.c:862: warning: assignment makes pointer from integer without a cast
drivers/media/video/mem2mem_testdev.c:874: error: implicit declaration of function 'kfree'
drivers/media/video/mem2mem_testdev.c:944: warning: assignment makes pointer from integer without a cast
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Stefan Ringel [Fri, 7 May 2010 15:29:04 +0000 (12:29 -0300)]
V4L/DVB: tm6000: bugfix image position
bugfix incorrect image and line position in videobuffer
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jarod Wilson [Tue, 4 May 2010 19:17:05 +0000 (16:17 -0300)]
V4L/DVB: IR/imon: remove dead IMON_KEY_RELEASE_OFFSET
On Tue, May 04, 2010 at 06:06:41PM +0200, Dan Carpenter wrote:
> On Tue, May 04, 2010 at 10:03:18AM -0400, Jarod Wilson wrote:
> > @@ -1205,7 +1204,7 @@ static u32 imon_panel_key_lookup(u64 hw_code)
> > if (imon_panel_key_table[i].hw_code == (code | 0xffee))
> > break;
> >
> > - keycode = imon_panel_key_table[i % IMON_KEY_RELEASE_OFFSET].keycode;
> > + keycode = imon_panel_key_table[i].keycode;
> >
> > return keycode;
> > }
>
> There is still potentially a problem here because if we don't hit the
> break statement, then we're one past the end of the array.
D'oh. Okay, here's v2, should fix that buglet too.
This hack was used when the imon driver was using internal key lookup
routines, but became dead weight when the driver was converted to use
ir-core's key lookup routines. These bits simply didn't get removed,
drop 'em now.
Pointed out by Dan Carpenter.
v2: fix possible attempt to access beyond end of key table array,
also pointed out by Dan.
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Stefan Ringel [Thu, 6 May 2010 14:25:52 +0000 (11:25 -0300)]
V4L/DVB: tm6000: README - add vbi
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Wed, 5 May 2010 15:30:01 +0000 (12:30 -0300)]
V4L/DVB: Fix unlock logic at medusa_video_init
As reported by Dan Carpenter:
> This was my patch: "cx25821: fix double unlock in medusa_video_init()"
>
> It accidentally got merged two times. The version from the staging tree
> is not correct. Please can you revert it:
>
7a02f549fcc30fe6be0c0024beae9a3db22e1af6 "Staging: cx25821: fix double
> unlock in medusa_video_init()"
After reviewing the logic at the function, instead of just adding a patch to
revert the wrong one, the better is to apply a different logic: add a goto
that will always unlock and return the error.
This simplifies the code a little bit, and, instead of just return -EINVAL,
it will return the error condition reported by the called functions.
This patch is folded with another patch from Dan that added one missing
goto.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
matthieu castet [Wed, 5 May 2010 18:59:20 +0000 (15:59 -0300)]
V4L/DVB: fix dvb frontend lockup
If my dvb device is removed while in use, I got the following oops:
[ 4920.484084] Call Trace:
[ 4920.484102] [<
c102daad>] ? default_wake_function+0x0/0x8
[ 4920.484147] [<
f8cb09e1>] ? dvb_unregister_frontend+0x95/0xcc [dvb_core]
[ 4920.484157] [<
c1044412>] ? autoremove_wake_function+0x0/0x2d
[ 4920.484168] [<
f8dd1af2>] ? dvb_usb_adapter_frontend_exit+0x12/0x21 [dvb_usb]
[ 4920.484176] [<
f8dd12f1>] ? dvb_usb_exit+0x26/0x88 [dvb_usb]
[ 4920.484184] [<
f8dd138d>] ? dvb_usb_device_exit+0x3a/0x4a [dvb_usb]
[ 4920.484217] [<
f7fe1b08>] ? usb_unbind_interface+0x3f/0xb4 [usbcore]
[ 4920.484227] [<
c11a4178>] ? __device_release_driver+0x74/0xb7
[ 4920.484233] [<
c11a4247>] ? device_release_driver+0x15/0x1e
[ 4920.484243] [<
c11a3a33>] ? bus_remove_device+0x6e/0x87
[ 4920.484249] [<
c11a26d6>] ? device_del+0xfa/0x152
[ 4920.484264] [<
f7fdf609>] ? usb_disable_device+0x59/0xb9 [usbcore]
[ 4920.484279] [<
f7fdb9ee>] ? usb_disconnect+0x70/0xdc [usbcore]
[ 4920.484294] [<
f7fdc728>] ? hub_thread+0x521/0xe1d [usbcore]
[ 4920.484301] [<
c1044412>] ? autoremove_wake_function+0x0/0x2d
[ 4920.484316] [<
f7fdc207>] ? hub_thread+0x0/0xe1d [usbcore]
[ 4920.484321] [<
c10441e0>] ? kthread+0x61/0x66
[ 4920.484327] [<
c104417f>] ? kthread+0x0/0x66
[ 4920.484336] [<
c1003d47>] ? kernel_thread_helper+0x7/0x10
If there are users (for example users == -2) :
- dvb_unregister_frontend :
- stop kernel thread with dvb_frontend_stop :
- fepriv->exit = 1;
- thread loop catch stop event and break while loop
- fepriv->thread = NULL; and fepriv->exit = 0;
- dvb_unregister_frontend wait on "fepriv->dvbdev->wait_queue" that fepriv->dvbdev->users==-1.
The user finish :
- dvb_frontend_release - set users to -1
- don't wait wait_queue because fepriv->exit != 1
=> dvb_unregister_frontend never exit the wait queue.
Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Dan Carpenter [Wed, 5 May 2010 06:00:47 +0000 (03:00 -0300)]
V4L/DVB: s2255drv: remove dead code
My concern initially was we dereference "dev" in the parameter list to
s2255_dev_err() but it turns out that code path is never used.
The s2255_stop_readpipe() is only called from one place and "dev" is
never null. So this patch just removes the whole condition here.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: linux-dev@sensoray.com
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Dan Carpenter [Wed, 5 May 2010 06:01:30 +0000 (03:01 -0300)]
V4L/DVB: s2255drv: return if vdev not found
The original code didn't handle the case where vdev was not found so I
added a check for that.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: linux-dev@sensoray.com
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Dan Carpenter [Wed, 5 May 2010 05:59:48 +0000 (02:59 -0300)]
V4L/DVB: ov511: cleanup: remove unneeded null check
We dereference "ov" unconditionally throughout the function so there is
no way it can be NULL here. This code has been around for ages so if
it were possible for "ov" to be NULL someone would have complained.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Dan Carpenter [Wed, 5 May 2010 05:58:57 +0000 (02:58 -0300)]
V4L/DVB: media/mem2mem: dereferencing free memory
We dereferenced "ctx" on the error path.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Peter Huewe [Wed, 5 May 2010 15:20:21 +0000 (12:20 -0300)]
V4L/DVB: media/IR: Add missing include file to rc-map.c
This patch adds a missing include linux/delay.h to prevent
build failures[1-5]
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Dan Carpenter [Wed, 5 May 2010 05:58:18 +0000 (02:58 -0300)]
V4L/DVB: dvb/stv6110x: cleanup error handling
The "stv6110x" is NULL so we can just return directly without calling
kfree(). Also I changed the printk() to make checkpatch.pl happy.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Devin Heitmueller [Sun, 21 Mar 2010 20:09:44 +0000 (17:09 -0300)]
V4L/DVB: ngene: Add lgdt3303 and mt2131 deps to Kconfig
Add the demod and tuner dependencies required for the Avermedia m780 to the
Kconfig for the ngene driver.
Thanks to Oliver Endriss for pointing this out.
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Devin Heitmueller [Sun, 14 Mar 2010 02:10:13 +0000 (23:10 -0300)]
V4L/DVB: ngene: start separating out DVB functions into separate file
Start moving the dvb specific code to ngene-dvb.c. Note that there is still
stuff in ngene-core.c which could potentially be moved out, but it will require
considerable reworking of the logic in order to continue to properly support
DVB while also being able to support transport streams coming from analog MPEG
encoders.
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Devin Heitmueller [Sat, 13 Mar 2010 20:53:58 +0000 (17:53 -0300)]
V4L/DVB: ngene: split out card specific code into a separate file
Split out the card profiles into a new file called ngene-cards.c. This is
part of a larger refactoring of the driver in preparation for adding analog
support.
Note that this patch makes *no* functional change - all I did was cut/paste the
code and add the function prototypes to ngene.h as needed.
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Devin Heitmueller [Sat, 13 Mar 2010 20:10:24 +0000 (17:10 -0300)]
V4L/DVB: ngene: split out i2c code into a separate file
Split out the i2c related code from the ngene-core.c into a new file called
ngene-i2c.c. This is part of a larger refactoring of the driver in preparation
for adding analog support.
Note that this patch makes *no* functional change - all I did was cut/paste the
code and add the function prototypes to ngene.h as needed.
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Devin Heitmueller [Sat, 13 Mar 2010 19:43:18 +0000 (16:43 -0300)]
V4L/DVB: ngene: add initial support for digital side of Avermedia m780
Add ATSC/QAM support for the Avermedia m780. Note that this patch does
not include any analog support for the board, as the ngene bridge driver does
not yet have analog implemented
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Devin Heitmueller [Sat, 13 Mar 2010 19:40:46 +0000 (16:40 -0300)]
V4L/DVB: ngene: properly support boards where channel 0 isn't a TS input
The current code assumes that channel zero is always a TS input, which would
result in an oops if the "one_adapter" modprobe option is 1 (which it is by
default) and the board in question has something else on channel zero (which
is the case for the Avermedia m780, which has it's analog input wired to UVI1)
The code now explicitly tracks the first adapter created and ensures that
other channels cannot accidentially be associated with a NULL adapter.
Also, eliminate what appears to be a typo where all of the channel parameters
are getting associated with stream zero's properties, which will work if you
happen to have a dual stream board with the exact same configuration, but if
they differ then the second stream is going to end up with the first stream's
configuration.
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Fri, 7 May 2010 11:48:41 +0000 (08:48 -0300)]
V4L-DVB: ngene: make sure that tuner headers are included
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Dan Carpenter [Tue, 4 May 2010 12:31:13 +0000 (09:31 -0300)]
V4L/DVB: media/az6027: handle -EIO failure
If the az6027_usb_in_op() returns a negative errno ret is -EIO and in
that case the value of b[0] may be undefined. The original code
assigned 0 to ret, but since it's already 0 now we can skip that.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Dan Carpenter [Tue, 4 May 2010 12:14:29 +0000 (09:14 -0300)]
V4L/DVB: media/az6027: doing dma on the stack
I changed the dma buffers to use allocated memory instead of stack
memory.
The reason for this is documented in Documentation/DMA-API-HOWTO.txt
under the section: "What memory is DMA'able?" That document was only
added a couple weeks ago and there are still lots of modules which
haven't been corrected yet. Btw. Smatch includes a pretty good test to
find places which use stack memory as a dma buffer. That's how I found
these. (http://smatch.sf.net).
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Dan Carpenter [Tue, 4 May 2010 11:36:34 +0000 (08:36 -0300)]
V4L/DVB: media/IR/imon: potential double unlock on error
If there is an error here we should unlock in the caller (which is
imon_init_intf1()). We can remove this stray unlock.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Dan Carpenter [Tue, 4 May 2010 11:38:26 +0000 (08:38 -0300)]
V4L/DVB: media/IR/imon: testing the wrong variable
There is a typo here. We meant to test "ir" instead of "props". The
"props" variable was tested earlier.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Dan Carpenter [Tue, 4 May 2010 11:37:33 +0000 (08:37 -0300)]
V4L/DVB: media/IR/imon: precendence issue: ! vs ==
The original condition is always false because ! has higher precedence
than == and neither 0 nor 1 is equal to IMON_DISPLAY_TYPE_VGA.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mats Randgaard [Wed, 5 May 2010 10:50:38 +0000 (07:50 -0300)]
V4L/DVB: tvp7002.c: fix some copy-paste errors in the comments
Signed-off-by: Mats Randgaard <mats.randgaard@tandberg.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mats Randgaard [Wed, 5 May 2010 08:21:24 +0000 (05:21 -0300)]
V4L/DVB: tvp7002.c: Add support for enum_dv_presets
Implement enum_dv_presets in tvp7002.
Signed-off-by: Mats Randgaard <mats.randgaard@tandberg.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mats Randgaard [Wed, 5 May 2010 08:08:22 +0000 (05:08 -0300)]
V4L/DVB: v4l2-subdev.h: Add support for enum_dv_preset
The op enum_dv_preset was missing in this header but is needed by subdev
drivers with DV functionality.
Signed-off-by: Mats Randgaard <mats.randgaard@tandberg.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Brian Johnson [Wed, 5 May 2010 16:22:45 +0000 (13:22 -0300)]
V4L/DVB: gspca - sn9c20x: Fix non working mt9v111 sensor
Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Brian Johnson [Mon, 19 Apr 2010 00:42:40 +0000 (21:42 -0300)]
V4L/DVB: gspca - sn9c20x: HAS_BUTTON flag -> HAS_NO_BUTTON flag
Reverse HAS_BUTTON logic since most webcams either have a button or if
they don't don't bother to send any interrupts. However I have at least
one model that appears to leave the button GPIO floating and can send
a bogus interrupt.
Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Brian Johnson [Sat, 10 Apr 2010 05:12:46 +0000 (02:12 -0300)]
V4L/DVB: gspca - sn9c20x: Add another MSI laptop to upsidedown device list
Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Brian Johnson [Mon, 5 Apr 2010 23:52:52 +0000 (20:52 -0300)]
V4L/DVB: gspca - sn9c20x: Add another laptop to upsidedown device list
Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 2 May 2010 14:11:40 +0000 (11:11 -0300)]
V4L/DVB: ivtv: fix VIDIOC_S_PRIORITY handling
VIDIOC_S_PRIORITY is also part of the ioctls that need to check the
access priority.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 2 May 2010 12:29:27 +0000 (09:29 -0300)]
V4L/DVB: usbvision: add delay before detecting the saa711x
The detection of the saa711x often failed. Adding a small delay before
attempting to detect it fixed this.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 2 May 2010 12:00:13 +0000 (09:00 -0300)]
V4L/DVB: usbvision: don't use usb_set_intfdata, let v4l2_device_register handle this
v4l2_device_register already sets intfdata, no need to do this again.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 2 May 2010 11:01:04 +0000 (08:01 -0300)]
V4L/DVB: hdpvr: fix disconnect sequence
Disconnecting the HDPVR caused a kernel oops if lockdep was enabled.
In addition, if an app still had video0 open and attempted to call ioctl
when the device was already disconnected the system would crash.
Move the freeing and cleanup code to the release function: that is the
right place for it since you know when you get there that nobody is
using the device.
Also removed usb_set_intfdata: v4l2_device_register sets this already
to v4l2_dev.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 2 May 2010 08:36:32 +0000 (05:36 -0300)]
V4L/DVB: radio-am800: let v4l2_device_(un)register handle usb_get/set_intfdata
v4l2_device_register already sets the usb intfdata to v4l2_dev. So use
that instead.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 2 May 2010 08:11:32 +0000 (05:11 -0300)]
V4L/DVB: v4l2-dev: remove unnecessary lock around atomic clear_bit
No need to lock when unregistering the device: clear_bit is already an
atomic operation.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sat, 1 May 2010 21:06:50 +0000 (18:06 -0300)]
V4L/DVB: em28xx: g_tuner must set type field
The 'type' field was undefined but should be set to ANALOG_TV.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sat, 1 May 2010 11:23:07 +0000 (08:23 -0300)]
V4L/DVB: tvp7002: fix query_dv_preset
If no signal or valid format is detected, then VIDIOC_QUERY_DV_PRESET must
return 0 and set the preset to V4L2_DV_INVALID.
This driver returned an error instead.
Also simplified the kernel messages a bit: change v4l2_err to v4l2_dbg (not
detecting a signal/valid format is not an error, so only print this info when
debug == 1) and do not call v4l_fill_dv_preset_info: it's overkill to do this
just for a debug message.
Thanks to Mats Randgaard for bringing this to my attention.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sat, 1 May 2010 11:03:24 +0000 (08:03 -0300)]
V4L/DVB: v4l2-common: simplify prio utility functions
v4l2_prio_init/open/close returned an int when in fact they would
always return 0. Make these void functions.
v4l2_prio_close and v4l2_prio_check pass an enum v4l2_priority as a
pointer for no good reason. Replace with a normal enum v4l2_priority
argument.
These changes will simplify the work of moving priority handling into
the v4l core.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sat, 1 May 2010 11:00:18 +0000 (08:00 -0300)]
V4L/DVB: bttv: remove bogus prio check in g_frequency
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sat, 1 May 2010 09:04:29 +0000 (06:04 -0300)]
V4L/DVB: Documentation: fix small error in the ENUMINPUT doc
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sat, 1 May 2010 19:07:04 +0000 (16:07 -0300)]
V4L/DVB: cx18/cx25840/saa7115/tvp5150: remove vbi support from s_fmt
Now that s_fmt is no longer used for VBI format setup in subdevs, remove
the VBI support from s_fmt.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 14 Mar 2010 15:39:27 +0000 (12:39 -0300)]
V4L/DVB: em28xx: switch to new vbi subdev ops
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 14 Mar 2010 15:31:08 +0000 (12:31 -0300)]
V4L/DVB: cx231xx: switch to new vbi subdev ops
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 14 Mar 2010 15:27:48 +0000 (12:27 -0300)]
V4L/DVB: pvrusb2: switch to new vbi subdev ops
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 14 Mar 2010 15:24:15 +0000 (12:24 -0300)]
V4L/DVB: cx18: switch to new vbi subdev ops
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 14 Mar 2010 15:18:18 +0000 (12:18 -0300)]
V4L/DVB: ivtv: switch to new vbi subdev ops
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 14 Mar 2010 13:59:16 +0000 (10:59 -0300)]
V4L/DVB: tvp5150: support new vbi ops to set/get VBI format
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 14 Mar 2010 13:54:47 +0000 (10:54 -0300)]
V4L/DVB: saa7127: support new vbi ops to set/get VBI format
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 14 Mar 2010 13:49:48 +0000 (10:49 -0300)]
V4L/DVB: cx18: support new vbi ops to set/get VBI format
Also removed the bogus zeroing of fmt.sliced when setting up raw VBI.
This should have been removed in ivtv, but it was just copied-and-pasted
into cx18.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 14 Mar 2010 13:16:46 +0000 (10:16 -0300)]
V4L/DVB: cx25840: support new vbi ops to set/get VBI format
Also removed the bogus zeroing of fmt.sliced when setting up raw VBI.
Switching between raw and sliced VBI changed in 2.6.28 and this memset
should have been removed at that time. It was never noticed because
the bridge driver will fill in the fmt.vbi values anyway.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 14 Mar 2010 13:10:14 +0000 (10:10 -0300)]
V4L/DVB: saa7115: support new vbi ops to set/get VBI format
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 14 Mar 2010 13:02:50 +0000 (10:02 -0300)]
V4L/DVB: v4l: add new subdev vbi ops to handle raw and sliced vbi
Currently raw and sliced vbi is setup using the video g/s_fmt ops.
However, we want to split off the vbi formatting into separate ops
so the first step is to create those new ops.
The next step will be to convert subdev drivers and bridge drivers
to use the new ops. And in the final step we can start converting
the video g/s_fmt ops to the new (and more appropriate) mediabus
format ops.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 14 Mar 2010 12:57:30 +0000 (09:57 -0300)]
V4L/DVB: v4l: move vbi-specific video ops to a new vbi ops struct
Only a relatively small number of video receivers and transmitters actually
support VBI. So start moving the vbi specific ops to an ops struct of their
own.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-François Moine [Thu, 29 Apr 2010 09:01:53 +0000 (06:01 -0300)]
V4L/DVB: gspca - main: Convert wMaxPacketSize from little endian 16 to cpu
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Laurent Pinchart [Fri, 30 Apr 2010 13:48:51 +0000 (10:48 -0300)]
V4L/DVB: MAINTAINERS: Update uvcvideo web site address
The web site has moved to a new location, update the MAINTAINERS file.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Laurent Pinchart [Sun, 25 Apr 2010 19:27:14 +0000 (16:27 -0300)]
V4L/DVB: uvcvideo: Prevent division by 0 when control step value is 0
The control step values reported by the device are used as a divisor
unchecked, which can result in a division by zero.
Check the step value and make it 1 when null.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Laurent Pinchart [Sun, 25 Apr 2010 19:23:24 +0000 (16:23 -0300)]
V4L/DVB: uvcvideo: Flag relative controls as write-only
The UVC relative controls (exposure time, iris, focus, zoom, pan/tilt)
are write-only (despite the UVC specification stating that the GET_CUR
request is mandatory). Mark the controls as such, and report the related
V4L2 controls V4L2_CTRL_FLAG_WRITE_ONLY.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Laurent Pinchart [Mon, 12 Apr 2010 13:41:22 +0000 (10:41 -0300)]
V4L/DVB: uvcvideo: Add support for V4L2_PIX_FMT_Y16
The Miricle 307K (17dc:0202) camera reports a 16-bit greyscale format,
support it in the driver.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Randy Dunlap [Wed, 5 May 2010 22:44:11 +0000 (19:44 -0300)]
V4L/DVB: [-next] media: fix vivi build error
vivi uses find_font(), which is only available when FONTS
is enabled, so make vivi depend on FONTS.
ERROR: "find_font" [drivers/media/video/vivi.ko] undefined!
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Dmitri Belimov [Tue, 6 Apr 2010 04:00:05 +0000 (01:00 -0300)]
V4L/DVB: saa7134: Add support new Behold TV cards
[dougsland@redhat.com: Fixed cards numbers reject due changes in saa7134.h]
Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Dmitri Belimov [Tue, 4 May 2010 22:53:50 +0000 (19:53 -0300)]
V4L/DVB: Rework for support xc5000
Set correct GPIO number for BEHOLD_WANDER/VOYAGER
Add xc5000 callback function
Small rework tm6000_cards_setup function
Small rework tm6000_config_tuner, build mode_mask by config information
Rework for support xc5000 silicon tuner
Add some information messages for more better understand an errors.
[mchehab@redhat.com: Fix CodingStyle and merge conflicts]
Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Pawel Osciak [Mon, 29 Mar 2010 08:16:31 +0000 (05:16 -0300)]
V4L/DVB: videobuf: make poll() report proper flags for output video devices
According to the V4L2 specification, poll() should set POLLOUT | POLLWRNORM
flags for output devices after the frame has been displayed.
Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Arnout Vandecappelle [Wed, 17 Mar 2010 22:53:04 +0000 (19:53 -0300)]
V4L/DVB: buf-dma-sg.c: don't assume nr_pages == sglen
videobuf_pages_to_sg() and videobuf_vmalloc_to_sg() happen to create
a scatterlist element for every page. However, this is not true for
bus addresses, so other functions shouldn't rely on the length of the
scatter list being equal to nr_pages.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Wed, 5 May 2010 20:16:35 +0000 (17:16 -0300)]
V4L/DVB: videobuf-vmalloc: remove __videobuf_sync()
videobuf-core checks if .sync ops is defined before calling.
So, we don't need a do-nothing function.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Wed, 5 May 2010 19:23:09 +0000 (16:23 -0300)]
V4L/DVB: videobuf-dma-sg: remove external function videobuf_dma_sync()
While analyzing one of the videobuf patches, I noticed that
videobuf_dma_sync is only used internally inside videobuf-dma-sg.
So, let's remove this function, merging the code at __videobuf_dma_sync()
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Pawel Osciak [Wed, 28 Apr 2010 07:05:23 +0000 (04:05 -0300)]
V4L/DVB: Add documentation for the new error flag
Add documentation for V4L2_BUF_FLAG_ERROR.
Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 28 Apr 2010 07:05:22 +0000 (04:05 -0300)]
V4L/DVB: videobuf: Add support for V4L2_BUF_FLAG_ERROR
For recoverable stream errors dqbuf() now returns 0 and the error flag
is set instead of returning EIO.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Pawel Osciak [Wed, 28 Apr 2010 07:05:21 +0000 (04:05 -0300)]
V4L/DVB: Add a new ERROR flag for DQBUF after recoverable streaming errors
This flag is intended to indicate streaming errors, which might have
resulted in corrupted video data in the buffer, but the buffer can still
be reused and streaming may continue.
Setting this flag and returning 0 is different from returning EIO. The
latter should now indicate more serious (unrecoverable) errors.
This patch also solves a problem with the ioctl handling code in
vl42-ioctl.c, which does not copy buffer identification data back to the
userspace when EIO is returned, so there is no way for applications
to discover on which buffer the operation failed in such cases.
Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Ricardo Maraschini [Tue, 20 Apr 2010 17:22:31 +0000 (14:22 -0300)]
V4L/DVB: cx25821-video-upstream.c: Added severity to printk calls
Signed-off-by: Ricardo Maraschini <ricardo.maraschini@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
sai [Sat, 20 Mar 2010 05:34:22 +0000 (02:34 -0300)]
V4L/DVB: staging:cx25821:fixes coding styles in cx25821-i2c.c
This is a patch to the cx25821-i2c.c file that fixes warning and errors found by checkpatch.pl tool
[mchehab@redhat.com: fix conflicts with changeset
2587a7ef7b8bc3c7db7c43659297b45b168922ab]
Signed-off-by: sai<tsg321@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
sai [Tue, 23 Mar 2010 02:29:25 +0000 (23:29 -0300)]
V4L/DVB: staging:cx2581: fixes coding style issues in cx25821-cards.c
This patch fixes all the coding style issues reported by checkpatch.pl tool
Signed-off-by: sai <tsg321@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
sai gopal [Wed, 28 Apr 2010 17:17:00 +0000 (14:17 -0300)]
V4L/DVB: cx25821: fix coding style issues in cx25821-alsa.c
This is a patch to cx25821-alsa.c file that fixes of most of the
warning & errors found by checkpatch.pl tool
[mchehab@redhat.com: Fix conflicts with changeset
4e0c923a0d23f86c7331b32bc2aeb280e10e029e]
Signed-off-by: sai gopal <tsg321@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jiri Slaby [Tue, 27 Apr 2010 21:11:20 +0000 (18:11 -0300)]
V4L/DVB: dvb-usb: gp8psk, fix potential null derefernce
Stanse found that in gp8psk_load_bcm4500fw there is missing a check for
return value of kmalloc. Add one and bail out appropriatelly.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Randy Dunlap [Mon, 8 Feb 2010 23:30:33 +0000 (20:30 -0300)]
V4L/DVB: dib3000mc: reduce large stack usage
This patch reduces static stack usage of one of the 2 top offenders
as listed by 'make checkstack':
Building with CONFIG_FRAME_WARN=2048 produces:
drivers/media/dvb/frontends/dib3000mc.c:853: warning: the frame size of 2224 bytes is larger than 2048 bytes
and in 'make checkstack', the stack usage goes from:
0x00000bbd dib3000mc_i2c_enumeration [dib3000mc]: 2232
to unlisted with this patch.
I don't have the hardware that is needed to test this patch.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andrew Morton [Tue, 27 Apr 2010 22:09:45 +0000 (19:09 -0300)]
V4L/DVB: dib7000p: reduce large stack usage fix
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Randy Dunlap [Mon, 8 Feb 2010 23:30:44 +0000 (20:30 -0300)]
V4L/DVB: dib7000p: reduce large stack usage
This patch reduces static stack usage of one of the 2 top offenders
as listed by 'make checkstack':
Building with CONFIG_FRAME_WARN=2048 produces:
drivers/media/dvb/frontends/dib7000p.c:1367: warning: the frame size of 2320 bytes is larger than 2048 bytes
and in 'make checkstack', the stack usage goes from:
0x00002409 dib7000p_i2c_enumeration [dib7000p]: 2328
to unlisted with this patch.
Also change one caller of dib7000p_i2c_enumeration() to check its
return value.
I don't have the hardware that is needed to test this patch.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Michael Müller [Tue, 27 Apr 2010 01:18:57 +0000 (22:18 -0300)]
V4L/DVB: Add Elgato EyeTV Diversity to dibcom driver
This patch introduces support for DVB-T for the following dibcom
based card: Elgato EyeTV Diversity (USB-ID: 0fd9:0011)
Support for the Elgato silver IR remote is added too (set parameter
dvb_usb_dib0700_ir_proto=0)
[w.sang@pengutronix.de: rebased to current linuxtv-master]
Signed-off-by: Michael Müller <mueller_michael@alice-dsl.net>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Kirill Smelkov [Tue, 27 Apr 2010 16:17:51 +0000 (13:17 -0300)]
V4L/DVB: bttv: Add another ids for IVC-200
I have 3 IVC-200 cards (with 4 video channels on each).
2 of the cards identify theirselves as 000[0-3]:a155 (ids already in
cardlist) and another one identifies itself as 080[0-3]:a155, which ids
were unknown so far.
Note - it's IVC-200, not IVC-200G.
Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Pierre Gronlier [Mon, 26 Apr 2010 16:26:29 +0000 (13:26 -0300)]
V4L/DVB: Read MAC for TeVii S470 PCI-e DVB-S2 card
This patch retrieve the correct mac address from the eeprom for TeVii
S470 card.
Signed-off-by: Pierre Gronlier <pierre.gronlier@gmail.com>
Cc: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Wed, 7 Apr 2010 20:07:58 +0000 (17:07 -0300)]
V4L/DVB: em28xx: fix locks during dvb init sequence
Serialize DVB initialization, to avoid it to happen while analog
initialization is still happening.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Istvan Varga [Sat, 27 Mar 2010 12:47:45 +0000 (09:47 -0300)]
V4L/DVB: cx88: fix setting input when using DVB
In cx88-mpeg.c, there is code that sets core->input to CX88_VMUX_DVB.
However, this may be incorrect, since core->input is actually an
index to core->board.input[], which has not enough elements to be
indexed by the value of CX88_VMUX_DVB. So, the modified code searches
core->board.input[] for an input with a type of CX88_VMUX_DVB, and if
it does not find one, the index is simply set to zero.
The change may not have much effect, though, since it appears the only
case when core->input is actually used is when the current input is
being queried.
Signed-off-by: Istvan Varga <istvanv@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jarod Wilson [Fri, 30 Apr 2010 19:06:12 +0000 (16:06 -0300)]
V4L/DVB: IR/imon: add proper auto-repeat support
Simplified from version 1, in that hacks heisted from ati_remote2.c
aren't actually necessary, the real fix for too many repeats was
from setting too long a timer release value (200ms) on repeats in
mce mode -- this patch drops the release timeout to 33ms, matching
the input subsystem default input_dev->rep[REP_PERIOD].
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jarod Wilson [Wed, 28 Apr 2010 17:37:29 +0000 (14:37 -0300)]
V4L/DVB: IR/imon: minor change_protocol fixups
This is a follow-up to my prior patch implementing ir-core's
change_protocol functionality in the imon driver, which eliminates
a false warning when change_protocol is called without a specific
protocol selected yet (i.e., still IR_TYPE_UNKNOWN). It also removes
some extraneous blank lines getting spewn into dmesg.
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
David Härdeman [Sat, 24 Apr 2010 21:14:16 +0000 (18:14 -0300)]
V4L/DVB: ir-core: remove ir-functions usage from cx231xx
Convert drivers/media/video/cx231xx/cx231xx-input.c to not
rely on ir-functions.c.
(I do not have the hardware so I can only compile test this)
Signed-off-by: David Härdeman <david@hardeman.nu>
Cc: Srinivasa Deevi <srinivasa.deevi@conexant.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
David Härdeman [Sat, 24 Apr 2010 21:14:00 +0000 (18:14 -0300)]
V4L/DVB: ir-core: remove IR_TYPE_PD
Pulse-distance is not a protocol, it is a line coding (used by some protocols,
like NEC). Looking at the uses of IR_TYPE_PD, the real protocol seems to be
NEC in all cases (drivers/media/video/cx88/cx88-input.c is the only user).
So, remove IR_TYPE_PD while it is still easy to do so.
Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jarod Wilson [Fri, 23 Apr 2010 05:27:11 +0000 (02:27 -0300)]
V4L/DVB: IR/imon: convert to ir-core protocol change handling
Drop the imon driver's internal protocol definitions in favor of using
those provided by ir-core. Should make ir-keytable Just Work for
switching protocol on the fly on the imon devices that support both the
native imon remotes and mce remotes.
The imon-no-pad-stabilize pseudo-protocol was dropped as a protocol, and
converted to a separate modprobe option (which it probably should have
been in the first place). On the TODO list is to convert this to an as yet
unwritten protocol-specific options framework.
While the mce remotes obviously map to IR_TYPE_RC6, I've yet to look at
what the actual ir signals from the native imon remotes are, so for the
moment, imon native ir is mapped to IR_TYPE_OTHER. Nailing it down more
accurately is also on the TODO list.
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Laurent Pinchart [Sun, 2 May 2010 17:32:43 +0000 (14:32 -0300)]
V4L/DVB: event: Export the v4l2_event_init and v4l2_event_dequeue functions
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sakari Ailus [Mon, 3 May 2010 15:42:46 +0000 (12:42 -0300)]
V4L/DVB: V4L: Events: Replace bad WARN_ON() with assert_spin_locked()
spin_is_locked() always returns zero when spinlock debugging is
disabled on a single CPU machine. Replace WARN_ON() with
assert_spin_locked().
Thanks to Laurent Pinchart for spotting this!
Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Mon, 3 May 2010 18:17:57 +0000 (15:17 -0300)]
Fix compilation breakage with tm6000
Randy Dunlap <randy.dunlap@oracle.com> reported a breakage while compiling
drivers/staging/tm6000, due to this change:
commit
1c1b78bee1a94f98deeb9c24b21c4812e191646c
Author: Greg Kroah-Hartman <gregkh@suse.de>
Date: Thu Apr 29 15:46:07 2010 -0700
USB: remove unused usb_buffer_alloc and usb_buffer_free macros
Now that all callers are converted over, remove the compatibility
functions and all is good.
As the function got renamed, the rename should also be applied at
tm6000.
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Mon, 3 May 2010 07:38:15 +0000 (04:38 -0300)]
V4L/DVB: tm6000: update the todo list
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Mon, 3 May 2010 07:25:59 +0000 (04:25 -0300)]
V4L/DVB: Fix color format with tm6010
The values for the fourcc format were correct, but applied to the
wrong register. With this change, video is now barely working again with
tm6000.
While here, let's remove, for now, the memset. This way, people can
have some image when testing this device.
Yet to be fixed: parts of the image frame are missed. As we don't clean
the buffers anymore, this is "recovered" by repeating the values from a
previous frame. The quality is bad, since the image pixels will contain
data from some previous frames, generating weird delay artifacts.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Roel Van Nyen [Tue, 27 Apr 2010 21:57:00 +0000 (18:57 -0300)]
V4L/DVB: tm6000: fix coding style issues of tm6000-cards.c
fix coding style issues
[mchehab@redhat.com: Fix conflicts with other patches]
Signed-off-by: Roel Van Nyen <roel.vannyen@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Stefan Ringel [Fri, 23 Apr 2010 15:43:42 +0000 (12:43 -0300)]
V4L/DVB: tm6000: renaming firmware
renaming tm6000-xc3028.fw to xc3028-v24.fw
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Stefan Ringel [Thu, 29 Apr 2010 12:24:47 +0000 (09:24 -0300)]
V4L/DVB: tm6000: bugfix analog init for tm6010
- change values in function tm6000_set_fourcc_format
- disable digital source
- add vbi and audio init
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Sun, 2 May 2010 20:14:33 +0000 (17:14 -0300)]
V4L/DVB: tm6000: Don't copy outside the buffer
tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
BUG: unable to handle kernel paging request at
000000000100f700
IP: [<
ffffffffa007ee79>] tm6000_irq_callback+0x51e/0xac7 [tm6000]
(gdb) list * tm6000_irq_callback+0x51e
0x2e79 is in tm6000_irq_callback (drivers/staging/tm6000/tm6000-video.c:363).
358 dev->isoc_ctl.tmp_buf_len--;
359 }
360 if (dev->isoc_ctl.tmp_buf_len) {
361 memcpy (&header,p,
362 dev->isoc_ctl.tmp_buf_l$
363 memcpy (((u8 *)header)+
364 dev->isoc_ctl.tmp_buf,
365 ptr,
366 4-dev->isoc_ctl.tmp_buf$
367 ptr+=4-dev->isoc_ctl.tmp_buf_le$
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Sun, 2 May 2010 14:42:45 +0000 (11:42 -0300)]
V4L/DVB: tm6000: Fix a panic if buffer become NULL
Changing a video standard takes a long time to happen on tm6000, since it
needs to load another firmware, and the i2c implementation on this device
is really slow. When the driver tries to change the video standard, a
kernel panic is produced:
BUG: unable to handle kernel NULL pointer dereference at
0000000000000008
IP: [<
ffffffffa0c7b48a>] tm6000_irq_callback+0x57f/0xac2 [tm6000]
...
Kernel panic - not syncing: Fatal exception in interrupt
By inspecting it with gdb:
(gdb) list *tm6000_irq_callback+0x57f
0x348a is in tm6000_irq_callback (drivers/staging/tm6000/tm6000-video.c:202).
197 /* FIXME: move to tm6000-isoc */
198 static int last_line = -2, start_line = -2, last_field = -2;
199
200 /* FIXME: this is the hardcoded window size
201 */
202 unsigned int linewidth = (*buf)->vb.width << 1;
203
204 if (!dev->isoc_ctl.cmd) {
205 c = (header >> 24) & 0xff;
206
Clearly, it was the trial to access *buf, at line 202 that caused the
Panic.
As ioctl is serialized, While S_STD is handled,QBUF/DQBUF won't be called.
So, the driver will run out of the buffers, and *buf will become NULL.
As, on tm6000, the same URB can contain more than one video buffer, it is
likely to hit a condition where no new buffer is available whily copying
the streams. The fix is to leave the URB copy loop, if there's no more buffers
are available.
The same bug could also be produced by an application that is not fast enough
to request new video buffers.
The same bug were reported by Bee Hock Goh <beehock@gmail.com>.
Thanks-to: Bee Hock Goh <beehock@gmail.com> for reporting the bug
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Mon, 26 Apr 2010 14:24:18 +0000 (11:24 -0300)]
V4L/DVB: tm6000: Properly set alternate when preparing to stream
Although the code is getting the better alternates, it is not really using
it. Get the interface/alternate numbers and use it where needed.
This patch implements also one small fix at the last_line set, as
proposed by Bee Hock Goh <behock@gmail.com>.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Bee Hock Goh [Sun, 25 Apr 2010 06:50:57 +0000 (03:50 -0300)]
V4L/DVB: tm6000: Add additional GPIO for UT821 during frmware loading
Signed-off-by: Bee Hock Goh <beehock@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>