V4L/DVB (9913): tuner-xc2028: allow printing stack trace as debug on sleep code
tuner-xc3028 can be put to sleep to save power. However, if not properly
recovered from sleep, the device won't work. It is noticed that some
devices doesn't recover properly, so let's add a dump_stack() as a debug
option, to allow us to track when this happens.
V4L/DVB (9911): em28xx: vidioc_try_fmt_vid_cap() doesn't need any lock
vidioc_try_fmt_vid_cap() just checks if a given resolution is supported.
It doesn't touch on struct em28xx device descriptor. so, there's no need
to lock.
While there, use unlikely() for those values that aren't likely to
occur.
Laurent Pinchart [Sun, 14 Dec 2008 19:22:05 +0000 (16:22 -0300)]
V4L/DVB (9898): v4l2: Add privacy control
The privacy control prevents video from being acquired by the camera. A true
value indicates that no image can be captured. Devices that implement the
privacy control must support read access and may support write access.
Laurent Pinchart [Sun, 14 Dec 2008 19:21:16 +0000 (16:21 -0300)]
V4L/DVB (9897): v4l2: Add camera zoom controls
The zoom controls move the zoom lens group to a an absolute position, as a
relative displacement or at a given speed until reaching physical device
limits. Positive values move the zoom lens group towards the telephoto
direction, negative values towards the wide-angle direction.
Andy Walls [Mon, 15 Dec 2008 00:26:25 +0000 (21:26 -0300)]
V4L/DVB (9895): cx18: Refine the firmware load and firmware startup process
Refine the firmware load and firmware startup process. Significant changes
are to ensure the SCB and IPC area are correct before starting up the firmware,
and letting the CPU firmware start up the APU firmware for us.
Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andy Walls [Sun, 23 Nov 2008 22:16:44 +0000 (19:16 -0300)]
V4L/DVB (9894): cx18: Use a known open task handle when setting stream CX2341x parameters
cx18: Use a known open task handle when setting stream CX2341x parameters
Sometimes, we might only have VBI or YUV stream open instead of an MPEG stream.
Let's make sure we use a valid task handle to perform the CX2341x control
settings.
Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
V4L/DVB (9869): gspca - zc3xx: Change the USB exchanges for the sensor pas202b.
This sensor was declared as hdcs2020.
The new exchanges have been extracted from the ms-win file usbvm31b.inf.
The light frequency control has been added.
Jim Paris [Thu, 4 Dec 2008 07:52:40 +0000 (04:52 -0300)]
V4L/DVB (9860): gspca - ov534: Frame transfer improvements.
The indirect registers at 0x1c/0x1d control frame settings. If we
leave the values at 0x0a and 0x0b at their reset-time defaults, frame
data from the camera matches the UVC payload format. This lets us
better reassemble the data into frames and know when data was lost.
This also lets us relax the bulk_size requirement from 600K to 2K,
which should help systems on with limited RAM (like the PS3).
Signed-off-by: Jim Paris <jim@jtan.com> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
V4L/DVB (9811): Add support for the CX24113 DVB-S tuner driver
This commit adds support for the CX24113 DVB-S tuner driver and thus support for the Technisat Skystar2 revision 2.8.
The driver was created with the help of Technisat. Thank you very much.
Signed-off-by: Patrick Boettcher <pb@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
V4L/DVB (9810): uvcvideo: Add a device quirk to prune bogus controls.
Bogus controls currently include processing unit auto controls for which no
corresponding manual control is available. Such auto controls make little
sense if any, and are known to crash at least the SiGma Micro webcam.
V4L/DVB (9809): uvcvideo: Add nodrop module parameter to turn incomplete frame drop off.
The driver drops incomplete uncompressed video frames to avoid confusing
userspace with corrupt data. Add a nodrop module parameter to turn that
behaviour off and make all frames available to userspace.
Andy Walls [Fri, 12 Dec 2008 19:24:04 +0000 (16:24 -0300)]
V4L/DVB (9805): cx18: Port fix for raw/sliced VBI mixup from ivtv and cx25840
This is a port of the fixes Hans Verkuil made for ivtv/cx25840:
The service_set field was used to determine whether raw or sliced VBI was
desired. This is incorrect since it is perfectly valid to select sliced VBI
with a service_set of 0.
Instead the driver should check on VIDIOC_S_FMT whether the type
field matches the raw or sliced VBI type.
Updated the cx18 driver accordingly, including an additional check in
cx18_start_v4l2_encode_stream() that didn't exist in ivtv.
Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andy Walls [Fri, 12 Dec 2008 18:50:27 +0000 (15:50 -0300)]
V4L/DVB (9804): cx18: Avoid making firmware API calls with the queue lock held
cx18: Avoid making firmware API calls with the queue lock held. The source
of MPEG strem corruption when not holding the queue lock was found to be that
the MPEG buffer could be retrieved by the user app before it was sync'ed for
the host cpu. Incoming buffers are now sync'ed before being put on q_full and
releasing the queue lock. We can thus avoid the sometimes lengthy call to
the firmware for CPU_DE_SET_MDL while holding the queue lock, so we can get
better performance.
Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andy Walls [Mon, 8 Dec 2008 02:30:17 +0000 (23:30 -0300)]
V4L/DVB (9802): cx18: Add module parameters for finer control over buffer allocations
cx18: Add module parameters for finer control over buffer allocations.
User now has the option of setting smaller buffers to get lower
latency transfers from the encoder. User can also now set the number
of buffers used for a stream explicitly.
Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andy Walls [Tue, 9 Dec 2008 02:02:45 +0000 (23:02 -0300)]
V4L/DVB (9801): cx18: Allow more than 63 capture buffers in rotation per stream
cx18: Allow more than 63 capture buffers in rotation per stream. Implement
q_busy to hold buffers the firmware has for use. q_free holds truly unused
buffers in a pool. New buffers are given to the firmware as soon as the
firmware returns one, if there are any to give to the firmware.
Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andy Walls [Fri, 28 Nov 2008 03:04:21 +0000 (00:04 -0300)]
V4L/DVB (9800): cx18: Eliminate q_io from stream buffer handling
Eliminate q_io from stream buffer handling in anticipation of upcoming
changes in buffer handling. q_io was a holdover from ivtv and it's function
in cx18 was trivial and not necessary. We just push things back onto the
front of q_full now, instead of maintaining a 1 buffer q_io queue.
Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
In the function cx88_audio_initdev, the value card has been created using
snd_card_new. The other error handling code in this function frees the
value using snd_card_free. I have thus changed the first error case to do
the same. On the other hand, it may be that card is not sufficiently
initialized at this point to use snd_card_free, in which case something
else should be done to free the memory in the error case.
In the function snd_cx88_create the call kfree(chip) in one error case
looks suspicious, both because it is not done in the other error code, and
because chip points into the middle of the memory allocated by
snd_card_new, ie it is not itself associated with a separate kmalloc.
Therefore I have removed it.
The semantic match that finds the first problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@r exists@
local idexpression x;
statement S,S1;
position p1,p2,p3;
expression E,E1;
type T,T1;
expression *ptr != NULL;
@@
(
if ((x@p1 = snd_card_new(...)) == NULL) S
|
x@p1 = snd_card_new(...);
)
... when != snd_card_free(...,(T)x,...)
when != if (...) { <+... snd_card_free(...,(T)x,...) ...+> }
when != true x == NULL || ...
when != x = E
when != E = (T)x
when any
(
if (x == NULL || ...) S1
|
if@p2 (...) {
... when != snd_card_free(...,(T1)x,...)
when != if (...) { <+... snd_card_free(...,(T1)x,...) ...+> }
when != x = E1
when != E1 = (T1)x
(
return \(0\|<+...x...+>\|ptr\);
|
return@p3 ...;
)
}
)
Robert Jarzmik [Mon, 1 Dec 2008 12:45:35 +0000 (09:45 -0300)]
V4L/DVB (9791): pxa-camera: pixel format negotiation
Use the new format-negotiation infrastructure, support all four YUV422
packed and the planar formats.
The new translation structure enables to build the format
list with buswidth, depth, host format and camera format
checked, so that it's not done anymore on try_fmt nor
set_fmt.