[cpia] CPiA colour balance problem [patch]

Peter Pregler Peter.Pregler@risc.uni-linz.ac.at
Sun, 05 Mar 2000 23:19:51 +0100 (CET)


On 05-Mar-2000 rich@annexia.org wrote:
> cpia.c(49441257):save_camera_state(2335):1/0/0/1/0/0/192/128
> 
> Note that the values printed out for red_comp, green?_comp and
> blue_comp in save_camera_state are wrong.
> 
> Any ideas? These seem to be read straight from the camera.

No idea, but please try the following. There are exactly two points in cpia.c
that control if the _comp-values are actually written to the camera. If you
switch that off the compensation is only controlled by firmware. So we should
be able to determine if this is a firmware-problem or some driver stuff. The
lines in question are:

- in reset_camera_struct set cam->params.exposure.compMode = 0;
- in set_camera_state change the first do_command_extened from

        do_command_extended(cam, CPIA_COMMAND_SetExposure
                            cam->params.exposure.gainMode, 1, 1,
to
        do_command_extended(cam, CPIA_COMMAND_SetExposure
                            cam->params.exposure.gainMode, 1, 0,

After that the exposure compensations for the color channels are not changed
anymore by the driver (unless I missed something ;). 

Before I forget it: your color-balance patch works fine! Checked it with the
control-client and a watch of /proc. I guess I have to implement
status-readback in the control-client so one can see the color-gain sliders move
automagically. That would be cool. :)

-Peter

-------------------------------
Even the thought that a ship was waiting to take him back to Earth
did not wipe out the sense of loss he felt at that moment.
-------------------------------
Email: Peter.Pregler@risc.uni-linz.ac.at
Peter Pregler / RISC, University of Linz, Austria