diff options
| author | TheKit <thekit@disroot.org> | 2026-07-28 13:15:00 +0300 |
|---|---|---|
| committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2026-10-12 22:19:59 +0200 |
| commit | 7b3161b8ac511cf0dcc18aded00171f8cc07ae9a (patch) | |
| tree | a725573453e0f4bc85916d73688150844a60e3b2 /src/deviceinfo-flashlight.c | |
| parent | ce800c1e2012bf0d6cced36ec6ea8e1b9e9ddf38 (diff) | |
| download | ayatana-indicator-power-7b3161b8ac511cf0dcc18aded00171f8cc07ae9a.tar.gz ayatana-indicator-power-7b3161b8ac511cf0dcc18aded00171f8cc07ae9a.tar.bz2 ayatana-indicator-power-7b3161b8ac511cf0dcc18aded00171f8cc07ae9a.zip | |
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.
Diffstat (limited to 'src/deviceinfo-flashlight.c')
| -rw-r--r-- | src/deviceinfo-flashlight.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/deviceinfo-flashlight.c b/src/deviceinfo-flashlight.c index 91e9f02..62ce7be 100644 --- a/src/deviceinfo-flashlight.c +++ b/src/deviceinfo-flashlight.c @@ -42,3 +42,11 @@ char* flashlight_simple_disable_value() struct DeviceInfo* di = deviceinfo_new(); return deviceinfo_get(di, "FlashlightSimpleDisableValue", ""); } + +char* flashlight_backend() +{ + struct DeviceInfo* di = deviceinfo_new(); + char* backend = deviceinfo_get(di, "FlashlightBackend", ""); + deviceinfo_delete(di); + return backend; +} |
