[APP] LevelSight 188.8.131.52 2009.09.16 - backlight enhancement for Acer 900s and HTC
Seriously consider donating
something like $1 if you want software from me to continue, as johnpatcher
This was originally built to flatten the brightness levels between AC and BATT on the Kaiser, but since lacking a workable front-camera API access, this works out better on devices with a light sensor.
/// new Acer m900 support
Since this device has only 3 auto-brightness settings, a full sensor-to-backlight curve is used -- configurable in HKCU/SOFTWARE/Creative 'Ware/LevelSight/0-a -- to map the 11 brightness settings actually available.
Brightness levels to about 4 have been hand-tuned and then it's a linear scale to max brightness.
Currently, the settings are loaded only on service startup, restart the service (through dotfred TaskMgr) if you want it to reload the registry settings
Remember to CLICK OFF
your auto-backlight setting.<HTC>
Uses HKCU\SOFTWARE\Creative 'Ware\LevelSight\offset
to adjust the native backlight setting. It defaults to -1 so it'll pick a setting 1 less than what the system would've automatically set. If you set it to 0, it'll pick the same as auto, and so on. Behavior is the same as pre-1.0.3.x when backlevels fall below low_wm, but switches to offset mode when levels rise above high_wm.
More gui ability to adjust these settings is coming.
All this does is TURNS OFF the auto-backlight whenever reported light levels drop below low_wm using a custom 1st order low-pass algorithm. When turned off, the backlight falls back to whatever you
have your AC/BATT light levels set to in your control panel
. This solves the issue of the auto-backlight not dimming below backlight level 3.
When light levels rise above what the light sensor API thinks should be backlight level high_wm, it uses the auto-backlight settings again, and lets it auto-adjust as was usual.<HTC>
It is however not perfect due to the low accuracy of the sensor at low light levels, but does try to ignore the random unexplainable surges in the sensor readings when light levels are constant. It's probably a reason why ODMs don't bother to try to make auto-backlight work any lower.
Thanks originally to Koush
for his LightSensor SDK reference as well as Scott Seligman
for the C++ reference.
- works with native OEM backlight without extra .NET layer
- history-less sensor-data filtering
- Native C++ and assembly, floating-point-less DSP/SIMD-accelerated math, and extra optimization analysis in Ida Pro.
No CPU/power-sucking .NET, nor the standard/default software floating-point emulation used.
- takes 1K of ram, 22K of storage
- 0 process slots (runs as a service)
- no notable power-draw (same amount of power ~53mA with service on/off on Fuze)
- polls every ~2000 milliseconds
- no HTCSensorSDK sensor-data lag (~200-300 ms) nor cpu load -- directly accesses the sensor driver
- dll and supporting code are compressed independently of .cab and use cpu's smaller Thumb (16-bit) code when advantageous
- mostly lockless multi-threading
: adjusts backlight levels positive or negative of oem-pick
: fuzzy point where it low-light auto-backlight (2 is default recommendation)
: fuzzy point where offset auto-backlight will turn on (5 is recommendation)
Tested with stock Fuze rom, and Acer m900 160-lite rom.
184.108.40.206: fix bug where max backlight was clamped to level 5. It now uses the full 1-10 (10 levels) range. Level 0 disabled because not useful.
: full-backlight enhancement for Acer m900 ONLY!!
Backport to FUZE whenever.
Acer 900s version abandoned because of Clove Technology
: full-backlight replacement
: reset hysteresis on backlight power-state edge
: hysteresis now using first-order low-pass filter with a medium α; math and power-state optimizations
obsolete (1.0.1.x series) LevelSightSvc.220.127.116.11.CAB (11.8 KB, 132 views)
: work-around for service not starting up when device is rebooted; tweaked hysteresis
: converted into a service with registry configurable water marks
: better hysterisis
: Previous version tended to like it dark and resisted turning it up.
Adjusted dark/light sensitivity so it switches auto-off at light sensor 3::3, and switches it back on at 3::5. Still playing with this to get a better hysteresis.