Jump to content

  1. 0
  2. 0
  3. 0/5

Rate this Topic

* * * * -
8 votes

[DEV] ICS Camera + HD video HW acceleration Fix

  • Please log in to reply

sananth

sananth

Average Android

  • 4 posts

Posted 24 July 2012 - 08:04 PM #141

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!
  • 4 Likes

oldpapa49

oldpapa49

Android Beginner

  • 175 posts

Posted 31 July 2012 - 02:58 PM #142

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...
  • 0 Likes

Dorregaray

Dorregaray

Super User

Posted 06 August 2012 - 11:02 AM #143

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.
  • 5 Likes

sananth

sananth

Average Android

  • 4 posts

Posted 06 August 2012 - 06:53 PM #144

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! :-)
  • 0 Likes

Dorregaray

Dorregaray

Super User

Posted 10 August 2012 - 05:52 AM #145

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.
  • 1 Likes

vbelo

vbelo

Average Android

  • 2 posts

Posted 10 August 2012 - 07:43 AM #146

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.

  • 0 Likes

wiresandstuff

wiresandstuff

Average Android

  • 7 posts

Posted 16 August 2012 - 08:49 AM #147

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.

  • 0 Likes

0082

0082

Average Android

  • 1 posts

Posted 16 August 2012 - 12:11 PM #148

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

Dorregaray

Dorregaray

Super User

Posted 24 August 2012 - 10:30 AM #149

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
  • 9 Likes

ktklein72

ktklein72

Android Apprentice

Posted 24 August 2012 - 11:34 AM #150

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
  • 0 Likes