^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) ==========================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) Notes on Power-Saving Mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) ==========================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) AC97 and HD-audio drivers have the automatic power-saving mode.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) This feature is enabled via Kconfig ``CONFIG_SND_AC97_POWER_SAVE``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) and ``CONFIG_SND_HDA_POWER_SAVE`` options, respectively.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) With the automatic power-saving, the driver turns off the codec power
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) appropriately when no operation is required. When no applications use
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) the device and/or no analog loopback is set, the power disablement is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) done fully or partially. It'll save a certain power consumption, thus
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) good for laptops (even for desktops).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) The time-out for automatic power-off can be specified via ``power_save``
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) module option of snd-ac97-codec and snd-hda-intel modules. Specify
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) the time-out value in seconds. 0 means to disable the automatic
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) power-saving. The default value of timeout is given via
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) ``CONFIG_SND_AC97_POWER_SAVE_DEFAULT`` and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) ``CONFIG_SND_HDA_POWER_SAVE_DEFAULT`` Kconfig options. Setting this to 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) (the minimum value) isn't recommended because many applications try to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) reopen the device frequently. 10 would be a good choice for normal
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) operations.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) The ``power_save`` option is exported as writable. This means you can
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) adjust the value via sysfs on the fly. For example, to turn on the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) automatic power-save mode with 10 seconds, write to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) ``/sys/modules/snd_ac97_codec/parameters/power_save`` (usually as root):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) # echo 10 > /sys/modules/snd_ac97_codec/parameters/power_save
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) Note that you might hear click noise/pop when changing the power
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) state. Also, it often takes certain time to wake up from the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) power-down to the active state. These are often hardly to fix, so
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) don't report extra bug reports unless you have a fix patch ;-)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) For HD-audio interface, there is another module option,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) power_save_controller. This enables/disables the power-save mode of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) the controller side. Setting this on may reduce a bit more power
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) consumption, but might result in longer wake-up time and click noise.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) Try to turn it off when you experience such a thing too often.