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.

Camera OV10633

Hello TI,

Our development is based on Vayu EVM XC5777X Rev G3 board with Android O (6AO.1.0_Engineering_Drop).

We wanted to integrate the OV10633 sensor to target device.

We connect the OV10633 sensor to the target device and kernel driver recognized it, but in android 0 sensor is not recognized.

We want to be able to use the sensor from the android 0.

Please can you support use with this?

Regards,

Goran

  • Hi Goran,

    I have forwarded your question to Android expert for comment.

    Regards,
    Yordan
  • Hi Goran,

    Please see e2e.ti.com/.../635129 for reference on how to enable OV1063x camera on 6AO.1.0_Engineering_Drop.

    Thanks,
    David
  • Hi David,

    Thanks for your reply.

    We apply that pathes, but still camera not work.

    Additionally, we are changed resolution (1280x720 because that's the resolution of camera OV10633) in V4LCapabilities.cpp and CameraHal.h files. OmxFrameDecoder.cpp file not exist (not in one folder).

    After that android recognized the camera (hardware/ti/dra7xx/camera/V4LCameraAdapter/V4LCameraAdapter.cpp:1301 V4LCameraAdapter_Capabilities - Camera device path 0 is /dev/video1), but still get some error logs during initialization (error log is attached - 'CameraInitialization.txt'):
    - hardware/ti/dra7xx/camera/CameraHal.cpp:126 getSocFamily - '/sys/board_properties/soc/family' Not Available.
    - hardware/ti/dra7xx/camera/CameraHal.cpp:286 enableMsgType - Preview callback not enabled 409.

    The android application "Camera" crash when we try to run it.
    We attached error log ('CameraApp_ErrorLog.txt').

    Please can you support us with this problem?

    Thanks,
    Goran

    -------- beginning of main
    --------- beginning of system
    01-01 00:00:10.102   175   175 E CameraHal: (b42914a8)   hardware/ti/dra7xx/camera/V4LCameraAdapter/V4LCameraAdapter.cpp:1260 V4LCameraAdapter_Capabilities - Opening device[0] = /dev/video0..
    01-01 00:00:10.103   175   175 E CameraHal: (b42914a8)   hardware/ti/dra7xx/camera/V4LCameraAdapter/V4LCameraAdapter.cpp:1275 V4LCameraAdapter_Capabilities - Error while adapter initialization: video capture not supported.
    01-01 00:00:10.103   175   175 E CameraHal: (b42914a8)   hardware/ti/dra7xx/camera/V4LCameraAdapter/V4LCameraAdapter.cpp:1260 V4LCameraAdapter_Capabilities - Opening device[1] = /dev/video1..
    01-01 00:00:10.335   175   175 E CameraHal: (b42914a8)   hardware/ti/dra7xx/camera/V4LCameraAdapter/V4LCapabilities.cpp:340 getCaps - Error while getting capabilities: V4L2_FRMIVAL_TYPE_CONTINUOUS & V4L2_FRMIVAL_TYPE_STEPWISE are not supported.
    01-01 00:00:10.336   175   175 E CameraHal: (b42914a8)   hardware/ti/dra7xx/camera/V4LCameraAdapter/V4LCameraAdapter.cpp:1301 V4LCameraAdapter_Capabilities - Camera device path 0 is /dev/video1
    01-01 00:00:10.336   175   175 E CameraHal: (b42914a8)   hardware/ti/dra7xx/camera/BaseCameraAdapter.cpp:2713 CameraAdapter_Capabilities - supportedCameras= 1
    01-01 00:00:10.336   175   175 I CameraHal: (b42914a8)   hardware/ti/dra7xx/camera/CameraProperties.cpp:114 loadProperties - num_cameras = 1
    01-01 00:00:12.042   175   175 E CameraHal: (b42914a8)   hardware/ti/dra7xx/camera/CameraHal_Module.cpp:634 camera_device_open - CameraHal_Module: ******************* 1 *******************
    01-01 00:00:12.042   175   175 I CameraHal: (b42914a8)   hardware/ti/dra7xx/camera/CameraHal_Module.cpp:638 camera_device_open - camera_device open
    01-01 00:00:12.042   175   175 E CameraHal: (b42914a8)   hardware/ti/dra7xx/camera/CameraHal.cpp:126 getSocFamily - '/sys/board_properties/soc/family' Not Available
    01-01 00:00:12.042   175   175 E CameraHal: (b42914a8)   hardware/ti/dra7xx/camera/CameraHal.cpp:4143 initialize - Sensor index= 0; Sensor name= USBCAMERA
    01-01 00:00:12.042   175   175 E CameraHal: (b42914a8)   hardware/ti/dra7xx/camera/V4LCameraAdapter/V4LCameraAdapter.cpp:895 V4LCameraAdapter - V4LCameraAdapter sensor index 0 
    01-01 00:00:12.043   175   175 E CameraHal: Video device list::dev_list[0]= /dev/video1
    01-01 00:00:12.043   175   175 E CameraHal: Video device list::dev_list[1]= /dev/video10
    01-01 00:00:12.043   175   175 E CameraHal: Video device list::dev_list[2]= /dev/video11
    01-01 00:00:12.043   175   175 E CameraHal: Video device list::dev_list[3]= /dev/video0
    01-01 00:00:12.043   175   175 E CameraHal: Found VPE M2M device /dev/video0!!! 
    01-01 00:00:12.094   175   175 E CameraHal: (b42914a8)   hardware/ti/dra7xx/camera/CameraHal_Module.cpp:634 camera_device_open - CameraHal_Module: ******************* 1 *******************
    01-01 00:00:12.094   175   175 I CameraHal: (b42914a8)   hardware/ti/dra7xx/camera/CameraHal_Module.cpp:638 camera_device_open - camera_device open
    01-01 00:00:12.094   175   175 E CameraHal: (b42914a8)   hardware/ti/dra7xx/camera/CameraHal_Module.cpp:643 camera_device_open - num_cameras 1 cameraid 0 gCamerasOpen 0
    01-01 00:00:12.094   175   175 E CameraHal: (b42914a8)   hardware/ti/dra7xx/camera/CameraHal.cpp:126 getSocFamily - '/sys/board_properties/soc/family' Not Available
    01-01 00:00:12.094   175   175 E CameraHal: (b42914a8)   hardware/ti/dra7xx/camera/CameraHal.cpp:4143 initialize - Sensor index= 0; Sensor name= USBCAMERA
    01-01 00:00:12.094   175   175 E CameraHal: (b42914a8)   hardware/ti/dra7xx/camera/V4LCameraAdapter/V4LCameraAdapter.cpp:895 V4LCameraAdapter - V4LCameraAdapter sensor index 0 
    01-01 00:00:12.094   175   175 E CameraHal: Video device list::dev_list[0]= /dev/video1
    01-01 00:00:12.095   175   175 E CameraHal: Video device list::dev_list[1]= /dev/video10
    01-01 00:00:12.095   175   175 E CameraHal: Video device list::dev_list[2]= /dev/video11
    01-01 00:00:12.095   175   175 E CameraHal: Video device list::dev_list[3]= /dev/video0..
    01-01 00:00:12.095   175   175 E CameraHal: Found VPE M2M device /dev/video0!!! 
    01-01 00:00:25.800   175   175 E CameraHal: (b42914a8)   hardware/ti/dra7xx/camera/CameraHal_Module.cpp:634 camera_device_open - CameraHal_Module: ******************* 1 *******************
    01-01 00:00:25.800   175   175 I CameraHal: (b42914a8)   hardware/ti/dra7xx/camera/CameraHal_Module.cpp:638 camera_device_open - camera_device open
    01-01 00:00:25.801   175   175 E CameraHal: (b42914a8)   hardware/ti/dra7xx/camera/CameraHal_Module.cpp:643 camera_device_open - num_cameras 1 cameraid 0 gCamerasOpen 0
    01-01 00:00:25.801   175   175 E CameraHal: (b42914a8)   hardware/ti/dra7xx/camera/CameraHal.cpp:126 getSocFamily - '/sys/board_properties/soc/family' Not Available
    01-01 00:00:25.801   175   175 E CameraHal: (b42914a8)   hardware/ti/dra7xx/camera/CameraHal.cpp:4143 initialize - Sensor index= 0; Sensor name= USBCAMERA
    01-01 00:00:25.801   175   175 E CameraHal: (b42914a8)   hardware/ti/dra7xx/camera/V4LCameraAdapter/V4LCameraAdapter.cpp:895 V4LCameraAdapter - V4LCameraAdapter sensor index 0 
    01-01 00:00:25.801   175   175 E CameraHal: Video device list::dev_list[0]= /dev/video1
    01-01 00:00:25.801   175   175 E CameraHal: Video device list::dev_list[1]= /dev/video10
    01-01 00:00:25.801   175   175 E CameraHal: Video device list::dev_list[2]= /dev/video11
    01-01 00:00:25.801   175   175 E CameraHal: Video device list::dev_list[3]= /dev/video0
    01-01 00:00:25.801   175   175 E CameraHal: Opening device[] =.. num_v4l_devices 4
    01-01 00:00:25.802   175   175 E CameraHal: Found VPE M2M device /dev/video0!!!
    01-01 00:00:25.982   175   175 E CameraHal: (b42914a8)   hardware/ti/dra7xx/camera/CameraHal.cpp:286 enableMsgType - Preview callback not enabled 409
    
    
    01-01 00:15:48.226   747   747 D InputEventConsistencyVerifier: TouchEvent: ACTION_DOWN but pointers are already down.  Probably missing ACTION_UP from previous gesture.
    01-01 00:15:48.226   747   747 D InputEventConsistencyVerifier:   in android.view.ScaleGestureDetector@7009930
    01-01 00:15:48.226   747   747 D InputEventConsistencyVerifier:   0: sent at 948220964000, MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=609.5238, y[0]=194.75656, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x2, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=948220, downTime=948220, deviceId=1, source=0x1002 }
    01-01 00:15:48.226   747   747 D InputEventConsistencyVerifier:   -- recent events --
    01-01 00:15:48.226   747   747 D InputEventConsistencyVerifier:   1: sent at 944321036000, MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=618.5168, y[0]=179.77528, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x2, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=944321, downTime=944321, deviceId=1, source=0x1002 }
    01-01 00:15:48.226   747   747 D InputEventConsistencyVerifier:   2: sent at 735247798000, MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=37.0, y[0]=764.2409, toolType[0]=TOOL_TYPE_MOUSE, buttonState=0, metaState=0, flags=0x2, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=735247, downTime=735159, deviceId=3, source=0x2002 }
    01-01 00:15:48.226   747   747 D InputEventConsistencyVerifier:   3: sent at 735159795000, MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=37.0, y[0]=764.2409, toolType[0]=TOOL_TYPE_MOUSE, buttonState=BUTTON_PRIMARY, metaState=0, flags=0x2, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=735159, downTime=735159, deviceId=3, source=0x2002 }
    01-01 00:15:48.226   747   747 D InputEventConsistencyVerifier:   4: sent at 734767796000, MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=3.0, y[0]=767.2409, toolType[0]=TOOL_TYPE_MOUSE, buttonState=0, metaState=0, flags=0x2, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=734767, downTime=734671, deviceId=3, source=0x2002 }
    01-01 00:15:48.226   747   747 D InputEventConsistencyVerifier:   5: sent at 734671793000, MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=3.0, y[0]=767.2409, toolType[0]=TOOL_TYPE_MOUSE, buttonState=BUTTON_PRIMARY, metaState=0, flags=0x2, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=734671, downTime=734671, deviceId=3, source=0x2002 }
    01-01 00:15:48.333   223   301 W APM_AudioPolicyManager: getOutput() could not find output for stream 1, samplingRate 0,format 0, channels 3, flags 0
    01-01 00:15:48.333   223   301 W APM_AudioPolicyManager: getOutput() could not find output for stream 1, samplingRate 0,format 0, channels 3, flags 0
    01-01 00:15:48.334   223   301 W APM_AudioPolicyManager: getOutput() could not find output for stream 1, samplingRate 48000,format 1, channels 3, flags 4
    01-01 00:15:48.333   317   328 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.camera2/com.android.camera.CameraLauncher bnds=[512,140][695,288]} from uid 10018
    01-01 00:15:48.334   317   398 E AudioTrack: Could not get audio output for session 89, stream type -1, usage 13, sample rate 48000, format 0x1, channel mask 0x3, flags 0x4
    01-01 00:15:48.337   317   398 E SoundPool: Error creating AudioTrack
    01-01 00:15:48.381   317   549 I ActivityManager: Start proc 1292:com.android.camera2/u0a41 for activity com.android.camera2/com.android.camera.CameraLauncher
    01-01 00:15:48.506   426   461 I zygote  : Starting a blocking GC NativeAlloc
    01-01 00:15:48.556  1292  1292 V CAM_Profiler: [  0.000ms][ui] GUARD: CameraApp onCreate() - START
    01-01 00:15:48.557  1292  1292 V CAM_Profiler: [  0.000ms][ui] GUARD: FirstRunDetector getTimeOfFirstRun - START
    01-01 00:15:48.591  1292  1292 I CAM_Profiler: [ 33.517ms][ui] GUARD: FirstRunDetector getTimeOfFirstRun - [33.517ms] PreferenceManager.getDefaultSharedPreferences
    01-01 00:15:48.602  1292  1292 V CAM_Profiler: [ 44.860ms][ui] GUARD: FirstRunDetector getTimeOfFirstRun - [11.343ms] preferences.getLong
    01-01 00:15:48.602  1292  1292 I CAM_Profiler: [ 45.356ms][ui] GUARD: FirstRunDetector getTimeOfFirstRun - STOP
    01-01 00:15:48.603  1292  1292 I CAM_Profiler: [ 51.239ms][ui] GUARD: CameraApp onCreate() - [51.239ms] initializeTimeOfFirstRun
    01-01 00:15:48.604  1292  1292 V CAM_Profiler: [ 52.403ms][ui] GUARD: CameraApp onCreate() - [ 1.164ms] UsageStatistics.initialize
    01-01 00:15:48.607  1292  1292 V CAM_Profiler: [ 55.656ms][ui] GUARD: CameraApp onCreate() - [ 3.253ms] clearNotifications
    01-01 00:15:48.607  1292  1292 I CAM_Profiler: [ 55.656ms][ui] GUARD: CameraApp onCreate() - STOP
    01-01 00:15:48.616   426   461 I zygote  : NativeAlloc concurrent copying GC freed 20328(1228KB) AllocSpace objects, 0(0B) LOS objects, 50% free, 3MB/7MB, paused 243us total 109.733ms
    01-01 00:15:48.678  1292  1292 V CAM_QuickActivity: START onCreate: Activity = com.android.camera.CameraActivity@5a9d5d5
    01-01 00:15:48.679  1292  1292 V CAM_Profiler: [  0.000ms][ui] GUARD: CameraActivity.onCreateTasks - START
    01-01 00:15:48.681  1292  1292 D CAM_LocationManager: Using legacy location provider.
    01-01 00:15:48.723  1292  1292 D CAM_MemoryManagerImpl: Max native memory: 11 MB
    01-01 00:15:48.738  1292  1292 W SoundPool: Use of stream types is deprecated for operations other than volume control
    01-01 00:15:48.738  1292  1292 W SoundPool: See the documentation of SoundPool() for what to use instead with android.media.AudioAttributes to qualify your playback use case
    01-01 00:15:48.743  1292  1292 I CAM_OneCamFtrCnfgCrtr: CaptureModule? true
    01-01 00:15:48.748   317   549 I ActivityManager: START u0 {cmp=com.android.camera2/com.android.camera.PermissionsActivity} from uid 10041
    01-01 00:15:48.816  1292  1292 I CAM_Profiler: [136.789ms][ui] GUARD: CameraActivity.onCreateTasks - [41.700ms] Glide.setup
    01-01 00:15:48.825  1292  1292 V CAM_Profiler: [146.178ms][ui] GUARD: CameraActivity.onCreateTasks - [ 9.389ms] OneCameraManager.get
    01-01 00:15:48.860  1292  1292 I CameraManagerGlobal: AConnecting to camera service
    01-01 00:15:48.886  1292  1292 V CAM_Profiler: [206.693ms][ui] GUARD: CameraActivity.onCreateTasks - [11.918ms] computePictureSizes
    01-01 00:15:48.899   151   151 W /system/bin/hwservicemanager: getTransportFromManifest: Cannot find entry android.hardware.media.omx@1.0::IOmx in either framework or device manifest, using default transport.
    01-01 00:15:48.901  1292  1318 I OMXClient: Treble IOmx obtained
    01-01 00:15:48.903   236   278 I OMXMaster: makeComponentInstance(OMX.google.vorbis.decoder) in omx@1.0-service process
    01-01 00:15:48.908   236   278 E OMXNodeInstance: getConfig(0xb3423140:google.vorbis.decoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: Undefined(0x80001001)
    01-01 00:15:48.914   172   172 W /system/bin/hw/android.hidl.allocator@1.0-service: ashmem_create_region(32768) returning hidl_memory(0xb3c18820, 32768)
    01-01 00:15:48.950   172   172 I chatty  : uid=1000(system) allocator@1.0-s identical 10 lines
    01-01 00:15:48.950   172   172 W /system/bin/hw/android.hidl.allocator@1.0-service: ashmem_create_region(32768) returning hidl_memory(0xb3c18820, 32768)
    01-01 00:15:48.998  1292  1292 W CAM_Log : Tag RoundedThumbnailView is 1 chars longer than limit.
    01-01 00:15:49.170  1292  1292 I CAM_Profiler: [490.998ms][ui] GUARD: CameraActivity.onCreateTasks - [279.753ms] setContentView()
    01-01 00:15:49.208  1292  1292 I CAM_Profiler: [528.932ms][ui] GUARD: CameraActivity.onCreateTasks - [37.935ms] Configure Camera UI
    01-01 00:15:49.241  1292  1292 V CAM_CameraController: Closing camera
    01-01 00:15:49.243  1292  1311 W CAM2PORT_AndCamAgntImp: Releasing camera without any camera opened.
    01-01 00:15:49.244  1292  1292 V CAM_ModulesInfo: EnableCaptureModule = true
    01-01 00:15:49.255  1292  1292 V CAM_Profiler: [  0.000ms][ui] GUARD: new CaptureModule - START
    01-01 00:15:49.258   317   332 W ActivityManager: Activity pause timeout for ActivityRecord{702a1b9 u0 com.android.camera2/com.android.camera.CameraLauncher t5 f}
    01-01 00:15:49.269  1292  1292 V CAM_Profiler: [ 13.712ms][ui] GUARD: new CaptureModule - STOP
    01-01 00:15:49.269  1292  1292 V CAM_SettingsManager: listeners: [com.android.camera.app.CameraAppUI@a319dda]
    01-01 00:15:49.294  1292  1292 V CAM_SettingsManager: listeners: [com.android.camera.app.CameraAppUI@a319dda, com.android.camera.ButtonManager@3fc83e7]
    01-01 00:15:49.295  1292  1292 V CAM_SettingsManager: listeners: [com.android.camera.app.CameraAppUI@a319dda, com.android.camera.ButtonManager@3fc83e7, com.android.camera.widget.IndicatorIconController@3f5263d]
    01-01 00:15:49.296  1292  1292 I CAM_Profiler: [616.970ms][ui] GUARD: CameraActivity.onCreateTasks - [26.364ms] Init Current Module UI
    01-01 00:15:49.296  1292  1292 V CAM_Profiler: [  0.000ms][ui] GUARD: CaptureModule.init - START
    01-01 00:15:49.296  1292  1292 D CAM_CaptureModule: init UseAutotransformUiLayout = false
    01-01 00:15:49.301  1292  1292 D CAM_Camera2OneCamMgr: Getting First BACK Camera
    01-01 00:15:49.308  1292  1292 D AndroidRuntime: Shutting down VM
    01-01 00:15:49.311  1292  1292 E AndroidRuntime: FATAL EXCEPTION: main
    01-01 00:15:49.311  1292  1292 E AndroidRuntime: Process: com.android.camera2, PID: 1292
    01-01 00:15:49.311  1292  1292 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.camera2/com.android.camera.CameraActivity}: java.lang.StringIndexOutOfBoundsException: length=0; index=0
    01-01 00:15:49.311  1292  1292 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2817)
    01-01 00:15:49.311  1292  1292 E AndroidRuntime: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892)
    01-01 00:15:49.311  1292  1292 E AndroidRuntime: 	at android.app.ActivityThread.-wrap11(Unknown Source:0)
    01-01 00:15:49.311  1292  1292 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
    01-01 00:15:49.311  1292  1292 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:105)
    01-01 00:15:49.311  1292  1292 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:164)
    01-01 00:15:49.311  1292  1292 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:6541)
    01-01 00:15:49.311  1292  1292 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
    01-01 00:15:49.311  1292  1292 E AndroidRuntime: 	at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
    01-01 00:15:49.311  1292  1292 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
    01-01 00:15:49.311  1292  1292 E AndroidRuntime: Caused by: java.lang.StringIndexOutOfBoundsException: length=0; index=0
    01-01 00:15:49.311  1292  1292 E AndroidRuntime: 	at java.lang.String.charAt(Native Method)
    01-01 00:15:49.311  1292  1292 E AndroidRuntime: 	at android.hardware.Camera$Parameters.splitRange(Camera.java:4184)
    01-01 00:15:49.311  1292  1292 E AndroidRuntime: 	at android.hardware.Camera$Parameters.getSupportedPreviewFpsRange(Camera.java:2889)
    01-01 00:15:49.311  1292  1292 E AndroidRuntime: 	at android.hardware.camera2.legacy.LegacyMetadataMapper.mapControlAe(LegacyMetadataMapper.java:409)
    01-01 00:15:49.311  1292  1292 E AndroidRuntime: 	at android.hardware.camera2.legacy.LegacyMetadataMapper.mapCharacteristicsFromParameters(LegacyMetadataMapper.java:183)
    01-01 00:15:49.311  1292  1292 E AndroidRuntime: 	at android.hardware.camera2.legacy.LegacyMetadataMapper.createCharacteristics(LegacyMetadataMapper.java:153)
    01-01 00:15:49.311  1292  1292 E AndroidRuntime: 	at android.hardware.camera2.CameraManager.getCameraCharacteristics(CameraManager.java:234)
    01-01 00:15:49.311  1292  1292 E AndroidRuntime: 	at com.android.camera.one.v2.Camera2OneCameraManagerImpl.findFirstCameraIdFacing(Camera2OneCameraManagerImpl.java:159)
    01-01 00:15:49.311  1292  1292 E AndroidRuntime: 	at com.android.camera.one.v2.Camera2OneCameraManagerImpl.findFirstBackCameraId(Camera2OneCameraManagerImpl.java:135)
    01-01 00:15:49.311  1292  1292 E AndroidRuntime: 	at com.android.camera.one.v2.Camera2OneCameraManagerImpl.findCameraId(Camera2OneCameraManagerImpl.java:128)
    01-01 00:15:49.311  1292  1292 E AndroidRuntime: 	at com.android.camera.one.v2.Camera2OneCameraManagerImpl.findFirstCameraFacing(Camera2OneCameraManagerImpl.java:102)
    01-01 00:15:49.311  1292  1292 E AndroidRuntime: 	at com.android.camera.CaptureModule.updateCameraCharacteristics(CaptureModule.java:390)
    01-01 00:15:49.311  1292  1292 E AndroidRuntime: 	at com.android.camera.CaptureModule.init(CaptureModule.java:417)
    01-01 00:15:49.311  1292  1292 E AndroidRuntime: 	at com.android.camera.CameraActivity.onCreateTasks(CameraActivity.java:1627)
    01-01 00:15:49.311  1292  1292 E AndroidRuntime: 	at com.android.camera.util.QuickActivity.onCreate(QuickActivity.java:114)
    01-01 00:15:49.311  1292  1292 E AndroidRuntime: 	at android.app.Activity.performCreate(Activity.java:6975)
    01-01 00:15:49.311  1292  1292 E AndroidRuntime: 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1213)
    01-01 00:15:49.311  1292  1292 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2770)
    01-01 00:15:49.311  1292  1292 E AndroidRuntime: 	... 9 more
    01-01 00:15:49.314   317   328 W ActivityManager:   Force finishing activity com.android.camera2/com.android.camera.PermissionsActivity
    01-01 00:15:49.322  1292  1292 I Process : Sending signal. PID: 1292 SIG: 9
    01-01 00:15:49.382   317   328 I ActivityManager: Process com.android.camera2 (pid 1292) has died: fore TOP 
    01-01 00:15:49.996   747   883 W OpenGLRenderer: Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...
    
    

  • Hi Goran,

    Can you rebuild Camera HAL with TI_CAMERAHAL_DEBUG_ENABLED, TI_CAMERAHAL_VERBOSE_DEBUG_ENABLED, TI_CAMERAHAL_DEBUG_FUNCTION_NAMES all enabled and send me a full adb log from boot through when you attempt to launch the Camera app (I think you already have these enabled, but a more complete log is needed)? 

    From the App error log, it looks like we're seeing a parameter not get set properly (SupportedPreviewFpsRange). Can you edit CameraHal.cpp to dump params_string at the end of CameraHal::getParameters? It's too long to simply dump to ADB in one shot, so it's probably best to write to file. You can reference the saveFile function in V4LCameraAdapter.cpp for an example of dumping to file from Camera HAL. 

    Please attach these two outputs when you have time to try this.

    Thanks,

    David

  • Hi David,

    Thanks for your reply, we did as you said.

    In file ('dump_logcat.txt') is all adb log including run "Camera" application ("RUN CAMERA APP" print is the moment the application "Camera" is started).

    In file ('dump_params_string.txt') are all the parameters which contains a params_string.

    Please can you support us if you conclude something from logs?

    Thanks,

    Goran

    dump_logcat.txt

    antibanding=;antibanding-values=auto;auto-convergence-mode=;auto-convergence-mode-values=;auto-exposure-lock=;auto-exposure-lock-supported=;brightness=;camera-name=USBCAMERA;contrast=;effect=;effect-values=none;exif-make=;exif-model=;exposure=;exposure-compensation=;exposure-compensation-step=;exposure-mode-values=auto;focal-length=1;focus-distances=Infinity,Infinity,Infinity;focus-mode=fixed;focus-mode-values=fixed;gbce=false;gbce-supported=;glbce=false;glbce-supported=;horizontal-view-angle=170;ipp=;ipp-values=ldc-nsf;iso=;iso-mode-values=auto;jpeg-quality=90;jpeg-thumbnail-height=240;jpeg-thumbnail-quality=50;jpeg-thumbnail-size-values=0x0,320x240;jpeg-thumbnail-width=320;manual-convergence=;manual-exposure=;manual-exposure-right=;manual-gain-iso=;manual-gain-iso-right=;max-exposure-compensation=;max-num-detected-faces-hw=0;max-num-detected-faces-sw=;max-num-focus-areas=;max-num
    

  • Hi Goran,

    As I mentioned in my previous reply, the params_string is too long to capture in a single ADB dump. Can you write it to file instead? /data should be write accessible.

    For more insight, can you go to frameworks/base/core/java/android/hardware/Camera.java (found in your CameraApp_ErrorLog.txt) and dump str in getSupportedPreviewFpsRange (line 2884) before it calls splitRange?

    Thanks,

    David

  • Hi David,

    -We dumped params_string in file (dump_params_string.txt).

    -Variable 'str' in getSupportedPreviewFpsRange() function is empty (we printed variable before it calls splitRange).

    Please can you support us if you know what the problem is?

    Thanks,

    Goran

    antibanding=;antibanding-values=auto;auto-convergence-mode=;auto-convergence-mode-values=;auto-exposure-lock=;auto-exposure-lock-supported=;brightness=;camera-name=USBCAMERA;contrast=;effect=;effect-values=none;exif-make=;exif-model=;exposure=;exposure-compensation=;exposure-compensation-step=;exposure-mode-values=auto;focal-length=1;focus-distances=Infinity,Infinity,Infinity;focus-mode=fixed;focus-mode-values=fixed;gbce=false;gbce-supported=;glbce=false;glbce-supported=;horizontal-view-angle=170;ipp=;ipp-values=ldc-nsf;iso=;iso-mode-values=auto;jpeg-quality=90;jpeg-thumbnail-height=240;jpeg-thumbnail-quality=50;jpeg-thumbnail-size-values=0x0,320x240;jpeg-thumbnail-width=320;manual-convergence=;manual-exposure=;manual-exposure-right=;manual-gain-iso=;manual-gain-iso-right=;max-exposure-compensation=;max-num-detected-faces-hw=0;max-num-detected-faces-sw=;max-num-focus-areas=;max-num-metering-areas=;max-zoom=1;mechanical-misalignment-correction=;mechanical-misalignment-correction-supported=;min-exposure-compensation=;mode-values=;picture-format=jpeg;picture-format-values=jpeg;picture-size=1280x720;picture-size-values=1280x800,1280x720,752x480,640x480,600x400,352x288,320x240;preview-format=yuv420sp;preview-format-values=yuv420sp,yuv420sp;preview-fps-ext-values=;preview-fps-range=30000,30000;preview-fps-range-ext-values=;preview-fps-range-values=;preview-frame-rate=30;preview-frame-rate-range=30000,30000;preview-frame-rate-values=;preview-size=1280x720;preview-size-values=1280x800,1280x720,752x480,640x480,600x400,352x288,320x240;raw-height=;raw-width=;recording-hint=;s3d-cap-frame-layout=;s3d-cap-frame-layout-values=;s3d-prv-frame-layout=none;s3d-prv-frame-layout-values=;saturation=;sensor-orientation=0;sharpness=;smooth-zoom-supported=;supported-manual-convergence-max=;supported-manual-convergence-min=;supported-manual-convergence-step=;supported-manual-exposure-max=;supported-manual-exposure-min=;supported-manual-exposure-step=;supported-manual-gain-iso-max=;supported-manual-gain-iso-min=;supported-manual-gain-iso-step=;supported-picture-sidebyside-size-values=;supported-picture-subsampled-size-values=;supported-picture-topbottom-size-values=;supported-preview-sidebyside-size-values=;supported-preview-subsampled-size-values=1280x800,1280x720,752x480,640x480,600x400,352x288,320x240;supported-preview-topbottom-size-values=;ti-algo-external-gamma=false;ti-algo-gic=true;ti-algo-nsf1=true;ti-algo-nsf2=true;ti-algo-sharpening=true;ti-algo-threelinecolormap=true;vertical-view-angle=170;video-frame-format=OMX_TI_COLOR_FormatYUV420PackedSemiPlanar;video-snapshot-supported=;video-stabilization=false;video-stabilization-supported=;vnf=false;vnf-supported=;zoom=1;zoom-ratios=1;zoom-supported=false
    

  • Hi Goran,

    You should be able to fix the current issue by inserting:

    p.set(android::CameraParameters::KEY_SUPPORTED_PREVIEW_FPS_RANGE, mCameraProperties->get(CameraProperties::FRAMERATE_RANGE));

    after the line at CameraHal.cpp:4543

    p.set(TICameraParameters::KEY_PREVIEW_FRAME_RATE_RANGE, mCameraProperties->get(CameraProperties::FRAMERATE_RANGE));

    If you see a new failure, please include a full debug logcat again.

    Thanks,

    David

  • Hi David,

    Thanks for your reply.

    We are added that two lines in initDefaultParameters() function.

    Application 'Camera' still crash but not in the same place.

    This is a log 'dump_logcat.txt' when we added two lines which you forwarded to us.

    After that we delete if condition in function splitRange(String str) in Camera.java file (frameworks/base/core/java/android/hardware/Camera.java) because it caused the crash ('splitRangeFunction.txt').

    After modification in function splitRange(String str), application 'Camera' still crash but not in the same place.  ('dump_logcat_afterModif.txt')

    Please can you support us if you conclude something from logs?

    Thanks,

    Goran

    6622.dump_logcat.txt

    private ArrayList<int[]> splitRange(String str) {
       /* if (str == null || str.charAt(0) != '('
                || str.charAt(str.length() - 1) != ')') {
            Log.e(TAG, "Invalid range list string=" + str);
            return null;
        }*/
        ArrayList<int[]> rangeList = new ArrayList<int[]>();
        int endIndex, fromIndex = 1;
        do {
            int[] range = new int[2];
            endIndex = str.indexOf("),(", fromIndex);
            if (endIndex == -1) endIndex = str.length() - 1;
            splitInt(str.substring(fromIndex, endIndex), range);
            rangeList.add(range);
            fromIndex = endIndex + 3;
        } while (endIndex != str.length() - 1);
    
        if (rangeList.size() == 0) return null;
        return rangeList;
    }
    
    dump_logcat_afterModif.txt

  • Hi Goran,

    I would suggest that you undo the change to Camera.java since that opens us up to more serious issues while also failing to get splitRange to work correctly. Let's instead look at why this isn't working. It looks to me like we should change my previous suggestion:

    p.set(TICameraParameters::KEY_PREVIEW_FRAME_RATE_RANGE, mCameraProperties->get(CameraProperties::FRAMERATE_RANGE));

    to :

    p.set(TICameraParameters::KEY_PREVIEW_FRAME_RATE_RANGE, "(30000,30000)");

    Or potentially change DEFAULT_FRAMERATE_RANGE in V4LCapabilities.cpp to include the parenthesis if we still see a similar error with splitRange. 

    These suggestions are based on reading the comments for splitRange in Camera.java.

    Thanks,

    David

  • Hi David,

    thanks for help.

    We successfully launched the camera app, but when we run camera we have problem with camera output.

    Camera output have some corrupted data and problem with color (blue is shown as red, and red is shown as blue).

    We attached video (IMG_7213.MOV) with problem and log (logcat.txt).

    Please can you support us if you know what the problem is?

    Thanks,

    Goran

    logcat.txt

  • Hi Goran,

    This is an OV camera specific issue which is not currently supported by our Android release, so I have not taken a closer look at this issue before but I can try to help. 

    To begin with, you can see in V4LCameraAdapter.cpp there is a call to "processFrame" where input and output formats are specified for VPE color scale conversion. A likely culprit for at least the color issue and possibly also what looks like a deinterlacing error is that the input format is incorrect. If you look in the V4LM2M.cpp "describeFormat" function, you'll see the translation from text arguments to actual V4L2 fourcc and colorspace arguments that get passed to our VPE driver. I would start by checking these configurations out to see if we're simply on the wrong input format for your camera.

    Thanks,

    David

  • Hi Goran,

    Looking more at the OV camera, it looks like it's a progressive scan instead of interlaced camera. With that in mind, we shouldn't be hitting the processFrame call at all, which is reflected in your logcat. That means the conversion issue is with the convertYUV422ToNV12Tiler function in V4LCameraAdapter.cpp. I don't know how long it's been since we've tried to support that function, but you should be able to use the processFrame function to call the VPE for color scale conversion without deinterlacing if you want to go down that path. You should be able to steal the alignedWidth and retVal = processFrame lines (two lines total from if block) into the else block, replacing the else block entirely.

    Thanks,

    David

  • Hi David,

    We applied your suggestions, now camera work perfect.
    Thanks for help.

    Regards,
    Goran