[pxc] AGC on generic Bt and/or PXC200*
Alessandro Rubini
rubini@gnu.org
Fri, 31 May 2002 16:24:32 +0200
Since the sponsor asked for agc disabling too, and since my arm system
now happily boots, I found motivation and time to investigate the issue.
Now, CAGC has no effect on luma. Bit 4 of ADC interface register on
the other hand disables the AGC, but if it's disabled a reference
voltage is needed. To my understanding, the 878 auto-generates its
input reference voltage for the ADC, so when the camera is first
connected it's 0 and the image is saturated. This the description:
[4] RW 0 AGC_EN
This bit controls the AGC function. If disabled REFOUT is not
driven, and an external reference voltage must be provided. If
enabled, REFOUT is driven to control the A/D reference voltage.
0 = AGC enabled
1 = AGC disabled
Disabling it I've a full-white image no matter what.
If you are curious, I'm using phob:
rudo% ./phob_io /dev/phob/0 0:68
read 4 bytes from '0':0x00000068 -- 0x00000082
rudo% ./phob_io /dev/phob/0 0:68=92
wrote 1 bytes to '0':0x00000068
rudo% ./phob_io /dev/phob/0 0:68=82
wrote 1 bytes to '0':0x00000068
[setting to 92 made the image white]
Changing bit 0 (that should make it adaptive or not) makes no
difference. Seeting bit 2 make the image black.
So the answer is no: there is no way to turn off autogain in a plain-878
device. The external voltage reference (programmable, but external) is one
of the features that make the PXC200 better for real-world use as opposed
to the toy-878 devices.
Note that contrast and brightness control is independent of this
auto-gain. Actually, my solution to this problem is adding
brightness/contrast controls to pxc_xgrab. It's a workaround rather
than a solution, but it's enough for my client in this case.
/alessandro