DAPM power sequence optimisation

I recently implemented some enhancements to DAPM, the part of ASoC which minimizes the power consumption of the embedded audio subsystem by keeping any unused components powered off while avoiding audible artifacts as the power changes. Prior to these changes DAPM used to change the power for each component with an individual register write which with many systems would result in a lot of repeated writes to the same register. This can get noticeable on slow or heavily contended buses, especially around resume. With these changes DAPM will try to minimize the number of register writes it does while still trying to avoid audio artifacts. These changes are currently available from the dapm branch of my ASoC git repository and should make their way into 2.6.32. Once they are merged the dapm branch is likely to be removed.

As with any substantial change in the power sequencing there is a risk that there may have been some performance regressions on some systems – my biggest concern is that some thing were being helped by the delays introduced by the repeated register writes and may require special handling to fix. My hope is that this won’t happen if anything it should fix some problems by ensuring that both left and right channels of stereo paths get powered up together without wide testing that’s hard to guarantee. Any testing that you can do on your systems would be greatly appreciated.

One thought on “DAPM power sequence optimisation

Leave a Reply