06-06-2021, 12:41 AM
(06-06-2021, 12:08 AM)kqlnut Wrote: Yes, I heard back from Martijn who told me that there are different autofocus firmwares out there and that it was a bit of trial and error to find one that worked for the PinePhone's sensor. So it's possible that slightly different sensors are used in different PinePhone's and some may expect a different firmware. So the next step would be finding and trying out other auto focus firmwares.
He also confirmed that this is not a timeout issue, the firmware should start within 10 ms.
This is good to know. Basically, now we know that the provided autofocus firmware image didn't come through an "official" channel and could be the culprit itself.
(06-06-2021, 12:08 AM)kqlnut Wrote:(06-03-2021, 11:52 PM)dsimic Wrote: If you have time, maybe you could add some error checking there, recompile the kernel, and check the results?
I might have some time in the next days to get into this and also find and learn how to make available different firmwares since that's probably the most promising direction.
It's rather easy, just provide a different version of the ov5640_af.bin file in /lib/firmware. By the way, below are a few useful links I've found while searching the web; some of them contain a version of the autofocus firmware image, and some suggest that the firmware can even be "patched" to alter its behavior:
- https://android.googlesource.com/kernel/...640.h#1044
- https://android.googlesource.com/kernel/...5640.c#273
- https://www.gitmemory.com/issue/espressi.../766448873
- https://github.com/qdk0901/q98_source/bl...o/ov5640.c
- https://github.com/xupsh/Vision-Zynq/blo...t/OV5640.h
- https://github.com/ArduCAM/Arduino/blob/...s.ino#L208
- https://github.com/ArduCAM/Arduino/blob/..._regs.h#L9