Jump to content


* * * * - 8 votes

[DEV] ICS Camera + HD video HW acceleration Fix


  • Please log in to reply

#141 sananth

sananth

    Average Android

  • Members
  • 4 posts

Posted 24 July 2012 - 08:04 PM

No, taking pictures does not work at all. The images coming from the camera are displayed using the overlay. When you click on the button to take a photo, the image shown is grabbed from the buffer and saved. However, the image sent from the camera to the overlay (or any other app) is blank, since the HAL is still being worked on.

The overlay is sort of the best way to debug the images coming in from the camera sensor (since it bypasses different layers when showing up on the screen). Once the overlay starts showing images, we should be in good shape. I am trying to see if I can figure it out in order to help Dorregaray, but if anyone else has some knowledge to share (like experience with reverse engineering camera drivers on other devices), please share!

#142 oldpapa49

oldpapa49

    Android Beginner

  • Members
  • 166 posts

Posted 31 July 2012 - 02:58 PM

Vacation over Dude, hope to it!

Just kidding, hope you had a great time on Vacation.. Post pictures and all... Slide Show..

My Family Vacation..

Hehe...

#143 Dorregaray

Dorregaray

    Super User

  • 383 posts

Posted 06 August 2012 - 11:02 AM

View Postsananth, on 24 July 2012 - 08:04 PM, said:

However, the image sent from the camera to the overlay (or any other app) is blank, since the HAL is still being worked on.
The image is blank because the HAL is not starting the preview (in dmesg you will see no start preview command being passed to kernel).
If you edit the camera_start_preview method in device/hp/tenderloin/camerahal/cameraHAL.cpp and remove the
if (dev->window == 0) {
    return 0;
}
you will see the preview will be started but the logcat will complain with message:
lockIfMessageWanted(16): dropped unwanted message
because the camera service is not expecting the preview to be running after calling startPreview in ICS (sic!) for the first time (and not everything is being initialized for it). With the code above the preview won't be started until the preview window (and overlay) is initialized but it does not work either.

#144 sananth

sananth

    Average Android

  • Members
  • 4 posts

Posted 06 August 2012 - 06:53 PM

View PostDorregaray, on 06 August 2012 - 11:02 AM, said:

The image is blank because the HAL is not starting the preview (in dmesg you will see no start preview command being passed to kernel).
If you edit the camera_start_preview method in device/hp/tenderloin/camerahal/cameraHAL.cpp and remove the
if (dev->window == 0) {
	return 0;
}
you will see the preview will be started but the logcat will complain with message:
lockIfMessageWanted(16): dropped unwanted message
because the camera service is not expecting the preview to be running after calling startPreview in ICS (sic!) for the first time (and not everything is being initialized for it). With the code above the preview won't be started until the preview window (and overlay) is initialized but it does not work either.

Thanks for the info Dorregaray! Let me try that. In case there is some specific section of code you want me to look at (in order to get the overlay initialization or other sections for startPreview), please PM me. I am just trying to see if I can reduce your burden while learning something new :-)

Also, welcome back! Hope you had a nice vacation! :-)

#145 Dorregaray

Dorregaray

    Super User

  • 383 posts

Posted 10 August 2012 - 05:52 AM

Thanks, the vacations were very nice. Unfortunately I don't have much time to work on camera right now.

However it would be great to have the sequence of commands issued by the Camera app via CameraService (frameworks/base/services/camera/libcameraservice/CameraService.cpp) so we could figure out the right sentence of the operations. Maybe the logcat from any ICS running device with working camera (especially running snapdragon) may be helpful. I don't have such device so if there's anyone willing help it would be great.

#146 vbelo

vbelo

    Average Android

  • Members
  • 2 posts

Posted 10 August 2012 - 07:43 AM

Could this thread help you ? http://forum.xda-dev...d.php?t=1427030
A logcat is included in the zip (even if you don't use the same HAL, it's Qualcomm but not Snapdragon).

This could also help you (not 100% working, but many useful informations) :
http://forum.xda-dev...at#post29238355

Edited by vbelo, 10 August 2012 - 07:53 AM.


#147 wiresandstuff

wiresandstuff

    Average Android

  • Members
  • 7 posts

Posted 16 August 2012 - 08:49 AM

Very sad to see no posts in a long time in here, I appreciate everyones efforts so much, and wish i had the technical ability with developing to assist. Still keeping my fingers crossed at a working camera for the cm9 touchpad. As i can tell from the posts and the work, you guys definately are smart cookies, and i will keep the faith that one day i can use my touchpad with all the important hardware working.

Edited by wiresandstuff, 16 August 2012 - 08:50 AM.


#148 0082

0082

    Average Android

  • Members
  • 1 posts

Posted 16 August 2012 - 12:11 PM

me too, look forward to the Best person to get the camera working. Thanks!

#149 Dorregaray

Dorregaray

    Super User

  • 383 posts

Posted 24 August 2012 - 10:30 AM

The good news is that I've fixed (in ugly way) the crash during preview start and was able to see the first preview frame :-)
Unfortunately just after that I got another crash :-D

#150 ktklein72

ktklein72

    Android Apprentice

  • Members
  • 163 posts

Posted 24 August 2012 - 11:34 AM

Call it a baby step but its still progress and a step in the right direction!

Sent from my HP TouchPad using TapaTalk 2.2.6