pwc
[Top] [All Lists]

[pwc] pwc driver bug

To:
Subject: [pwc] pwc driver bug
From: Depardieu <>
Date: Thu, 25 May 2006 18:16:12 +0200
Hi!

While coding one of my projects, I was using a Logitec QuickCam Pro 4000, which uses the pwc driver. I was doing tests, and i got a weird values on pwc controls:

the brightness, hue, and contrast were set to extrange values, so far away of these control bounds when I try to read the control values.

the reason is pwc-v4l.c. You wrote the next code in the VIDIOC_S_CTRL's switch:

case V4L2_CID_BRIGHTNESS:
                                        c->value <<= 9;
                                        ret = pwc_set_brightness(pdev, c->value);
                                        if (ret<0)
                                                return -EINVAL;
                                        return 0;

So, taking a look in these lines, you modify the value in c shifting it 9 bits. So maybe you mean:

case V4L2_CID_BRIGHTNESS:
                                        ret = pwc_set_brightness(pdev, c->value << 9);
                                        if (ret<0)
                                                return -EINVAL;
                                        return 0;

I've done tests whith xawtv, and my webcam application, and it does work.

I've only made tests in brightness, hue, saturation and contrast, and the only which works fine whithout the modification, is the saturation control.

the same changes in contrast works in both, xawtv and my application. Because my webcam does not support Hue control, I cannot say if it's working correctly, but I suggest doing the modification.

So, maybe you want to add the modification to the code, so please, feel free to ask me for diff patches.

Any questions you have about this modification are wellcome, so I apologize about changing your code. :)

my best regards. Bye

Luis Delgado de Mendoza.
_______________________________________________
pwc mailing list

http://lists.saillard.org/mailman/listinfo/pwc
<Prev in Thread] Current Thread [Next in Thread>
  • [pwc] pwc driver bug, Depardieu <=
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