summaryrefslogtreecommitdiff
path: root/pm/power.d/intel-audio-powersave
diff options
context:
space:
mode:
Diffstat (limited to 'pm/power.d/intel-audio-powersave')
-rw-r--r--pm/power.d/intel-audio-powersave15
1 files changed, 15 insertions, 0 deletions
diff --git a/pm/power.d/intel-audio-powersave b/pm/power.d/intel-audio-powersave
new file mode 100644
index 0000000..f45b88b
--- /dev/null
+++ b/pm/power.d/intel-audio-powersave
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+audio_powersave() {
+ for dev in /sys/module/snd_*_codec/parameters/power_save; do
+ [ -w $dev ] && echo $1 > $dev
+ done
+}
+
+case $1 in
+ true) audio_powersave 1 ;;
+ false) audio_powersave 0 ;;
+ *) exit $NA
+esac
+
+exit 0 \ No newline at end of file