I found one problem with the ov511 driver. Namely, it expects only valid picture size arguments and does not compensate for too large or too small values, as expected by Kopete.
Here is a patch against version 2.30 of the driver. It fixes a problem for ov518-based webcams, so people with ov511 webcams may need to do a similar hack in ov511_mode_init_regs:
--- ov511-2.30/ov511_core.c 2005-10-22 04:27:18.000000000 -0400
+++ ov511-new/ov511_core.c 2006-01-18 15:42:36.000000000 -0500
@@ -2395,7 +2395,7 @@
ov518_mode_init_regs(struct usb_ov511 *ov,
int width, int height, int mode, int sub_flag)
{
- int hsegs, vsegs, hi_res;
+ int hsegs, vsegs, hi_res, newwidth, newheight;
if (sub_flag) {
width = ov->subw;
@@ -2405,14 +2405,28 @@
PDEBUG(3, "width:%d, height:%d, mode:%d, sub:%d",
width, height, mode, sub_flag);
- if (width % 16 || height %
{
- err("Invalid size (%d, %d)", width, height);
- return -EINVAL;
- }
+ /* Fix width and height according to the maximum and minimum values.
+ The newwidth and newheight variables are only used to get a debug
+ message in case any of the two values is changed. */
+ if (width < ov->minwidth)
+ newwidth = ov->minwidth;
+ else if (width > ov->maxwidth)
+ newwidth = ov->maxwidth;
+ else
+ newwidth = width;
- if (width < ov->minwidth || height < ov->minheight) {
- err("Requested dimensions are too small");
- return -EINVAL;
+ if (height < ov->minheight)
+ newheight = ov->minheight;
+ else if (height > ov->maxheight)
+ newheight = ov->maxheight;
+ else
+ newheight = height;
+
+ if (width != newwidth || height != newheight) {
+ width = newwidth;
+ height = newheight;
+ PDEBUG(3, "new width:%d, new height:%d, mode:%d, sub:%d",
+ width, height, mode, sub_flag);
}
if (width >= 320 && height >= 240) {