Hi,

On Tuesday 15 January 2008, RUMI Szabolcs wrote:
> On Fri, 11 Jan 2008 21:38:56 +0100
> Laurent Pinchart <[EMAIL PROTECTED]> wrote:
> > > > I plan to fix it, probably by disallowing frame rate changes while
> > > > streaming.
> > >
> > > I'd be more than happy to test that fix you are planning... ;-)
> >
> > Then grab the latest SVN version. I've just committed a patch that
> > disallows changing the frame format or the frame size while streaming.
>
> I have tested svn version 166. The results are the following:
>
> - luvcview works after proper detection as almost always.
>
> - Skype turned on camera but failed to get picture when started after
> luvcview.
>
> - luvcview failed when started again after Skype failed as above.
>
> luvcview stderr: "unable to set format: 5."
> dmesg:
> uvcvideo: Failed to query (130) UVC control 3 (unit 2) : -32 (exp. 2).
> uvcvideo: Failed to query (1) UVC control 1 (unit 0) : -32 (exp. 26).
> uvcvideo: Failed to query (1) UVC control 1 (unit 0) : -32 (exp. 26).
> uvcvideo: Failed to query (1) UVC control 1 (unit 0) : -75 (exp. 26).
> uvcvideo: Failed to query (1) UVC control 1 (unit 0) : -110 (exp. 26).
> uvcvideo: Failed to query (1) UVC control 1 (unit 0) : -110 (exp. 26).
> uvcvideo: Failed to query (1) UVC control 1 (unit 0) : -110 (exp. 26).

Good old Logitech firmware bug :-/

To be completely fair we should rename it the Logitech+SPCA bug as that part 
of the firmware was provided by the chip vendor. Logitech is "only" 
responsible for not testing the devices enough with Linux.

> - after some rmmod/insmod cycles and proper redetection I've started
> Skype without starting any other programs in between. It started to
> work but the picture was distorted, to be more exact, it was stretched
> to about 120% of the original in the Y (vertical) direction from the
> center of the image but basically your code change seems to work! :)

I'm pretty sure that's not the driver's fault :-) Skype might be stretching 
the picture to fit the fixed-size window.

> I have also tested what luvcview controls work and how:
>
> brightness - works
> contrast - works
> saturation - works
> gain - works
> sharpness - setting works but no apparent effect
> gamma - adjusted down with effect but then could not be adjusted up anymore
> reset to default - works sometimes (only when camera is in a workable
> state?) pan - ioctl querycontrol error 22
> tilt - ioctl querycontrol error 22
> pan/tilt reset - ioctl querycontrol error 22

pan/tilt only work if the camera isn't streaming at a resolution higher than 
640x480. Don't ask me why.

> switch light freq filter - works
> exposure - ioctl set control error
> auto exposure - setting works but apparently always remains on
> white balance - ioctl set control error
> auto white balance - setting works but apparently always remains on

As you experienced the firmware bug, error might be caused by communication 
issues with the camera.

> > The driver already includes workarounds for various broken devices.
> > Have a look at the UVC_QUIRK_* macros in uvcvideo.h and how they are
> > associated with devices in uvc_driver.c.
> >
> > For early Logitech devices, however, no satisfying workaround has
> > been find so far.
>
> I see, what I was suggesting wasn't device specific: it's about not having
> to dig up the sources to enable/disable a hack but to be able to control
> them on the module parameter level.
>
> I don't have a clue but what I can imagine as a solution for the QC Fusion
> in particular is that it should be detected somehow when the camera gets
> into an unworkable state (failed uvc control queries or failed
> initialization) and then it should be reset or reenumerated. Basically
> doing automatically what one is doing by hand using rmmod/insmod cycles
> when it's apparent from the dmesg that the camera is probably unworkable...

If there was an easy way to detect and fix those situations I would include a 
workaround in the driver. Unfortunately, all the proposed workarounds often 
fail and they are too intrusive. I don't want to mess the code with a very 
intrusive workaround that don't even work well.

The real problem is that we have no idea today why the camera fails. There is 
a known firmware bug, but there is no explanation as to why the bug isn't 
triggered by Windows and is triggered by Linux.

> By the way recently I have seen various cameras working under
> Windows and apparently several of them are buggy enough to freeze
> or get unworkable within a certain amount of time of submitting
> video. Even original OEM Windows drivers seem to reset these cams
> repeatedly (at least it seems like it) as a solution which results
> in temporary video breakages in a video enabled Skype connection.
> So it's not unique to the QC Fusion and Linux I guess...

I hope those are not UVC cameras. I'd rather have other drivers implement all 
kind of hacks to get them working :-)

Best regards,

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

Reply via email to