summaryrefslogtreecommitdiff
path: root/pm
diff options
context:
space:
mode:
authorVictor Lowther <victor.lowther@gmail.com>2008-06-29 11:57:55 -0500
committerVictor Lowther <victor.lowther@gmail.com>2010-06-05 13:32:49 -0500
commit58379d77e02e7ed3e4d61757358fb88d7f98413a (patch)
tree05175a2c49e59072d1d25919a402c58e837ce6c9 /pm
parent69922741b43bfcee13677ae5dce16fa274f53a9e (diff)
Added comments to intel-audio-powersave and wireless
Diffstat (limited to 'pm')
-rw-r--r--pm/power.d/intel-audio-powersave4
-rw-r--r--pm/power.d/wireless7
2 files changed, 11 insertions, 0 deletions
diff --git a/pm/power.d/intel-audio-powersave b/pm/power.d/intel-audio-powersave
index f45b88b..3d42ae3 100644
--- a/pm/power.d/intel-audio-powersave
+++ b/pm/power.d/intel-audio-powersave
@@ -1,5 +1,9 @@
#!/bin/sh
+# Allow the driver to put the audio hardware to sleep
+# once the driver has been inactive for a second.
+# This hook should work with at least the ac97 and hda codecs.
+
audio_powersave() {
for dev in /sys/module/snd_*_codec/parameters/power_save; do
[ -w $dev ] && echo $1 > $dev
diff --git a/pm/power.d/wireless b/pm/power.d/wireless
index 7de6a03..eb0f02e 100644
--- a/pm/power.d/wireless
+++ b/pm/power.d/wireless
@@ -2,6 +2,13 @@
[ -x /sbin/iwconfig ] || exit $NA
+# This hook is very generic and only works on wireless hardware that
+# iwconfig can actually configure power settings on. Sadly, this misses
+# some more popular cards *cough* iwlwifi *cough*.
+
+# Better heuristics and better control for specific cards
+# would be welcome.
+
wireless_powersave() {
case $1 in
on) iwparams="txpower auto power on" ;;