ALSA:节能指南
有谁知道 ALSA 的一套省电指南吗?例如...
- 当不播放声音时,将 PCM 流置于什么最佳状态?
- 是否可以在库中禁用任何可以节省电量的功能?
- 什么不该做?
Does anyone know of a set of power-saving guidelines for ALSA anywhere? For example...
- What is the best state to put the PCM stream in when not sound is being played?
- Is there anything that can be disabled in the lib that would save power?
- What NOT to do?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您不播放声音,则不应消耗大量电量。问问自己的好问题是:我可以测量我的功耗吗?过早的优化是万恶之源,在功耗方面也是如此。
如果你无法衡量它,那么你可能会优化错误的东西。
您的目标应该是寻找任何能让您的处理器保持唤醒状态的东西。
您是否正在循环设置某个变量,或者正在等待中断?
您多久向您的声音设备写入一次信息?您可以增加缓冲区并减少写入次数吗?你的硬件会自动处理这个问题吗?
If you are not playing sound, you should not be drawing significant power. The good question to ask yourself is : can I measure my power consumption. Premature optimisation is the root of all evil is also true when it comes to power consumption.
If you can't measure it, then you will probably optimize the wrong thing.
What you should aim for is looking for anything that will keep your processor awake.
Are you looping for some variable to be set, or are you waiting for an interrupt ?
How often do you write to your sound device ? Can you increase the buffers and reduce the number of wite ? Is your hardware automatically taking care of this ?
任何地方似乎都没有任何指导方针。
There do not appear to be any guidelines anywhere.