platform/kernel/linux-stable.git
14 years agoV4L/DVB: ngene: add initial support for digital side of Avermedia m780
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>
14 years agoV4L/DVB: ngene: properly support boards where channel 0 isn't a TS input
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>
14 years agoV4L-DVB: ngene: make sure that tuner headers are included
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>
14 years agoV4L/DVB: media/az6027: handle -EIO failure
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>
14 years agoV4L/DVB: media/az6027: doing dma on the stack
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>
14 years agoV4L/DVB: media/IR/imon: potential double unlock on error
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>
14 years agoV4L/DVB: media/IR/imon: testing the wrong variable
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>
14 years agoV4L/DVB: media/IR/imon: precendence issue: ! vs ==
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>
14 years agoV4L/DVB: tvp7002.c: fix some copy-paste errors in the comments
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>
14 years agoV4L/DVB: tvp7002.c: Add support for enum_dv_presets
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>
14 years agoV4L/DVB: v4l2-subdev.h: Add support for enum_dv_preset
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>
14 years agoV4L/DVB: gspca - sn9c20x: Fix non working mt9v111 sensor
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>
14 years agoV4L/DVB: gspca - sn9c20x: HAS_BUTTON flag -> HAS_NO_BUTTON flag
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>
14 years agoV4L/DVB: gspca - sn9c20x: Add another MSI laptop to upsidedown device list
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>
14 years agoV4L/DVB: gspca - sn9c20x: Add another laptop to upsidedown device list
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>
14 years agoV4L/DVB: ivtv: fix VIDIOC_S_PRIORITY handling
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>
14 years agoV4L/DVB: usbvision: add delay before detecting the saa711x
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>
14 years agoV4L/DVB: usbvision: don't use usb_set_intfdata, let v4l2_device_register handle this
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>
14 years agoV4L/DVB: hdpvr: fix disconnect sequence
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>
14 years agoV4L/DVB: radio-am800: let v4l2_device_(un)register handle usb_get/set_intfdata
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>
14 years agoV4L/DVB: v4l2-dev: remove unnecessary lock around atomic clear_bit
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>
14 years agoV4L/DVB: em28xx: g_tuner must set type field
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>
14 years agoV4L/DVB: tvp7002: fix query_dv_preset
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>
14 years agoV4L/DVB: v4l2-common: simplify prio utility functions
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>
14 years agoV4L/DVB: bttv: remove bogus prio check in g_frequency
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>
14 years agoV4L/DVB: Documentation: fix small error in the ENUMINPUT doc
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>
14 years agoV4L/DVB: cx18/cx25840/saa7115/tvp5150: remove vbi support from s_fmt
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>
14 years agoV4L/DVB: em28xx: switch to new vbi subdev ops
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>
14 years agoV4L/DVB: cx231xx: switch to new vbi subdev ops
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>
14 years agoV4L/DVB: pvrusb2: switch to new vbi subdev ops
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>
14 years agoV4L/DVB: cx18: switch to new vbi subdev ops
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>
14 years agoV4L/DVB: ivtv: switch to new vbi subdev ops
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>
14 years agoV4L/DVB: tvp5150: support new vbi ops to set/get VBI format
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>
14 years agoV4L/DVB: saa7127: support new vbi ops to set/get VBI format
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>
14 years agoV4L/DVB: cx18: support new vbi ops to set/get VBI format
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>
14 years agoV4L/DVB: cx25840: support new vbi ops to set/get VBI format
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>
14 years agoV4L/DVB: saa7115: support new vbi ops to set/get VBI format
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>
14 years agoV4L/DVB: v4l: add new subdev vbi ops to handle raw and sliced vbi
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>
14 years agoV4L/DVB: v4l: move vbi-specific video ops to a new vbi ops struct
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>
14 years agoV4L/DVB: gspca - main: Convert wMaxPacketSize from little endian 16 to cpu
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>
14 years agoV4L/DVB: MAINTAINERS: Update uvcvideo web site address
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>
14 years agoV4L/DVB: uvcvideo: Prevent division by 0 when control step value is 0
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>
14 years agoV4L/DVB: uvcvideo: Flag relative controls as write-only
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>
14 years agoV4L/DVB: uvcvideo: Add support for V4L2_PIX_FMT_Y16
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>
14 years agoV4L/DVB: [-next] media: fix vivi build error
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>
14 years agoV4L/DVB: saa7134: Add support new Behold TV cards
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>
14 years agoV4L/DVB: Rework for support xc5000
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>
14 years agoV4L/DVB: videobuf: make poll() report proper flags for output video devices
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>
14 years agoV4L/DVB: buf-dma-sg.c: don't assume nr_pages == sglen
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>
14 years agoV4L/DVB: videobuf-vmalloc: remove __videobuf_sync()
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>
14 years agoV4L/DVB: videobuf-dma-sg: remove external function videobuf_dma_sync()
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>
14 years agoV4L/DVB: Add documentation for the new error flag
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>
14 years agoV4L/DVB: videobuf: Add support for V4L2_BUF_FLAG_ERROR
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>
14 years agoV4L/DVB: Add a new ERROR flag for DQBUF after recoverable streaming errors
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>
14 years agoV4L/DVB: cx25821-video-upstream.c: Added severity to printk calls
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>
14 years agoV4L/DVB: staging:cx25821:fixes coding styles in cx25821-i2c.c
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>
14 years agoV4L/DVB: staging:cx2581: fixes coding style issues in cx25821-cards.c
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>
14 years agoV4L/DVB: cx25821: fix coding style issues in cx25821-alsa.c
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>
14 years agoV4L/DVB: dvb-usb: gp8psk, fix potential null derefernce
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>
14 years agoV4L/DVB: dib3000mc: reduce large stack usage
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>
14 years agoV4L/DVB: dib7000p: reduce large stack usage fix
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>
14 years agoV4L/DVB: dib7000p: reduce large stack usage
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>
14 years agoV4L/DVB: Add Elgato EyeTV Diversity to dibcom driver
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>
14 years agoV4L/DVB: bttv: Add another ids for IVC-200
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>
14 years agoV4L/DVB: Read MAC for TeVii S470 PCI-e DVB-S2 card
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>
14 years agoV4L/DVB: em28xx: fix locks during dvb init sequence
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>
14 years agoV4L/DVB: cx88: fix setting input when using DVB
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>
14 years agoV4L/DVB: IR/imon: add proper auto-repeat support
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>
14 years agoV4L/DVB: IR/imon: minor change_protocol fixups
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>
14 years agoV4L/DVB: ir-core: remove ir-functions usage from cx231xx
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>
14 years agoV4L/DVB: ir-core: remove IR_TYPE_PD
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>
14 years agoV4L/DVB: IR/imon: convert to ir-core protocol change handling
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>
14 years agoV4L/DVB: event: Export the v4l2_event_init and v4l2_event_dequeue functions
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>
14 years agoV4L/DVB: V4L: Events: Replace bad WARN_ON() with assert_spin_locked()
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>
14 years agoFix compilation breakage with tm6000
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>
14 years agoV4L/DVB: tm6000: update the todo list
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>
14 years agoV4L/DVB: Fix color format with tm6010
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>
14 years agoV4L/DVB: tm6000: fix coding style issues of tm6000-cards.c
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>
14 years agoV4L/DVB: tm6000: renaming firmware
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>
14 years agoV4L/DVB: tm6000: bugfix analog init for tm6010
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>
14 years agoV4L/DVB: tm6000: Don't copy outside the buffer
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>
14 years agoV4L/DVB: tm6000: Fix a panic if buffer become NULL
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>
14 years agoV4L/DVB: tm6000: Properly set alternate when preparing to stream
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>
14 years agoV4L/DVB: tm6000: Add additional GPIO for UT821 during frmware loading
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>
14 years agoV4L/DVB: tm6000: fix i2c read
Dmitri Belimov [Wed, 28 Apr 2010 01:32:43 +0000 (22:32 -0300)]
V4L/DVB: tm6000: fix i2c read

Set correct limit for I2C packet.
Use different method for the tm5600/tm6000 and tm6010 to read word.

[mchehab@redhat.com: Fix CodingStyle]
Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - zc3xx: Fix the gamma calculation from the contrast
Jean-François Moine [Sun, 25 Apr 2010 18:25:42 +0000 (15:25 -0300)]
V4L/DVB: gspca - zc3xx: Fix the gamma calculation from the contrast

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - zc3xx.c: Remove the brightness control
Jean-François Moine [Sun, 25 Apr 2010 18:05:31 +0000 (15:05 -0300)]
V4L/DVB: gspca - zc3xx.c: Remove the brightness control

Brightness is done by the gamma tables and not by single bridge registers.
It will be back as soon as an algorithm will be found.

This change also fixes the autogain problem found by Jose Alberto Reguero
(webcam 046d:08dd).

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - zc3xx: Fix the light frequency values for pas202b and pb0330
Jean-François Moine [Sun, 25 Apr 2010 17:57:10 +0000 (14:57 -0300)]
V4L/DVB: gspca - zc3xx: Fix the light frequency values for pas202b and pb0330

The error was introduced by "gspca - zc3xx: Rename the USB sequences."
in commit e945e2e44c798f84494260c02478d3c23965bb93.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - sonixj: Add sensor soi768
Jean-François Moine [Sun, 25 Apr 2010 17:45:43 +0000 (14:45 -0300)]
V4L/DVB: gspca - sonixj: Add sensor soi768

The webcams 0c45:613e may contain the sensors ov7630 or soi768.
A sensor probe is done at init time when the sensor is declared ov7630.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - sonixj: Reset the bridge after sensor probe
Jean-François Moine [Sun, 25 Apr 2010 17:41:51 +0000 (14:41 -0300)]
V4L/DVB: gspca - sonixj: Reset the bridge after sensor probe

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - sonixj: Adjust minor values of sensor ov7630. - set the color gains...
Jean-François Moine [Sun, 25 Apr 2010 17:33:31 +0000 (14:33 -0300)]
V4L/DVB: gspca - sonixj: Adjust minor values of sensor ov7630.  - set the color gains to null at init time  - change value of register 0x9a

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - sonixj: Set the colors at startup time
Jean-François Moine [Sun, 25 Apr 2010 17:31:05 +0000 (14:31 -0300)]
V4L/DVB: gspca - sonixj: Set the colors at startup time

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - sonixj: Adjust debug output. - fix bad function name - add debug...
Jean-François Moine [Sun, 25 Apr 2010 17:27:39 +0000 (14:27 -0300)]
V4L/DVB: gspca - sonixj: Adjust debug output.  - fix bad function name  - add debug info for i2c buffer write

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - sonixj: Split the init sequence of sensor ov7630
Jean-François Moine [Sun, 25 Apr 2010 17:23:39 +0000 (14:23 -0300)]
V4L/DVB: gspca - sonixj: Split the init sequence of sensor ov7630

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: v4l: videobuf: qbuf now uses relevant v4l2_buffer fields for OUTPUT types
Pawel Osciak [Wed, 21 Apr 2010 09:44:27 +0000 (06:44 -0300)]
V4L/DVB: v4l: videobuf: qbuf now uses relevant v4l2_buffer fields for OUTPUT  types

According to the V4L2 specification, applications set bytesused, field and
timestamp fields of struct v4l2_buffer when the buffer is intended for
output and memory type is MMAP. This adds proper copying of those values
to videobuf_buffer so drivers can use them.

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>
14 years agoV4L/DVB: omap_vout:V4L2 Display: Changed enum return type to int
Vaibhav Hiremath [Sun, 11 Apr 2010 13:50:23 +0000 (10:50 -0300)]
V4L/DVB: omap_vout:V4L2 Display: Changed enum return type to int

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Muralidharan Karicheri <mkaricheri@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: V4L2: Add support for OMAP2/3 V4L2 display driver on top of DSS2
Vaibhav Hiremath [Sun, 11 Apr 2010 13:41:49 +0000 (10:41 -0300)]
V4L/DVB: V4L2: Add support for OMAP2/3 V4L2 display driver on top of DSS2

Features Supported -
1. Provides V4L2 user interface for the video pipelines of DSS
2. Basic streaming working on LCD, DVI and TV.
3. Works on latest DSS2 library from Tomi
4. Support for various pixel formats like YUV, UYVY, RGB32, RGB24,
   RGB565
5. Supports Alpha blending.
6. Supports Color keying both source and destination.
7. Supports rotation.
8. Supports cropping.
9. Supports Background color setting.
10. Allocated buffers to only needed size

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed-by: Muralidharan Karicheri <mkaricheri@gmail.com>
Signed-off-by: Murailidharan Karicheri <mkaricheri@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: v4l spec: document new events
Hans Verkuil [Sat, 27 Mar 2010 17:10:57 +0000 (14:10 -0300)]
V4L/DVB: v4l spec: document new events

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: v4l spec: document what odd and even fields are
Hans Verkuil [Sat, 27 Mar 2010 17:10:37 +0000 (14:10 -0300)]
V4L/DVB: v4l spec: document what odd and even fields are

Document that odd == top and even == bottom. I can never remember this,
so it is probably worth documenting.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ivtv: support the new events API
Hans Verkuil [Sat, 27 Mar 2010 17:10:13 +0000 (14:10 -0300)]
V4L/DVB: ivtv: support the new events API

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>