From 7b3161b8ac511cf0dcc18aded00171f8cc07ae9a Mon Sep 17 00:00:00 2001 From: TheKit Date: Tue, 28 Jul 2026 13:15:00 +0300 Subject: flashlight: add a camera HAL backend Some flash drivers expose a sysfs node that only toggles the LED and leaves the duty and the flash safety timeout unset, so the LED goes out by itself. Drive the torch through the AIDL camera provider instead, which programs all three. Select it with "FlashlightBackend: camera-hal" in the device yaml. Needs libgbinder, so it is behind the ENABLE_LIBGBINDER build option. --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 40df0c2..cbf8ad7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,7 @@ option(ENABLE_COVERAGE "Enable coverage reports (includes enabling all tests and option(ENABLE_WERROR "Treat all build warnings as errors" OFF) option(ENABLE_LOMIRI_FEATURES "Build with Lomiri-specific libraries, schemas and media" OFF) option(ENABLE_DEVICEINFO "Build with deviceinfo integration" OFF) +option(ENABLE_LIBGBINDER "Build with the camera HAL flashlight backend" OFF) option(ENABLE_RDA "Build with RDA (remote desktop awareness) support" ON) if(ENABLE_COVERAGE) @@ -109,6 +110,13 @@ if (ENABLE_DEVICEINFO) include_directories (${DEVICEINFO_INCLUDE_DIRS}) endif () +if (ENABLE_LIBGBINDER) + pkg_check_modules (GBINDER REQUIRED libgbinder) + include_directories (${GBINDER_INCLUDE_DIRS}) + link_directories (${GBINDER_LIBRARY_DIRS}) + add_definitions (-DENABLE_LIBGBINDER) +endif () + ## icons directory add_definitions(-DINDICATOR_ICONS_DIR="${CMAKE_INSTALL_FULL_DATADIR}/ayatana-indicator-power/icons") -- cgit v1.2.3