@@ -266,7 +266,7 @@ int SpectraCamera::clear_req_queue() {
266266 req_mgr_flush_request.link_hdl = link_handle;
267267 req_mgr_flush_request.flush_type = CAM_REQ_MGR_FLUSH_TYPE_ALL;
268268 int ret = do_cam_control (m->video0_fd , CAM_REQ_MGR_FLUSH_REQ, &req_mgr_flush_request, sizeof (req_mgr_flush_request));
269- LOGD (" flushed all req: %d" , ret);
269+ LOGD (" flushed all req: %d" , ret); // returns a "time until timeout" on clearing the workq
270270
271271 for (int i = 0 ; i < MAX_IFE_BUFS; ++i) {
272272 destroySyncObjectAt (i);
@@ -1418,11 +1418,13 @@ bool SpectraCamera::waitForFrameReady(uint64_t request_id) {
14181418 }
14191419
14201420 auto waitForSync = [&](uint32_t sync_obj, int timeout_ms, const char *sync_type) {
1421+ double st = millis_since_boot ();
14211422 struct cam_sync_wait sync_wait = {};
14221423 sync_wait.sync_obj = sync_obj;
14231424 sync_wait.timeout_ms = stress_test (sync_type) ? 1 : timeout_ms;
14241425 bool ret = do_sync_control (m->cam_sync_fd , CAM_SYNC_WAIT, &sync_wait, sizeof (sync_wait)) == 0 ;
1425- if (!ret) LOGE (" camera %d %s failed" , cc.camera_num , sync_type);
1426+ double et = millis_since_boot ();
1427+ if (!ret) LOGE (" camera %d %s failed after %.2fms" , cc.camera_num , sync_type, et-st);
14261428 return ret;
14271429 };
14281430
@@ -1434,6 +1436,7 @@ bool SpectraCamera::waitForFrameReady(uint64_t request_id) {
14341436 // BPS is typically 7ms
14351437 success = waitForSync (sync_objs_bps[buf_idx], 50 , " BPS sync" );
14361438 }
1439+
14371440 return success;
14381441}
14391442
0 commit comments