I am making an unofficial LineageOS 17.1 build for the Samsung galaxy j5 2016 (j510f). I used device tree and kernel tree from Galaxy-msm8916: https://github.com/orgs/Galaxy-MSM8916/repositories, and vendor from J5 unofficial LineageOS sources: http://github.com/Galaxy-J5-Unofficial-LineageOS-Sources/samsung_vendor
The camera module works, but і cant take photos (video recording works). It crashes with: unknown error, closing camera error. Open Camera cant take photo either, it just freezes.
Here is this part from logcat (if that іs what’s needed):
09-06 16:04:13.533 389 3049 E mm-camera-img: cac_comp_process_frame:194] Start CAC
09-06 16:04:13.533 389 3049 E librnrgpu: rnrgpu_opencl_init() thread reported : 2740 millisec
09-06 16:04:13.533 389 3049 E librnrgpu: memory allocation (allocator: ION) : 0 millisec
09-06 16:04:13.533 389 3049 E librnrgpu: clCreateKernel (downscale_by_8) : 0 millisec
09-06 16:04:13.533 389 3049 E librnrgpu: clCreateKernel (rnr_process) : 0 millisec
09-06 16:04:13.533 389 3049 E librnrgpu: rnrgpu_opencl_init_program() : 0 millisec
09-06 16:04:13.533 389 3049 E librnrgpu: rnrgpu_opencl_mem_alloc() : 0 millisec
09-06 16:04:13.533 389 3049 E librnrgpu: rnrgpu_process() : GPU
09-06 16:04:13.535 389 3049 E librnrgpu:
09-06 16:04:13.535 389 3049 E librnrgpu: clEnqueueNDRangeKernel - RNRGPU_KERNEL_FUNC_DOWNSCALE
09-06 16:04:13.535 389 3049 E librnrgpu: globalworksize={576,387}
09-06 16:04:13.535 389 3049 E librnrgpu: localworksize={64,1}
09-06 16:04:13.535 389 3049 E librnrgpu: kernelInfoArray[i].wg_size=64
09-06 16:04:13.535 389 3049 E librnrgpu:
09-06 16:04:13.535 389 3049 E librnrgpu:
09-06 16:04:13.535 389 3049 E librnrgpu: clEnqueueNDRangeKernel - RNRGPU_KERNEL_FUNC_EDGE_FILTER
09-06 16:04:13.535 389 3049 E librnrgpu: globalworksize={1280,3096}
09-06 16:04:13.535 389 3049 E librnrgpu: localworksize={256,1}
09-06 16:04:13.535 389 3049 E librnrgpu: kernelInfoArray[i].wg_size=256
09-06 16:04:13.535 389 3049 E librnrgpu:
09-06 16:04:13.544 341 541 V qcreverb: Effect_command, ctxt 0xaf91b280, cmd 2
09-06 16:04:13.545 341 541 V qcreverb: Reverb_setConfig, ctxt 0xaf91b280
09-06 16:04:13.545 341 643 V qcvirt : Effect_command, ctxt 0xaf91b200, cmd 2
09-06 16:04:13.545 341 643 V qcvirt : Virtualizer_setConfig, ctxt 0xaf91b200
09-06 16:04:13.545 341 537 V qcbassboost: Effect_command: ctxt 0xaf91b180, cmd 2
09-06 16:04:13.545 341 537 V qcbassboost: BassBoost_setConfig: ctxt 0xaf91b180
09-06 16:04:13.563 341 541 V qcreverb: Effect_command, ctxt 0xaf91b280, cmd 2
09-06 16:04:13.563 341 541 V qcreverb: Reverb_setConfig, ctxt 0xaf91b280
09-06 16:04:13.564 341 537 V qcvirt : Effect_command, ctxt 0xaf91b200, cmd 2
09-06 16:04:13.564 341 537 V qcvirt : Virtualizer_setConfig, ctxt 0xaf91b200
09-06 16:04:13.564 341 2873 V qcbassboost: Effect_command: ctxt 0xaf91b180, cmd 2
09-06 16:04:13.564 341 2873 V qcbassboost: BassBoost_setConfig: ctxt 0xaf91b180
09-06 16:04:13.584 341 541 V qcreverb: Effect_command, ctxt 0xaf91b280, cmd 2
09-06 16:04:13.584 341 541 V qcreverb: Reverb_setConfig, ctxt 0xaf91b280
09-06 16:04:13.585 341 537 V qcvirt : Effect_command, ctxt 0xaf91b200, cmd 2
09-06 16:04:13.585 341 537 V qcvirt : Virtualizer_setConfig, ctxt 0xaf91b200
09-06 16:04:13.585 341 2873 V qcbassboost: Effect_command: ctxt 0xaf91b180, cmd 2
09-06 16:04:13.585 341 2873 V qcbassboost: BassBoost_setConfig: ctxt 0xaf91b180
09-06 16:04:13.603 433 3061 W QCamera2HWI: processAutoFlashValue: AutoFlash not enabled, no ops here
09-06 16:04:13.604 341 2873 V qcreverb: Effect_command, ctxt 0xaf91b280, cmd 2
09-06 16:04:13.604 341 2873 V qcreverb: Reverb_setConfig, ctxt 0xaf91b280
09-06 16:04:13.604 341 541 V qcvirt : Effect_command, ctxt 0xaf91b200, cmd 2
09-06 16:04:13.604 341 541 V qcvirt : Virtualizer_setConfig, ctxt 0xaf91b200
09-06 16:04:13.604 341 541 V qcbassboost: Effect_command: ctxt 0xaf91b180, cmd 2
09-06 16:04:13.604 341 541 V qcbassboost: BassBoost_setConfig: ctxt 0xaf91b180
09-06 16:04:13.614 361 611 W APM_AudioPolicyManager: unregisterEffect effect 43 enabled
09-06 16:04:13.615 341 2873 V qcbassboost: EffectRelease: Releasing Effect 0xaf91b180 for SessionId 97
09-06 16:04:13.615 341 541 V qcvirt : Effect_command, ctxt 0xaf91b200, cmd 1
09-06 16:04:13.615 341 541 V qcvirt : Virtualizer_setConfig, ctxt 0xaf91b200
09-06 16:04:13.615 341 541 E qcvirt : [vendor/qcom/proprietary/mm-audio-noship/audio-effects/safx/android-adapter/qcvirt/qcvirt.c:569] Assertion fail: pConfig->inputCfg.format == AUDIO_FORMAT_PCM_16_BIT
09-06 16:04:13.615 341 541 W EffectHAL: Effect 0xaf86dcb0 command SET_CONFIG returned status: Invalid argument
09-06 16:04:13.616 341 541 V qcvirt : Effect_command, ctxt 0xaf91b200, cmd 1
09-06 16:04:13.616 341 541 V qcvirt : Virtualizer_setConfig, ctxt 0xaf91b200
09-06 16:04:13.617 341 2873 V qcreverb: Effect_command, ctxt 0xaf91b280, cmd 1
09-06 16:04:13.617 341 2873 V qcreverb: Reverb_setConfig, ctxt 0xaf91b280
09-06 16:04:13.617 341 2873 E qcreverb: [vendor/qcom/proprietary/mm-audio-noship/audio-effects/safx/android-adapter/qcreverb/qcreverb.c:532] Assertion fail: pConfig->inputCfg.format == AUDIO_FORMAT_PCM_16_BIT
09-06 16:04:13.617 341 2873 W EffectHAL: Effect 0xaf86dd00 command SET_CONFIG returned status: Invalid argument
09-06 16:04:13.617 341 2873 V qcvirt : EffectRelease: Releasing Effect 0xaf91b200 for SessionId 97
09-06 16:04:13.617 341 541 V qcreverb: Effect_command, ctxt 0xaf91b280, cmd 1
09-06 16:04:13.617 341 541 V qcreverb: Reverb_setConfig, ctxt 0xaf91b280
09-06 16:04:13.619 341 541 V qcreverb: EffectRelease: Releasing Effect 0xaf91b280 for SessionId 97
09-06 16:04:13.658 389 3049 E librnrgpu: clGetEventProfilingInfo() for kernel 0: 21 millisec
09-06 16:04:13.658 389 3049 E librnrgpu: clGetEventProfilingInfo() for kernel 1: 122 millisec
09-06 16:04:13.660 389 3049 E librnrgpu: clEnqueueMapBuffer() : 1 millisec
09-06 16:04:13.660 389 3049 E cac2 : [cac2latency] rnr_gpu_process: 127 ms
09-06 16:04:13.660 389 3049 E mm-camera-img: cac_comp_process_frame:202] CAC Successfull
09-06 16:04:13.660 389 3049 E mm-camera: module_cac_client_divert_exec:317] after wait rc 0
09-06 16:04:13.660 389 3049 E mm-camera: module_cac_client_divert_exec:346] End
09-06 16:04:13.660 389 3050 E mm-camera: ### CAC metadata
09-06 16:04:13.660 433 3052 E mm-camera-intf: mm_camera_event_notify:188] CAM_EVENT_TYPE_CAC_DONE
09-06 16:04:13.671 433 3061 W QCamera2HWI: processAutoFlashValue: AutoFlash not enabled, no ops here
09-06 16:04:13.700 433 3093 I QCamera2HWI: [KPI Perf] postproc_channel_cb_routine: E PROFILE_YUV_CB_TO_HAL
09-06 16:04:13.700 433 3093 I QCamera2HWI: [KPI Perf] postproc_channel_cb_routine: X
09-06 16:04:13.700 433 3054 W QCameraPostProc: dataProcessRoutine: Do next job, active is 1
09-06 16:04:13.700 433 3054 W QCameraPostProc: encodeData : E
09-06 16:04:13.700 433 3054 W QCameraStream: isOrignalTypeOf : stream_type 9, pp_type 0, input_stream_type 1
09-06 16:04:13.700 433 3054 W QCameraStream: isOrignalTypeOf : stream_type 9, pp_type 0, input_stream_type 1
09-06 16:04:13.700 433 3054 W QCameraStream: isOrignalTypeOf : stream_type 9, pp_type 0, input_stream_type 3
09-06 16:04:13.700 433 3054 I QCameraPostProc: encodeData: frame id = 65
09-06 16:04:13.700 433 3054 I QCameraPostProc: msg check : 0xf4d
09-06 16:04:13.700 433 3054 E QCamera2HWI: getExifData: getExifGpsProcessingMethod null
09-06 16:04:13.700 433 3054 E QCamera2HWI: getExifData: getExifLatitude null
09-06 16:04:13.700 433 3054 E QCamera2HWI: getExifData: getExifLongitude null
09-06 16:04:13.700 433 3054 E QCamera2HWI: getExifData: getExifAltitude null
09-06 16:04:13.700 433 3054 I QCamera2HWI: EXIF - Thumbnail Size : 512x384
09-06 16:04:13.700 433 3054 I QCamera2HWI: EXIF -FW [CAM/PHONE] : V13QLIA02SM V13QLJB01SA
09-06 16:04:13.700 433 3054 W QCameraHWI_Mem: alloc: use ION_SYSTEM_HEAP_ID memory: (33554432)
09-06 16:04:13.703 2708 2708 D CAM_PhotoModule: RawPictureCallback: onPictureTaken()
09-06 16:04:13.703 2708 2708 V CAM_PhotoModule: mShutterToRawCallbackTime = 651ms
09-06 16:04:13.705 433 3054 W QCameraPostProc: [KPI Perf] encodeData : call jpeg create_session
09-06 16:04:13.709 433 3054 E qomx_image_core: OMX_GetHandle:215] Cannot load the library
09-06 16:04:13.709 433 3054 E qomx_image_core: OMX_GetHandle:270] Error -2147479548
09-06 16:04:13.709 433 3054 E mm-jpeg-intf: mm_jpeg_session_create:472] OMX_GetHandle failed (-2147479548)
09-06 16:04:13.709 433 3054 E mm-jpeg-intf: mm_jpeg_create_session:2107] jpeg session create failed
09-06 16:04:13.709 433 3054 W QCameraPostProc: [KPI Perf] encodeData : PROFILE_JPEG_JOB_START
09-06 16:04:13.709 433 3054 E mm-jpeg-intf: mm_jpeg_start_job:1955] session_idx 0 client idx 0
09-06 16:04:13.709 433 3054 E mm-jpeg-intf: mm_jpeg_start_job:1967] session not active 0
09-06 16:04:13.709 433 3054 W QCameraPostProc: encodeData : X
09-06 16:04:13.716 433 3054 E QCameraPostProc: releaseJpegJobData: DEBUG : src_reproc_frame 1132
09-06 16:04:13.719 433 3054 E QCameraPostProc: releaseJpegJobData: DEBUG : src_reproc_frame 1139
09-06 16:04:13.720 2708 2775 E Camera : Error -2147483648
09-06 16:04:13.720 2708 2775 E CameraErrorCallback: Got camera error callback. error=-2147483648
How to fix it?