]> code.delx.au - pulseaudio/commit
suspend-on-idle: Allow disabling suspending for specific devices
authorTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Thu, 29 Aug 2013 14:36:53 +0000 (17:36 +0300)
committerTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Fri, 13 Sep 2013 07:53:30 +0000 (10:53 +0300)
commit943275d2fd8f060633194126a8b3bb4fecbb8a19
treefb21b7dea3903e5d5a080b8384836d1080c622dc
parent8a2ea2834c0d125c3666d6d3e7cee80467f6161f
suspend-on-idle: Allow disabling suspending for specific devices

Sometimes it would be nice to disable module-suspend-on-idle for
specific devices. For me the use case is to keep a HDMI sink running
all the time to avoid loss of audio when starting to play a stream to
the device (the HDMI receiver eats a bit from the beginning of the
stream when the device is opened). This is arguably a hacky solution
to the problem, but on the other hand, I think it's very sensible to
interpret negative timeout in the module-suspend-on-idle.timeout
property as disabling the suspending altogher. This is also how the
exit-idle-time configuration option behaves (negative value disables
automatic exiting).

I moved the property parsing from the timer restart function to the
function that creates the device_info objects, because if the timeout
is negative, we don't need to create the device_info object at all.
src/modules/module-suspend-on-idle.c