From 8c359892be0638db26d9de732ce79b5f58fcb0d8 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Tue, 11 Mar 2025 11:02:02 -0700 Subject: [PATCH] camerad: clear request queue on exit (#34842) * camerad: doesn't need rt * clear q --- system/camerad/cameras/spectra.cc | 2 ++ system/camerad/main.cc | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/system/camerad/cameras/spectra.cc b/system/camerad/cameras/spectra.cc index 713d5ba1cc..1bd6f00352 100644 --- a/system/camerad/cameras/spectra.cc +++ b/system/camerad/cameras/spectra.cc @@ -1258,6 +1258,8 @@ void SpectraCamera::camera_close() { LOG("-- Stop devices %d", cc.camera_num); if (enabled) { + clear_req_queue(); + // ret = device_control(sensor_fd, CAM_STOP_DEV, session_handle, sensor_dev_handle); // LOGD("stop sensor: %d", ret); int ret = device_control(m->isp_fd, CAM_STOP_DEV, session_handle, isp_dev_handle); diff --git a/system/camerad/main.cc b/system/camerad/main.cc index d55bd495ad..05fdef1a65 100644 --- a/system/camerad/main.cc +++ b/system/camerad/main.cc @@ -6,9 +6,8 @@ #include "common/util.h" int main(int argc, char *argv[]) { - int ret = util::set_realtime_priority(53); - assert(ret == 0); - ret = util::set_core_affinity({6}); + // doesn't need RT priority since we're using isolcpus + int ret = util::set_core_affinity({6}); assert(ret == 0 || Params().getBool("IsOffroad")); // failure ok while offroad due to offlining cores camerad_thread();