Ticket #114 (closed enhancement: fixed)

Opened 1 year ago

Last modified 10 months ago

Reduce the wakeups for the audio hardware (powertop profiling)

Reported by: coling Assigned to: lennart
Priority: normal Milestone: 0.9.7
Component: daemon Severity: normal
Keywords: Cc:

Description

While incidentally discussing pulseaudio with someone (Amaranth) on IRC on #compiz-fusion-dev he mentioned the killing effect on battery life with pulseaudio.

Using the tool "powertop" I profiled pulseaudio.

The largest culprit seems to be the sound device:

  33.5% (250.4)       <interrupt> : uhci_hcd:usb2, HDA Intel

Killing pulseaudio and those 250 wakeups disappear off the register!

Amaranth reckons it would be hard to get it below 48/second due to 48KHz audio but still 250 seems pretty high.

Is there anything that can be done?

Col

Change History

08/07/07 12:33:13 changed by cjvdb

You can decrease the interrupt rate by adjusting the fragments and fragement_size parameters to the module-alsa-sink/-source modules (Which means you have to load them manually instead of using module-hal-detect or module-detect). That increases latency though, so it might not be a good thing if you are using pulseaudio in combination with realtime audio applications (like voip for example). There is no other workaround for this at the moment because alsa doesn't allow applications to dynamically change fragment sizes on the fly, so pulseaudio has no option but to pick a default fragment_size value that works well for the most applications.

In addition to that, unfortunately, pulseaudio causes interrupts even when idle because it plays silence (to avoid audio hardware popping whenever the device is opened). That is a known problem and AFAIK a workaround is on Lennart's todo list. Until that workaround is avaliable the only other option is to use pulseausdio's autoload feature to load/unload the sink/source modules on demand.

08/26/07 03:13:59 changed by lennart

  • status changed from new to assigned.

The "lennart" branch of PulseAudio now contains a module "module-suspend-on-idle" which closes all audio devices when they are idle. This brings the number of interrupts to zero when nothing is played.

08/26/07 04:26:40 changed by lennart

  • milestone set to 0.9.7.

10/30/07 15:02:36 changed by lennart

  • status changed from assigned to closed.
  • resolution set to fixed.

Commited to trunk.