From ca7b4340c191a245c572ed708117b9779d769683 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Thu, 6 Mar 2025 16:57:37 -0800 Subject: [PATCH] camerad: make recovery reset threshold based on queue depth (#34803) Co-authored-by: Comma Device --- system/camerad/cameras/spectra.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/camerad/cameras/spectra.cc b/system/camerad/cameras/spectra.cc index c70c427766..713d5ba1cc 100644 --- a/system/camerad/cameras/spectra.cc +++ b/system/camerad/cameras/spectra.cc @@ -1360,7 +1360,7 @@ bool SpectraCamera::validateEvent(uint64_t request_id, uint64_t frame_id_raw) { // check if the request ID is even valid. this happens after queued // requests are cleared. unclear if it happens any other time. if (request_id == 0) { - if (invalid_request_count++ > 10) { + if (invalid_request_count++ > ife_buf_depth+2) { LOGE("camera %d reset after half second of invalid requests", cc.camera_num); clearAndRequeue(request_id_last + 1); invalid_request_count = 0;