[HTC Aria Android Development] munjeni:
About camera. We have black screen for about 3sec and than camera crash! We have in logcat:

D/Camera ( 692): app passed NULL surface

found part of the code here -> system/frameworks/base/libs/camera/camera.cpp:

// pass the buffered Surface to the camera service
status_t Camera::setPreviewDisplay(const sp<Surface>& surface)
{
LOGV("setPreviewDisplay(%p)", surface.get());
sp <ICamera> c = mCamera;
if (c == 0) return NO_INIT;
if (surface != 0) {
return c->setPreviewDisplay(surface);
} else {
LOGD("app passed NULL surface");
return c->setPreviewDisplay(0);
}
}

// pass the buffered ISurfaceTexture to the camera service
status_t Camera::setPreviewTexture(const sp<ISurfaceTexture>& surfaceTexture)
{
LOGV("setPreviewTexture(%p)", surfaceTexture.get());
sp <ICamera> c = mCamera;
if (c == 0) return NO_INIT;
if (surfaceTexture != 0) {
return c->setPreviewTexture(surfaceTexture);
} else {
LOGD("app passed NULL surface");
return c->setPreviewTexture(0);
}
}

Idea? This camera.cpp need to be modified to send detailed log debug.

Using grep -r "native_access_parm:" . I can not see what produce this:

E/QualcommCameraHardware( 110): native_access_parm: error (No such file or directory): fd 11, type 1, length 32, status 0

Maybe propietary libcamera.so ?

EDIT:

yes its libcamera.so:

; android::QualcommCameraHardware::native_access_parm(cam_ctrl_type, unsigned short, void *)
EXPORT _ZN7android22QualcommCameraHardware18native_access_parmE13cam_ctrl_typetPv
_ZN7android22QualcommCameraHardware18native_access_parmE13cam_ctrl_typetPv
; CODE XREF: android::QualcommCameraHardware::setSharpness(android::CameraParameters const&)+98p
; android::QualcommCameraHardware::setSaturation(android::CameraParameters const&)+98p ...

var_50	= -0x50
var_4C	= -0x4C
var_48	= -0x48
var_44	= -0x44
var_40	= -0x40
var_38	= -0x38
var_34	= -0x34
var_2C	= -0x2C

PUSH	{R4-R7,LR}
SUB	SP, SP,	#0x3C
LDR	R6, =0x1388
ADD	R4, SP,	#0x50+var_2C
STRH	R1, [R4]
STR	R2, [SP,#0x50+var_38]
STR	R0, [SP,#0x50+var_34]
MOVS	R7, R1
MOVS	R0, #0x18
MOV	R1, SP
STR	R6, [R4,#0xC]
LDRH	R6, [R0,R1]
LDR	R5, =(_GLOBAL_OFFSET_TABLE_ - 0xA76094EE)
LDR	R1, =(aQualcommcamera -	0xA7613548)
STRH	R6, [R4,#2]
LDR	R6, [SP,#0x50+var_34]
LDR	R2, =(aSFdDTypeDLengt -	0xA7613548)
ADD	R5, PC
ADDS	R6, #0xA0
LDR	R0, [R6]
STR	R3, [R4,#4]
LDR	R3, =(aNative_access_ -	0xA7613548)
STR	R0, [R4,#0x10]
STR	R0, [SP,#0x50+var_50]
LDR	R0, [SP,#0x50+var_38]
ADDS	R1, R5,	R1	; "QualcommCameraHardware"
ADDS	R2, R5,	R2	; "%s: fd %d, type %d, length %d"
STR	R0, [SP,#0x50+var_48]
ADDS	R3, R5,	R3	; "native_access_parm"
MOVS	R0, #3
STR	R7, [SP,#0x50+var_4C]
BLX	__android_log_print
LDR	R0, [R6]	; fd
LDR	R1, =0x40046D04	; request
MOVS	R2, R4
BLX	ioctl
CMP	R0, #0
BLT	loc_A7609520
LDRH	R3, [R4,#8]
MOVS	R0, #1
CMP	R3, #1
BEQ	loc_A7609554

loc_A7609520	; CODE XREF: android::QualcommCameraHardware::native_access_parm(cam_ctrl_type,ushort,void *)+4Ej
BLX	__errno
LDR	R0, [R0]	; errnum
BLX	strerror
LDR	R6, [SP,#0x50+var_34]
STR	R0, [SP,#0x50+var_50]
LDR	R1, =(aQualcommcamera -	0xA7613548)
ADDS	R6, #0xA0
LDR	R0, [R6]
LDR	R2, =(aSErrorSFdDType -	0xA7613548)
STR	R7, [SP,#0x50+var_48]
LDR	R3, =(aNative_access_ -	0xA7613548)
LDR	R7, [SP,#0x50+var_38]
STR	R0, [SP,#0x50+var_4C]
ADDS	R1, R5,	R1	; "QualcommCameraHardware"
ADDS	R2, R5,	R2	; "%s: error (%s): fd %d, type %d, length "...
ADDS	R3, R5,	R3	; "native_access_parm"
STR	R7, [SP,#0x50+var_44]
ADD	R5, SP,	#0x50+var_2C
LDRH	R4, [R5,#8]
MOVS	R0, #6
STR	R4, [SP,#0x50+var_40]
BLX	__android_log_print
MOVS	R0, #0

loc_A7609554	; CODE XREF: android::QualcommCameraHardware::native_access_parm(cam_ctrl_type,ushort,void *)+56j
ADD	SP, SP,	#0x3C
POP	{R4-R7,PC}
; End of function android::QualcommCameraHardware::native_access_parm(cam_ctrl_type,ushort,void	*)