Difference between revisions of "How to enable audio codec power saving"

From ThinkWiki
Jump to: navigation, search
 
(On-demand power control: in 2.6.19 git)
Line 5: Line 5:
  
 
==On-demand power control==
 
==On-demand power control==
There's an [http://www.kernel.org/git/?p=linux/kernel/git/perex/alsa.git;a=commitdiff_plain;h=6dbe662874ba08585eaf732d126762c25ac8e3f7;hp=2b29b13c5794f648cd5e839796496704d787f5a6 experimental patch] which enables the support
+
There's an [http://www.kernel.org/git/?p=linux/kernel/git/perex/alsa.git;a=commitdiff_plain;h=6dbe662874ba08585eaf732d126762c25ac8e3f7;hp=2b29b13c5794f648cd5e839796496704d787f5a6 experimental patch] (accepted for Linux 2.6.19) which enables the support
of aggressive AC97 power-saving mode.  In this mode, the AC97 powerdown register bits are dynamically controlled at each open/close of PCM streams. To allow powering off the analog mixer, make sure all analog inputs (Line, Microphone, CD, etc.) are muted.
+
of aggressive AC97 power-saving mode in the Linux [[ALSA]] drivers.  In this mode, the AC97 powerdown register bits are dynamically controlled at each open/close of PCM streams. To allow powering off the analog mixer, make sure all analog inputs (Line, Microphone, CD, etc.) are muted.
  
 
The mode is disabled by default, and activated via <tt>power_save=1</tt> option for <tt>snd-ac97-codec</tt> driver (at run time, use {{cmdroot|echo Y > /sys/module/snd_ac97_codec/parameters/power_save}}).
 
The mode is disabled by default, and activated via <tt>power_save=1</tt> option for <tt>snd-ac97-codec</tt> driver (at run time, use {{cmdroot|echo Y > /sys/module/snd_ac97_codec/parameters/power_save}}).
  
 
You may hear a faint click each time the device is powered up (at start of playback) and each time the device is powered down (2 seconds after playback ends).
 
You may hear a faint click each time the device is powered up (at start of playback) and each time the device is powered down (2 seconds after playback ends).

Revision as of 22:41, 7 October 2006

The AC97 sound device (e.g., AD1981B) requires a noticable amount of power (0.3W on T43). This power can be saved when the device is not in use.

Disabling the device

Disable the sound device by unloading modules or # echo -n 3 > /sys/class/sound/controlC0/device/power/state (replace 3 by 0 to enable again).

On-demand power control

There's an experimental patch (accepted for Linux 2.6.19) which enables the support of aggressive AC97 power-saving mode in the Linux ALSA drivers. In this mode, the AC97 powerdown register bits are dynamically controlled at each open/close of PCM streams. To allow powering off the analog mixer, make sure all analog inputs (Line, Microphone, CD, etc.) are muted.

The mode is disabled by default, and activated via power_save=1 option for snd-ac97-codec driver (at run time, use # echo Y > /sys/module/snd_ac97_codec/parameters/power_save).

You may hear a faint click each time the device is powered up (at start of playback) and each time the device is powered down (2 seconds after playback ends).