[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.19-573-gb6be95e

Colin Guthrie gitmailer-noreply at 0pointer.de
Thu Sep 30 17:39:26 PDT 2010


This is an automated email from the git hooks/post-receive script. It was
generated because of a push to the "PulseAudio Sound Server" repository.

The master branch has been updated
      from  b02abcb61303a571eeec80f7f1917a256d68290f (commit)

- Log -----------------------------------------------------------------
b6be95e sink-input: Fix comment
d195a54 suspend: Do not assert when checking for device suspended status and a stream is not linked.
-----------------------------------------------------------------------

Summary of changes:
 src/pulsecore/sink-input.h |    2 +-
 src/pulsecore/sink.c       |    9 ++++++++-
 src/pulsecore/source.c     |    9 ++++++++-
 3 files changed, 17 insertions(+), 3 deletions(-)

-----------------------------------------------------------------------

commit d195a549799743806a62c4f05017b45fd8b51ab0
Author: Colin Guthrie <cguthrie at mandriva.org>
Date:   Fri Oct 1 01:26:43 2010 +0100

    suspend: Do not assert when checking for device suspended status and a stream is not linked.
    
    When looping through the streams on a given device checking to see if the
    stream is 'active' there should be no assert if the stream is not linked, it
    should simply be ignored.
    
    This assert can be hit if a sink and a sink input are both created and setup
    but the final put calls are left to the end as is done in module-ladspa-sink.
    
    While the order of the calls in module-ladspa-sink could be altered, we should
    deal gracefully with the way it is now and not complain about ending up
    in this state.
    
    A trigger case was trivial:
     1. Load a ladspa-sink.
     2. Play a stream and move it to it.
     3. Unload the module, then reload it.
     4. Due to module-stream-restore and module-suspend-on-idle, the hook callbacks
        will ultimately hit this assert.
    
    Thanks to Kim Therkelsen for highlighting this issue.

diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index b68ad3a..ff4cc17 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -1763,7 +1763,14 @@ unsigned pa_sink_check_suspend(pa_sink *s) {
         pa_sink_input_state_t st;
 
         st = pa_sink_input_get_state(i);
-        pa_assert(PA_SINK_INPUT_IS_LINKED(st));
+
+        /* We do not assert here. It is perfectly valid for a sink input to
+         * be in the INIT state (i.e. created, marked done but not yet put)
+         * and we should not care if it's unlinked as it won't contribute
+         * towarards our busy status.
+         */
+        if (!PA_SINK_INPUT_IS_LINKED(st))
+            continue;
 
         if (st == PA_SINK_INPUT_CORKED)
             continue;
diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c
index 415c54b..412a3db 100644
--- a/src/pulsecore/source.c
+++ b/src/pulsecore/source.c
@@ -996,7 +996,14 @@ unsigned pa_source_check_suspend(pa_source *s) {
         pa_source_output_state_t st;
 
         st = pa_source_output_get_state(o);
-        pa_assert(PA_SOURCE_OUTPUT_IS_LINKED(st));
+
+        /* We do not assert here. It is perfectly valid for a source output to
+         * be in the INIT state (i.e. created, marked done but not yet put)
+         * and we should not care if it's unlinked as it won't contribute
+         * towarards our busy status.
+         */
+        if (!PA_SOURCE_OUTPUT_IS_LINKED(st))
+            continue;
 
         if (st == PA_SOURCE_OUTPUT_CORKED)
             continue;

commit b6be95ef53c8c8a8b7cfedff2b2026899331dfed
Author: Colin Guthrie <cguthrie at mandriva.org>
Date:   Fri Oct 1 01:32:37 2010 +0100

    sink-input: Fix comment

diff --git a/src/pulsecore/sink-input.h b/src/pulsecore/sink-input.h
index 4491d8a..f81e2d4 100644
--- a/src/pulsecore/sink-input.h
+++ b/src/pulsecore/sink-input.h
@@ -38,7 +38,7 @@ typedef struct pa_sink_input pa_sink_input;
 #include <pulsecore/envelope.h>
 
 typedef enum pa_sink_input_state {
-    PA_SINK_INPUT_INIT,         /*< The stream is not active yet, because pa_sink_put() has not been called yet */
+    PA_SINK_INPUT_INIT,         /*< The stream is not active yet, because pa_sink_input_put() has not been called yet */
     PA_SINK_INPUT_DRAINED,      /*< The stream stopped playing because there was no data to play */
     PA_SINK_INPUT_RUNNING,      /*< The stream is alive and kicking */
     PA_SINK_INPUT_CORKED,       /*< The stream was corked on user request */

-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list