-
Notifications
You must be signed in to change notification settings - Fork 359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[2.3.2.r1.4] msm: camera: actuator: Fix range for BU64747 actuator #1921
[2.3.2.r1.4] msm: camera: actuator: Fix range for BU64747 actuator #1921
Conversation
@sraase Due to the issues with the actuator range, this commit appeared to be totally necessary. Currently, the framework sends a range of 414-699. I am not sure (but I sort of hope) that this can be addressed in the userspace framework in a timely manner, so I'd like to have your opinion on this, as well. Thanks ;) |
On Tama, userspace uses the AF calibration data from EEPROM, i.e. known DAC values for macro and infinity. The framework maps those onto a 400 step step range, which the algorithms operate on. The v6 image introduced AF tuning values as well. When you set persist.vendor.camera.logVerboseMask to 0x2, restart the camera server and start the camera app, you should see the mapping in the log. On my Akari test phone, I see values between ~310 and ~780, and you should see similar values based on your testing. Could you please verify this, and do you see any difference when running with the "default" tuning (remove all other tuning files)? If needed, I can measure the AF values before the next release, but that requires ruling out a systematic error on my side first. I don't think patching the kernel is a good idea, but it may suffice as a stop-gap measure. Also, thanks for pinging me on the comment; I won't notice otherwise. :-) |
@sraase So, I tried to set the verbose mask and yeah now the output is really verbose.... By the way, I had this hack way before v6 was released (so the calibrations weren't there at all). I have pushed this thing after seeing the latest ODM drop because I was thinking that this was something that you were solving with the actual calibration, which it wasn't the case. One last thing! Example: In any case, I'm forcepushing the commit with a truly needed fix... I've just noticed that I am forcing the lens to never go to the zero position (which happens to be requested when you close the camera app)... so it never got parked correctly! Oops! :P |
The actuator has a sensible range of 250-800, where 800 is for near subjects and 250 is "infinity". Address the userspace framework issues with the actuator range by normalizing the incoming position request data in the supported range.
4d00a93
to
d5c2a49
Compare
To anyone using this PR: |
@kholk The userspace mapping is not shown until you open the camera. You should see lines like this: As far as I can tell, there are at least four layers to consider:
I only know very little about the latter two layers. On my device, the mapping table goes from 348 to 841. When doing a sweep from an Android app, the DAC values are 484-719-476 (step values 289-99-295). So even though the camera framework knows the actuator range, it will only use a small part of it. So the problems seems not to be in the driver, at least. |
@sraase With com.qti.tuned.beagle.bin: Without com.qti.tuned.beagle.bin: So it looks the... exact.. same :) |
3839797
to
1f78b61
Compare
1aa47ec
to
24d2b9e
Compare
c08de3f
to
35d2ea7
Compare
f56ce1c
to
3082682
Compare
2344865
to
d7f09e2
Compare
The actuator has a sensible range of 250-800, where 800 is
for near subjects and 250 is "infinity".
Address the userspace framework issues with the actuator range
by normalizing the incoming position request data in the
supported range.
Tested on SoMC Tama Akatsuki RoW.