yashsingh1/xdaforums huggingface dataset:
[Xperia Z1 Original Android Development] prateek29chandra:
Hi Sir,

I have been following this thread from the start. Sorry for off topic but I would like to thank you for working so hard as If this works then It will open new doors for the dev team. And also bring back Z1 community from the dead.
[Xperia Z1 Original Android Development] SuperLamic:
Maybe it would be worth creating repos on github to make it easy to use. Anyway thank you. :)
[Xperia Z1 Original Android Development] munjeni:
I'm mad since I not worked on that 3 months ago, instead I wasted time with LA branches from sonyxperiadev which changed 3 branches in 6 month without any known reason, its just changed, my net resource was wasted with it, my time, my nerves, I am prety sure camera will never work on that branch... now situation is better for sure, we have stock kernel boot on nougat and I am sure it will boot in future too since we have right hals source code (just tomascus need to confirm)
[Xperia Z1 Original Android Development] munjeni:
I will open it on git, just need some free time! Will also make new device tree. We need to colect things/sources into one new device tree for rhine
[Xperia Z1 Original Android Development] SuperLamic:
By the way they are changing branches to support new devices and since it's only one kernel they need older devices to use the new kernel too. They will switch to a new branch soon to support sd820.

They were using 1.2.2 for almost year if I'm not wrong... It wasn't that bad when they switched to 1.3.3, there are no random reboots like on 1.2.2
[Xperia Z1 Original Android Development] munjeni:
I apreciate his work, but I was confused with it, never managed to boot old cwm recoveey which I'm using for years with that 3.10 kernel. I can't say its 3.10 kernel is bad, its very good now on 1.3.3! But I think that kernel is not for us. My plan was to use that recobery for booting into real ubuntu, was not able to boot and was lazy to connect uart, was disapointed totaly since he changed many branches and it was soo hard tracking its changes, marchmalow also had no good look for me and I had pause, now after trying nougat I am realy impresed with it, its great os realy! Worked many days in LA camera and was totaly confused since was not sure where problem comes (is it from blobs, is it from hals, is it from kernel, is it from android), from that reason I used stock kernel with stock blobs and eliminated 2 things for sure (kernel+blobs), now I am sure that I need to look into android + hals + eventualy do some small changes in kernel. Things not be easy since some reverts must be done on android to make camera hal & daemon and stock blobs happy + camera wrapper need to be modified for N
[Xperia Z1 Original Android Development] tomascus:
Adreno are prebuilt, since they're definitely proprietary.

Display HAL is prebuilt but it should be identical to a built one since msm8974 HAL hasn't been updated in so long (and is now deprecated).
[Xperia Z1 Original Android Development] munjeni:
Yes you are right, I'm compiled this one

url = https://source.codeaurora.org/quic/la/platform/hardware/qcom/display

merge = refs/heads/LA.BF.1.1.3_rb1.9

Require some small modification e.g

struct copybit_module_t HAL_MODULE_INFO_SYM = {
common: {
tag: HARDWARE_MODULE_TAG,
version_major: 1,
version_minor: 0,
id: COPYBIT_HARDWARE_MODULE_ID,
name: "QCT COPYBIT C2D 2.0 Module",
author: "Qualcomm",
methods: &copybit_module_methods
}
};

to

struct copybit_module_t HAL_MODULE_INFO_SYM = {
.common = {
.tag = HARDWARE_MODULE_TAG,
.version_major = 1,
.version_minor = 0,
.id = COPYBIT_HARDWARE_MODULE_ID,
.name = "QCT COPYBIT C2D 2.0 Module",
.author = "Qualcomm",
.methods = &copybit_module_methods
}
};

Its working and also have the same size like your prebuilts!
[Xperia Z1 Original Android Development] munjeni:
Here is kernel https://github.com/munjeni/android_kernel_sony_msm
[Xperia Z1 Original Android Development] tomascus:
Change branch to LA.BF.1.1.3_rb1.13 , rb1.9 is not the latest.

And yes, the numbers are in strange order.
[Xperia Z1 Original Android Development] munjeni:
Is this related to camera doubled preview??? https://github.com/sonyxperiadev/ke...3.3_rb2.14/include/uapi/linux/msm_mdp.h#L1143 see comment line!
[Xperia Z1 Original Android Development] SuperLamic:
It may be but since the value for split source and non split display is the same I don't think it matters...

source split is enabled: l_roi = roi and r_roi = 0

non split display: l_roi = roi and r_roi = 0
[Xperia Z1 Original Android Development] munjeni:
* user needs to follow guidelines as per below rules

* 1. source split is enabled: l_roi = roi and r_roi = 0

* 2. source split is disabled:

*	2.1 split display: l_roi = l_roi and r_roi = r_roi

*	2.2 non split display: l_roi = roi and r_roi = 0

What about if somethere source split is disabled? :) Stock kernel dont have l_roi and r_roi, it have only roi!
[Xperia Z1 Original Android Development] tomascus:
Not sure what you guys are talking about but that looks like some infrastructure for use by dual DSI panels only.

You have to remember that it's a unified kernel that supports heaps of devices, so there will be heaps of redundant code if you compare unified kernel to stock.
[Xperia Z1 Original Android Development] munjeni:
Not be so bad debugging that! If r_roi.x displays something more than 0 than probably we have fix for cam at least we can know if source split is disabled :) , I am on stock kernel, can't debug now
[Xperia Z1 Original Android Development] thipok17:
loop at sony

can someone help I installed but I got loop at sony first boot screen I tried to get in recovery but it still have a sony logo in recovery with orange led (I think that recovery is a PhilZ because I feel a vibrating whel I touch my screen) can some-dev hep me

- UB

-Mine base on Dstriker Kai 5.1.1 rom

-flash via twrp dual recovry (Nut recovery)

-wipe data system cache (not ftfs)

if this problem is from not install a correct kernel can give me a kernel Plz
[Xperia Z1 Original Android Development] pokepokepoke:
-Flash Stock FTF via FlashTool

-Flash real twrp in fastboot mode code:fastboot flash recovery recovery.img

-Wipe data system cache

-Flash latest SuperLamic build

-If on C6902 flash modem otherwise you won't boot
[Xperia Z1 Original Android Development] munjeni:
Seems split is disabled! I don't know if split is need for camera but this is a log from kernel

amami:/ # dmesg | grep split
[ 0.671565] mdss_fb_probe: fb0: split_mode:0 left:0 right:0
[ 1.552488] mdss_fb_probe: fb1: split_mode:0 left:0 right:0
[ 1.552973] mdss_fb_probe: fb2: split_mode:0 left:0 right:0
amami:/ #
[Xperia Z1 Original Android Development] tomascus:
Like I said before, are you sure that these mdss related things are even relevant to the camera?

Here's the commits in question:

https://github.com/sonyxperiadev/kernel/commit/398653b3734cd85ee1edd43acf0a11fc03014eb9

https://github.com/sonyxperiadev/kernel/commit/8668596a2ba37db55460f960167a4fc5b5f62f35
[Xperia Z1 Original Android Development] munjeni:
I dont't know realy, I can see now that we have now 2 overlays, don't know is it realy corect or not, even don;t know how many overlays was on 1.2.2 kernel, investigating now, have no idea

[ 1661.631766] ov queue pnum=7
[ 1661.631787] buffer alloc: f5bad4d8
[ 1661.631910] starting fb0 overlay called from mdss_mdp_overlay_kickoff+0xf4/0x1228
[ 1661.631948] input: l_roi:-> 0 0 720 1280 r_roi:-> 65176 0 0 0
[ 1661.632000] pnum=7 buf=f5bad4d8 first buffer ready
[ 1661.632120] pnum=6 buf=f5bacf18 first buffer ready
[ 1661.644842] purging fb0 free list
[ 1661.644880] buffer freed: f5bac508
[ 1661.644983] buffer freed: f5baca10
[COLOR="Red"][ 1661.697206] prepare fb0 num_ovs=2[/COLOR]
[ 1661.697247] ctl=0 req id=40 mux=1 z_order=1 flags=0x0 dst_x:0
[ 1661.697290] skipping pipe_reconfiguration
[ 1661.697318] pnum:6 id:0x40 flags:0x0 dst_x:0 l_blend_pnum-1
[ 1661.697346] ctl=0 req id=80 mux=1 z_order=2 flags=0x20000 dst_x:0
[ 1661.697381] skipping pipe_reconfiguration
[ 1661.697409] pnum:7 id:0x80 flags:0x20000 dst_x:0 l_blend_pnum-1
[ 1661.697885] play req id=40
[ 1661.697910] ov queue pnum=6
[ 1661.697933] buffer alloc: f5bac170
[ 1661.697987] play req id=80
[ 1661.698010] ov queue pnum=7
[ 1661.698031] buffer alloc: f5bad140
[ 1661.698172] starting fb0 overlay called from mdss_mdp_overlay_kickoff+0xf4/0x1228
[ 1661.698229] input: l_roi:-> 0 0 720 1280 r_roi:-> 65176 0 0 0
[ 1661.711577] purging fb0 free list
[ 1661.711749] buffer freed: f5bacfd0
[ 1661.763905] prepare fb0 num_ovs=1
[ 1661.763950] ctl=0 req id=ffffffff mux=1 z_order=2 flags=0x220000 dst_x:0
[ 1661.764042] pnum:3 id:0x8 flags:0x220000 dst_x:0 l_blend_pnum-1
[ 1661.764117] unset ndx=40
[ 1661.764234] unset ndx=80
[ 1661.767803] play req id=8
[ 1661.767842] ov queue pnum=3
[ 1661.767868] buffer alloc: f5bad648
[ 1661.768047] starting fb0 overlay called from mdss_mdp_overlay_kickoff+0xf4/0x1228
[ 1661.768105] input: l_roi:-> 0 0 720 1280 r_roi:-> 65176 0 0 0
[ 1661.768195] pnum=3 buf=f5bad648 first buffer ready

Is not r_roi on our device 0??? See https://github.com/sonyxperiadev/kernel/commit/8668596a2ba37db55460f960167a4fc5b5f62f35
[Xperia Z1 Original Android Development] munjeni:
I have made tool for making splash image for jerpelea kernel if somebody need it...
[Xperia Z1 Original Android Development] munjeni:
Hi, today i had hard time getting wifi and bt working on my stock rom backup after I done something with an kernel, tried almost everything and it not worked. Problem is so stupid and problem is related to the uuid of the partition, don't have idea why it was changed. Wifi and bt is not working on stock rom if uuid is changed on partition, in my case my data partition had changed uuid. Sadly but I forgot to check if camera working, was bussy with wifi and bt :( You can check if you have right uuid, maybe camera is related to uuid too!

Here is a part of the multiboot script which I done 3 years ago for reference... I had hard time getting wifi and things working on file based partitions until I found that all things is related to partitions uuid, it all was fixed and worked perfectly after found that

### create file based partitions
echo "____________ creating file based partitions"
echo ""
GAPPSSIZE="25600"
ZIPSIZE=`ls -l $ARG | awk '{print $5}'`
ZIPSIZEMB=$(($ZIPSIZE / 1024 /1024))
SIZECALC=$((($ZIPSIZEMB * 1024 * 1024) / 4096))
SIZECALC=$((($SIZECALC * 2) + $GAPPSSIZE))
DATAEXIST="0"
DDDATAPERFORMED="0"
UUID=`blkid /dev/block/platform/msm_sdcc.1/by-name/system | awk '{print $2}' | sed 's/UUID=\"//g' | sed 's/\"//g'`
if [ -e /data/media/0/bootmenu/$NAME/data.ext4 ]; then
DATAEXIST="1"
fi
dd if=/dev/zero of=/data/media/0/bootmenu/$NAME/system.ext4 bs=4096 count=$SIZECALC
if [ "$DATAEXIST" == "0" ]; then
dd if=/dev/zero of=/data/media/0/bootmenu/$NAME/data.ext4 bs=4096 count=256000
DDDATAPERFORMED="1"
fi
dd if=/dev/zero of=/data/media/0/bootmenu/$NAME/cache.ext4 bs=4096 count=12800
losetup /dev/block/loop1 /data/media/0/bootmenu/$NAME/system.ext4
if [ "$DDDATAPERFORMED" == "1" ]; then
losetup /dev/block/loop2 /data/media/0/bootmenu/$NAME/data.ext4
fi
losetup /dev/block/loop3 /data/media/0/bootmenu/$NAME/cache.ext4
mke2fs -T ext4 -O has_journal,ext_attr,resize_inode,filetype,extent,sparse_super,large_file,uninit_bg -U $UUID -I 256 /dev/block/loop1
if [ "$DDDATAPERFORMED" == "1" ]; then
mke2fs -T ext4 -O has_journal,ext_attr,resize_inode,filetype,extent,sparse_super,large_file,uninit_bg -U $UUID -I 256 /dev/block/loop2
tune2fs -o journal_data_writeback /dev/block/loop2
fi
mke2fs -T ext4 -O has_journal,ext_attr,resize_inode,filetype,extent,sparse_super,large_file,uninit_bg -U $UUID -I 256 /dev/block/loop3
tune2fs -o journal_data_writeback /dev/block/loop3

Stock uuid on z1c (probably the same on z1) is:

57f8f4bc-abf4-655f-bf67-946fc0f9f25b
[Xperia Z1 Original Android Development] tomascus:
That's interesting that wifi and bt would break as a result of that... usually it breaks when kernel version doesn't match module version.

Wifi and bluetooth are both kernel related, you can try to build the appropriate prima module for wifi in kernel as external module

EDIT: Prima for rhine platform. not bcmdhd.

Here is the prima: https://source.codeaurora.org/quic/...m-opensource/wlan/prima/?h=LA.BF.1.1.3_rb1.13

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Camera findings:

By taking images in landscape what I found was:

The green area is actually an "out of bounds" region that cannot be captured by the camera anyway. The camera is failing to capture the "top half" of the image and instead, the bottom half of the picture becomes the top half. I tried my best to keep the camera in same orientation each time and have made an image to illustrate my point:

Notice how the green area isn't present in the "original" picture, which is one I shot on stock ROM. The image taking on 3.10 kernel is wrong, that is, the "top half of the picture" seems to be completed "pushed off" the frame of the picture, like the whole image was shifted upwards.

Also I got this catlog spam:

10-09 15:32:00.887 363 6551 E mm-camera: iface_util_buf_divert_notify: HW error! frame id reverse!! sessid 1, hw streamid 10002
10-09 15:32:00.888 363 6551 E mm-camera: iface_util_buf_divert_notify: curr: frame 17, sec 509 usec 147179
10-09 15:32:00.888 363 6551 E mm-camera: iface_util_buf_divert_notify: prev: frame 17, sec 509 usec 141302
10-09 15:32:00.891 363 6490 E mm-camera-CORE: af_process_parse_stats:682 Invalid FV data!
10-09 15:32:00.951 363 6551 E mm-camera: iface_util_buf_divert_notify: HW error! frame id reverse!! sessid 1, hw streamid 10002
10-09 15:32:00.952 363 6551 E mm-camera: iface_util_buf_divert_notify: curr: frame 18, sec 509 usec 211144
10-09 15:32:00.952 363 6551 E mm-camera: iface_util_buf_divert_notify: prev: frame 18, sec 509 usec 205270
10-09 15:32:00.952 363 6490 E mm-camera-CORE: af_process_parse_stats:682 Invalid FV data!

This is all conjecture, but it's the only thing I can conclude.
[Xperia Z1 Original Android Development] munjeni:
Strange thing on camera preview is it choses wrong width & height, for example it choses 640x480, have no idea why but probably its something related to the framebufer, for example see dmesg:

<6>[ 0.672727] mdss_fb_register: FrameBuffer[0] 720x1280 registered successfully!
<6>[ 1.544569] mdss_fb_register: FrameBuffer[1] 640x480 registered successfully!
<6>[ 1.544853] mdss_fb_register: FrameBuffer[2] 1920x1080 registered successfully!

for example all that things is related to mdss. I have copied whole drivers/video from 1.2.2 but curently can't get screen working since need to modify dtsi in arch... I think the most camera fails is related to display driver. I don't think that significant changes is in vendor prebuils, its almost the same, I think all things is kernel related. In 1.2.2 kernel camera worked!
[Xperia Z1 Original Android Development] tomascus:
I get the same output on my stock z3c so don't think so, and that doesn't show it picking any resolution, merely looks like an array of 3 elements with those 3 resolutions.
[Xperia Z1 Original Android Development] munjeni:
Did you got 1.2.2 kernel boot? I'm getting black screen :( Probly selinux related like one on stock 3.4
[Xperia Z1 Original Android Development] tomascus:
Yeah it's not patched to latest.

I got you fam: https://github.com/tunturn/kernel/commits/aosp/LA.BF64.1.2.2_rb4.7
[Xperia Z1 Original Android Development] munjeni:
Did you tried with 1.2.2 ?
[Xperia Z1 Original Android Development] tomascus:
Try what with 1.2.2?

Camera allegedly works with fish eye issue present
[Xperia Z1 Original Android Development] munjeni:
On 1.2.2 camera also have the same efect? :eek: Is green half of screen present too?
[Xperia Z1 Original Android Development] tomascus:
Can you please make your posts less vague so we don't spam this thread so much? :p

Yes, all camera blobs besides stock exhibit fish eye effect. 1.2.2 doesn't have half green issue of course
[Xperia Z1 Original Android Development] munjeni:
I trying my best to speak english sorry :o
[Xperia Z1 Original Android Development] tomascus:
Remember to change blobs for 1.2.2 too :P
[Xperia Z1 Original Android Development] munjeni:
Ok. I'm still going to see which part of things cause half green part of screen, is it blobs, is it kernel, is it hal, no idea. If I need to use blobs from 1.2.2 than definitely I can't get which thing cause thing... :(
[Xperia Z1 Original Android Development] tomascus:
Yeah that's the thing, I think 1.2.2 aren't compatible with 1.3.3 kernel and vice versa so it'll be hard to isolate that aspect
[Xperia Z1 Original Android Development] munjeni:
By looking into latest 4 commits on 1.3.3 camera hal I am prety sure that camera blobs is broken with part of the dual camera
[Xperia Z1 Original Android Development] tomascus:
That was commited 5 days ago, and camera has been broken on 1.3.3 branch since forever, so it does not explain why camera had issues from very long time ago.
[Xperia Z1 Original Android Development] munjeni:
http://pastebin.com/sLuTXH1b

Can't get camera on 1.2.2, changed kernel, hal and blobs and no way. Whats need for camera on 1.2.2 for nougat?
[Xperia Z1 Original Android Development] tomascus:
What errors did you get? I've never actually tried Nougat but it worked on Marshmallow I believe.

You should join me in freenode: https://webchat.freenode.net/

channel is: xperia-dev
[Xperia Z1 Original Android Development] munjeni:
http://pastebin.com/0Rn8VCzD
[Xperia Z1 Original Android Development] SuperLamic:
If you are using nougat on 1.2.2 you must've used Marshmallow blobs...
[Xperia Z1 Original Android Development] tomascus:
Camera already crashed during boot so it doesn't show here, you must take logcat as soon as you finish boot.
[Xperia Z1 Original Android Development] munjeni:
No errors in camera other than

10-09 01:16:38.996 721 900 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 pkg=com.android.camera2 cmp=com.android.camera2/com.android.camera.CameraLauncher bnds=[564,1022][697,1190] (has extras)} from uid 10019 on display 0
10-09 01:16:39.024 721 974 E SchedPolicy: add_tid_to_cgroup failed; fd=-1
10-09 01:16:39.025 721 974 W ActivityManager: Failed setting process group of 2285 to 2
10-09 01:16:39.025 721 974 W System.err: java.lang.IllegalArgumentException

probably kernel/sched need to be updated
[Xperia Z1 Original Android Development] tomascus:
get the full log straight after phone boots up
[Xperia Z1 Original Android Development] munjeni:
No errors in camera in start of android boot, qcameraserver started, no rrors in mm_qcamera_dameon... only things related to sched policy
[Xperia Z1 Original Android Development] munjeni:
Full logcat http://pastebin.com/NFWfzwqa

I'm aplied https://github.com/benschhold/andro...mmit/bebadf46e98874f1a18f2bcae73248ede371795b but stil having the same isue with sched policy

Edit:

solved! CPUSETS need to be enabled in defconfig.
[Xperia Z1 Original Android Development] optimumpro:
Have you noticed that camera service doesn't see hardware cameras:

10-09 04:25:58.124 419 419 I mm-camera-intf: sort_camera_info[1652]: dualCamera:0 auxCamera 0

10-09 04:25:58.124 419 419 I mm-camera-intf: sort_camera_info: Number of cameras 0 sorted 0

10-09 04:25:58.124 419 419 I mm-camera-intf: get_num_of_cameras: num_cameras=0

10-09 04:25:58.124 419 419 I QCamera2Factory: qcamera::QCamera2Factory::QCamera2Factory(): 0 camera devices detected!
[Xperia Z1 Original Android Development] munjeni:
You are right! But why that happen? I'm used camera 1.2.2 and also used blobs 1.2.2
[Xperia Z1 Original Android Development] optimumpro:
Which kernel are you using? Sonyxperiadev, stock 3.4 or 3.10?

Using exclusion method: it must be kernel...
[Xperia Z1 Original Android Development] munjeni:
Using 3.10 1.2.2
[Xperia Z1 Original Android Development] optimumpro:
From what I understand Sony has deliberately moved to 1.3.x to cut off Z1-Z3 from Nougat. So, you'll have to look at 1.3.x branch to port changes back to 1.2.2...
[Xperia Z1 Original Android Development] munjeni:
I'm already on 1.2.2 and ported only selinux and some things need for nougat, I'm using 1.2.2 hal but errors comming from that hal which worked on 1.2.2! I'm used allso blobs from 1.2.2! This is strange log since hal 1.2.2 need to be working on 1.2.2 kernel

Maybe I used wrong blobs? Used this one SW_binaries_for_Xperia_AOSP_M_v05a.zip
[Xperia Z1 Original Android Development] optimumpro:
Why don't you disable selinux temporarily in config file (# CONFIG_SECURITY_SELINUX is not set) and compile kernel, so that you know whether it is selinux or not...
[Xperia Z1 Original Android Development] munjeni:
I know since I am used uart to debug bootloop on nougat, you can start read posts 10 pages back at start from page 15 about selinux nougat relative! There is 10 pages of posts about selinux. On nougat you can't disable selinux since system/core/init (for more info see system/core/init in android source) will reboot your phone to recovery! It must be forced or permissive to get into boot and your kernel must have nougat compatible selinux! No way to boot nougat if you have not nougat compatible selinux kernel! You can't disable selinux with CONFIG_SECURITY_SELINUX (for more info see system/core/init in android source), reboot to recovery is guaranted! I have tried to disable it in init, disabled it, but no way to boot, new selinux is somehow need ;)
[Xperia Z1 Original Android Development] optimumpro:
But you can "#" the language calling for selinux in init.rc...
[Xperia Z1 Original Android Development] munjeni:
No because init is called before any rc. Look into android source code "system/core/init/*" for more info
[Xperia Z1 Original Android Development] tomascus:
androidboot.selinux=disabled on kernel command line worked for me on Marshmallow, not sure about Nougat.

Relevent: https://android.googlesource.com/platform/system/core/+/d34e407aeb5898f19d4f042b7558420bbb3a1817
[Xperia Z1 Original Android Development] optimumpro:
So, you change it where it is called for. It is open source. And I was talking about /system/core...
[Xperia Z1 Original Android Development] munjeni:
Beter idea is having working kernel which will go "in line" with android without needs touching anything android level , that would be ideal thing! Its almost in line, ofcourse that would be not possible without jerpelea and guys who working in it. More ideal thing would be if we have camera blobs source code
[Xperia Z1 Original Android Development] munjeni:
As you saw it was problem on nougat, with your help we solved selinux problem
[Xperia Z1 Original Android Development] munjeni:
Anyway lets speak about nougat, forget mm, this thread is about aosp 7.0 please! Anybody interesting for aosp 7.0? I'm testing it and I must say its perfectly stable, can be used daily without any problem! There is a few things which need to be solved, working realy corect for daily usage

Tomascus, how you solved gui & SensorManager singleton? Singleton is removed from SensorManager in gui and cause qcom camera dameon missing dependency...
[Xperia Z1 Original Android Development] tomascus:
Gui is solved with the following commits:

https://github.com/CyanogenMod/android_system_core/commit/04e5e3b697caa1f47c89439415ddd870b3489a8f

https://github.com/CyanogenMod/android_system_core/commit/1ff785445828a9a40138d67e1de2a4fbae9680e9

SensorManager issue can be solved with a shim library which implements the legacy code required by camera HAL module (camera.msm8974.so) or perhaps wrapper functions, [MENTION=6979267]nailyk[/MENTION] has an example of such a implementation.

I have exams next month so I won't be working on anything until the end of November, but I'll be around XDA to help you guys out.