Jump to content

  1. 0
  2. 0
  3. 0/5

Rate this Topic

* * * * *
5 votes

UNOFFICIAL CM10 with working camera

  • Please log in to reply

OP Dorregaray

Dorregaray

Super User

Posted 02 December 2012 - 11:34 AM #1

CM10 Camera Preview


Camera Config patch:
included in jcsullins 20130304 build
allow to change the mode of the camera and recording rotation


jcsullins preview build from 20121211 has preview5 included

Download link:
jcsullins JellyBean build: http://goo.im/devs/j...NG_ONLY_CAM.zip (base)
Preview 5: http://goo.im/devs/D...ra-preview5.zip (update for jcsullins build 20121204-20121205)

Video recording fix for jcsullins 20121211: http://goo.im/devs/D...ia-profiles.zip

Important:
Preview3 contained workaround for preview rotation. Preview5 fixes this issue.
If you have installed preview3 reinstall jcsullins 20121205 (recommended) or use http://goo.im/devs/D...era-service.zip

What is working:
- preview
- taking pictures
- video recording
- skype

What is not working:
- panorama

To enable camera in launcher try:
https://play.google.....cameralauncher

Changelog:
preview1:
- first release basing on ICS code
preview2:
- video recording is working (use 480p setting)
preview3:
- preview rotation workaround
preview4:
- fixed zoom in preview
- fixed preview rotation
preview5:
- fixed preview after rotating the device by 90/270 degrees

Sources repository:
JB/ICS camera wrapper: https://github.com/D...garay/camerahal

Edited by Dorregaray, 04 March 2013 - 11:44 AM.

  • 18 Likes

OP Dorregaray

Dorregaray

Super User

Posted 02 December 2012 - 11:40 AM #2

The camera on JellyBean reached the same functional/stability level as preview15 for CM9. There might be some minor issues but we're good.

Preview rotation issues
Our beloved TouchPad has a front camera. The front cameras in Android are expected to be working in mirror mode. Our sensor is configured for working in normal mode (as rear camera) which is the cause of the preview rotation issues we had. It is possible to change the sensor configuration (in kernel) to make it working in mirror mode. However while this solves the preview rotation this breaks thevideo records, pics and Skype. So I tried to reconfigure the camera sensor on runtime - to mirror mode for preview and normal mode for video recording and taking pics. However didn't fixed the Skype.
In the preview3 I have modify the libcameraservice (which is responsible for rotating the preview) to work differently, which worked. But adding an flag FIRST_CAMERA_NOT_MIRRORED (or something like that) wasn't good enough to get merged to CM sources (I didn't even posted it to the gerrit).
So after discussion with jcsullins I decided to leave the sensor working in normal mode but to flip (vertically & horizontally) the preview frames in camerahal to look exactly the same as in mirror mode. This change has been introduced in preview4 and is the final one.
However not all 3rd party apps works well with front cameras. Some of them has a configuration option to fix the preview rotation like ucam (works well) and camera zoom fx (but the option is not working). Some of them don't and in that case there's nothing I can do about it.

Panorama mode
The preview in panorama mode in stock camera app is rotated by 90 degrees. This is by the design - our camera is rotated 90 degrees so it produces the pics of size 768x1024. The panorama mode needs to use the larger value for width so it has to rotate the preview. Changing that will require patching the camera app and will break the panorama mode. So this is not an option.
The second issue are the artefacts that appear in the preview. For some other platforms setting the global flags QCOM_NO_SECURE_PLAYBACK or QCOM_ICS_COMPAT (or maybe ANCIENT_GL) was reported to fix this issue but none of them worked for me. So we might have a little different issue. As we're using quite old kernel there might be some incompatibility with structures exchanged between kernel and qcom drivers. It may not be so easy to track down the issue and fix it. In fact fixing it may break other things so I decided not to touch it.

Edited by Dorregaray, 10 December 2012 - 11:56 PM.

  • 12 Likes

shezar

shezar

Member

  • 44 posts

Posted 02 December 2012 - 11:52 AM #3

Is this based on the sources with working audio and hardware decoding?
By the way you are still awesome ;)

Edited by shezar, 02 December 2012 - 11:59 AM.

  • 0 Likes

Gradular

Gradular

Android Master

Posted 02 December 2012 - 11:53 AM #4

Excellent!!! Downloading now.

Sent from my cm_tenderloin using RootzWiki
  • 0 Likes

Motorola I1, Samsung Transform Ultra(rooted) running 2.3.6 via ff27 forcedROM
Touchpad running cm7 a3.5, cm9 a0, cm9 a0.5, cm9 a0.6 nightly, cm9 a1.0, cm9 a2.0, cm9 nightlies, cm 9 weeklies, cm 10 previews cm10.1 Milaq, cm10.2 Milaq cm11 by invisblek
Samsung Galaxy tab running cm10, cm10.1 experimental, cm10.1 nightlies, cody's cm10.2, cm10.2 nightlies  cm11 by codyf86

All the TouchPad PC files in a few simple clicks. How to change your data, system, and cache sizes


OP Dorregaray

Dorregaray

Super User

Posted 02 December 2012 - 12:59 PM #5

the audio is working. hardware encoding probably too. but don't expect too much from the cam right now ;)
  • 3 Likes

Gradular

Gradular

Android Master

Posted 02 December 2012 - 01:03 PM #6

I'm getting no camera app in my drawer for some reason. But in camera ics,no preview at first then rotation is upside down with pic taken rotated 90. In camera zoom no preview at first, but then rotated 90. The pic taken is rotated correctly! Pixlr express allows me to use the stock camera app but it works just like ics. Camera360 crashes without message.

Also I have two galleries. I didn't reflash gapps when I flashed the rom.

Sent from my cm_tenderloin using RootzWiki
  • 0 Likes

Motorola I1, Samsung Transform Ultra(rooted) running 2.3.6 via ff27 forcedROM
Touchpad running cm7 a3.5, cm9 a0, cm9 a0.5, cm9 a0.6 nightly, cm9 a1.0, cm9 a2.0, cm9 nightlies, cm 9 weeklies, cm 10 previews cm10.1 Milaq, cm10.2 Milaq cm11 by invisblek
Samsung Galaxy tab running cm10, cm10.1 experimental, cm10.1 nightlies, cody's cm10.2, cm10.2 nightlies  cm11 by codyf86

All the TouchPad PC files in a few simple clicks. How to change your data, system, and cache sizes


Gradular

Gradular

Android Master

Posted 02 December 2012 - 01:11 PM #7

And the grid is limited to 7x7...

Sent from my cm_tenderloin using RootzWiki
  • 0 Likes

Motorola I1, Samsung Transform Ultra(rooted) running 2.3.6 via ff27 forcedROM
Touchpad running cm7 a3.5, cm9 a0, cm9 a0.5, cm9 a0.6 nightly, cm9 a1.0, cm9 a2.0, cm9 nightlies, cm 9 weeklies, cm 10 previews cm10.1 Milaq, cm10.2 Milaq cm11 by invisblek
Samsung Galaxy tab running cm10, cm10.1 experimental, cm10.1 nightlies, cody's cm10.2, cm10.2 nightlies  cm11 by codyf86

All the TouchPad PC files in a few simple clicks. How to change your data, system, and cache sizes


RolandDeschain79

RolandDeschain79

Android Adventurer

Posted 02 December 2012 - 02:05 PM #8

the audio is working. hardware encoding probably too. but don't expect too much from the cam right now ;)


Good enough for a first test, thank you for your hard work:) Time for some testing!

P:S: Everyone make a Nandroid backup before testing.


Edited by RolandDeschain79, 02 December 2012 - 02:10 PM.

  • 0 Likes

OP Dorregaray

Dorregaray

Super User

Posted 02 December 2012 - 02:28 PM #9

I'm getting no camera app in my drawer for some reason.

the camera is integrated in the gallery (don't ask me why) so you can access it via gallery or from the lock screen.

But in camera ics,no preview at first then rotation is upside down with pic taken rotated 90. In camera zoom no preview at first, but then rotated 90. The pic taken is rotated correctly! Pixlr express allows me to use the stock camera app but it works just like ics. Camera360 crashes without message.

the rotation is totally messed up. needs to be fixed ;)

Also I have two galleries.

me too ;)
  • 3 Likes

RolandDeschain79

RolandDeschain79

Android Adventurer

Posted 02 December 2012 - 02:46 PM #10

The first release is a full ROM at this point. This will be the base for the next preview releases until we reach the functional level of preview15 for ICS. Then I'll work on getting this stuff merged to CM10 (as happened today for CM9).


I'm testing it out now, it works! Thank you so much, i'm very happy to have CM10 with a working Camera. Is this build based on Jcsullins latest cm-10-20121116-EXPERIMENTAL-tenderloin-...zip.. or are there differences between the two builds, other than the working Camera?

Edited by RolandDeschain79, 02 December 2012 - 02:50 PM.

  • 0 Likes