QCamera3HWI: Add a flag to skip powering on Easel
Add a flag to skip powering on Easel so HDR+ client
tests can run.
Test: hdrplus_client_tests
Bug: 36127281
Change-Id: I4b052e9bb656449bccdacec301ede8084e8ea181
diff --git a/msm8998/QCamera2/HAL3/QCamera3HWI.cpp b/msm8998/QCamera2/HAL3/QCamera3HWI.cpp
index 143f822..fa878ca 100644
--- a/msm8998/QCamera2/HAL3/QCamera3HWI.cpp
+++ b/msm8998/QCamera2/HAL3/QCamera3HWI.cpp
@@ -10252,6 +10252,17 @@
gHdrPlusClient = std::make_shared<HdrPlusClient>();
if (gHdrPlusClient->isEaselPresentOnDevice()) {
+ // Check if HAL should not power on Easel even if it's present. This is to allow HDR+ tests
+ // to connect to Easel.
+ bool doNotpowerOnEasel =
+ property_get_bool("camera.hdrplus.donotpoweroneasel", false);
+
+ if (doNotpowerOnEasel) {
+ gHdrPlusClient = nullptr;
+ ALOGI("%s: Easel is present but not powered on.", __FUNCTION__);
+ return OK;
+ }
+
// If Easel is present, power on Easel and suspend it immediately.
status_t res = gHdrPlusClient->powerOnEasel();
if (res != OK) {