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.
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 [email protected] http://lists.saillard.org/mailman/listinfo/pwc
