pwc
[Top] [All Lists]

[pwc] Patch: Fix "pwc_set_video_mode attempt 1 failed."

To:
Subject: [pwc] Patch: Fix "pwc_set_video_mode attempt 1 failed."
From: Philipp Kolmann <>
Date: Sat, 20 Oct 2007 22:08:07 +0200
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!

Attachment: pwc.diff
Description: Text Data

_______________________________________________
pwc mailing list

http://lists.saillard.org/mailman/listinfo/pwc
<Prev in Thread] Current Thread [Next in Thread>
  • [pwc] Patch: Fix "pwc_set_video_mode attempt 1 failed.", Philipp Kolmann <=
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU