[Debian-eeepc-commits] [SCM] Maintenance of eeepc-acpi-scripts debian package branch, master, updated. 1.1.0-beta.1-7-gd665d8e
Darren Salt
linux at youmustbejoking.demon.co.uk
Sat Apr 25 15:52:52 UTC 2009
The following commit has been merged in the master branch:
commit 2cff76eb604877ed0dbb96bf8d657d3758721216
Author: Darren Salt <linux at youmustbejoking.demon.co.uk>
Date: Sat Apr 25 16:33:33 2009 +0100
Alter the audio control blacklisting to allow for controls for which
(for example) muting only should be allowed.
diff --git a/debian/changelog b/debian/changelog
index 13f146a..a55af7a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,8 @@ eeepc-acpi-scripts (1.1.1) unstable; urgency=low
function rather than location.
(We've had one instance of renaming to reflect location on a 1000-series
without corresponding fixes in the hotkey handler script.)
+ * Alter the audio control blacklisting to allow for controls for which
+ (for example) muting only should be allowed.
-- Darren Salt <linux at youmustbejoking.demon.co.uk> Sat, 25 Apr 2009 16:07:32 +0100
diff --git a/etc/acpi/lib/eeepc-amixer-blacklist b/etc/acpi/lib/eeepc-amixer-blacklist
index a3c9d3c..b4499e8 100644
--- a/etc/acpi/lib/eeepc-amixer-blacklist
+++ b/etc/acpi/lib/eeepc-amixer-blacklist
@@ -1,3 +1,8 @@
+# Mixer control blacklist.
+# Append '!x' (or '!x,y' etc.) to remove from the blacklist for a given
+# control type.
+# Recognised control types are "volume" and "mute",
+# corresponding to ALSA's pvolume and pswitch.
Mic
PCM
Master
diff --git a/etc/acpi/lib/sound.sh b/etc/acpi/lib/sound.sh
index 4415676..02c672a 100644
--- a/etc/acpi/lib/sound.sh
+++ b/etc/acpi/lib/sound.sh
@@ -20,22 +20,22 @@ configureSoundFilter() {
$AMIXER |
grep -B1 "$1" |
sed -r "s/^(.*'([^']+)'.*|[^']+())$/\\2/; /^$/ d" |
- grep -ivFf /etc/acpi/lib/eeepc-amixer-blacklist
+ grep -ivF "$(sed -nre "/^#/ d; /!/! {p; d}; /!(.*,)?\b$2\b/ d; s/\s*!.*//; p" /etc/acpi/lib/eeepc-amixer-blacklist)"
}
# Defaults
configureSound() {
[ "$SOUND_LABEL" ] || {
- SOUND_LABEL="$(configureSoundFilter pvolume)"
+ SOUND_LABEL="$(configureSoundFilter pvolume volume)"
}
[ "$SOUND_SWITCH" ] || {
- SOUND_SWITCH="$(configureSoundFilter pswitch)"
+ SOUND_SWITCH="$(configureSoundFilter pswitch mute)"
}
[ "$SOUND_SWITCH_EXCLUSIVE" ] || {
- SOUND_SWITCH_EXCLUSIVE="$(configureSoundFilter ': pswitch$')"
+ SOUND_SWITCH_EXCLUSIVE="$(configureSoundFilter ': pswitch$' mute)"
}
[ "$SOUND_VOLUME_STEP" ] || {
--
Maintenance of eeepc-acpi-scripts debian package
More information about the Debian-eeepc-commits
mailing list