From 29af95b9788e712ffd44d8835194e4850aebdb0b Mon Sep 17 00:00:00 2001 From: "Ali K. Zadeh" Date: Fri, 2 Aug 2024 20:10:44 +0000 Subject: [PATCH 1/3] [felix] Define CAMERA_MULTICAM_BOOST Port from ag/28607900 This CL defines CAMERA_MULTICAM_BOOST (with the same settings as the existing CAMERA_ZOOMING_BOOST). Having both definitions is necessary to be able to transition from zooming boost to multicam boost. Once the multicam boost flag is fully rolled out, we can remove the CAMERA_ZOOMING_BOOST. Bug: 347829135 Test: adb logcat Flag: EXEMPT resource file only change Change-Id: I3e25ea8e3fd84512e514aabab92b1d7c65ffab63 --- powerhint.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/powerhint.json b/powerhint.json index 530c865..3c4aa8f 100644 --- a/powerhint.json +++ b/powerhint.json @@ -1100,6 +1100,18 @@ "Duration": 100, "Value": "0" }, + { + "PowerHint": "CAMERA_MULTICAM_BOOST", + "Node": "CDPreferIdle", + "Duration": 100, + "Value": "1" + }, + { + "PowerHint": "CAMERA_MULTICAM_BOOST", + "Node": "PMU_POLL", + "Duration": 100, + "Value": "0" + }, { "PowerHint": "GCA_CAMERA_SHOT_BIGCPU_RANK1", "Node": "TAPreferHighCap", From c5a772a3f2961a469578a6dc5cd179025ddb6435 Mon Sep 17 00:00:00 2001 From: Tai Kuo Date: Mon, 14 Oct 2024 20:37:50 +0800 Subject: [PATCH 2/3] vibrator: correct debug() calibration file path Bug: 356823441 Test: dumpsys Flag: EXEMPT bugfix Change-Id: I2d126e63ae7365b4bd199d00776f10b11c700702 --- vibrator/common/HardwareBase.cpp | 16 ++++++++++++---- vibrator/common/HardwareBase.h | 1 + vibrator/cs40l26/Vibrator.cpp | 6 +++++- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/vibrator/common/HardwareBase.cpp b/vibrator/common/HardwareBase.cpp index 329293a..583caaa 100644 --- a/vibrator/common/HardwareBase.cpp +++ b/vibrator/common/HardwareBase.cpp @@ -69,6 +69,7 @@ HwCalBase::HwCalBase() { std::ifstream calfile; std::ifstream calfile_dual; auto propertyPrefix = std::getenv("PROPERTY_PREFIX"); + auto calPath = std::getenv("CALIBRATION_FILEPATH"); if (propertyPrefix != NULL) { mPropertyPrefix = std::string(propertyPrefix); @@ -76,6 +77,14 @@ HwCalBase::HwCalBase() { ALOGE("Failed get property prefix!"); } + // Keep the cal file path for the current HwCalBase instance. + if (calPath != NULL) { + mCalPath = std::string(calPath); + } else { + ALOGE("Failed get the calibration file path!"); + } + + // Read the cal data for the current instance. utils::fileFromEnv("CALIBRATION_FILEPATH", &calfile); for (std::string line; std::getline(calfile, line);) { @@ -89,6 +98,7 @@ HwCalBase::HwCalBase() { } } + // Read the cal data for the other instance. utils::fileFromEnv("CALIBRATION_FILEPATH_DUAL", &calfile_dual); for (std::string line; std::getline(calfile_dual, line);) { @@ -106,7 +116,6 @@ HwCalBase::HwCalBase() { void HwCalBase::debug(int fd) { std::ifstream stream; - std::string path; std::string line; struct context { HwCalBase *obj; @@ -133,9 +142,8 @@ void HwCalBase::debug(int fd) { dprintf(fd, "Persist:\n"); - utils::fileFromEnv("CALIBRATION_FILEPATH", &stream, &path); - - dprintf(fd, " %s:\n", path.c_str()); + utils::openNoCreate(mCalPath, &stream); + dprintf(fd, " %s:\n", mCalPath.c_str()); while (std::getline(stream, line)) { dprintf(fd, " %s\n", line.c_str()); } diff --git a/vibrator/common/HardwareBase.h b/vibrator/common/HardwareBase.h index f09fada..0296390 100644 --- a/vibrator/common/HardwareBase.h +++ b/vibrator/common/HardwareBase.h @@ -208,6 +208,7 @@ class HwCalBase { private: std::string mPropertyPrefix; + std::string mCalPath; std::map mCalData; }; diff --git a/vibrator/cs40l26/Vibrator.cpp b/vibrator/cs40l26/Vibrator.cpp index 8543bf0..e091571 100644 --- a/vibrator/cs40l26/Vibrator.cpp +++ b/vibrator/cs40l26/Vibrator.cpp @@ -1081,7 +1081,7 @@ ndk::ScopedAStatus Vibrator::on(uint32_t timeoutMs, uint32_t effectIndex, const if (mIsDual) { mHwApiDual->getOwtFreeSpace(&freeBytes); if (ch-> size() > freeBytes) { - ALOGE("Invalid OWT length in flip: Effect %d: %d > %d!", effectIndex, + ALOGE("Invalid OWT length in flip: Effect %d: %zu > %d!", effectIndex, ch-> size(), freeBytes); return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); } @@ -1619,12 +1619,16 @@ binder_status_t Vibrator::dump(int fd, const char **args, uint32_t numArgs) { verFile.close(); } + dprintf(fd, "\n"); + mHwApiDef->debug(fd); dprintf(fd, "\n"); mHwCalDef->debug(fd); + dprintf(fd, "\n"); + if (mIsDual) { mHwApiDual->debug(fd); dprintf(fd, "\n"); From 3f7ccdf45fe49fddbad817deade85ac19641171b Mon Sep 17 00:00:00 2001 From: Tai Kuo Date: Wed, 16 Oct 2024 00:33:13 +0800 Subject: [PATCH 3/3] Update OWNERS Bug: 362659323 Test: N/A Flag: EXEMPT OWNERS change Change-Id: I6e2148448f1105933d66cec57cb879054657eeda --- vibrator/OWNERS | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vibrator/OWNERS b/vibrator/OWNERS index dec74a8..fc59b13 100644 --- a/vibrator/OWNERS +++ b/vibrator/OWNERS @@ -1 +1,3 @@ -file:platform/hardware/google/pixel:/vibrator/OWNERS +chrispaulo@google.com +nathankulczak@google.com +taikuo@google.com