Hi,

I tested latest snapshot for the pwc driver and came accross an issue with
Philips PCA645VC WebCam.

The app works at 176x144 but doesn't 320x240.

Since the following change, my cam doesn't work anymore:

diff -wur pwc-2.6.22/pwc-misc.c pwc-v4l2-20071012-042701/pwc-misc.c
--- pwc-2.6.22/pwc-misc.c       2007-10-20 21:58:08.000000000 +0200
+++ pwc-v4l2-20071012-042701/pwc-misc.c 2007-07-16 12:40:29.000000000 +0200
@@ -70,7 +70,7 @@
        find = -1;
        for (i = 0; i < PSZ_MAX; i++) {
                if (pdev->image_mask & (1 << i)) {
-                       if (pwc_image_sizes[i].x <= width && 
pwc_image_sizes[i].y <= height)
+                       if (pwc_image_sizes[i].x == width && 
pwc_image_sizes[i].y == height)
                                find = i;
                }
        }


The problem with this change is, that now it fails, if the right setting isn't 
found.

This triggers a problem in pwc-if.c, pwc_try_video_mode():

In this function, if the setting to the new settings, fail, you try to set
back to the last known good settings. This is fine, but the variable ret isn't
set to the new pwc_set_video_mode() return code.

This results in having the cam set to the last good setting, but failing
completely, since the error from the new setting is given back by the return
ret in the end of the function.

With my Patch, it works again.

Please take this patch in.

thanks
Philipp Kolmann


-- 
The more I learn about people, the more I like my dog!
diff -ur pwc-v4l2-20071012-042701/pwc-if.c pwc-v4l2-20071012-042701-new/pwc-if.c
--- pwc-v4l2-20071012-042701/pwc-if.c	2007-04-09 23:55:31.000000000 +0200
+++ pwc-v4l2-20071012-042701-new/pwc-if.c	2007-10-20 21:52:31.000000000 +0200
@@ -996,7 +996,7 @@
 	if (ret) { 
 	        PWC_DEBUG_FLOW("pwc_set_video_mode attempt 1 failed.\n");
 		/* That failed... restore old mode (we know that worked) */
-		start = pwc_set_video_mode(pdev, pdev->view.x, pdev->view.y, pdev->vframes, pdev->vcompression, pdev->vsnapshot);
+		ret = start = pwc_set_video_mode(pdev, pdev->view.x, pdev->view.y, pdev->vframes, pdev->vcompression, pdev->vsnapshot);
 		if (start) {
 		        PWC_DEBUG_FLOW("pwc_set_video_mode attempt 2 failed.\n");
 		}
_______________________________________________
pwc mailing list
pwc@lists.saillard.org
http://lists.saillard.org/mailman/listinfo/pwc

Reply via email to