[WIP] - JB Camera HAL for 2.6 kernel

Search This thread

Rashed97

Inactive Recognized Developer
May 28, 2012
1,624
10,632
Hello everyone!!!
This is a continuation of rapmv78's ICS Camera HAL for 2.6 kernel. Great thanks to nobodyAtall who helped get this working :D

THINGS YOU WILL NEED:
A working ICS ROM for your device
A lot of time ;)

Now this can be adapted to any phone, but it is designed for the LG Optimus One (P500)
I will upload the panorama fix to my GitHub as soon as I finish porting the code for it

SOURCES:
https://github.com/androidarmv6/android_device_libcamera
Camera app changes coming soon!
Frameworks changes coming soon!

TO FIX VIDEO RECORDING AND PLAYBACK:
To fix video you will need the lib/libstagefright_soft_aacdec.so file from your ICS ROM. Setup a vendor pregenerated lib by adding that .so to your COMMONFOLDERNAME/proprietary/lib/libstagefright_soft_aacdec.so

TO INSTALL:
1. Follow the instructions in the READMEs in the repos ;)
2. In your BoardConfigCommon.mk, delete the following lines IF THEY EXIST:
(Note: these are scattered all over the file, so look for them)
  • COMMON_GLOBAL_CFLAGS += -DICS_CAMERA_BLOB
  • TARGET_USE_OVERLAY := false
  • TARGET_HAVE_BYPASS := false
  • TARGET_USES_C2D_COMPOSITION := false
  • COMMON_GLOBAL_CFLAGS += -DREFRESH_RATE=60
3. Now add these lines to your BoardConfigCommon.mk
  • TARGET_DISABLE_ARM_PIE := true
  • TARGET_BOOTANIMATION_USE_RGB565 := true
  • TARGET_BOOTANIMATION_TEXTURE_CACHE := true
  • Note that the following 2 might not be needed based on your device, but most devices will need them
  • TARGET_NO_HW_VSYNC := true
  • COMMON_GLOBAL_CFLAGS += -DQCOM_NO_SECURE_PLAYBACK
4. Edit the files in the DEVICE/libcamera folder to suit your device

Again, thanks to nobodyAtall for getting this to work!!!
 
Last edited:

a2441918

Inactive Recognized Developer / Senior Member
Jan 1, 2011
1,521
3,613
New York
How to do this "Setup a vendor pregenerated lib by adding that .so to your COMMONFOLDERNAME/proprietary/lib/libstagefright_soft_aacdec.so"??

I have an x10 and camera works but with small grey bar at the bottom in 8 Mpx but 6MPx works fine.. No video recording nd panaroma..
 

pluGinSz

Senior Member
Aug 2, 2012
279
67
Hello everyone!!!
This is a continuation of rapmv78's ICS Camera HAL for 2.6 kernel. Great thanks to nobodyAtall who helped get this working :D

THINGS YOU WILL NEED:
A working ICS ROM for your device
A lot of time ;)

Now this can be adapted to any phone, but it is designed for the LG Optimus One (P500)
I will upload the panorama fix to my GitHub as soon as I finish porting the code for it

SOURCES:
https://github.com/Rashed97/android_device_libcamera
Camera app changes coming soon!
Frameworks changes coming soon!

TO FIX VIDEO RECORDING AND PLAYBACK:
To fix video you will need the lib/libstagefright_soft_aacdec.so file from your ICS ROM. Setup a vendor pregenerated lib by adding that .so to your COMMONFOLDERNAME/proprietary/lib/libstagefright_soft_aacdec.so

TO INSTALL:
1. Follow the instructions in the READMEs in the repos ;)
2. In your BoardConfigCommon.mk, delete the following lines IF THEY EXIST:
(Note: these are scattered all over the file, so look for them)
  • COMMON_GLOBAL_CFLAGS += -DICS_CAMERA_BLOB
  • TARGET_USE_OVERLAY := false
  • TARGET_HAVE_BYPASS := false
  • TARGET_USES_C2D_COMPOSITION := false
  • COMMON_GLOBAL_CFLAGS += -DREFRESH_RATE=60
3. Now add these lines to your BoardConfigCommon.mk
  • TARGET_DISABLE_ARM_PIE := true
  • TARGET_BOOTANIMATION_USE_RGB565 := true
  • TARGET_BOOTANIMATION_TEXTURE_CACHE := true
  • Note that the following 2 might not be needed based on your device, but most devices will need them
  • TARGET_NO_HW_VSYNC := true
  • COMMON_GLOBAL_CFLAGS += -DQCOM_NO_SECURE_PLAYBACK
4. Edit the files in the DEVICE/libcamera folder to suit your device

Again, thanks to nobodyAtall for getting this to work!!!

Read me only shows this message "This directory contains code for the Jelly Bean Camera HAL"
BTW where do we replace the files ? Where does BoardConfigCommon.mk file exist ?
 
Last edited:

Rashed97

Inactive Recognized Developer
May 28, 2012
1,624
10,632
Put the file in the /vendor/MANUFACTURER/DEVICE/proprietary/lib/
Add this line to your vendor-DEVICE-blobs.mk: (Note: Make sure it's the second to last line, not the last line)
vendor/COMPANY/DEVICE/proprietary/lib/libstagefright_soft_aacdec.so:system/lib/libstagefright_soft_aacdec.so \

Also here is an example of a common repo where you need to make all these changes:
https://github.com/lgics/cm_device_lge_msm7x27-common

And the vendor for the video:
https://github.com/lgics/cm_vendor_lge
 

asdfzz

Senior Member
Mar 10, 2012
1,266
1,613
take credit to erikcas for vide LQ

For camera on LG p690/e510 it doesnt work..we cant take picts... pano works :s
 

lagloose

Senior Member
Feb 11, 2008
728
2,969
Use proprietary files from GB ?

Sent from my GT-S5830 using xda app-developers app
 

goodoane

Senior Member
Jul 22, 2007
369
183
Any way to use prprietary file from froyo 2.2.2 the only official available for a Huawei S7 tablet with snapdragon and adreno 200 ?...
Or other hack to make camera working.
Thank you.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 22
    Hello everyone!!!
    This is a continuation of rapmv78's ICS Camera HAL for 2.6 kernel. Great thanks to nobodyAtall who helped get this working :D

    THINGS YOU WILL NEED:
    A working ICS ROM for your device
    A lot of time ;)

    Now this can be adapted to any phone, but it is designed for the LG Optimus One (P500)
    I will upload the panorama fix to my GitHub as soon as I finish porting the code for it

    SOURCES:
    https://github.com/androidarmv6/android_device_libcamera
    Camera app changes coming soon!
    Frameworks changes coming soon!

    TO FIX VIDEO RECORDING AND PLAYBACK:
    To fix video you will need the lib/libstagefright_soft_aacdec.so file from your ICS ROM. Setup a vendor pregenerated lib by adding that .so to your COMMONFOLDERNAME/proprietary/lib/libstagefright_soft_aacdec.so

    TO INSTALL:
    1. Follow the instructions in the READMEs in the repos ;)
    2. In your BoardConfigCommon.mk, delete the following lines IF THEY EXIST:
    (Note: these are scattered all over the file, so look for them)
    • COMMON_GLOBAL_CFLAGS += -DICS_CAMERA_BLOB
    • TARGET_USE_OVERLAY := false
    • TARGET_HAVE_BYPASS := false
    • TARGET_USES_C2D_COMPOSITION := false
    • COMMON_GLOBAL_CFLAGS += -DREFRESH_RATE=60
    3. Now add these lines to your BoardConfigCommon.mk
    • TARGET_DISABLE_ARM_PIE := true
    • TARGET_BOOTANIMATION_USE_RGB565 := true
    • TARGET_BOOTANIMATION_TEXTURE_CACHE := true
    • Note that the following 2 might not be needed based on your device, but most devices will need them
    • TARGET_NO_HW_VSYNC := true
    • COMMON_GLOBAL_CFLAGS += -DQCOM_NO_SECURE_PLAYBACK
    4. Edit the files in the DEVICE/libcamera folder to suit your device

    Again, thanks to nobodyAtall for getting this to work!!!
    3
    http://review.cyanogenmod.com/#/c/22147/
    This should fix recording issues
    I just added it to all of CM since its needed a lot
    2
    Put the file in the /vendor/MANUFACTURER/DEVICE/proprietary/lib/
    Add this line to your vendor-DEVICE-blobs.mk: (Note: Make sure it's the second to last line, not the last line)
    vendor/COMPANY/DEVICE/proprietary/lib/libstagefright_soft_aacdec.so:system/lib/libstagefright_soft_aacdec.so \

    Also here is an example of a common repo where you need to make all these changes:
    https://github.com/lgics/cm_device_lge_msm7x27-common

    And the vendor for the video:
    https://github.com/lgics/cm_vendor_lge