Skip to content

Front Camera not working #61

@yaro24

Description

@yaro24

I have ava 0.4.3 running on LineageOS17.1 and Galaxy S2 8.0 LTE (gts28velte)

The Back camera is working as expected, but when I want to use the front camera i don't get a picture (tested both photo and video mode with various fps and resolutions)

following is the adb log when i enable recording:

03-30 16:23:31.342  6445  6445 D SwitchEntity: SwitchCommand received: key=13, objectId=video_recording, state=true
03-30 16:23:31.344  6445 25207 D VoiceSatelliteCamera: Starting video recording...
03-30 16:23:31.355   809  4605 D SensorHAL: lsm6ds3_accel: Flush event done.
03-30 16:23:31.367  6445  6445 D CameraQuirks: camera2 CameraQuirks = AeFpsRangeLegacyQuirk | CamcorderProfileResolutionQuirk | LegacyCameraOutputConfigNullPointerQuirk | AfRegionFlipHorizontallyQuirk | ConfigureSurfaceToSecondarySessionFailQuirk | PreviewOrientationIncorrectQuirk | CaptureSessionStuckQuirk | IncorrectCaptureStateQuirk
03-30 16:23:31.373  6445  6445 D DeferrableSurface: Surface created[total_surfaces=1, used_surfaces=0](C.k0@705ef6d}
03-30 16:23:31.375  6445 24067 D Camera2CameraImpl: {Camera@ab44336[id=1]} Use case z.F-7218196c-650d-4040-9bc3-4d5ea9d4095042990999 ACTIVE
03-30 16:23:31.375  6445 24067 D UseCaseAttachState: Active and attached use case: [] for camera: 1
03-30 16:23:31.376  6445 24067 D Camera2CameraImpl: {Camera@ab44336[id=1]} Use cases [z.F-7218196c-650d-4040-9bc3-4d5ea9d4095042990999] now ATTACHED
03-30 16:23:31.376  6445 24067 D Camera2CameraControlImp: setActive: isActive = true
03-30 16:23:31.377  6445 24067 D UseCaseAttachState: All use case: [z.F-7218196c-650d-4040-9bc3-4d5ea9d4095042990999] for camera: 1
03-30 16:23:31.378  6445 24067 D UseCaseAttachState: Active and attached use case: [z.F-7218196c-650d-4040-9bc3-4d5ea9d4095042990999] for camera: 1
03-30 16:23:31.380  6445 24067 D Camera2CameraImpl: {Camera@ab44336[id=1]} Resetting Capture Session
03-30 16:23:31.380  6445 24067 D Camera2CameraImpl: {Camera@ab44336[id=1]} Skipping Capture Session state check due to current camera state: INITIALIZED and previous session status: false
03-30 16:23:31.381  6445 24067 D Camera2CameraImpl: {Camera@ab44336[id=1]} Releasing session in state INITIALIZED
03-30 16:23:31.381  6445 24067 D Camera2CameraImpl: {Camera@ab44336[id=1]} Attempting to force open the camera.
03-30 16:23:31.381  6445 24067 D CameraStateRegistry: tryOpenCamera(Camera@ab44336[id=1]) [Available Cameras: 1, Already Open: false (Previous state: CLOSED)] --> SUCCESS
03-30 16:23:31.381  6445 24067 D CameraStateRegistry: Recalculating open cameras:
03-30 16:23:31.381  6445 24067 D CameraStateRegistry: Camera                                       State                 
03-30 16:23:31.381  6445 24067 D CameraStateRegistry: -------------------------------------------------------------------
03-30 16:23:31.381  6445 24067 D CameraStateRegistry: Camera@ab44336[id=1]                         OPENING               
03-30 16:23:31.381  6445 24067 D CameraStateRegistry: Camera@4c84a3f[id=0]                         UNKNOWN               
03-30 16:23:31.381  6445 24067 D CameraStateRegistry: -------------------------------------------------------------------
03-30 16:23:31.381  6445 24067 D CameraStateRegistry: Open count: 1 (Max allowed: 1)
03-30 16:23:31.382  6445 24067 D Camera2CameraImpl: {Camera@ab44336[id=1]} Cancelling scheduled re-open: s.M$g$b@387c12b
03-30 16:23:31.382  6445 24067 D Camera2CameraImpl: {Camera@ab44336[id=1]} Opening camera.
03-30 16:23:31.382  6445 24067 D Camera2CameraImpl: {Camera@ab44336[id=1]} Transitioning camera internal state: INITIALIZED --> OPENING
03-30 16:23:31.382  6445 24067 D CameraStateMachine: New public camera state CameraState{type=OPENING, error=null} from OPENING and null
03-30 16:23:31.382  6445 24067 D CameraStateMachine: Publishing new public camera state CameraState{type=OPENING, error=null}
03-30 16:23:31.383  6445 24067 D UseCaseAttachState: All use case: [z.F-7218196c-650d-4040-9bc3-4d5ea9d4095042990999] for camera: 1
03-30 16:23:31.396  6445 24067 I CameraManager: Using legacy camera HAL.
03-30 16:23:31.399   487  3190 I CameraService: CameraService::connect call (PID -1 "com.example.ava", camera ID 1) for HAL version default and Camera API version 1
03-30 16:23:31.400   487  3190 E CameraService: CameraService::connect evicting conflicting client for camera ID 1
03-30 16:23:31.400   487  3190 D QCamera2HWI: disable_msg_type : E, msg type 65535
03-30 16:23:31.400   487 24271 D QCamera2HWI: disableMsgType (0xffff) : mMsgEnabled = 0x0
03-30 16:23:31.401   487  3190 D QCamera2HWI: disable_msg_type : X
03-30 16:23:31.401   487  3190 I QCamera2HWI: [KPI Perf] stop_preview: E PROFILE_STOP_PREVIEW camera id 1
03-30 16:23:31.401   487  3190 E QCamera2HWI: [KPI Perf] stop_preview: X, aleady stop
03-30 16:23:31.401   487  3190 D QCamera2HWI: [KPI Perf] cancel_picture: E PROFILE_CANCEL_PICTURE camera id 1
03-30 16:23:31.401   487 24271 D QCameraStateMachine: procEvtPreviewStoppedState: No ops for evt(21) in state(0)
03-30 16:23:31.401   487  3190 D QCamera2HWI: [KPI Perf] cancel_picture: X camera id 1
03-30 16:23:31.401   487  3190 I CamDev@1.0-impl: Closing camera 1
03-30 16:23:31.401   487  3190 D QCamera2Factory: get_number_of_cameras: num of cameras: 2
03-30 16:23:31.401   487  3190 I chatty  : uid=1047(cameraserver) Binder:487_1 identical 1 line
03-30 16:23:31.402   487  3190 D QCamera2Factory: get_number_of_cameras: num of cameras: 2
03-30 16:23:31.402   487  3190 I QCamera2HWI: [KPI Perf] close_camera_device: E camera id 1
03-30 16:23:31.402   487  3190 D QCamera2HWI: ~QCamera2HardwareInterface: E
03-30 16:23:31.404   487 24272 D QCamera2HWI: deferredWorkRoutine: stop data proc
03-30 16:23:31.405   487 24271 D QCameraStateMachine: smEvtProcRoutine: X
03-30 16:23:31.406  6445 24267 E Camera  : Error 2
03-30 16:23:31.407   487  3190 D QCamera2HWI: [KPI Perf] closeCamera: E, mCameraId = 1
03-30 16:23:31.408   525 24287 I mm-camera-sensor: sensor_get_output_info:4445requested dim 0 0 stream mask 0
03-30 16:23:31.409   525 24287 I mm-camera-sensor: sensor_pick_res_is_vt_mode:256check vt_mode valid : 0
03-30 16:23:31.410   525 24287 I mm-camera-sensor: sensor_pick_res_is_support_only_fixed_fps:273check support_only_fixed_fps valid : 0
03-30 16:23:31.410   525 24287 E mm-camera-sensor: sensor_pick_fill_expected_data:451ex_w:0, ex_h:0,ex_mode:1, ex_fps:30.000000, ex_clk:0, ex_ar: 0
03-30 16:23:31.410   525 24287 I mm-camera-sensor: sensor_pick_fill_input_data:420in_w:1920, in_h:1080,in_fps:30.000000, in_clk:73200000, in_mode:1, in_ar: 177
03-30 16:23:31.410   525 24287 I mm-camera-sensor: sensor_pick_check_mode:99check mode: 1
03-30 16:23:31.410   525 24287 I mm-camera-sensor: sensor_pick_fill_input_data:420in_w:1920, in_h:1080,in_fps:30.000000, in_clk:73200000, in_mode:9, in_ar: 177
03-30 16:23:31.410   525 24287 I mm-camera-sensor: sensor_pick_resolution:646res_idx: 1
03-30 16:23:31.410   525 24287 I mm-camera-sensor: sensor_get_output_info:4490pick res 1 dim 1920X1080 op clk 73200000
03-30 16:23:31.412   525 24287 I         : Camera[ INFO][ISP   ] isp_util_print_meta_stream_info: 5986: Deallocate resources
03-30 16:23:31.413   525 24287 E         : Camera[ERROR][IFACE ] iface_util_handle_meta_stream_info: 4628: iface_util_handle_meta_stream_info:4628 stream mapping req failed, no native buf opt
03-30 16:23:31.413   525 24287 W         : mct_pipeline_process_set,Line -2761 : X
03-30 16:23:31.413   525 24287 W         :  
03-30 16:23:31.414   525 24287 E         : Camera[ERROR][MCT   ] mct_pipeline_unmap_buf: 828: mct_pipeline_unmap_buf: Un-Mapping failed for sync buf
03-30 16:23:31.414   525 24287 E         : Camera[ERROR][MCT   ] mct_pipeline_unmap_buf: 889: mct_pipeline_unmap_buf: pipeline sanity failed
03-30 16:23:31.414   487  3190 E QCamera2HWI: waitDeferredWork: Invalid job id 0
03-30 16:23:31.414   487  3190 E QCamera2HWI: waitDeferredWork: Invalid job id 0
03-30 16:23:31.414   487  3190 D QCamera2HWI: deinitJpegHandle: E
03-30 16:23:31.414   487  3190 D QCamera2HWI: deinitJpegHandle: X rc = 0
03-30 16:23:31.415   525 24287 E         : Camera[ERROR][MCT   ] mct_pipeline_process_set: 2405: mct_pipeline_process_set:2405: Couldn't find stream id: 0
03-30 16:23:31.416   525   525 I mm-camera-sensor: port_sensor_unlink_func:335ide 2000f
03-30 16:23:31.416   525   525 I mm-camera-sensor: port_sensor_caps_unreserve:244ide 2000f
03-30 16:23:31.416   525   525 E         : Camera[ERROR][IFACE ] iface_unreserve_sink_port: 626: iface_unreserve_sink_port: stream_id f mode 0 
03-30 16:23:31.416   525   525 E         : Camera[ERROR][IFACE ] iface_ext_unlink_src_port: 502: iface_ext_unlink_src_port: mct stream already removed from hw stream
03-30 16:23:31.416   525   525 I         : Camera[ INFO][ISP   ] isp_port_check_caps_unreserve: 877: ide 2000f port 0xf50a8cc0
03-30 16:23:31.416   525   525 E         : Camera[ERROR] q3a_thread_aecawb_stop: 597: q3a_thread_aecawb_stop:597  q3a_thread_aecawb_stop:597 MSG_STOP_THREAD
03-30 16:23:31.417   525   525 E         : Camera[ERROR] q3a_thread_af_stop: 908: q3a_thread_af_stop:908  q3a_thread_af_stop:908 MSG_STOP_THREAD
03-30 16:23:31.418   525 24296 E         : Camera[ERROR] is_thread_handler: 111: is_thread_handler:111  is_thread_handler: Exiting IS thread handler
03-30 16:23:31.418   525   525 W         : mct_pipeline_process_set,Line -2761 : X
03-30 16:23:31.418   525   525 W         :  
03-30 16:23:31.418   525 26286 I mm-camera-sensor: module_sensor_stop_session:1354session 2
03-30 16:23:31.420   525 26288 I         : Camera[ INFO][ISP   ] isp_module_stop_session: 469: session id 2
03-30 16:23:31.421   525 26289 E         : Camera[ERROR] stats_module_stop_session: 332: stats_module_stop_session:332  stats_module_stop_session: list =0xf00996b0, remove port =0xf00a9f00 name=stats_sink from module=0xf5226220, name=stats
03-30 16:23:31.421   525 26289 E         : Camera[ERROR] stats_module_stop_session: 336: stats_module_stop_session:336  stats_module_stop_session: 1 port =0xf00a9f00 name=stats_sink 
03-30 16:23:31.421   525 26289 E         : Camera[ERROR] stats_module_stop_session: 340: stats_module_stop_session:340  stats_module_stop_session: 2 port =0xf00a9f00 name=stats_sink 
03-30 16:23:31.421   525 26289 E         : Camera[ERROR] af_single_destroy: 70: af_single_destroy:70  af_single destroy success!
03-30 16:23:31.421   525 26289 E         : 
03-30 16:23:31.421   525 26289 E         : Camera[ERROR] af_core_deinit: 467: af_core_deinit:467   E
03-30 16:23:31.423   525 26289 E         : Camera[ERROR] awb_port_ext_unload_function: 545: awb_port_ext_unload_function:545  Unload External algo
03-30 16:23:31.424   525 26289 E         : Camera[ERROR] stats_module_stop_session: 345: stats_module_stop_session:345  stats_module_stop_session: 3 port =0xf00a9f00 name=stats_sink 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions