[Debian-eeepc-commits] [SCM] Maintenance of eeepc-acpi-scripts debian package branch, master, updated. d0256ed89f5fc785f2726d6c4a12593b548ed997
Darren Salt
linux at youmustbejoking.demon.co.uk
Wed Feb 4 21:11:46 UTC 2009
The following commit has been merged in the master branch:
commit d0256ed89f5fc785f2726d6c4a12593b548ed997
Author: Darren Salt <linux at youmustbejoking.demon.co.uk>
Date: Wed Feb 4 18:55:52 2009 +0000
Made the volume stepping configurable, with the default being hw-dependent.
The test is of the entry for device 00-00 in /proc/asound/pcm; ALC269, which
my 901 has, is recognised.
diff --git a/debian/changelog b/debian/changelog
index d52a066..e58265f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,6 +14,9 @@ eeepc-acpi-scripts (1.0.12) UNRELEASED; urgency=low
- Replaced the heuristic for determining which should be fast
notifications with an extra parameter.
- Fast notifications stay around for a bit longer.
+ * Made the volume stepping configurable, with the default being hw-dependent
+ (the test being of the entry for device 00-00 in /proc/asound/pcm):
+ ALC269, which my 901 has, is recognised.
[ Raphael Geissert ]
* Auto detect the playback devices and the playback switches
diff --git a/debian/eeepc-acpi-scripts.default b/debian/eeepc-acpi-scripts.default
index 900b828..0aa39be 100644
--- a/debian/eeepc-acpi-scripts.default
+++ b/debian/eeepc-acpi-scripts.default
@@ -20,6 +20,14 @@ SOUND_SWITCH=
# pswitch capabilities only:
SOUND_SWITCH_EXCLUSIVE=
+# Default volume level change.
+# You can specify the change in all ways supported by amixer, e.g.
+# raw value ('5'), percentage ('1.5625%') or decibels ('0.8dB').
+# The different representations are probably not equivalent. Check amixer
+# output to determine what's right for your hardware.
+# Leave empty if you want to allow for auto-configuration.
+SOUND_VOLUME_STEP=
+
# Set to 'yes' to display detailed information when the volup and voldown
# hotkeys are pressed but the volume percentage of all the playback devices
# is not the same
diff --git a/etc/acpi/actions/volume.sh b/etc/acpi/actions/volume.sh
index 228557d..465574b 100755
--- a/etc/acpi/actions/volume.sh
+++ b/etc/acpi/actions/volume.sh
@@ -82,13 +82,13 @@ case "$action" in
;;
down)
for label in $SOUND_LABEL $SOUND_SWITCH_EXCLUSIVE; do
- $AMIXER -q set $label 2%- unmute
+ $AMIXER -q set $label "$SOUND_VOLUME_STEP"- unmute
done
show_volume
;;
up)
for label in $SOUND_LABEL $SOUND_SWITCH_EXCLUSIVE; do
- $AMIXER -q set $label 2%+ unmute
+ $AMIXER -q set $label "$SOUND_VOLUME_STEP"+ unmute
done
show_volume
;;
diff --git a/etc/acpi/lib/sound.sh b/etc/acpi/lib/sound.sh
index e5a5379..08e82ad 100644
--- a/etc/acpi/lib/sound.sh
+++ b/etc/acpi/lib/sound.sh
@@ -16,4 +16,11 @@ configureSound() {
sed -r "s/^(.*'([^']+)'.*|[^']+())$/\\2/")"
}
+ [ "$SOUND_VOLUME_STEP" ] || {
+ case "$(grep ^00-00 /proc/asound/pcm 2>/dev/null)" in
+ *ALC269*) SOUND_VOLUME_STEP=3.125%; ;;
+ *) SOUND_VOLUME_STEP=2%; ;;
+ esac
+ }
+
}
--
Maintenance of eeepc-acpi-scripts debian package
More information about the Debian-eeepc-commits
mailing list