pwc
[Top] [All Lists]

[pwc] Re: PWC Driver, V4L2 API, missing bits?

To: Luc Saillard <>
Subject: [pwc] Re: PWC Driver, V4L2 API, missing bits?
From: Alistair John Strachan <>
Date: Fri, 2 Sep 2005 15:54:40 +0100
On Friday 02 September 2005 07:51, Luc Saillard wrote:
> On Thu, Sep 01, 2005 at 02:01:42PM +0100, Alistair John Strachan wrote:
> > 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.
>
> I've look the patch, and i'll made a new snapshots this week-end. Thanks
> for your works.

No problem. It's my intention to patch through the rest of the controls once I 
can verify they work semantically correctly.

>
> > 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).
>
> Because we keep the v4l1 api that want a value between 1-65535. So perhaps
> i'll change all the function to accept the right range, and when we change
> value using v4l1 or setpwc, shift the value at this moment.

Thanks. I would suggest always taking an 8bit argument, then shift left for 
the v4l1 controls (indicating to the developer that there is a loss of 
precision), and the v4l2 controls can map right through (or be scaled from 
0-100, whichever is preferable).

>
> > 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 If anybody has the documentation from which this driver was
> > written, I'd happily validate it and check whether these issues actually
> > exist.
>
> Is it possible to get this documentation ? for now i've nothing :(

Find the documentation for (at least) the 740K attached. I had a brief look 
last week, but I couldn't see how the register offsets matched with what was 
in the driver. At the very least, some of the commands seem to be out of 
order versus this spec.

-- 
Cheers,
Alistair.

'No sense being pessimistic, it probably wouldn't work anyway.'
Third year Computer Science undergraduate.
1F2 55 South Clerk Street, Edinburgh, UK.

Attachment: SAA8116_3.pdf
Description: Adobe PDF document

_______________________________________________
pwc mailing list

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