[Pkg-voip-commits] [portaudio19] 03/03: Imported Debian patch 19+svn20140130-1.1

Benjamin Drung bdrung at moszumanska.debian.org
Sun Dec 25 20:26:07 UTC 2016


This is an automated email from the git hooks/post-receive script.

bdrung pushed a commit to branch master
in repository portaudio19.

commit 41a06ec79a3484f5c9801d49cbdcba48f2d956e8
Author: Balint Reczey <balint at balintreczey.hu>
Date:   Thu Sep 29 14:34:58 2016 +0200

    Imported Debian patch 19+svn20140130-1.1
---
 debian/README.Debian                               |  8 ++
 debian/changelog                                   | 10 +++
 debian/control                                     |  2 +-
 ...alsa-fix-hang-in-callback-caused-by-abort.patch | 93 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 debian/rules                                       |  2 +-
 6 files changed, 114 insertions(+), 2 deletions(-)

diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 0000000..2556e15
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,8 @@
+This package ships static libraries and they are compiled with -fPIC
+to let reverse dependencies use the static libraries as part of shared
+libraries and PIE binaries.
+
+The exception is discussed in this thread:
+ https://lists.debian.org/debian-devel/2016/09/msg00277.html
+
+ -- Balint Reczey <balint at balintreczey.hu>, Thu, 29 Sep 2016 13:47:13 +0200
diff --git a/debian/changelog b/debian/changelog
index e4902e3..baf6cca 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+portaudio19 (19+svn20140130-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix lockups in portaudio after upgrading to alsa-lib 1.1.2
+    (Closes: #833950)
+  * Build only PIC objects (Closes: #837424)
+  * Move portaudio19-dev to section libdevel (Closes: #813990)
+
+ -- Balint Reczey <balint at balintreczey.hu>  Thu, 29 Sep 2016 14:34:58 +0200
+
 portaudio19 (19+svn20140130-1) unstable; urgency=medium
 
   * New upstream release.
diff --git a/debian/control b/debian/control
index 8df560b..01159f3 100644
--- a/debian/control
+++ b/debian/control
@@ -49,7 +49,7 @@ Description: Portable audio I/O C++ bindings - shared library
  This package contains the shared library of the C++ bindings.
 
 Package: portaudio19-dev
-Section: devel
+Section: libdevel
 Architecture: any
 Depends: libasound2-dev [linux-any],
          libjack-dev,
diff --git a/debian/patches/0001-pa_linux_alsa-fix-hang-in-callback-caused-by-abort.patch b/debian/patches/0001-pa_linux_alsa-fix-hang-in-callback-caused-by-abort.patch
new file mode 100644
index 0000000..a21d726
--- /dev/null
+++ b/debian/patches/0001-pa_linux_alsa-fix-hang-in-callback-caused-by-abort.patch
@@ -0,0 +1,93 @@
+From f17d549093a9653285f81ff5a14f4a41d395fbce Mon Sep 17 00:00:00 2001
+From: Phil Burk <philburk at mobileer.com>
+Date: Wed, 14 Sep 2016 08:50:33 -0700
+Subject: [PATCH] pa_linux_alsa: fix hang in callback caused by abort
+
+The author of this patch is Alan Horstmann.
+
+Fixes ticket #251
+---
+ src/hostapi/alsa/pa_linux_alsa.c | 35 ++++++++++++++++++++++++++---------
+ 1 file changed, 26 insertions(+), 9 deletions(-)
+
+--- a/src/hostapi/alsa/pa_linux_alsa.c
++++ b/src/hostapi/alsa/pa_linux_alsa.c
+@@ -3810,8 +3810,23 @@
+             totalFds += self->playback.nfds;
+         }
+ 
++#ifdef PTHREAD_CANCELED
++        if( self->callbackMode )
++        {
++            /* To allow 'Abort' to terminate the callback thread, enable cancelability just for poll() (& disable after) */
++            pthread_setcancelstate( PTHREAD_CANCEL_ENABLE, NULL );
++        }
++#endif
++
+         pollResults = poll( self->pfds, totalFds, pollTimeout );
+ 
++#ifdef PTHREAD_CANCELED
++        if( self->callbackMode )
++        {
++            pthread_setcancelstate( PTHREAD_CANCEL_DISABLE, NULL );
++        }
++#endif
++
+         if( pollResults < 0 )
+         {
+             /*  XXX: Depend on preprocessor condition? */
+@@ -4180,12 +4195,18 @@
+     int streamStarted = 0;
+ 
+     assert( stream );
++    /* Not implemented */
++    assert( !stream->primeBuffers );
+ 
+     /* Execute OnExit when exiting */
+     pthread_cleanup_push( &OnExit, stream );
+-
+-    /* Not implemented */
+-    assert( !stream->primeBuffers );
++#ifdef PTHREAD_CANCELED
++    /* 'Abort' will use thread cancellation to terminate the callback thread, but the Alsa-lib functions
++     * are NOT cancel-safe, (and can end up in an inconsistent state).  So, disable cancelability for
++     * the thread here, and just re-enable it for the poll() in PaAlsaStream_WaitForFrames(). */
++    pthread_testcancel();
++    pthread_setcancelstate( PTHREAD_CANCEL_DISABLE, NULL );
++#endif
+ 
+     /* @concern StreamStart If the output is being primed the output pcm needs to be prepared, otherwise the
+      * stream is started immediately. The latter involves signaling the waiting main thread.
+@@ -4270,10 +4291,6 @@
+         {
+             xrun = 0;
+ 
+-#ifdef PTHREAD_CANCELED
+-           pthread_testcancel();
+-#endif
+-
+             /** @concern Xruns Under/overflows are to be reported to the callback */
+             if( stream->underrun > 0.0 )
+             {
+@@ -4304,11 +4321,12 @@
+ #if 0
+             CallbackUpdate( &stream->threading );
+ #endif
++
+             CalculateTimeInfo( stream, &timeInfo );
+             PaUtil_BeginBufferProcessing( &stream->bufferProcessor, &timeInfo, cbFlags );
+             cbFlags = 0;
+ 
+-            /* CPU load measurement should include processing activivity external to the stream callback */
++            /* CPU load measurement should include processing activity external to the stream callback */
+             PaUtil_BeginCpuLoadMeasurement( &stream->cpuLoadMeasurer );
+ 
+             framesGot = framesAvail;
+@@ -4339,7 +4357,6 @@
+             {
+                 /* Go back to polling for more frames */
+                 break;
+-
+             }
+ 
+             if( paContinue != callbackResult )
diff --git a/debian/patches/series b/debian/patches/series
index ebc90e2..0d13b3c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 audacity-portmixer.patch
+0001-pa_linux_alsa-fix-hang-in-callback-caused-by-abort.patch
diff --git a/debian/rules b/debian/rules
index 794b236..fee7f5e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,7 +9,7 @@ override_dh_auto_clean:
 	rm -f bindings/cpp/doc/Makefile doc/html/*
 
 override_dh_auto_configure:
-	dh_auto_configure -- --enable-cxx
+	dh_auto_configure -- --enable-cxx -with-pic=yes
 
 override_dh_auto_build:
 	dh_auto_build

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/portaudio19.git



More information about the Pkg-voip-commits mailing list