Those error messages are from overlayLib in hardware/qcom/display/liboverlay. Inside overlayLib.h here we have a class Overlay. I wonder if this is the overlay that should be included in cameraHal? The interface is not quite the same though...
EDIT: This overlay stuff also seems to have a lot to do with the kernel framebuffer driver, so that is something to keep in mind as well.
EDIT2: Or maybe camerahal doesn't really need an overlay, and we need to just update what's in frameworks.
EDIT3: I realized I never mentioned on here but I have been hanging out in irc, might be good to talk there sometime.
Sorry for not responding with more info, I was fighting to keep my eyes open after that first post.
Yes, since the overlay is tied to the hardware, I wanted to incorporate it, since from everything I see it should be enabled. Once enabled, I saw the errors and went about finding a solution. This led me to an old CM9 I had on disk, to see what mantera did, and that is how I got where I am now. I uploaded all the camera source I had handy, to make it easier for anybody who wants to help, there is a readme in it briefly describing what everything is. This may help to figure out what we are missing.
Moto_Triumph_various_camera_source_2-26-13
I have never really used irc, but I would be willing to get on and discuss this in more depth.
I could never quite wrap my heard around why we need both libcamera.so and camera.msm7x30.so: clearly the app needs the former and the mediaserver needs the latter. But, why doesn't the app just use camera.msm7x30.so?
Now, it is looking like this scheme is essentially copied for the overlay library, which we will have in both frameworks and camera.msm7x30.so... something is rotten.
I guess the immediate options are to either 1) completely remove overlay from camerHal or 2) update cameraHal to use qcom overlayLib. Does one of these make more sense to you than the other?
Also, do you know offhand if we have a similar problem with overlayLib/framebuffer as we did with kernel/camera stuff (possibly mismatched version, etc)?
I am pretty sure the camera.msm7x30.so is new to ICS, it is the reason the camera is so hard to get working on ICS for devices that never got the update.
I think that the overlay files are included in the cameraHal so it is a complete package, but then again the QualcommCameraHardware does include the frameworks file. So, yeah it is confusing, plus the renaming of the OverlayHtc to Overlay in the cameraHal is confusing. Why not just leave it as OverlayHtc?
My gut feeling is that we need to rewrite the overlay code in the cameraHal to match the Overlay files. It seems that while the phone that the HTC files are for may be the same SOC, we do not have an HTC phone. Also, the line in the logcat about acousticHtc.so, or whatever, not being found kinda perplexed me, I am wondering if it is tied to the BOARD_USES_HTC_CAMERA, since that is the only flag we have set that relates to HTC. Plus the flag only seems to be in our BoardConfig and frameworks/base/libs/ui/Android.mk. While the flag is in manteras BoardConfig it is not in frameworks, nor the OverlayHtc files. Neither of the frameworks Overlay files are included in stock source.
As far as I can tell the Overlay should match our kernel, since we use manteras kernel and he is the one that put the Overlay files in. The other mismatches are due to us having so many phones to choose from, while we were stuck at froyo most of the others got GB, and Isaac used the libs from the Cherry ROM to get the camera working in CM7, then the files just got used as ours since they worked. Basically at points we were using libs from both Sharp and Cherry GB ROMS, but I had no hand in that, so I can't tell you what is what. I just compare the variant ROMs to our proprietary files to see where they come from, they are different depending on whose repo you pull. I am pretty sure my device files are using just Cherry and Stock files, I figure that is the best way to go since they use the same kernel for the most part and Sharp uses the 2.6.35.7 kernel and is setup for 3GVM_SPLIT, while we and all the other variants use 2GVM_SPLIT.
My issue with the overlay is, I don't know how to rewrite the overlay in the cameraHal, it is over my head. Before the changes to get the camera taking pictures, I was using the Overlay files but leaving the camera stuff pointing to OverlayHtc and it still worked like it did just different errors. I am pretty sure that is how I built the PA Camera Test that I posted, I know for sure that I had commented out the BOARD_USES_HTC_CAMERA. But now, with the fixes, building that way breaks the camera. The app opens and has no preview and will flash but not save the picture, it even focuses, you can hear it.
SIDE NOTE: I have been thinking that the issue is not with the focus but with the zoom, or maybe the way focus uses the zoom. Since I had messed with Camera Mod for Xperia PLAY from the playstore, and they have no zoom, I tried it out and you can hear the camera zoom when it focuses when you take a picture, but it does not go all crazy in video mode.