Bug 99361 - when unloading module-suspend-on-idle, sinks don't resume
Summary: when unloading module-suspend-on-idle, sinks don't resume
Status: RESOLVED FIXED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: modules (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-11 11:57 UTC by wim.taymans@gmail.com
Modified: 2017-01-20 10:05 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
proposed patch (971 bytes, patch)
2017-01-11 11:57 UTC, wim.taymans@gmail.com
Details | Splinter Review
proposed patch (1.42 KB, patch)
2017-01-13 09:50 UTC, wim.taymans@gmail.com
Details | Splinter Review

Description wim.taymans@gmail.com 2017-01-11 11:57:03 UTC
Created attachment 128890 [details] [review]
proposed patch

When unloading the module-suspend-on-idle, the sinks/sources that were suspended are not resumed anymore. This causes playback/record to not work anymore after the unload.

The proposed patch is to manually resume all devices when unloading the module.
Comment 1 Tanu Kaskinen 2017-01-12 02:22:33 UTC
The patch resumes all devices even if they are already running, which results in some unwanted log messages (see the code in resume()).

Also, a couple of formatting accidents: too small indentation and space between a function's name and its argument list.

Otherwise a nice fix, though!
Comment 2 Arun Raghavan 2017-01-12 04:44:03 UTC
We could make resume conditional on the sink/source current state.
Comment 3 wim.taymans@gmail.com 2017-01-13 09:50:17 UTC
Created attachment 128926 [details] [review]
proposed patch
Comment 4 wim.taymans@gmail.com 2017-01-13 09:51:59 UTC
I added an improved patch:
 - correct indendation
 - only resume suspended sinks/sources
 - don't reset the timer if we're going to destroy it later anyway
 - improved log message
Comment 5 Tanu Kaskinen 2017-01-20 10:05:25 UTC
Thanks! Applied.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.