[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] 2 commits: main, core: check idle after loading conf

Tanu Kaskinen gitlab at gitlab.freedesktop.org
Mon Aug 31 16:24:27 UTC 2020



Tanu Kaskinen pushed to branch master at PulseAudio / pulseaudio


Commits:
e36132b7 by Tom Yan at 2020-08-31T19:09:02+03:00
main, core: check idle after loading conf

pa_core_check_idle() uses pa_core.exit_idle_time, which is set after the
pa_core_new() call, so pa_core_check_idle() needs to be called later.

This patch preserves the fact that core state is set to PA_CORE_RUNNING
after checking idle (now in main). It doesn't seem to matter anyway and
main(pa_core_new(state:PA_CORE_STARTUP)->...->state:PA_CORE_RUNNING)
seems right as well.

- - - - -
f003d6ca by Tom Yan at 2020-08-31T19:18:21+03:00
man: mention that exit-idle-time is complied if the user is lingering

- - - - -


4 changed files:

- man/pulse-daemon.conf.5.xml.in
- man/pulseaudio.1.xml.in
- src/daemon/main.c
- src/pulsecore/core.c


Changes:

=====================================
man/pulse-daemon.conf.5.xml.in
=====================================
@@ -326,7 +326,8 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
       session, then any positive value will be reset to 0 so that PulseAudio
       will terminate immediately on logout. A positive value therefore has
       effect only in environments where there's no support for login session
-      tracking. A negative value can still be used to disable any automatic
+      tracking (or if the user is logged in without a session spawned, a.k.a.
+      lingering). A negative value can still be used to disable any automatic
       exit.</p>
 
       <p>When PulseAudio runs in the system mode, automatic exit is always


=====================================
man/pulseaudio.1.xml.in
=====================================
@@ -212,8 +212,9 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
         session, then any positive value will be reset to 0 so that PulseAudio
         will terminate immediately on logout. A positive value therefore has
         effect only in environments where there's no support for login session
-        tracking. A negative value can still be used to disable any automatic
-        exit.</p>
+        tracking (or if the user is logged in without a session spawned,
+        a.k.a. lingering). A negative value can still be used to disable any
+        automatic exit.</p>
 
         <p>When PulseAudio runs in the system mode, automatic exit is always
         disabled, so this option does nothing.</p>


=====================================
src/daemon/main.c
=====================================
@@ -1067,6 +1067,10 @@ int main(int argc, char *argv[]) {
     c->server_type = conf->local_server_type;
 #endif
 
+    pa_core_check_idle(c);
+
+    c->state = PA_CORE_RUNNING;
+
     pa_cpu_init(&c->cpu_info);
 
     pa_assert_se(pa_signal_init(pa_mainloop_get_api(mainloop)) == 0);


=====================================
src/pulsecore/core.c
=====================================
@@ -159,10 +159,6 @@ pa_core* pa_core_new(pa_mainloop_api *m, bool shared, bool enable_memfd, size_t
     pa_check_signal_is_blocked(SIGPIPE);
 #endif
 
-    pa_core_check_idle(c);
-
-    c->state = PA_CORE_RUNNING;
-
     return c;
 }
 



View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/compare/90a6c5ef0707ff024f1dab68ff0ffa2e9fd9b8b5...f003d6ca62186e2b5394a7f9a2e29c1b3fbf56c7

-- 
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/compare/90a6c5ef0707ff024f1dab68ff0ffa2e9fd9b8b5...f003d6ca62186e2b5394a7f9a2e29c1b3fbf56c7
You're receiving this email because of your account on gitlab.freedesktop.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20200831/fe9470dd/attachment-0001.htm>


More information about the pulseaudio-commits mailing list