[WIP] - ICS Camera HAL for 2.6 kernel

Search This thread
H

hoffmas

Guest
just tried it on desire z (androdamus alpha 7)...

first with the libs inside the zip, then i took the libs from cm7.1 for my device...

didn´t work, but i did not flash the boot image through fastboot...

EDIT: my skills are not good enough for this, i will leave it to someone else
 
Last edited:

jwhood

Senior Member
Mar 4, 2011
1,080
195
baltimore,md
I have mt4g creamedglacier 6.0 ics, ive been trying to get this to work,if i flash the boot.img in fastboot
Will it brick my phone????
Sent frm the home of the "wire"
 
Last edited:
The hal code itself is generic, but it depends on libcamera.so, which inturn depends on kernel structs and constants to match the running kernel for successful control ioctls/pmem etc.

That is not "generic" by nature and sounds like it was written for a very specific kernel. I will wait for the source to modify it for the current "common" ics kernel, as most other devices are using the same ioctl and pmem configurations.

Sent from my ADR6400L using Tapatalk
 
  • Like
Reactions: nickaren

rapmv78

Senior Member
May 9, 2010
113
791
I have mt4g creamedglacier 6.0 ics, ive been trying to get this to work,if i flash the boot.img in fastboot
Will it brick my phone????
Sent frm the home of the "wire"

It will render your phone unusable since you are flashing a wrong kernel. May not brick if you can recover from bad kernel flashes. I am working with Nicgraner. Hopefully will have something for you to use.
 
  • Like
Reactions: jwhood

jwhood

Senior Member
Mar 4, 2011
1,080
195
baltimore,md
Great bro thats who i was speaking with when i first seen your post a few days ago he was trying to get it to work but couldnt get it to,glad to see that ill stop taking up space on threads and thanks again for your hard work!!! : )

Sent from my HTC Glacier using xda premium
 

rapmv78

Senior Member
May 9, 2010
113
791
I do not get those black lines, except in video mode (which I am trying to fix). Can someone post a screenshot? Also If anyone can try flashing the boot-new.img from the zip file (note that your wifi may stop working) and see if that makes it go away, then it could be a kernel issue. You can go back to using the boot.img from the original ROM once you are done checking.
 
  • Like
Reactions: sucon and j00m

j00m

Senior Member
Aug 3, 2010
312
238
j00m.exnix.org
I do not get those black lines, except in video mode (which I am trying to fix). Can someone post a screenshot? Also If anyone can try flashing the boot-new.img from the zip file (note that your wifi may stop working) and see if that makes it go away, then it could be a kernel issue. You can go back to using the boot.img from the original ROM once you are done checking.

flashed the boot-new.img, still same issue.

camera mode: only has some black lines about 1-2 cm on left screen, show random.

in video mode: full black lines which that knowns issue.

Hope will fix it.
 

mulerokeh

Senior Member
Apr 22, 2010
144
19
Jakarta
i can't zoom in or out, anyone have same problem?
phone also like not responding for a while after take 2 or 3 photos..

Sent from my Nexus One using xda premium
 

rapmv78

Senior Member
May 9, 2010
113
791
i can't zoom in or out, anyone have same problem?
phone also like not responding for a while after take 2 or 3 photos..

Sent from my Nexus One using xda premium

Are you using the new HAL from this thread? The one from the other thread had that issue, which should be fixed with this one. If you are still having issues, can you post logcat?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 142
    I have re-written the ICS camera HAL module to be a thin wrapper for the gingerbread libcamera.so and hence it will only work with the 2.6 kernel. The advantage is that getting to gingerbread level functionality should be quick :) Creating a new thread because there is a slight chance that this will work for all qualcomm devices with existing libcamera.so files (with slight mods ofcourse :))

    http://www.mediafire.com/download.php?wjf035mz2vzunw4

    Here is a zip file which contains the new camera HAL module. README file accompanying it has instructions on the locations for the files. If you already have the previous version of camera HAL working, all you have to do is replace camera.qsd8k.so and libcamera.so with the ones in the zip file.

    What works:
    1) Preview works.
    2) Taking a picture works pretty well.
    3) Size of picture is no longer huge.
    4) Software zoom works.
    5) Most of the other knobs like focus, file size etc. seemed to work as well in my testing.
    6) Pretty stable as far as I can see :)

    Not working yet:
    Video and other fancy stuff.

    If people have requests for other qualcomm devices after having tried the HAL included in the zip file, kindly include the following information.
    1) logcat from having used the HAL module.
    2) build.prop
    3) libcamera.so from gingerbread ROM for the device.
    4) liboemcamera.so from gingerbread ROM.

    Currently known to work on the following devices:
    1) Nexus One.
    2) HTC Desire
    3) HTC HD2

    Enjoy and thanks for all the feedback.
    55
    Updates:

    02/09/2012

    Working barcode scanner mode

    Flashable zip file (should work with texasice's ROMs)
    http://www.mediafire.com/?w4fu0u05qtxq3tu

    01/30/2012
    Working Panorama mode

    Flashable zip file (should work with texasice's ROMs)
    http://www.mediafire.com/?5r599m5jg5yfaqn

    Known issues:
    Sometimes screen has some garbage while in Panorama mode viewfinder. Quitting completely from the app and restart or invoking Gallery from inside the app and returning back to camera app should mostly fix it.

    Video enabled version:

    Fastboot compatible images compiled from evervolv base:

    For Stock hboot :
    http://www.mediafire.com/?wdlip7h6necetia

    For HBoot(s) supporting larger /system partition
    http://www.mediafire.com/?f6rz3sz2r97qln0

    Source code is now available at
    https://github.com/rapmv78/
    14
    Got video to work finally with hardware encoder support as well. It is not as smooth as I would like it to, but I do not know what the issue is. I could see that all frames were encoded, so the issue is probably in the encoder or my SD card is slow. Would like some feedback on whether others see some stutters too or not. Updated the second post with new fastboot system images. Also source code is now available on my github, as promised :) DISCLAIMER: The code has a bunch of hacks and is not very clean, as I did not get much time to clean it up before sharing.

    For people with non-nexus devices, you can use the source code to compile your own or here is just the HAL module as a separate download

    http://www.mediafire.com/?87nizd1jrx01j49

    You also need

    media_profiles.xml which should to into /system/etc/

    http://www.mediafire.com/?ig6t931i8h3zhzf

    libmediaplayer.so which should go into /system/lib/

    http://www.mediafire.com/?8jb64a94tdfe4vp

    Here are the source changes for libmediaplayer.so
    --- a/frameworks/base/media/libmediaplayerservice/StagefrightRecorder.cpp
    +++ b/frameworks/base/media/libmediaplayerservice/StagefrightRecorder.cpp

    uint32_t encoder_flags = 0;
    - if (mIsMetaDataStoredInVideoBuffers) {
    + if (0 && mIsMetaDataStoredInVideoBuffers) {
    encoder_flags |= OMXCodec::kHardwareCodecsOnly;
    encoder_flags |= OMXCodec::kStoreMetaDataInVideoBuffers;
    }

    Enjoy!!
    13
    Just updated the second post with a new flashable zip to enable panorama mode.
    The black lines should be either completely gone or very rare as far as I can tell.
    A bonus, Gallery hanging randomly should be fixed as well.
    Enjoy and thanks a lot for your feedback. Please keep them coming.
    12
    Have updated the post with another flashable zip file which should fix colors for the panorama mode and also the barcode scanner mode should work now.

    Enjoy!!