[Bravo Android Development] snnyby:
I think we need the developer of defy cm7 to help us

Ok guys i have spent some time today an found some more information on camera:

1- there is a command to enable more camera debugging in cm7:

adb shell dumpsys media.camera -v 2

2- i took a picture in cm7.1 got little bit more detail in the error:

E/camera ( 2639): <PROFILE> mAutoFocusTime = 1508ms

D/CameraService( 1907): setParameters (pid 2639) (rotation-values=0,90,180,270;mot-postview-mode=on;zoom=0;mot-video-size=640

x480;mot-sensor-display-orientation-support-values=off,on;mot-face-track-frame-skip=15;zoom-supported=true;mot-flip-mode-valu

es=off;whitebalance=auto;mot-face-track-mode=off;scene-mode=auto;jpeg-quality=90;preview-format-values=yuv420sp,yuv422i-yuyv;

rotation=90;mot-picture-iso-values=auto;jpeg-thumbnail-quality=75;preview-format=yuv420sp;gps-timestamp=1323906986;mot-zoom-s

tep=0.5;mot-sensor-display-orientation=0;mot-video-stabilization-values=off;mot-image-stabilization-values=off;preview-size=6

40x480;focal-length=3.92;mot-max-picture-continuous-zoom=6;flash-mode-values=off,on,auto,torch;preview-frame-rate-values=10,1

5,20,24,25,30;mot-image-stabilization=off;mot-exposure-offset-values=-3,-2.67,-2.33,-2,-1.67,-1.33,-1,-0.67,-0.33,0,0.33,0.67

,1,1.33,1.67,2,2.33,2.67,3;preview-frame-rate=30;mot-face-detect-num-faces=4;mot-max-face-detect-num-faces=9;focus-mode-value

s=auto,macro,infinity,off;jpeg-thumbnail-width=

D/LibSOCJordanCamera( 1907): +setParameters

I/LibSOCJordanCamera( 1907): Changed: rotation: 0 -> 90 {0,90,180,270}

I/LibSOCJordanCamera( 1907): Changed: gps-timestamp: (null) -> 1323906986 {(null)}

I/LibSOCJordanCamera( 1907): Extract changes completed, 2 total changes

D/LibSOCJordanCamera( 1907): +handlePicRotationChange

D/LibSOCJordanCamera( 1907): -handlePicRotationChange

D/LibSOCJordanCamera( 1907): +handleGpsTimeStampChange

D/LibSOCJordanCamera( 1907): -handleGpsTimeStampChange

D/LibSOCJordanCamera( 1907): -setParameters

D/CameraService( 1907): takePicture (pid 2639)

D/LibSOCJordanCamera( 1907): +stopPreview

E/LibSOCJordanCamera( 1907): Turned off Streaming

E/LibSOCJordanCamera( 1907): dequeing frames from overlay

D/LibSOCJordanCamera( 1907): -stopPreview

D/LibSOCJordanCamera( 1907): +captureThread

D/CameraService( 1907): notifyCallback(2)

D/CameraService( 1907): lockIfMessageWanted(2): enter sleep

D/CameraService( 1907): lockIfMessageWanted(2): waited for 10 ms

D/CameraService( 1907): playSound(0)

D/AudioHardwareMot( 1907): doRouting devs: stereo 0x2, mono 0, input 0. Chose speaker Speakerphone (gain 0xb) mic None (gain

0x1c1c)

D/AudioHardwareMot( 1907): Output 0x134e0 exiting standby

V/camera ( 2639): mShutterLag = 448ms

D/LibSOCJordanCamera( 1907): cfilledbuffer length = 1441792

D/CameraService( 1907): dataCallback(64)

E/CameraService( 1907): Null data returned in data callback

D/CameraService( 1907): dataCallback(256)

E/LibSOCJordanCamera( 1907): MG: Returning focus to infinity!

D/LibSOCJordanCamera( 1907): -captureThread

E/Camera ( 2639): Error -2147483648

V/camera ( 2639): mPictureDisplayedToJpegCallbackTime = 1323906987599ms

E/camera ( 2639): <PROFILE> Snapshot to Snapshot Latency = 2209 ms

D/CameraService( 1907): setPreviewDisplay(0x72d80) (pid 2639)

3- I also found in cm7 code tree where these error messages are generated:

https://github.com/CyanogenMod/andr...ces/camera/libcameraservice/CameraService.cpp

void CameraService::Client::dataCallback(int32_t msgType,

const sp<IMemory>& dataPtr, void* user) {

LOG2("dataCallback(%d)", msgType);

sp<Client> client = getClientFromCookie(user);

if (client == 0) return;

if (!client->lockIfMessageWanted(msgType)) return;

if (dataPtr == 0) {

LOGE("Null data returned in data callback");

client->handleGenericNotify(CAMERA_MSG_ERROR, UNKNOWN_ERROR, 0);

#if (defined(TARGET_OMAP3) && defined(OMAP_ENHANCEMENT))

//Handle the NULL data returned in RawCallback from lower layers in OMAP3

client->handleGenericData(msgType, NULL);

#endif

return;

}

Im not a developer , but to my understanding CameraService calls LibSOCJordanCamera to take a picture, camera takes the picture and saves the raw image (1441792 bytes) somewhere in the memory. Then Cameraservice tries to read the raw image from the memory but it fails.

a google search on LibSOCJordanCamera and cfilledbuffer revealed pictures taken on a defy are always raw 2621440 bytes (5M) whereas Bravo's 3M sensor allocates 1441792 bytes.

I am thinking that LibSOCJordanCamera might be rejecting the data as invalid as it is not 2621440 byte long.

I will try to get hold of maniac103 who seems to maintain libcamera stuff for cm7 defy.