yashsingh1/xdaforums huggingface dataset:
[Sony Cross-Device General] optimumpro:
MOD EDIT

My contribution to Nougat. It is impossible to make it work with custom 3.4 kernel without re-writing 50% of Android code. You could perhaps make stock 3.4 work, but stock 3.4 is abandoned and is missing all security patches after August-September 2015. So, I would rather have and continue to update LP 5.1.1.
[Sony Cross-Device General] Myself5:
So how about this: We get the 3.4 Kernel working on Nougat and use the stock blobs for that (thanks to the discoveries on the kitakami devices this shouldn't be witchcraft) and you take care of the security updates that need to go into the outdated stock kernel?

Wouldn't that be better (and seems thats something you care a lot about: ) safer?
[Sony Cross-Device General] optimumpro:
That'll be fine, but my understanding was (and I may be wrong) that if you change stock kernel, stock blobs won't work. Also, unlike in Z3, which had stock MM kernel and blobs (and those blobs basically work with Nougat), there is no such thing for Z1...
[Sony Cross-Device General] Myself5:
Nah. The initial problem why the stock kernel was no longer used was the fact that with the new blobs, DRM got introduced, and that was never brought up to work (till now). It's not a kernel thing and you should be able to edit the kernel just fine.

I didn't know that the Z1 never got a M update though. That might indeed get problematic.
[Sony Cross-Device General] optimumpro:
That's why I was saying it is impossible for Z1 without re-writing Android code. By the way, could you point me to that DRM discovery?
[Sony Cross-Device General] adinkwok:
The lack of maturity in this thread continues to lower my standards of decency.

If you guys cannot have grown up conversations on XDA without bringing drama or flaming, then there should be no conversation at all.

Thread closed, will re-open when everything is cooled down.
[Sony Cross-Device General] munjeni:
Imx200 and imx134 is on our z1 & z1c, for the rest I don't know.
[Sony Cross-Device General] munjeni:
Instead of helping us he comes here to try to disapoint us. Do not be disapointed, lets back to topic!
[Sony Cross-Device General] SuperLamic:
well, I wasn't opening the thread just to start a flame with devs...

You wouldn't work on the 3.10 kernel anyway, so I think there is nothing to be angry on both sides. I hope all of you can get along, just with different kernel/blobs.

This thread wasn't meant to start complaining at 3.10 kernel. Just to give all people a choice, stock kernel and blobs are more stable and if there is a way to make it work on custom rom, the quality of photos will be probably higher.
[Sony Cross-Device General] munjeni:
Agree with you!!! I will make camera working on 3.4 kernel in revolt to non working camera in 3.10, and everybody will switch to stock 3.4 kernel.
[Sony Cross-Device General] niaboc79:
Guys, instead of doing debates, start to work on your ideas ;)

Envoyé de mon D6503 en utilisant Tapatalk
[Sony Cross-Device General] brickhayabusa:
well i think that we can help on the 2 kernels?

why not?

i know you have your lives and that's a good thing, i'm an a student and i think that if i can help in something or learn new things why not? x2

all of you needs to stop insulting, that's not the point of the development.

after that, the new kernel fixes the random reboots, yeah that's a thing........

oh and added more speed and stability

but we can help to munjeni, he have a good idea.
[Sony Cross-Device General] munjeni:
The best weapon for debates is, ignore them, just ignore them. Lets back to OP!
[Sony Cross-Device General] aquaboy11:
[MENTION=3816568]Myself5[/MENTION] and [MENTION=489838]kholk[/MENTION] are trying to help. I think they have a lot more experience and knowledge about this subject than we do, at least [MENTION=489838]kholk[/MENTION] does. It might be a good idea to at least hear what they have to say, and not just immediately disregarding everything and flaming them for not sharing your opinion. Actually, doing this for everyone might be good :p.

I put up some ideas in my previous post, hopefully it will be seen and we can continue developing :).
[Sony Cross-Device General] erikcas:
now I lost it. Who came here to disappoint who?

No disrespect, but I think you are mixing up the goal of the Sonyxperiadev open-source devices project VS creating custom roms using tons of closed source blobs working with ugly hacks in stocks kernels with loads of untested so called performance tweaks (for which no average users nor most of the "devs" understand side effects). Did I also mention the hacks to get hacks working?

Ofc everyone is free to choose. But... Imo giving readers here hope on getting a cam working on stock blobs, which I think is already widely discussed for Sony devices, will give them just that.. Disappointment.

Ofc I can be wrong...
[Sony Cross-Device General] munjeni:
Heyyy, please stop! Forgive all that! He started to "censure" me becuse I was say that his kernel have no good camera! I lost my free time with it (month) on his camera! I can confirm that working on camera on that 1.3.3 is waste of time! I'm ignoring what he say, I have lost my free time with it and I am free to say what I want to say. Anyway I have respect to kholk and jerpelea!!! Please lets back to OP finaly!
[Sony Cross-Device General] erikcas:
AFAIK I did. Gave my 2 cents on camera...
[Sony Cross-Device General] munjeni:
That link which you provided is kernel camera sensor! And that sensors is not imx200. We no need kernel sensors since we allready have kernel sensors! We need right android hal + right blobs
[Sony Cross-Device General] mkdmc:
OK. I share my ideas for everyone:D

My first idea for porting stock camera to aosp :

We can never port Sony stock android 7 camera for Z1-Z3.

So let's start porting Sony android 6.0 camera for aosp 6.0 !

First of all you should download stock Z2/Z3 kernel source and copy camera stuffs to aosp kernel.(drivers>media)

And then copy all stock (Z2 Android 6.0) camera libs and drivers to aosp system.

(

system > bin (camera_test, mm-pp-daemon , ...)

system > lib

system > lib > camera

system > lib > hw

system > vendor > lib

system > vendor > camera

system > vendor > pittpatt

)

I hope my first idea helps:D
[Sony Cross-Device General] munjeni:
We working on nougat! Things in kernel is not just copy paste, a lot of work is need for porting media from one kenrel to the another kernel, there is a lot of things to be changed in dtbs which is also not easy...! Anyway I have already done copy-paste stock blobs from 5.1.1 stock android and using it in combination with stock kernel, still a lot of work is need
[Sony Cross-Device General] ->---:
[MENTION=676497]aqa[/MENTION]boy11: What munjeni meant was; thanks for the suggestion. It is not actually what they need, but thanks anyways.
[Sony Cross-Device General] aquaboy11:
Those sensors are imx220, I do not get why else they would call them imx220. Also, I cannot find any file including imx220 in Sony's kernel repository on Github. Also, there were some complaints regarding calibration from Sony's camera blobs, and as this source sets all kinds of values for different things I thought it might be helpful.
[Sony Cross-Device General] mkdmc:
I know it's hard. But do we have any other choice?!:D
[Sony Cross-Device General] munjeni:
Ok I understand what you mean, but thats kernel hal! We already have stable kernel hal in stock kernel source tree! Calibrations is done from userspace, we no need to look into kernel source! Anyway thanks
[Sony Cross-Device General] Myself5:
I wonder who is "him". Nobody here dissapointed you, we all tried to help and make you save time, because there were a lot of people before trying what you did and giving up. There is a reason rhine and shinano official support was gone for cm13.

Have fun wasting your time, rebel.

Working on 2 Kernels at the same time, will slow down boths development just more.

The best weapon for a "debate" is considering Pro and Contra facts. You should have learned that in school. After all, it usually is considered who stops providing sensible facts to be the debates loser. Which is you here.

You spent months on the kernel? How come there is literally NOTHING on record about your contributions?

Nobody here tried to dissapoint anyone.

All we did, was SHARING our knowledge about 3.4 stock cam not working with AOSP on blobs newer than 4.4.4 rhine blobs.
[Sony Cross-Device General] aquaboy11:
Thanks [MENTION=6594010]mkdmc[/MENTION], this was similar to one of the ideas I have had. As we use Marshmallow blobs to compile Nougat, porting the Z2's camera stuff might work on Nougat too. I will try to see what I can do when I get some free time (tomorrow that is). Thanks for providing some extra information :).
[Sony Cross-Device General] munjeni:
Yes we have! We have done some progress using stock kernel + stock blobs, lets try to make them working!
[Sony Cross-Device General] SuperLamic:
then you can explain a little bit more about drm on sony devices? The only explanation I found is this http://redstar154.blogspot.cz/2016/02/xperia-camera-issue.html (g translate)

how does that chocoball work and why it won't work on custom rom (why does it fail to create a socket)? that's the thing that may be interesting instead of repeating that it is not possible.
[Sony Cross-Device General] mkdmc:
Few months ago, I downloaded rhine stock 5.1.1 kernel and I deleted media folder (drivers>media). Then I added aosp 6.0 media folder to it.

I compiled kernel successfully but my phone bootlooped on sony bootanimation.

I think my phone bootlooped because I tried aosp 6.0 kernel stuffs on 5.1.1. So I think Stock 6.0 kernel stuffs should work on aosp 6.0

Good Luck !
[Sony Cross-Device General] munjeni:
[MENTION=3816568]Myself5[/MENTION], someone already here said that booting stock kernel on nougat is apsolutly imposible, the same debate about things was happen, at the end its ended with false! Stock kernel boots on nougat now! I will show you camera shoot too! I'm here not to make debate with you or anybody. Give us working blobs for 1.3.3 an I will trust, now I nothing trust until I try it byself. I will work on new hal for month, five month, ten months no problem at all, thats just an hobby in spare time, I'm learning. If you realy wanted to help than you are free to help. My thanks meter is good enought to show you about my contribution to xperia.
[Sony Cross-Device General] munjeni:
Blobs from 6.0 will reguire libshims for nougat too, so I think we have the same choice, 5.1.1 blobs or 6.0 blobs, booth require libshims
[Sony Cross-Device General] PDesire:
If you do your HAL, any chance that you can upload it separated on Github? Because I want that my cam works on ZU too with Nougat but I don't get how to fix, I am very new in Custom ROM development so my condolences for that :D

But a bit experience I have now, so I can help if needed

Time to get the camera now work :good:

Your PDesire
[Sony Cross-Device General] munjeni:
All my work is open, I not steal anything, if it is not on git its on forum, so if I make hal it will be opensource too. I not promising anything, just making plan. Even I don't know if android generic v4l2 hal can be possible to use with sony kernel v4l2 camera, I thinking to try to make an primitive for example to open and close camera at least
[Sony Cross-Device General] Myself5:
Nobody said that stock is not able to boot N. Rcstar said some hal adjustments might be needed. Thats it.

We all know stuff is booting. We all, exept you, however also know, that trying to get Cam working is a worthless attempt.

Judging your "contributions" by your thanks meter is a bad joke. Especially since I was specifically to your contributions to the sonyxperiadev project (since you mentioned you've been working on that for months).
[Sony Cross-Device General] munjeni:
Nobody said? Somebody said that, see previous thread! And about nougat, thats not true! You can't boot nougat by just "some hal adjustments"! I have spent day to boot it and for that I have disasembled phone to be able to solder uart cable, after that got things, of course with some help from tomascus and ..., finaly we got it. I not trust anybody word "he says", I not trust that. Instead I try things byself to be sure. About my contributions, I am speaked with jerpelea, if you not trust just ask him! I am worked on it, for month, not a joke! He say that camera bug is related to vfe isue, it working on one vfe only. I don't believing that since I found isues in blobs too, for example chromatix_imx200 is load first time, on next reboot cromatix_imx134 is load, and vice versa, it can't be kernel only related... also preview sizes sometimes requests 480x640 and sometimes 720x1280... got disapoint on that since I am not sure if things is hal related, kernel related, blobs related... development can't be possible without knowing from where problem coming

Edit:

You said "We all know stuff is booting", ok, let show me any link where stock kernel runing on nougat, I would be glad to see link! How you know that.
[Sony Cross-Device General] Myself5:
Links... Just because someone is not releasing a valid proof of his internal tests, things dont mean it didn't happen. Rcstar as well as me mentioned multiple times that cdesai tested it, and we also mentioned multiple times why we suggest not to mess with that 3.4 stuff.
[Sony Cross-Device General] munjeni:
Ok, than I see no reason why camera can't be working on stock kernel since things is based on "he said". Don't believing until I see.
[Sony Cross-Device General] nailyk:
off-topic/no real contribution

I already talk about that in the cm-13.0 3.4^w^w thread: for me the biggest lack in open source is everyone working in is own and not together. It is a waste of time for everyone...

Some times ago, i bought a device with the knowledge that the community support was not the best. I decide to take the plunge and start learning how CyanogenMod builds trees works, start learning C, etc... Most i learn, most the support for my device dropped and figure i was on my own.

Anyway, as soon as I feel enough confident to keep a few support for a rom, I open the cm-13.0 thread, to share my work, ask for help etc... If you read it we discuss a lot about this 3.10/3.4 kernel choice. We read a lot of commits in a lot of git & gerrit (specially HAL) and figure out that the msm8974 become and abandoned soc. Then we get a "won't fix" on the sonyxperiadev/kernel screen flickering issue.

At this time, even if the unified kernel sounds like a good idea to me, as it will remain unusable for unmodified shinano devices, I decide to switch to 3.4 kernel, at least to provide almost functional upgraded rom. (i don't mean functionality but security).

Then i see some people from other device sharing ideas into the z3 thread. Then this cross dev thread opened and now a group of smarts developers, users, and porters are one the same place. That is really good point! Working together will make the things going faster! Community support for our 8974 is not dead!

Now I heard the unified kernel had the screen flickering issue fixed, and other points too. (That's why a concentrated point of information is important for me. )

I'm not afraid to spend some time testing concepts/ideas (i already did it) or to throw away 3 month of port if we can get a more viable/better solution.

So I'm thinking about continuing to maintain cm-13.0 (3.4 kernel, no camera) with the few needed update, and starting cm-14.0 (someone else is working on it) with the unified kernel at the same time. Maybe it could be an approach.

Now back to topic :)

I start to sync the 1.3.3 branches on my cm trees and encounter some HAL problem. I soon as i get a build I post the results (some weeks maybe, I am slow).

Thanks for reading, and i will try not polluting this thread anymore with my off-topic novel ;)

Sorry for my English and my clumsy.
[Sony Cross-Device General] ReznorNInchNails:
I have shared this story once in one post. Before Z1 I had M2 and Neo V. Neo V was a really interesting device and also whole 2011 series. It got few updates to 2.3.x, then Sony released an upgrade to 4.0.1. It was also transition from Sony Ericsson to Sony brand and replaced that cool animated SE logo with a boring Sony static one. This official firmware was really slow and unstable, wifi was dropping constantly, and a bugfix update never came. Then the custom rom development for these devices was stopped by fxp because they got old and forgotten and he moved to a newer 2012 line. It was the opposite situation to this. A newer ROM such as CM11 needed 3.0 kernel, but actual version was 2.6.x. A guy called nAa made a kernel out from nothing. I remember that it was really weird at the very start. Even boot logo was screwed, not to tell that everything else was buggy. He was porting things one by one and got everything working so far, but camera. Another guy called mikeioannina continued his work and made a working camera driver which is so far impressive work and today these devices have received a Lollipop update. I mean, come on it is today beyond low end device with 512 MB RAM and single core CPU. Only some proprietary things like HDMI port doesn't work, also OTA updates aren't available, because boot.img has to be flashed through fastboot. If anyone is interested check out the link https://legacyxperia.github.io/

And for kernel: http://xdaforums.com/showthread.php?t=2246010

Same thing for our devices. I understand that these devices are getting older, but don't wait miracle to happen, because it's not gonna work. So, whatever you are planning I support this idea. I have some coding and Linux knowledge, if there's something I can help I will try.
[Sony Cross-Device General] munjeni:
10-15 14:52:33.974 522 522 I V4L2_Camera: v4l_cam_get_number_of_cameras() , number of cams = 2
[COLOR="Red"]10-15 14:52:33.974 522 522 I CameraService: Loaded "Generic V4L2 camera HAL" camera module[/COLOR]
10-15 14:52:33.974 522 522 I V4L2_Camera: v4l_cam_get_number_of_cameras() , number of cams = 2
10-15 14:52:33.974 522 522 I V4L2_Camera: v4l_cam_get_number_of_cameras() , number of cams = 2
10-15 14:52:33.974 522 522 I CameraFlashlight: Opening camera 0
10-15 14:52:33.974 522 522 I V4L2_Camera: v4l_cam_get_camera_info()
10-15 14:52:33.974 522 522 I V4L2_Camera: v4l_cam_get_number_of_cameras() , number of cams = 2
10-15 14:52:33.974 522 522 I V4L2_Camera: v4l_cam_open(): running as 1047.1005
10-15 14:52:33.974 522 522 I V4L2_Camera: v4l_cam_get_number_of_cameras() , number of cams = 2
10-15 14:52:33.974 522 522 E V4L2_Camera: QUERYCAP(/dev/video0): errno = 25, caps=aed03038
10-15 14:52:34.053 522 522 E CameraFlashlight: Could not open camera 0: -19
10-15 14:52:34.053 522 522 E CameraFlashlight: connectCameraDevice: initializing camera 0 failed
10-15 14:52:34.053 522 522 I CameraFlashlight: Destroying camera 0
10-15 14:52:34.053 522 522 E CameraFlashlight: findFlashUnits: failed to check if camera 0 has a flash unit. No such device (-19)
10-15 14:52:34.053 522 522 I CameraFlashlight: Opening camera 1
10-15 14:52:34.053 522 522 I V4L2_Camera: v4l_cam_get_camera_info()
10-15 14:52:34.053 522 522 I V4L2_Camera: v4l_cam_get_number_of_cameras() , number of cams = 2
10-15 14:52:34.053 522 522 I V4L2_Camera: v4l_cam_open(): running as 1047.1005
10-15 14:52:34.053 522 522 I V4L2_Camera: v4l_cam_get_number_of_cameras() , number of cams = 2
10-15 14:52:34.053 522 522 E V4L2_Camera: open(/dev/video1): errno = 2
10-15 14:52:34.054 522 522 E CameraFlashlight: Could not open camera 1: -19
10-15 14:52:34.054 522 522 E CameraFlashlight: connectCameraDevice: initializing camera 1 failed
10-15 14:52:34.054 522 522 I CameraFlashlight: Destroying camera 1
10-15 14:52:34.054 522 522 E CameraFlashlight: findFlashUnits: failed to check if camera 1 has a flash unit. No such device (-19)
10-15 14:52:34.054 522 522 I V4L2_Camera: v4l_cam_get_camera_info()
10-15 14:52:34.054 522 522 I V4L2_Camera: v4l_cam_get_number_of_cameras() , number of cams = 2
10-15 14:52:34.055 522 522 I V4L2_Camera: v4l_cam_get_camera_info()
10-15 14:52:34.055 522 522 I V4L2_Camera: v4l_cam_get_number_of_cameras() , number of cams = 2

I will be focused on v4l2 camera, there is a ton of things related for v4l2 cam, I' used generic one but I will search for https://www.linuxtv.org/downloads/presentations/media_summit_2014_DE/android-camera-hal-v3-v4l2.pdf , found some libs https://github.com/jollen/libv4l2-android ... there is realy ton of thnigs on gogle about v4l2

Edit:

Anybody help me find hal 3 version of the v4l2 android camera?
[Sony Cross-Device General] niaboc79:
Guys here's some infos from Jerpelea ;)

I hope that it may help you ;)

Envoyé de mon D6503 en utilisant Tapatalk
[Sony Cross-Device General] munjeni:
For battery and leds I have a fix, just rename all hal modules from for example XXX.amami.so to XXX.msm8974.so, thing will work booth les and charging. For camera I found something, have no log curenlty to see but if I am not wrong kernel camera reserved e.g. 100mb memory but somehow from android hal I see in logcat something about e.g. ~350mb, don't have log now to tell you precisely..

About vfe:

10-15 21:05:40.152 541 541 E mm-camera-isp2: isp_resource_query_mod:145 num_isp_preallocate 1 num_session_opened 1 dual_vfe_enabled 0

What mean dual vfe? Is that 2 x vfe0 and 2 x vfe1 or that mean vfe0 and vfe1? Maybe thats a reason why only one vfe is vorking?

Also this might be wrong:

QCameraParameters: Requested preview size 1280 x 720
QCameraParameters: Requested picture size 160 x 120

sometimes it request preview size 640x480 without any good reason.

and this too:

10-15 21:05:40.189 1361 1361 D QCameraParameters: bool qcamera::QCameraParameters::setStreamConfigure(bool, bool, bool): Done Resetting stream config!!
10-15 21:05:40.189 541 1380 E mm-camera: mct: mct_pipeline_unmap_buf: Un-Mapping failed for sync buf
10-15 21:05:40.189 541 1380 E mm-camera: mct: mct_pipeline_unmap_buf: pipeline sanity failed

this too:

void qcamera::QCameraParameters::setBufBatchCount(int8_t) : Buffer batch count = 0

this too:

mm-camera: mct: mct_pipeline_process_set:2524: Couldn't find stream id: 0

this too:

10-15 21:05:45.321 1361 2130 D QCameraHWI_Mem: int qcamera::QCameraMemory::alloc(int, size_t, unsigned int, uint32_t) : No memory pool available, allocating now
10-15 21:05:45.321 1361 2130 D QCameraHWI_Mem: static int qcamera::QCameraMemory::allocOneBuffer(qcamera::QCameraMemory::QCameraMemInfo&, unsigned int, size_t, bool, uint32_t) : ION buffer 1 with size 700416 allocated

one buffer only??

a lot of analyse is need in hal...

Edit:

I have compared nougat camera hal for msm8996 which comes by default on nougat, there is a ton of things diferent than hal which we using for msm8974, we simply need a new hal, this one maybe can not be working without implementing new things which is done on msm8996. Havw no more free time today but tommorow i will compare msm8996 M hal with msm8996 N hal to see whats changes is done related to nougat, than will try to implement these missing thing in msm8974 hal, if you have free time for that please make diff file and post it please!
[Sony Cross-Device General] munjeni:
New display hal is out on codeaurora, version 2.0, and its for all msm and apq!
[Sony Cross-Device General] tomascus:
Well apparently there's two VFEs : https://github.com/sonyxperiadev/ke...ch/arm/boot/dts/qcom/msm8974-camera.dtsi#L227

Buffer Batch count set in build.prop? https://github.com/sonyxperiadev/ca....14/QCamera2/HAL/QCameraParameters.cpp#L12951

Yes what I found interesting was the differences from 1.2.2 to 1.3.3 branches.

Mainly 1.2.2 branch had like:

01-06 10:52:37.545 309 1916 E mm-camera: iface_util_io_cfg: <dual_dbg> single vfe Camif
01-06 10:52:37.545 309 1916 E mm-camera: iface_util_io_cfg: 6411is_split 0

Compared to 1.3.3 implementation:

10-15 02:00:41.682 352 4204 E mm-camera-isp2: isp_resource_request_stripe_info:702 DUAL ISP!
10-15 02:00:41.694 352 4204 E mm-camera: iface_util_camif_cfg: <dual_dbg> dual vfe Camif
10-15 02:00:41.687 352 4204 E mm-camera: iface_util_dump_isp_resource_request: ispif stripe info: is split 1, overlap 216, stripe offset 1844