[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.16-test3-15-g3e2ab9b

Lennart Poettering gitmailer-noreply at 0pointer.de
Mon Aug 3 14:07:50 PDT 2009


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  277822053c2f070940e5a996b9a6d95645d74590 (commit)

- Log -----------------------------------------------------------------
3e2ab9b client: extend documentation on pa_operation_cancel() a bit
a44cb64 build-sys: take preset CFLAGS into account
34f31f6 Recover stream when it's suspended upon rewind
-----------------------------------------------------------------------

Summary of changes:
 bootstrap.sh                 |    2 +-
 src/modules/alsa/alsa-sink.c |    8 +++++++-
 src/pulse/operation.h        |    6 +++++-
 3 files changed, 13 insertions(+), 3 deletions(-)

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

commit 34f31f666e2a2c301e0735e48e48da44ff503acc
Author: Lubomir Rintel <lkundrak at v3.sk>
Date:   Sun Aug 2 17:52:05 2009 +0200

    Recover stream when it's suspended upon rewind
    
    Error from snd_pcm_rewind() might mean we just woke up from suspend and
    didn't have a chance to try to recover the stream since we didn't write
    to it in between. Call try_recover() in such cases.
    
    Note that for this to work kernel must return ESTRPIPE instead of EBADF
    for rewind/forward attempts on suspended streams, so that
    snd_pcm_recover() can recognize it should snd_pcm_resume() the stream.
    This is not the case yet (2.6.31-rc5), patch is available.
    
    Signed-off-by: Lubomir Rintel <lkundrak at v3.sk>

diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
index 7fc602b..2a734e3 100644
--- a/src/modules/alsa/alsa-sink.c
+++ b/src/modules/alsa/alsa-sink.c
@@ -340,6 +340,9 @@ static int try_recover(struct userdata *u, const char *call, int err) {
     if (err == -EPIPE)
         pa_log_debug("%s: Buffer underrun!", call);
 
+    if (err == -EBADFD)
+        pa_log_debug("%s: Stream suspended!", call);
+
     if ((err = snd_pcm_recover(u->pcm_handle, err, 1)) < 0) {
         pa_log("%s: %s", call, pa_alsa_strerror(err));
         return -1;
@@ -1199,8 +1202,11 @@ static int process_rewind(struct userdata *u) {
         pa_log_debug("before: %lu", (unsigned long) in_frames);
         if ((out_frames = snd_pcm_rewind(u->pcm_handle, (snd_pcm_uframes_t) in_frames)) < 0) {
             pa_log("snd_pcm_rewind() failed: %s", pa_alsa_strerror((int) out_frames));
-            return -1;
+            if (try_recover(u, "process_rewind", out_frames) < 0)
+                return -1;
+            out_frames = 0;
         }
+
         pa_log_debug("after: %lu", (unsigned long) out_frames);
 
         rewind_nbytes = (size_t) out_frames * u->frame_size;

commit a44cb642ebd2543e55314d4d8679a9b3d115e533
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Aug 3 23:07:39 2009 +0200

    build-sys: take preset CFLAGS into account

diff --git a/bootstrap.sh b/bootstrap.sh
index 79e0a7d..970e884 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -94,7 +94,7 @@ else
     run_versioned automake "$VERSION" --copy --foreign --add-missing
 
     if test "x$NOCONFIGURE" = "x"; then
-        CFLAGS="-g -O0" ./configure --sysconfdir=/etc --localstatedir=/var --enable-force-preopen "$@"
+        CFLAGS="$CFLAGS -g -O0" ./configure --sysconfdir=/etc --localstatedir=/var --enable-force-preopen "$@"
         make clean
     fi
 fi

commit 3e2ab9b22ed95bab3c69b1ea32cf2b8449fe3427
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Aug 3 23:07:59 2009 +0200

    client: extend documentation on pa_operation_cancel() a bit

diff --git a/src/pulse/operation.h b/src/pulse/operation.h
index 7b0dabd..b6b5691 100644
--- a/src/pulse/operation.h
+++ b/src/pulse/operation.h
@@ -40,7 +40,11 @@ pa_operation *pa_operation_ref(pa_operation *o);
 /** Decrease the reference count by one */
 void pa_operation_unref(pa_operation *o);
 
-/** Cancel the operation. Beware! This will not necessarily cancel the execution of the operation on the server side. */
+/** Cancel the operation. Beware! This will not necessarily cancel the
+ * execution of the operation on the server side. However it will make
+ * sure that the callback associated with this operation will not be
+ * called anymore, effectively disabling the operation from the client
+ * side's view. */
 void pa_operation_cancel(pa_operation *o);
 
 /** Return the current status of the operation */

-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list