Users with these webcams please test this patch.
( $ git apply 0001-Auto...
$ make
$ sudo make rmmod
$ sudo make insmod )
GWater
Sorry, but it doesn't work for my 624f-cam (ov9650 sensor) :(
GWater
This patch is just 1 of the patches that need testing, here is the
full list of patches that need testing
https://groups.google.com/group/microdia/browse_thread/thread/497a71f5bf2e2f14
(this patch is also included in the bigger list, so you just need to
test the above 9 patches.
To apply patches, download them into the latest microdia driver source
code directory, then
$ git apply ./<patchfile.patch>
OR
$ git am ./<patchfile.patch>
-JoJo
2008/8/16 Kuzja <kuznet...@gmail.com>:
2008/8/21 Kuzja <kuznet...@gmail.com>:
2008/8/23 GWater <grew...@googlemail.com>:
Yeah the problem is calling it ov96xx_set_autoexposure isn't really
any more accurate, since it will work for the ov76xx series as well.
So maybe it would be better named simply something like
ov_set_exposure, but then i'm not sure where exactly to put it, should
we make a new file simply called omnivision.c and combine the contents
of the various ov*.c files into it. Or leave them separate but put
only common functions into the new omnivision.c file? When i was
merging things i wasn't entirely the sure th best way to go about this
since while the register set is certainly different among the various
omnivision sensors there are certain things that are teh same for
every one i've looked at. what do you think?
About the ov965x_set_exposure function i didn't originally write that
one it used to be called 624f_set_exposure. And yeah its not really
adjusting the exposure value at all the registers it adjusts are
updated when enabling night mode on omnivision sensors. the effects it
has are basically to make then image brighter and lower the frame
rate. But it may be better to change to to actually update the
exposure value instead.
Yeah the default values should safely be able to be removed in the
ov965x_initialize function. I simply didn't bother to do more then
remove the duplicate writes that were originally being done. Also
once you separate your sensor init from the bridge init can i ask you
play around with using the bridge init set form my 624f_start_stream
there should be no real reason why all the devices can't end up using
the same bridge init and being able to eventually do so will reduce
the mount of code a lot as well.
2008/8/23 GWater <grew...@googlemail.com>:
Hi Brian
yes it would appear so...
the commit 8063bf44e8ffac breaks apps like skype/ekiga, while
mplayer/cheese work fine
(as you pointed out mplayer 640x420 & 320x240 both work fine, however)
and yes I tried working on your 9th pending patch, however stream
refuses to start w/o that write to 1189.
-JoJo
Also JoJo if it seems that the write to 1189 is necessary to get your
start_stream function working right can you try doing that write from
within the intialization fucntion instead that way it will get the
right value but won't overwrite the the scaling factor.
look under "The debugfs interface"
-JoJo
A resulting problem will be the ov*.h files since we will have different
defines for one general register like 0x13.
There are a two ways to solve that:
1. Use no defines in general functions but comments for explanation and
keep different "ov*.h" files fo each sensor.
2. Merge "ov*.h" files to "omnivision.h". Structure it like
"omnivision.c" but loose the connection to the datasheets.
I am in favour of the first one. One omvision.c, many ov*.h.
[set_exposure]
I agree.
[sensor_init]
I'll try that.
GWater
Brian Johnson schrieb:
We're probably headed that way, first started with init/start/stop sequences,
which had both bridge r/w & sensor r/w interwined. Then we seperated
bridge & sensors,
>
> A resulting problem will be the ov*.h files since we will have different
> defines for one general register like 0x13.
> There are a two ways to solve that:
>
> 1. Use no defines in general functions but comments for explanation and
> keep different "ov*.h" files fo each sensor.
>
> 2. Merge "ov*.h" files to "omnivision.h". Structure it like
> "omnivision.c" but loose the connection to the datasheets.
>
> I am in favour of the first one. One omvision.c, many ov*.h.
>
Lets start with 1 set of functions for a unique sensor,
later we can decide which functionality can be merged together
if a register like 0x13 has a friendly/meaningful name, use it.
>
> [set_exposure]
> I agree.
>
This is a bit more complicated than that...
exposure & auto-exposure feature are available in both Sensor & Bridge,
so if we have the know-how to implement this feature in Bridge, do it there
while leaving the sensor at the best possible output value.
in case we don't know how to enable/disable or otherwise use this
feature in Bridge
we need to use the sensor documentation to implement it there.
so we either keep the sensor exposure values constant & vary the
bridge exposure values or
forget about the bridge & vary the sensor exposure values directly.
-JoJo
GWater
> ov965x_set_exposure is a bit strange - none of the datasheets assigns
> the registers 0x2d and 0x2e to an exposure value. What exactly does this
> function do? Could you add doxygen comments?
It seems that ov965x spec lies. Maybe you've noticed that initialize function
of ov9650 makes many writes to undocumented\reserved registers\bits.
I've tried to use exposure regs address from spec, but it doesn't work :(
maybe sensor in 624f cam is not a ov9650 sensor? Or some kind modified
ov9650?
Regards
Vasily
GWater
> Did you check whether AEC was enabled - if not maybe the sensor
> automatically reset the values. ov9625 spec works perfectly for my cam.
>
> GWater
Tried with AEC enabled and disabled... It seems that sensor in 624f do not
react on enabling\disabling AEC, or something wrong with stable range of AEC.
It's strange because AGC and AWB works (it's bits of same reg as for AEC)
Maybe we need to write our own sensor init func, without writes to
undocumented regs? :)
Regards
Vasily
Hi Vasily
OV7660 data sheet says
2D ADVFL 00 RW LSB of insert dummy lines in vertical direction (1 bit
equals 1 line)
2E ADVFH 00 RW MSB of insert dummy lines in vertical direction
there isn't just 1 register that we can tune and get the exposure that we want,
Last I checked there were a group of 3 or more registers being written
to / read from
the specs don't lie, it's just that Omnivision could be least bothered
to document them properly ;-0
-JoJo
Bridge is more capable to better calculate / self adjust exposure on-the-fly
Bridge has registers that moniter various parameters, take their average,
and we can set the gain etc as a value derived from these averages etc.
(There's a reason 'Dem EE guys put these nifty things in there ;-)
-JoJo
> Hi Vasily
>
> OV7660 data sheet says
> 2D ADVFL 00 RW LSB of insert dummy lines in vertical direction (1 bit
> equals 1 line)
> 2E ADVFH 00 RW MSB of insert dummy lines in vertical direction
But writes to changing values in these regs causes changing exposure... Maybe
sensor in 624f is not a OV9650.
> there isn't just 1 register that we can tune and get the exposure that we
> want, Last I checked there were a group of 3 or more registers being
> written to / read from
>
> the specs don't lie, it's just that Omnivision could be least bothered
> to document them properly ;-0
maybe, but why things that were wrote in spec do not fit things that really
happen? :)
> -JoJo
Anyway - since auto-exposure is currently the most comfortable method to
use in the sensor we don't need functions to set a fixed exposure in the
sensors. Let's find the bridge setting (it's 1 bit among ~3000).
GWater