Vom: Fri, 14 Dec 2007 10:14:27 +0100

Hi,

i had the same problem with the reset of brightness/agc.

> > look at pwc-if.c :
> > 
> >          /* Initialize the webcam to sane value */
> >          pwc_set_brightness(pdev, 0x7fff);
> >          pwc_set_agc(pdev, 1, 0);
> > 
> > and delete that pwc_set_agc line, and perhaps the other one, too. I
> > didn't try it, but a while ago, I did help someone about this: I
> > told him to try this and he said it worked.

I attached a patch that does it a bit cleaner. It adds a "no_reset"
module-parameter. If the driver is loaded with "no_reset=1" then the
reset is skipped and the camera settings are preserved over multiple
pwc_video_open() calls. The default is to stuck to the old behaviour
although i don't think it would cause trouble otherwise. You can decide
about that better.

> the line mathieu mentioned worked for me with the little side effect,
> that the led doesn't turn off after the device isn't used anymore. 
> 

I doubt this is related to pwc_set_agc() not beeing present and I don't
share your experience (using ID 046d:08b0 Logitech, Inc. QuickCam 3000
Pro [pwc])

If there is a relation one could save the agc-setting module-wide and
re-initialize the previous state in pwc_video_open()

Please include the patch (or alike) since with such a reset the driver
is unusable for me (and i guess a bunch of others, too ;)


best regards

-- 
rigid

Keep your boss's boss off your boss's back.

PGP Key available.
diff pwc.orig/pwc-if.c pwc/pwc-if.c
55a56
>    - D. Hiepler: module-parameter to skip camera reset in pwc_video_open()
133a135
> static int no_reset = 0;
1188,1190c1190,1197
< 	/* Initialize the webcam to sane value */
< 	pwc_set_brightness(pdev, 0x7fff);
< 	pwc_set_agc(pdev, 1, 0);
---
> 	/* Initialize the webcam to sane value 
> 	   (if not overriden by module-parameter) */
> 	if(no_reset == 0)
> 	{
> 		PWC_DEBUG_OPEN("Resetting camera to sane state.\n");
> 	        pwc_set_brightness(pdev, 0x7fff);
> 	        pwc_set_agc(pdev, 1, 0);
> 	}
1854a1862
> 
1868a1877
> module_param(no_reset, int, 0444);
1878a1888
> MODULE_PARM_DESC(no_reset, "Don't reset device when opened. (Preserve camera-settings while module is loaded)");
_______________________________________________
pwc mailing list
[email protected]
http://lists.saillard.org/mailman/listinfo/pwc

Reply via email to