hal/tools hal-system-lcd-get-brightness, 1.6,
1.7 hal-system-lcd-set-brightness, 1.6, 1.7
Richard Hughes
hughsient at freedesktop.org
Sat Feb 18 15:11:25 PST 2006
Update of /cvs/hal/hal/tools
In directory gabe:/tmp/cvs-serv20068/tools
Modified Files:
hal-system-lcd-get-brightness hal-system-lcd-set-brightness
Log Message:
2006-02-18 Richard Hughes <richard at hughsie.com>
* hald/linux2/acpi.c (laptop_panel_refresh, acpi_synthesize_hotplug_events): add handler for omnibook displays.
* tools/hal-system-lcd-get-brightness, tools/hal-system-lcd-set-brightness: Add omnibook support.
* hald/linux2/acpi.c (acpi_synthesize_display): don't prepend the acpi/ here as the new omnibook isn't under /proc/acpi. See http://bugzilla.gnome.org/show_bug.cgi?id=331458 for details.
Index: hal-system-lcd-get-brightness
===================================================================
RCS file: /cvs/hal/hal/tools/hal-system-lcd-get-brightness,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- hal-system-lcd-get-brightness 18 Feb 2006 23:00:55 -0000 1.6
+++ hal-system-lcd-get-brightness 18 Feb 2006 23:11:23 -0000 1.7
@@ -54,6 +54,10 @@
# 5
value="`cat $HAL_PROP_LINUX_ACPI_PATH`"
let "value = ${value} - 1"
+elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "omnibook" ]; then
+ # cat /proc/omnibook/lcd
+ # LCD brightness: 7
+ value="`cat $HAL_PROP_LINUX_ACPI_PATH | awk '{print $3;}'`"
else
echo "org.freedesktop.Hal.Device.LaptopPanel.NotSupported" >&2
echo "No ACPI method found" >&2
Index: hal-system-lcd-set-brightness
===================================================================
RCS file: /cvs/hal/hal/tools/hal-system-lcd-set-brightness,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- hal-system-lcd-set-brightness 18 Feb 2006 23:00:55 -0000 1.6
+++ hal-system-lcd-set-brightness 18 Feb 2006 23:11:23 -0000 1.7
@@ -60,6 +60,10 @@
# echo "{1..8}" > /proc/acpi/sony/brightness
# http://popies.net/sonypi/2.6-sony_acpi4.patch
echo "$value" > $HAL_PROP_LINUX_ACPI_PATH
+elif [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "omnibook" ]; then
+ # echo "{0..7}" > /proc/omnibook/lcd
+ # http://bugzilla.gnome.org/show_bug.cgi?id=331458
+ echo "$value" > $HAL_PROP_LINUX_ACPI_PATH
else
echo "org.freedesktop.Hal.Device.LaptopPanel.NotSupported" >&2
echo "No ACPI method found" >&2
More information about the hal-commit
mailing list