On Monday 22 August 2005 17:47, Luc Saillard wrote:
> On Mon, Aug 22, 2005 at 02:59:40PM +0100, Alistair John Strachan wrote:
> > Hi Luc,
> >
> > Are supported. We would like to also be able to set:
> >
> > V4L2_CID_AUTO_WHITE_BALANCE
> > V4L2_CID_DO_WHITE_BALANCE
> > V4L2_CID_RED_BALANCE
> > V4L2_CID_BLUE_BALANCE
> > V4L2_CID_AUTOGAIN
> > V4L2_CID_GAIN (??)
> >
> > And maybe add a private control for SHARPNESS. Now, I've read the sources
> > to the 10.0.7a driver, and I find almost all of these functions wrapped
> > in pwc-ctrl.c; however, only the 4 mentioned above are mapped through to
> > V4L2.
>
> Yes, i know this, the control are implemented but not fully. It was just to
> see if it's possible. Please look in the file pwc-v4l.c, at the beginning,
> you will see some default component. If you want to add more setting, i'll
> be happy to integrate your works. In the queue, i've a patch to control the
> same setting using the sysfs interface (/sys/...).
Hi Luc, list,
Here is a patch which implements setting various previously unsettable
controls via the v4l2 interface. We need these controls to be exported to
userspace so that we can flexibly change the camera settings for scientific
imaging purposes.
Please review these changes and let me know if there's any problems. I've
verified it doesn't break xawtv, at the very least, and for our purposes
these controls work perfectly.
After making these changes, it's obvious to me that maybe the internal
pwc-ctrl functions shouldn't really be implemented as taking a 16bit value,
only to downshift them to the range the camera supports (generally 8bit or
7bit, sometimes even 5bit values). Currently almost all the v4l2 controls
shift up to the 16bit value only to be shifted back internally.. also I can't
find anywhere whether the v4l2 control range values are enforced by the
driver, or whether there's a standard for ranges (I've used 0-255, but I've
read elsewhere that other v4l2 devices use 0-100).
In other news, having looked at the PDF specification for the chip on the
camera we're using (the PCVC740), I can't see how their register descriptions
match the values in pwc-ctrl.h; in fact, I believe some of the commands in
the pwc driver are incorrectly mapped to their corresponding controls
(brightness seems to be multiplying pixel values, almost like contrast
should.. I can't get contrast working. Gamma works, but I'm not sure the
range is correctly specified).
If anybody has the documentation from which this driver was written, I'd
happily validate it and check whether these issues actually exist.
The attached patch is against the stable 10.0.7a driver, and there's a compile
fix included for compiling against 2.6.13. Thanks!
--
Cheers,
Alistair.
'No sense being pessimistic, it probably wouldn't work anyway.'
Third year Computer Science undergraduate.
1F2 55 South Clerk Street, Edinburgh, UK.
add-v4l2-ioctls.diff
Description: Text Data
_______________________________________________
pwc mailing list
http://lists.saillard.org/mailman/listinfo/pwc
|