Hi Ralph,

[...]
> > > There are different versions of the driver and different versions of
> > > luvcview that don't always work together because at some point the
> > > control IDs changed. Can you try to recompile the latest luvcview and
> > > make sure that its control IDs are the same as in your driver?
> >
> > The latest luvcview tarball available on Michel Xhaard's website still
> > doesn't support the new pan/tilt controls introduced in the split branch.
> > I plan to submit the pan/tilt controls for inclusion in V4L2. The
> > pan/tilt controls IDs will thus be modified once again. Sorry for the
> > inconvenience, but keep in mind the driver is under development :-)
> >
> > In the meantime, I'm sure Michel would accept a patch to support the new
> > pan/tilt controls.
>
> OK, I allways had the cam working with the trunk driver and try using split
> from time to time. So was with rev 68.
> As i'm no programmer, could u point me where to compare control IDs and /
> or what to do to luvcview-code?
> I don't know how to create a patch - yet - but do know how to patch.

Applications have several ways to interact with V4L2 devices. One of those is 
called the controls API. A control is usually any parameter that doesn't 
directly influence streaming: brightness, contrast, autofocus, zoom, pan, 
tilt, ... User-space applications can read (get) or write (set) the value of 
any control the device supports at any time.

The Logitech Quickcam Orbit MP has a single pan/tilt control. Writing a new 
value makes the webcam perform a pan motion (if the tilt value is zero), a 
tilt motion (if the pan value is zero) or a combined pan/tilt motion (if no 
value is zero).

The straightforward approach was to implement a pan control and a tilt 
control. Setting the pan control would pan the webcam, setting the tilt 
control would tilt it, but they was no way to pan and tilt the webcam in a 
single motion.

V4L2 only supported setting a single control at once, with the control value 
being a 32 bits integer. As there was no way to set two the pan and tilt 
controls in a single operation, I decided to hack around the limit and create 
a single pan/tilt control. The 32 bit value was split in two 16 bits numbers, 
controlling pan and tilt. The pan/tilt control was defined as

#define V4L2_CID_PANTILT_RELATIVE               (V4L2_CID_PRIVATE_BASE+7)

and the 32 bit value was assigned using the following union.

union pantilt {
        struct {
                short pan;
                short tilt;
        } s16;
        int value;
} pantilt;

Check the v4L2UpDownPan() and v4L2UpDownTilt() functions in luvcview (file 
v4l2uvc.c) to see how V4L2_CID_PANTILT_RELATIVE was used.

The control API has recently been enhanced by the extended control API (note: 
extended refers to the API, not the controls). This new API offers a way to 
set several controls at once, so the Linux UVC driver has been modified (in 
the split branch) to remove the V4L2_CID_PANTILT_RELATIVE control and 
introduce two new controls defined as

#define V4L2_CID_PAN_RELATIVE                   (V4L2_CID_PRIVATE_BASE+7)
#define V4L2_CID_TILT_RELATIVE                  (V4L2_CID_PRIVATE_BASE+8)

controlling pan and tilt respectively. The control values are signed number 
expressed in 1/64th degrees.

As luvcview controls pan and tilt separately, you don't have to use the new 
API. Using the old API with the two new controls should be fine. You might 
have to scale the angle passed to v4L2UpDownPan() and v4L2UpDownTilt(), as 
too small increments might not be processed properly by the webcam.

> Next i get and compile a newer luvcview.
>
> > > > I tried all things of unplugging cam, reloading module, etc. but Tilt
> > > > control was dead, and so was the reset button.
> > >
> > > Did the tilt control ever work? (Tilt during the reset process doesn't
> > > count because that's controlled by the camera.)
>
> As said before, it worked with trunk, some time i think it worked with
> split too (iirc) and works with trunk again. Don't worry here.

The split branch should work at least as good as the trunk. The only 
user-visible difference is the control IDs. I will merge the split branch 
into the trunk soon.

Cheers,

Laurent Pinchart
_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to