This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3359: USB Camera not working in android kitkat-4.4.4

Part Number: AM3359

Hi all, 

Greetings !!!

I am using USB camera with AM335x for Android KitKat 4.4.

Kernel Version - 3.2 

I have done all compilation setup by using the below link. SDcard image is working perfectly.

https://github.com/csimmonds/bbb-android-device-files/tree/kk4.4-sdcard

For USB Camera i have  done all the changes as per the below wiki link,

http://processors.wiki.ti.com/index.php/TI-Android-JB-4.2.2-DevKit-4.1.1_PortingGuide#USB_camera 

I cross compiled the kernel and flashed the new kernel image into MMC. i am getting the video0 in /dev.

but when i open the camera application, it is closing immediately. not throwing any error on display.

here I am attaching the Logcat log for reference.

Log:
~~~

(standard input):4957:I/ActivityManager( 395): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER]
flg=0x10200000 cmp=com.android.camera2/com.android.camera.CameraLauncher} from pid 585
(standard input):4958:I/ActivityManager( 395): Start proc com.android.camera2 for activity com.android.camera2/com.android.cam
era.CameraLauncher: pid=1352 uid=10040 gids={50040, 3003, 1028, 1015}
[ 2146.053061] LCDC sync lost or underflow error occured 0x22
(standard input):4965:V/CAM_PhotoModule( 1352): Open camera device.
(standard input):4967:D/****CameraHAL( 1340): cameraHal BACK 0
(standard input):4968:D/****CameraHAL( 1340): cameraHal 0
(standard input):4969:D/****CameraHAL( 1340): cameraHal Front 1
(standard input):4970:D/****CameraHAL( 1340): cameraHal 1
(standard input):4971:V/CameraHolder( 1352): open camera 0
(standard input):4972:D/****CameraHAL( 1340): cameraHal BACK 0
(standard input):4973:D/****CameraHAL( 1340): cameraHal 0
(standard input):4974:D/****CameraHAL( 1340): cameraHal BACK 0
(standard input):4975:D/****CameraHAL( 1340): cameraHal 0
(standard input):4979:I/CameraClient( 1340): Opening camera 0
(standard input):4980:I/****CameraHAL( 1340): camera_device open
(standard input):4981:D/CameraHardware( 1340): Set Parameter...!!
(standard input):4982:D/CameraHardware( 1340): PreviewFormat yuv422sp
(standard input):4983:D/CameraHardware( 1340): PictureFormat jpeg
(standard input):4984:D/CameraHardware( 1340): preview width:640,height:480
(standard input):4985:D/CameraHardware( 1340): picture width:640,height:480
(standard input):4986:D/CameraHardware( 1340): FRAMERATE 15
(standard input):4987:D/CameraHardware( 1340): Picture Size by CamHAL 640 x 480
(standard input):4988:D/CameraHardware( 1340): Preview Resolution by CamHAL 640 x 480
(standard input):4989:D/CameraHardware( 1340): enableMsgType:3085
(standard input):4990:D/CameraHardware( 1340): Set Parameter...!!
(standard input):4991:D/CameraHardware( 1340): PreviewFormat yuv422sp
(standard input):4992:D/CameraHardware( 1340): PictureFormat jpeg
(standard input):4993:D/CameraHardware( 1340): preview width:640,height:480
(standard input):4994:D/CameraHardware( 1340): picture width:640,height:480
(standard input):4995:D/CameraHardware( 1340): FRAMERATE 15
(standard input):4996:D/CameraHardware( 1340): Picture Size by CamHAL 640 x 480
(standard input):4997:D/CameraHardware( 1340): Preview Resolution by CamHAL 640 x 480
(standard input):4998:D/CameraHardware( 1340): Set Parameter...!!
(standard input):4999:D/CameraHardware( 1340): PreviewFormat yuv422sp
(standard input):5000:D/CameraHardware( 1340): PictureFormat jpeg
(standard input):5001:D/CameraHardware( 1340): preview width:640,height:480
(standard input):5002:D/CameraHardware( 1340): picture width:640,height:480
(standard input):5003:D/CameraHardware( 1340): FRAMERATE 15
(standard input):5004:D/CameraHardware( 1340): Picture Size by CamHAL 640 x 480
(standard input):5005:D/CameraHardware( 1340): Preview Resolution by CamHAL 640 x 480
(standard input):5006:E/Camera ( 1352): Invalid range list string=null
(standard input):5010:E/AndroidRuntime( 1352): Process: com.android.camera2, PID: 1352
(standard input):5011:E/AndroidRuntime( 1352): java.lang.RuntimeException: Unable to resume activity {com.android.camera2/com.a
ndroid.camera.CameraLauncher}: java.lang.NullPointerException
(standard input):5026:E/AndroidRuntime( 1352): at com.android.camera.util.CameraUtil.getPhotoPreviewFpsRange(CameraUtil.java:8
38)
(standard input):5027:E/AndroidRuntime( 1352): at com.android.camera.util.CameraUtil.getPhotoPreviewFpsRange(CameraUtil.java:8
34)
(standard input):5028:E/AndroidRuntime( 1352): at com.android.camera.PhotoModule.updateCameraParametersInitialize(PhotoModule.
java:1560)
(standard input):5029:E/AndroidRuntime( 1352): at com.android.camera.PhotoModule.setCameraParameters(PhotoModule.java:1778)
(standard input):5030:E/AndroidRuntime( 1352): at com.android.camera.PhotoModule.prepareCamera(PhotoModule.java:1186)
(standard input):5031:E/AndroidRuntime( 1352): at com.android.camera.PhotoModule.onResumeTasks(PhotoModule.java:1224)
(standard input):5032:E/AndroidRuntime( 1352): at com.android.camera.PhotoModule.onResumeAfterSuper(PhotoModule.java:1213)
(standard input):5033:E/AndroidRuntime( 1352): at com.android.camera.CameraActivity.onResume(CameraActivity.java:1243)
(standard input):5038:W/ActivityManager( 395): Force finishing activity com.android.camera2/com.android.camera.CameraLaunche
r
(standard input):5039:I/WindowManager( 395): Screenshot max retries 4 of Token{41ec0060 ActivityRecord{41e43e78 u0 com.android
.camera2/com.android.camera.CameraLauncher t11 f}} appWin=Window{41ea0df0 u0 Starting com.android.camera2} drawState=4
(standard input):5042:I/ActivityManager( 395): Process com.android.camera2 (pid 1352) has died.
(standard input):5043:F/ActivityManager( 395): Service ServiceRecord{41e523c0 u0 com.android.camera2/com.android.camera.MediaS
aveService} in process ProcessRecord{41ec3028 1352:com.android.camera2/u0a40} not same as in map: null
(standard input):5044:W/CameraService( 1340): Disconnecting camera client 0x400b7ce8 since the binder for it died (this pid 134
0)
(standard input):5045:D/CameraHardware( 1340): disableMsgType:65535
(standard input):5046:I/CameraClient( 1340): Destroying camera 0
(standard input):5079:I/DEBUG ( 80): #00 pc 00004fd2 /system/lib/hw/camera.omap3.so (android::V4L2Camera::Uninit()+5)
(standard input):5080:I/DEBUG ( 80): #01 pc 000063db /system/lib/hw/camera.omap3.so (android::CameraHardware::~Camera
Hardware()+14)
(standard input):5081:I/DEBUG ( 80): #02 pc 00006485 /system/lib/hw/camera.omap3.so (android::CameraHardware::~Camera
Hardware()+4)
(standard input):5082:I/DEBUG ( 80): #03 pc 00004587 /system/lib/hw/camera.omap3.so
(standard input):5083:I/DEBUG ( 80): #04 pc 00044567 /system/lib/libcameraservice.so
(standard input):5084:I/DEBUG ( 80): #05 pc 000445bd /system/lib/libcameraservice.so
(standard input):5086:I/DEBUG ( 80): #07 pc 00042b83 /system/lib/libcameraservice.so (android::sp<android::CameraDevi
ceBase>::clear()+18)
(standard input):5087:I/DEBUG ( 80): #08 pc 00045127 /system/lib/libcameraservice.so (android::CameraClient::disconne
ct()+170)
(standard input):5088:I/DEBUG ( 80): #09 pc 0003f845 /system/lib/libcameraservice.so (android::CameraService::binderD
ied(android::wp<android::IBinder> const&)+48)
(standard input):5118:I/DEBUG ( 80): 41228b9c 40cc40bc /system/lib/hw/camera.omap3.so
(standard input):5120:I/DEBUG ( 80): 41228ba4 405f6050 /system/lib/libcameraservice.so
(standard input):5121:I/DEBUG ( 80): 41228ba8 405b8859 /system/lib/libcameraservice.so (non-virtual thunk to and
roid::CameraService::binderDied(android::wp<android::IBinder> const&))
(standard input):5122:I/DEBUG ( 80): 41228bac 40cc03df /system/lib/hw/camera.omap3.so (android::CameraHardware::
~CameraHardware()+18)
(standard input):5124:I/DEBUG ( 80): 41228bb4 40cc40bc /system/lib/hw/camera.omap3.so
(standard input):5126:I/DEBUG ( 80): 41228bbc 40cc0489 /system/lib/hw/camera.omap3.so (android::CameraHardware::
~CameraHardware()+8)
(standard input):5128:I/DEBUG ( 80): 41228bc4 40cbe589 /system/lib/hw/camera.omap3.so
(standard input):5388:I/ServiceManager( 75): service 'media.camera' died
(standard input):5392:I/CameraService( 1380): CameraService started (pid=1380)
(standard input):5393:I/CameraService( 1380): Loaded "V4L2 CameraHal Module" camera module

Anybody faced this issue before ?

What could be the problem ? 

please help me to find out this.

Thanks in advance for your help and time.

Best Regards,
Bhaskar