Android 5.0 Leaked for the Samsung Galaxy Note 3

Android Lollipop is still making its way to many new devices. Firmware updates have been … more

Learn to Sync Files Between Android And PC with Unison

Dropbox and similar cloud services are great if youre planning to keep your files … more

OnePlus Indian Ban Lifted, Android One Expanding – XDA TV

Android 5.0.1 Lollipop is available for the Nvidia SHIELD Tablet! That and … more

Nvidia and Robotics w/ Barrett Williams – XDA:DevCon 2014

Robotics continues to dominate our videos from this years XDA:DevCon 2014 in … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[WIP] - JB Camera HAL for 2.6 kernel

OP Rashed97

24th August 2012, 12:02 AM   |  #1  
Rashed97's Avatar
OP Recognized Contributor / Recognized Developer
Thanks Meter: 10,229
 
1,527 posts
Join Date:Joined: May 2012
Donate to Me
More
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

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/andr...vice_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 by Rashed97; 26th August 2012 at 08:45 PM.
The Following 22 Users Say Thank You to Rashed97 For This Useful Post: [ View ]
24th August 2012, 12:14 AM   |  #2  
stelios97's Avatar
Recognized Developer
Flag Famagusta
Thanks Meter: 4,388
 
1,462 posts
Join Date:Joined: Feb 2011
Donate to Me
More
are you sure that this line need to be removed?
COMMON_GLOBAL_CFLAGS += -DREFRESH_RATE=60
24th August 2012, 12:37 AM   |  #3  
Rashed97's Avatar
OP Recognized Contributor / Recognized Developer
Thanks Meter: 10,229
 
1,527 posts
Join Date:Joined: May 2012
Donate to Me
More
Yes
Or else you get weird issues with the screen
24th August 2012, 05:59 AM   |  #4  
a2441918's Avatar
Recognized Developer / Recognized Contributor
Flag New York
Thanks Meter: 3,464
 
1,443 posts
Join Date:Joined: Jan 2011
Donate to Me
More
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..
25th August 2012, 02:54 AM   |  #5  
Senior Member
Thanks Meter: 63
 
270 posts
Join Date:Joined: Aug 2012
Quote:
Originally Posted by Rashed97

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

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 by pluGinSz; 25th August 2012 at 03:08 AM.
25th August 2012, 04:51 AM   |  #6  
Rashed97's Avatar
OP Recognized Contributor / Recognized Developer
Thanks Meter: 10,229
 
1,527 posts
Join Date:Joined: May 2012
Donate to Me
More
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
The Following 2 Users Say Thank You to Rashed97 For This Useful Post: [ View ]
26th August 2012, 08:46 PM   |  #7  
Rashed97's Avatar
OP Recognized Contributor / Recognized Developer
Thanks Meter: 10,229
 
1,527 posts
Join Date:Joined: May 2012
Donate to Me
More
http://review.cyanogenmod.com/#/c/22147/
This should fix recording issues
I just added it to all of CM since its needed a lot
The Following 3 Users Say Thank You to Rashed97 For This Useful Post: [ View ]
29th August 2012, 04:22 PM   |  #8  
Senior Member
Thanks Meter: 63
 
270 posts
Join Date:Joined: Aug 2012
Quote:
Originally Posted by Rashed97

http://review.cyanogenmod.com/#/c/22147/
This should fix recording issues
I just added it to all of CM since its needed a lot

I use Xperia Ray running CM10 by FXP with FXP kernel. Should it work on it ? I can't find any file with extension .mk
30th August 2012, 09:17 AM   |  #9  
asdfzz's Avatar
Senior Member
Thanks Meter: 1,611
 
1,247 posts
Join Date:Joined: Mar 2012
take credit to erikcas for vide LQ

For camera on LG p690/e510 it doesnt work..we cant take picts... pano works :s
31st August 2012, 10:27 PM   |  #10  
Crenshaw-PCGH's Avatar
Senior Member
Thanks Meter: 156
 
327 posts
Join Date:Joined: Mar 2012
How to open the readme??

I get just " This directory contains code for the Jelly Bean Camera HAL"

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes