Package: laptop-mode-tools
Version: 1.34-1
Followup-For: Bug #438782

Following up bug #438782, here is attached a simple patch to activate
AC97 autosuspend feature via laptop_mode.

Thanks!
--
a.m.


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.23.1
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages laptop-mode-tools depends on:
ii  lsb-base                      3.1-24     Linux Standard Base 3.1 init scrip

Versions of packages laptop-mode-tools recommends:
ii  acpid                         1.0.6-4    Utilities for using ACPI power man
ii  hdparm                        7.7-1      tune hard disk parameters for high
pn  sdparm                        <none>     (no description available)

-- no debconf information
--- usr/sbin/laptop_mode.orig   2007-10-29 02:41:51.000000000 +0100
+++ usr/sbin/laptop_mode        2007-10-29 02:43:02.000000000 +0100
@@ -98,6 +98,7 @@
 BATT_DPMS_STANDBY=300
 LM_AC_DPMS_STANDBY=1200
 NOLM_AC_DPMS_STANDBY=1200
+CONTROL_AC97=0
 CONTROL_CPU_THROTTLING=0
 BATT_CPU_THROTTLING=medium
 LM_AC_CPU_THROTTLING=minimum
@@ -1543,6 +1544,16 @@
 fi
 
 
+# Control AC97 powersave feature
+if [ $CONTROL_AC97 -eq 1 ] ; then
+        if [ -w /sys/module/snd_ac97_codec/parameters/power_save ]; then
+               echo 1 > /sys/module/snd_ac97_codec/parameters/power_save
+               echo "AC97 autosuspend enabled." >> $OUTPUT
+       else
+               echo "CONFIG_SND_AC97_POWER_SAVE option not set in kernel 
config." >> $OUTPUT
+       fi
+fi
+
 # Start/stop programs 
 if [ $CONTROL_START_STOP -eq 1 -a "$STATE" == "enabled" ]; then
        # Empty undo file first. We write the actions we take

Reply via email to