Amit Kucheria wrote: > On 3/21/07, Shaohua Li <shaohua.li@xxxxxxxxx> wrote: >> On Wed, 2007-03-21 at 02:30 +0800, Pavel Machek wrote: > >>> No, that's not how it works; look at hda_audio, it already has >>> powersave. Just power down audio card 5 seconds after its control file >>> is closed. >> It's another case of doing policy in a driver. >> > > IMHO, this kind of policy is best handled inside the driver because it > is specific to the hardware. This will ensure that the driver will > just work on every distro without some userspace policy being present > and setup _correctly_. It some circumstances this policy may increase power consumption but not decrease it. Consider the case of repeatable operation, something like periodic sound beep, with period of 5s. In this case, a driver implementing the policy will periodically suspend/resume a number of devices - audio controller, codec, ADC, but the operation itself (suspending/resuming) will consume more power than power consumed by these devices in case they left running for a 5s. In such a case you may want to change the predefined value or just disable the policy. Yes, we may just not close a sound device file, but phone applications I've seen, do close the file. And, my example is applicable not for audio drivers only, keep the file opened may be impossible for some reason. Thanks, Dmitry _______________________________________________ linux-pm mailing list linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/linux-pm