162306a36Sopenharmony_ci========================== 262306a36Sopenharmony_ciNotes on Power-Saving Mode 362306a36Sopenharmony_ci========================== 462306a36Sopenharmony_ci 562306a36Sopenharmony_ciAC97 and HD-audio drivers have the automatic power-saving mode. 662306a36Sopenharmony_ciThis feature is enabled via Kconfig ``CONFIG_SND_AC97_POWER_SAVE`` 762306a36Sopenharmony_ciand ``CONFIG_SND_HDA_POWER_SAVE`` options, respectively. 862306a36Sopenharmony_ci 962306a36Sopenharmony_ciWith the automatic power-saving, the driver turns off the codec power 1062306a36Sopenharmony_ciappropriately when no operation is required. When no applications use 1162306a36Sopenharmony_cithe device and/or no analog loopback is set, the power disablement is 1262306a36Sopenharmony_cidone fully or partially. It'll save a certain power consumption, thus 1362306a36Sopenharmony_cigood for laptops (even for desktops). 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ciThe time-out for automatic power-off can be specified via ``power_save`` 1662306a36Sopenharmony_cimodule option of snd-ac97-codec and snd-hda-intel modules. Specify 1762306a36Sopenharmony_cithe time-out value in seconds. 0 means to disable the automatic 1862306a36Sopenharmony_cipower-saving. The default value of timeout is given via 1962306a36Sopenharmony_ci``CONFIG_SND_AC97_POWER_SAVE_DEFAULT`` and 2062306a36Sopenharmony_ci``CONFIG_SND_HDA_POWER_SAVE_DEFAULT`` Kconfig options. Setting this to 1 2162306a36Sopenharmony_ci(the minimum value) isn't recommended because many applications try to 2262306a36Sopenharmony_cireopen the device frequently. 10 would be a good choice for normal 2362306a36Sopenharmony_cioperations. 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_ciThe ``power_save`` option is exported as writable. This means you can 2662306a36Sopenharmony_ciadjust the value via sysfs on the fly. For example, to turn on the 2762306a36Sopenharmony_ciautomatic power-save mode with 10 seconds, write to 2862306a36Sopenharmony_ci``/sys/modules/snd_ac97_codec/parameters/power_save`` (usually as root): 2962306a36Sopenharmony_ci:: 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ci # echo 10 > /sys/modules/snd_ac97_codec/parameters/power_save 3262306a36Sopenharmony_ci 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_ciNote that you might hear click noise/pop when changing the power 3562306a36Sopenharmony_cistate. Also, it often takes certain time to wake up from the 3662306a36Sopenharmony_cipower-down to the active state. These are often hardly to fix, so 3762306a36Sopenharmony_cidon't report extra bug reports unless you have a fix patch ;-) 3862306a36Sopenharmony_ci 3962306a36Sopenharmony_ciFor HD-audio interface, there is another module option, 4062306a36Sopenharmony_cipower_save_controller. This enables/disables the power-save mode of 4162306a36Sopenharmony_cithe controller side. Setting this on may reduce a bit more power 4262306a36Sopenharmony_ciconsumption, but might result in longer wake-up time and click noise. 4362306a36Sopenharmony_ciTry to turn it off when you experience such a thing too often. 44