On Thu 2007-03-22 00:49:51, Dmitry Krivoschekov wrote: > 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, And what... that happens. Lets not break our design because you can think of very contrieved corner case. > 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. Fix the app, then. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html _______________________________________________ linux-pm mailing list linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/linux-pm