This is an automated email from the git hooks/post-receive script. themuso-guest pushed a commit to branch ubuntu in repository pulseaudio.
commit 1881bb94d8fc5a9975318ccd0e3b36c17e446756 Author: Luke Yelavich <[email protected]> Date: Tue Nov 25 10:00:47 2014 +1100 Dropped patches, either applied upstream or are now obsolete: --- debian/changelog | 17 + ...use-incompatible-default-sample-spec-para.patch | 41 --- ...se-the-fixed-point-speex-resampler-on-ARM.patch | 70 ---- debian/patches/0003-exit-with-X-session.patch | 55 ---- .../0004-dont-start-when-already-running.patch | 30 -- debian/patches/broken-PA_FLOAT32_SWAP.patch | 320 ------------------ ...ndianmacros-Fix-PA_MAYBE_INT16_SWAP-macro.patch | 27 -- .../kfreebsd_no_lock_and_threads_synchro.patch | 29 -- debian/patches/misc-cleanups-and-bug-fixes.patch | 118 ------- ...Fix-mixing-of-S24-samples-stored-as-S32RE.patch | 37 --- debian/patches/only-autostart-kde-version.patch | 12 - ...x-crash-on-empty-UDP-packets-CVE-2014-397.patch | 57 ---- debian/patches/series | 16 - debian/patches/tests-Cleanup-mix-test.patch | 41 --- .../tests-Fix-mix-test-on-big-endian-systems.patch | 364 --------------------- ...Fix-pa_get_binary_name-on-Debian-kFreeBSD.patch | 38 --- ...finding-out-application-name-using-dladdr.patch | 78 ----- ...ion-Fix-completion-for-default-sink-sourc.patch | 22 -- 18 files changed, 17 insertions(+), 1355 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4d10dd5..cab46ae 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,23 @@ pulseaudio (5.99.1-1) UNRELEASED; urgency=medium * New upstream release candidate + * Dropped patches, either applied upstream or are now obsolete: + - 0001-raop-Don-t-use-incompatible-default-sample-spec-para.patch + - 0002-Use-the-fixed-point-speex-resampler-on-ARM.patch + - 0003-exit-with-X-session.patch + - 0004-dont-start-when-already-running.patch + - broken-PA_FLOAT32_SWAP.patch + - endianmacros-Fix-PA_MAYBE_INT16_SWAP-macro.patch + - kfreebsd_no_lock_and_threads_synchro.patch + - misc-cleanups-and-bug-fixes.patch + - mix-Fix-mixing-of-S24-samples-stored-as-S32RE.patch + - only-autostart-kde-version.patch + - rtp-recv-fix-crash-on-empty-UDP-packets-CVE-2014-397.patch + - tests-Cleanup-mix-test.patch + - tests-Fix-mix-test-on-big-endian-systems.patch + - util-Fix-pa_get_binary_name-on-Debian-kFreeBSD.patch + - util-Try-finding-out-application-name-using-dladdr.patch + - zsh-completion-Fix-completion-for-default-sink-sourc.patch -- Luke Yelavich <[email protected]> Tue, 25 Nov 2014 09:39:16 +1100 diff --git a/debian/patches/0001-raop-Don-t-use-incompatible-default-sample-spec-para.patch b/debian/patches/0001-raop-Don-t-use-incompatible-default-sample-spec-para.patch deleted file mode 100644 index a58b2e3..0000000 --- a/debian/patches/0001-raop-Don-t-use-incompatible-default-sample-spec-para.patch +++ /dev/null @@ -1,41 +0,0 @@ -From b1c4e7bf6bae405999d3247c332a71be6b130496 Mon Sep 17 00:00:00 2001 -From: Tanu Kaskinen <[email protected]> -Date: Tue, 19 Aug 2014 14:08:34 +0300 -Subject: [PATCH] raop: Don't use incompatible default sample spec parameters - -Since the RAOP sink supports only some formats and channel counts, we -shouldn't blindly use pa_core.default_sample_spec. This patch changes -things so that we default to PA_SAMPLE_S16NE and 2 channels, and only -take the sample rate from pa_core.default_sample_spec. ---- - src/modules/raop/module-raop-sink.c | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/src/modules/raop/module-raop-sink.c b/src/modules/raop/module-raop-sink.c -index 2d08645..13036d9 100644 ---- a/src/modules/raop/module-raop-sink.c -+++ b/src/modules/raop/module-raop-sink.c -@@ -518,15 +518,17 @@ int pa__init(pa_module*m) { - goto fail; - } - -- ss = m->core->default_sample_spec; -+ ss.format = PA_SAMPLE_S16NE; -+ ss.channels = 2; -+ ss.rate = m->core->default_sample_spec.rate; - if (pa_modargs_get_sample_spec(ma, &ss) < 0) { - pa_log("invalid sample format specification"); - goto fail; - } - -- if ((/*ss.format != PA_SAMPLE_U8 &&*/ ss.format != PA_SAMPLE_S16NE) || -+ if ((ss.format != PA_SAMPLE_S16NE) || - (ss.channels > 2)) { -- pa_log("sample type support is limited to mono/stereo and U8 or S16NE sample data"); -+ pa_log("sample type support is limited to mono/stereo and S16NE sample data"); - goto fail; - } - --- -2.1.0 - diff --git a/debian/patches/0002-Use-the-fixed-point-speex-resampler-on-ARM.patch b/debian/patches/0002-Use-the-fixed-point-speex-resampler-on-ARM.patch deleted file mode 100644 index 5749bcb..0000000 --- a/debian/patches/0002-Use-the-fixed-point-speex-resampler-on-ARM.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 00fbfcc27ffa179eb88c8a9627c1e928b0593d0e Mon Sep 17 00:00:00 2001 -From: Sjoerd Simons <[email protected]> -Date: Sun, 25 Nov 2012 21:46:38 +0100 -Subject: [PATCH 2/2] Use the fixed point speex resampler on ARM - -Switch to use the speex fixed point resampler method by default on ARM. -Traditionately there wasn't any standard floating point hardware, so for -those machines it's an obvious choise. On machine using the hardfloat -ABI floating point still isn't an obvious win over integer performance, -it's of equal performance on some machines, but slower on others. ---- - man/pulse-daemon.conf.5.xml.in | 2 ++ - src/daemon/daemon.conf.in | 2 ++ - src/pulsecore/core.c | 4 ++++ - src/pulsecore/resampler.c | 4 ++++ - 4 files changed, 12 insertions(+) - ---- a/man/pulse-daemon.conf.5.xml.in -+++ b/man/pulse-daemon.conf.5.xml.in -@@ -101,6 +101,8 @@ - also offers slightly better quality. See the output of - <opt>dump-resample-methods</opt> for a complete list of all - available resamplers. Defaults to <opt>speex-float-1</opt>. The -+ available resamplers. Defaults to <opt>speex-float-1</opt> on most -+ achitectures and <opt>speex-fixed-1</opt> on ARM. The - <opt>--resample-method</opt> command line option takes precedence. - Note that some modules overwrite or allow overwriting of the - resampler to use.</p> ---- a/src/daemon/daemon.conf.in -+++ b/src/daemon/daemon.conf.in -@@ -54,6 +54,8 @@ - ; log-time = no - ; log-backtrace = 0 - -+# resample-method defaults to speex-float-1 on most architectures, -+# speex-fixed-1 on ARM - ; resample-method = speex-float-1 - ; enable-remixing = yes - ; enable-lfe-remixing = no ---- a/src/pulsecore/core.c -+++ b/src/pulsecore/core.c -@@ -141,7 +141,11 @@ - c->disable_remixing = false; - c->disable_lfe_remixing = false; - c->deferred_volume = true; -- c->resample_method = PA_RESAMPLER_SPEEX_FLOAT_BASE + 1; -+#ifdef __arm__ -+ c->resample_method = PA_RESAMPLER_SPEEX_FIXED_BASE + 1; -+#else -+ c->resample_method = PA_RESAMPLER_SPEEX_FLOAT_BASE + 1; -+#endif - - for (j = 0; j < PA_CORE_HOOK_MAX; j++) - pa_hook_init(&c->hooks[j], c); ---- a/src/pulsecore/resampler.c -+++ b/src/pulsecore/resampler.c -@@ -187,8 +187,13 @@ - static pa_resample_method_t choose_auto_resampler(pa_resample_flags_t flags) { - pa_resample_method_t method; - -+# ifdef __arm__ -+ if (pa_resample_method_supported(PA_RESAMPLER_SPEEX_FIXED_BASE + 1)) -+ method = PA_RESAMPLER_SPEEX_FIXED_BASE + 1; -+#else - if (pa_resample_method_supported(PA_RESAMPLER_SPEEX_FLOAT_BASE + 1)) - method = PA_RESAMPLER_SPEEX_FLOAT_BASE + 1; -+#endif - else if (flags & PA_RESAMPLER_VARIABLE_RATE) - method = PA_RESAMPLER_TRIVIAL; - else diff --git a/debian/patches/0003-exit-with-X-session.patch b/debian/patches/0003-exit-with-X-session.patch deleted file mode 100644 index a77d34e..0000000 --- a/debian/patches/0003-exit-with-X-session.patch +++ /dev/null @@ -1,55 +0,0 @@ -Description: start-pulseaudio-*: Kill pulseaudio daemon when x session ends -Forwarded: https://bugs.freedesktop.org/show_bug.cgi?id=77497 -Author: Alexander Kurtz <[email protected]> ---- a/src/daemon/start-pulseaudio-x11.in -+++ b/src/daemon/start-pulseaudio-x11.in -@@ -19,6 +19,13 @@ - - set -e - -+# check if pulseaudio has already been started by someone else -+if /usr/bin/pulseaudio --check; then -+ EXIT_WITH_X_SESSION=no -+else -+ EXIT_WITH_X_SESSION=yes -+fi -+ - @PA_BINARY@ --start "$@" - - if [ x"$DISPLAY" != x ] ; then -@@ -30,3 +37,9 @@ if [ x"$DISPLAY" != x ] ; then - @PACTL_BINARY@ load-module module-x11-xsmp "display=$DISPLAY session_manager=$SESSION_MANAGER" > /dev/null - fi - fi -+ -+# fork and wait for X-session to end, then quit pulseaudio -+if [ "$EXIT_WITH_X_SESSION" = yes ]; then -+ /usr/bin/xprop -root -spy > /dev/null 2>&1 || true -+ /usr/bin/pulseaudio --kill -+fi & ---- a/src/daemon/start-pulseaudio-kde.in -+++ b/src/daemon/start-pulseaudio-kde.in -@@ -21,6 +21,13 @@ set -e - - [ -z "$PULSE_SERVER" ] - -+# check if pulseaudio has already been started by someone else -+if /usr/bin/pulseaudio --check; then -+ EXIT_WITH_X_SESSION=no -+else -+ EXIT_WITH_X_SESSION=yes -+fi -+ - @PA_BINARY@ --start "$@" - - if [ x"$DISPLAY" != x ] ; then -@@ -28,3 +35,9 @@ if [ x"$DISPLAY" != x ] ; then - @PACTL_BINARY@ load-module module-device-manager "do_routing=1" > /dev/null - - fi -+ -+# fork and wait for X-session to end, then quit pulseaudio -+if [ "$EXIT_WITH_X_SESSION" = yes ]; then -+ /usr/bin/xprop -root -spy > /dev/null 2>&1 || true -+ /usr/bin/pulseaudio --kill -+fi & diff --git a/debian/patches/0004-dont-start-when-already-running.patch b/debian/patches/0004-dont-start-when-already-running.patch deleted file mode 100644 index 948837a..0000000 --- a/debian/patches/0004-dont-start-when-already-running.patch +++ /dev/null @@ -1,30 +0,0 @@ -Description: Do not start pulseaudio if it is already running -Origin: https://bbs.archlinux.org/viewtopic.php?pid=1164699#p1164699 -Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=743813 -Forwarded: http://lists.freedesktop.org/archives/pulseaudio-discuss/2014-April/020381.html ---- a/src/daemon/start-pulseaudio-kde.in -+++ b/src/daemon/start-pulseaudio-kde.in -@@ -26,9 +26,9 @@ if /usr/bin/pulseaudio --check; then - EXIT_WITH_X_SESSION=no - else - EXIT_WITH_X_SESSION=yes -+ @PA_BINARY@ --start "$@" - fi - --@PA_BINARY@ --start "$@" - - if [ x"$DISPLAY" != x ] ; then - ---- a/src/daemon/start-pulseaudio-x11.in -+++ b/src/daemon/start-pulseaudio-x11.in -@@ -24,9 +24,9 @@ if /usr/bin/pulseaudio --check; then - EXIT_WITH_X_SESSION=no - else - EXIT_WITH_X_SESSION=yes -+ @PA_BINARY@ --start "$@" - fi - --@PA_BINARY@ --start "$@" - - if [ x"$DISPLAY" != x ] ; then - diff --git a/debian/patches/broken-PA_FLOAT32_SWAP.patch b/debian/patches/broken-PA_FLOAT32_SWAP.patch deleted file mode 100644 index f8c0d87..0000000 --- a/debian/patches/broken-PA_FLOAT32_SWAP.patch +++ /dev/null @@ -1,320 +0,0 @@ -From: Peter Meerwald <[email protected]> -To: General PulseAudio Discussion <[email protected]> -Date: Wed, 3 Sep 2014 02:25:42 +0200 -Message-Id: <[email protected]> -X-Mailer: git-send-email 1.9.1 -In-Reply-To: <[email protected]> -References: <[email protected]> -Subject: [pulseaudio-discuss] [PATCH 2/2] endianmacros: Replace borked - PA_FLOAT32_SWAP() with PA_READ_FLOAT32RE() / PA_WRITE_FLOAT32RE() -X-BeenThere: [email protected] -X-Mailman-Version: 2.1.15 -Precedence: list -Reply-To: General PulseAudio Discussion - <[email protected]> -List-Id: General PulseAudio Discussion - <pulseaudio-discuss.lists.freedesktop.org> -List-Unsubscribe: <http://lists.freedesktop.org/mailman/options/pulseaudio-discuss>, - <mailto:[email protected]?subject=unsubscribe> -List-Archive: <http://lists.freedesktop.org/archives/pulseaudio-discuss> -List-Post: <mailto:[email protected]> -List-Help: <mailto:[email protected]?subject=help> -List-Subscribe: <http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss>, - <mailto:[email protected]?subject=subscribe> -MIME-Version: 1.0 -Content-Type: text/plain; charset="us-ascii" -Content-Transfer-Encoding: 7bit -Errors-To: [email protected] -Sender: "pulseaudio-discuss" <[email protected]> - -From: Peter Meerwald <pmeerw@debian> - -building PA with -O0 leads to test failure in mix-test on i386 - -issue reported by Felipe, see -http://lists.freedesktop.org/archives/pulseaudio-discuss/2014-August/021406.html - -the problem is the value 0xbeffbd7f: when byte-swapped it becomes 0x7fbdffbe and according -to IEEE-754 represents a signalling NaN (starting with s111 1111 10, see http://en.wikipedia.org/wiki/NaN) - -when this value is assigned to a floating point register, it becomes 0x7ffdffbe, representing -a quiet NaN (starting with s111 1111 11) -- a signalling NaN is turned into a quiet NaN! - -so PA_FLOAT32_SWAP(PA_FLOAT32_SWAP(x)) != x for certain values, uhuh! - -the following test code can be used; due to volatile, it will always demonstrate the issue; -without volatile, it depends on the optimization level (i386, 32-bit, gcc 4.9): - -// snip - -static inline float PA_FLOAT32_SWAP(float x) { - union { - float f; - uint32_t u; - } t; - - t.f = x; - t.u = bswap_32(t.u); - return t.f; -} - -int main() { - unsigned x = 0xbeffbd7f; - volatile float f = PA_FLOAT32_SWAP(*(float *)&x); - printf("%08x %08x %08x %f\n", 0xbeffbd7f, *(unsigned *)&f, bswap_32(*(unsigned *)&f), f); -} -// snip - -the problem goes away with optimization when no temporary floating point registers are used - -the proposed solution is to avoid passing swapped floating point data in a -float; this is done with new functions PA_READ_FLOAT32RE() and PA_WRITE_FLOAT32RE() -which use uint32_t to dereference a pointer and byte-swap the data, hence no temporary -float variable is used - -also delete PA_FLOAT32_TO_LE()/_BE(), not used - -Signed-off-by: Peter Meerwald <[email protected]> -Reported-by: Felipe Sateler <[email protected]> ---- - src/pulsecore/endianmacros.h | 23 ++++++++++++----------- - src/pulsecore/mix.c | 11 ++++------- - src/pulsecore/sample-util.c | 4 ++-- - src/pulsecore/sconv-s16le.c | 22 ++++++++-------------- - src/pulsecore/svolume_c.c | 4 ++-- - src/tests/mix-test.c | 4 ++-- - src/tests/resampler-test.c | 4 ++-- - 7 files changed, 32 insertions(+), 40 deletions(-) - ---- a/src/pulsecore/endianmacros.h -+++ b/src/pulsecore/endianmacros.h -@@ -71,25 +71,32 @@ static inline void PA_WRITE24LE(uint8_t - p[0] = (uint8_t) u; - } - --static inline float PA_FLOAT32_SWAP(float x) { -+static inline float PA_READ_FLOAT32RE(const void *p) { - union { - float f; - uint32_t u; - } t; - -- t.f = x; -- t.u = PA_UINT32_SWAP(t.u); -+ t.u = PA_UINT32_SWAP(*(uint32_t *) p); - return t.f; - } - -+static inline void PA_WRITE_FLOAT32RE(void *p, float x) { -+ union { -+ float f; -+ uint32_t u; -+ } t; -+ -+ t.f = x; -+ *(uint32_t *) p = PA_UINT32_SWAP(t.u); -+} -+ - #define PA_MAYBE_INT16_SWAP(c,x) ((c) ? PA_INT16_SWAP(x) : (x)) - #define PA_MAYBE_UINT16_SWAP(c,x) ((c) ? PA_UINT16_SWAP(x) : (x)) - - #define PA_MAYBE_INT32_SWAP(c,x) ((c) ? PA_INT32_SWAP(x) : (x)) - #define PA_MAYBE_UINT32_SWAP(c,x) ((c) ? PA_UINT32_SWAP(x) : (x)) - --#define PA_MAYBE_FLOAT32_SWAP(c,x) ((c) ? PA_FLOAT32_SWAP(x) : (x)) -- - #ifdef WORDS_BIGENDIAN - #define PA_INT16_FROM_LE(x) PA_INT16_SWAP(x) - #define PA_INT16_FROM_BE(x) ((int16_t)(x)) -@@ -115,9 +122,6 @@ static inline float PA_FLOAT32_SWAP(floa - #define PA_UINT32_TO_LE(x) PA_UINT32_SWAP(x) - #define PA_UINT32_TO_BE(x) ((uint32_t)(x)) - -- #define PA_FLOAT32_TO_LE(x) PA_FLOAT32_SWAP(x) -- #define PA_FLOAT32_TO_BE(x) ((float) (x)) -- - #define PA_READ24NE(x) PA_READ24BE(x) - #define PA_WRITE24NE(x,y) PA_WRITE24BE((x),(y)) - -@@ -148,9 +152,6 @@ static inline float PA_FLOAT32_SWAP(floa - #define PA_UINT32_TO_LE(x) ((uint32_t)(x)) - #define PA_UINT32_TO_BE(x) PA_UINT32_SWAP(x) - -- #define PA_FLOAT32_TO_LE(x) ((float) (x)) -- #define PA_FLOAT32_TO_BE(x) PA_FLOAT32_SWAP(x) -- - #define PA_READ24NE(x) PA_READ24LE(x) - #define PA_WRITE24NE(x,y) PA_WRITE24LE((x),(y)) - ---- a/src/pulsecore/mix.c -+++ b/src/pulsecore/mix.c -@@ -576,17 +576,14 @@ static void pa_mix_float32re_c(pa_mix_in - - for (i = 0; i < nstreams; i++) { - pa_mix_info *m = streams + i; -- float v, cv = m->linear[channel].f; -+ float cv = m->linear[channel].f; - -- if (PA_LIKELY(cv > 0)) { -- v = PA_FLOAT32_SWAP(*(float*) m->ptr); -- v *= cv; -- sum += v; -- } -+ if (PA_LIKELY(cv > 0)) -+ sum += PA_READ_FLOAT32RE(m->ptr) * cv; - m->ptr = (uint8_t*) m->ptr + sizeof(float); - } - -- *data = PA_FLOAT32_SWAP(sum); -+ PA_WRITE_FLOAT32RE(data, sum); - - if (PA_UNLIKELY(++channel >= channels)) - channel = 0; ---- a/src/pulsecore/sample-util.c -+++ b/src/pulsecore/sample-util.c -@@ -296,9 +296,9 @@ void pa_sample_clamp(pa_sample_format_t - for (; n > 0; n--) { - float f; - -- f = PA_FLOAT32_SWAP(*s); -+ f = PA_READ_FLOAT32RE(s); - f = PA_CLAMP_UNLIKELY(f, -1.0f, 1.0f); -- *d = PA_FLOAT32_SWAP(f); -+ PA_WRITE_FLOAT32RE(d, f); - - s = (const float*) ((const uint8_t*) s + sstr); - d = (float*) ((uint8_t*) d + dstr); ---- a/src/pulsecore/sconv-s16le.c -+++ b/src/pulsecore/sconv-s16le.c -@@ -157,8 +157,7 @@ void pa_sconv_s16le_to_float32re(unsigne - for (; n > 0; n--) { - int16_t s = *(a++); - float k = INT16_FROM(s) * (1.0f / (1 << 15)); -- k = PA_FLOAT32_SWAP(k); -- *(b++) = k; -+ PA_WRITE_FLOAT32RE(b++, k); - } - } - -@@ -169,8 +168,7 @@ void pa_sconv_s32le_to_float32re(unsigne - for (; n > 0; n--) { - int32_t s = *(a++); - float k = INT32_FROM(s) * (1.0f / (1U << 31)); -- k = PA_FLOAT32_SWAP(k); -- *(b++) = k; -+ PA_WRITE_FLOAT32RE(b++, k); - } - } - -@@ -180,8 +178,7 @@ void pa_sconv_s16le_from_float32re(unsig - - for (; n > 0; n--) { - int16_t s; -- float v = *(a++); -- v = PA_FLOAT32_SWAP(v) * (1 << 15); -+ float v = PA_READ_FLOAT32RE(a++) * (1 << 15); - s = (int16_t) PA_CLAMP_UNLIKELY(lrintf(v), -0x8000, 0x7FFF); - *(b++) = INT16_TO(s); - } -@@ -193,8 +190,7 @@ void pa_sconv_s32le_from_float32re(unsig - - for (; n > 0; n--) { - int32_t s; -- float v = *(a++); -- v = PA_FLOAT32_SWAP(v) * (1U << 31); -+ float v = PA_READ_FLOAT32RE(a++) * (1U << 31); - s = (int32_t) PA_CLAMP_UNLIKELY(llrintf(v), -0x80000000LL, 0x7FFFFFFFLL); - *(b++) = INT32_TO(s); - } -@@ -325,7 +321,7 @@ void pa_sconv_s24le_to_float32re(unsigne - for (; n > 0; n--) { - int32_t s = READ24(a) << 8; - float k = s * (1.0f / (1U << 31)); -- *b = PA_FLOAT32_SWAP(k); -+ PA_WRITE_FLOAT32RE(b, k); - a += 3; - b++; - } -@@ -337,8 +333,7 @@ void pa_sconv_s24le_from_float32re(unsig - - for (; n > 0; n--) { - int32_t s; -- float v = *a; -- v = PA_FLOAT32_SWAP(v) * (1U << 31); -+ float v = PA_READ_FLOAT32RE(a) * (1U << 31); - s = (int32_t) PA_CLAMP_UNLIKELY(llrint(v), -0x80000000LL, 0x7FFFFFFFLL); - WRITE24(b, ((uint32_t) s) >> 8); - a++; -@@ -411,7 +406,7 @@ void pa_sconv_s24_32le_to_float32re(unsi - for (; n > 0; n--) { - int32_t s = (int32_t) (UINT32_FROM(*a) << 8); - float k = s * (1.0f / (1U << 31)); -- *b = PA_FLOAT32_SWAP(k); -+ PA_WRITE_FLOAT32RE(b, k); - a++; - b++; - } -@@ -437,8 +432,7 @@ void pa_sconv_s24_32le_from_float32re(un - - for (; n > 0; n--) { - int32_t s; -- float v = *a; -- v = PA_FLOAT32_SWAP(v) * (1U << 31); -+ float v = PA_READ_FLOAT32RE(a) * (1U << 31); - s = (int32_t) PA_CLAMP_UNLIKELY(llrint(v), -0x80000000LL, 0x7FFFFFFFLL); - *b = UINT32_TO(((uint32_t) s) >> 8); - a++; ---- a/src/pulsecore/svolume_c.c -+++ b/src/pulsecore/svolume_c.c -@@ -125,9 +125,9 @@ static void pa_volume_float32re_c(float - for (channel = 0; length; length--) { - float t; - -- t = PA_FLOAT32_SWAP(*samples); -+ t = PA_READ_FLOAT32RE(samples); - t *= volumes[channel]; -- *samples++ = PA_FLOAT32_SWAP(t); -+ PA_WRITE_FLOAT32RE(samples++, t); - - if (PA_UNLIKELY(++channel >= channels)) - channel = 0; ---- a/src/tests/mix-test.c -+++ b/src/tests/mix-test.c -@@ -150,7 +150,7 @@ static void compare_block(const pa_sampl - float *u = d; - - for (i = 0; i < chunk->length / pa_frame_size(ss); i++) { -- float uu = PA_MAYBE_FLOAT32_SWAP(ss->format != PA_SAMPLE_FLOAT32NE, *u); -+ float uu = ss->format == PA_SAMPLE_FLOAT32NE ? *u : PA_READ_FLOAT32RE(u); - fail_unless(fabsf(uu - *v) <= 1e-6f, NULL); - ++u; - ++v; -@@ -264,7 +264,7 @@ static pa_memblock* generate_block(pa_me - if (ss->format == PA_SAMPLE_FLOAT32RE) { - float *u = d; - for (i = 0; i < 10; i++) -- u[i] = PA_FLOAT32_SWAP(float32ne_result[0][i]); -+ PA_WRITE_FLOAT32RE(&u[i], float32ne_result[0][i]); - } else - memcpy(d, float32ne_result[0], sizeof(float32ne_result[0])); - ---- a/src/tests/resampler-test.c -+++ b/src/tests/resampler-test.c -@@ -98,7 +98,7 @@ static void dump_block(const char *label - float *u = d; - - for (i = 0; i < chunk->length / pa_frame_size(ss); i++) { -- printf("%4.3g ", ss->format == PA_SAMPLE_FLOAT32NE ? *u : PA_FLOAT32_SWAP(*u)); -+ printf("%4.3g ", ss->format == PA_SAMPLE_FLOAT32NE ? *u : PA_READ_FLOAT32RE(u)); - u++; - } - -@@ -222,7 +222,7 @@ static pa_memblock* generate_block(pa_me - - if (ss->format == PA_SAMPLE_FLOAT32RE) - for (i = 0; i < 10; i++) -- u[i] = PA_FLOAT32_SWAP(u[i]); -+ PA_WRITE_FLOAT32RE(&u[i], u[i]); - - break; - } diff --git a/debian/patches/endianmacros-Fix-PA_MAYBE_INT16_SWAP-macro.patch b/debian/patches/endianmacros-Fix-PA_MAYBE_INT16_SWAP-macro.patch deleted file mode 100644 index d98f81a..0000000 --- a/debian/patches/endianmacros-Fix-PA_MAYBE_INT16_SWAP-macro.patch +++ /dev/null @@ -1,27 +0,0 @@ -From a39a3b3f7df3ece773bb74b8c6baa599272704e0 Mon Sep 17 00:00:00 2001 -From: Peter Meerwald <[email protected]> -Date: Wed, 6 Aug 2014 11:47:34 +0200 -Subject: [PATCH 4/6] endianmacros: Fix PA_MAYBE_INT16_SWAP() macro - -PA_MAYBE_INT16_SWAP() should call PA_INT16_SWAP(), not PA_INT32_SWAP - -PA_MAYBE_INT16_SWAP() is not used (yet), so no big deal :) - -Signed-off-by: Peter Meerwald <[email protected]> ---- - src/pulsecore/endianmacros.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/src/pulsecore/endianmacros.h -+++ b/src/pulsecore/endianmacros.h -@@ -82,8 +82,8 @@ static inline float PA_FLOAT32_SWAP(floa - return t.f; - } - --#define PA_MAYBE_INT16_SWAP(c,x) ((c) ? PA_INT32_SWAP(x) : (x)) --#define PA_MAYBE_UINT16_SWAP(c,x) ((c) ? PA_UINT32_SWAP(x) : (x)) -+#define PA_MAYBE_INT16_SWAP(c,x) ((c) ? PA_INT16_SWAP(x) : (x)) -+#define PA_MAYBE_UINT16_SWAP(c,x) ((c) ? PA_UINT16_SWAP(x) : (x)) - - #define PA_MAYBE_INT32_SWAP(c,x) ((c) ? PA_INT32_SWAP(x) : (x)) - #define PA_MAYBE_UINT32_SWAP(c,x) ((c) ? PA_UINT32_SWAP(x) : (x)) diff --git a/debian/patches/kfreebsd_no_lock_and_threads_synchro.patch b/debian/patches/kfreebsd_no_lock_and_threads_synchro.patch deleted file mode 100644 index 3ad44dc..0000000 --- a/debian/patches/kfreebsd_no_lock_and_threads_synchro.patch +++ /dev/null @@ -1,29 +0,0 @@ -Description: Don't try to lock and synchronise threads on kFreeBSD. -Bug-Debian: http://bugs.debian.org/705435 -Origin: http://svnweb.freebsd.org/ports/head/audio/pulseaudio/files/patch-src_daemon_main.c?revision=231972&view=markup&pathrev=231972 -Author: Joe Marcus Clarke <[email protected]> -Author: Steven Chamberlain <[email protected]> -Last-Update: 2013-04-24 -Applied-Upstream: 6.0, commit:69fae3e33ad024be39fb3da0643314abf4e59980 - ---- a/src/daemon/main.c -+++ b/src/daemon/main.c -@@ -743,6 +743,10 @@ - * first take the autospawn lock to make things - * synchronous. */ - -+ /* This locking and thread synchronisation code doesn't work reliably -+ * on kFreeBSD (Debian bug #705435), or in upstream FreeBSD ports -+ * (bug reference: ports/128947, patched in SVN r231972). */ -+#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) - if ((autospawn_fd = pa_autospawn_lock_init()) < 0) { - pa_log("Failed to initialize autospawn lock"); - goto finish; -@@ -754,6 +758,7 @@ - } - - autospawn_locked = true; -+#endif - } - - if (conf->daemonize) { diff --git a/debian/patches/misc-cleanups-and-bug-fixes.patch b/debian/patches/misc-cleanups-and-bug-fixes.patch deleted file mode 100644 index 7a08a53..0000000 --- a/debian/patches/misc-cleanups-and-bug-fixes.patch +++ /dev/null @@ -1,118 +0,0 @@ -Author: Peter Meerwald <[email protected]> -Description: misc cleanups and bug fixes - This is a collapse of a few small patches by Peter Meerwald. - Changes are: - put *.log and *.trs (which are created by running 'make check') into src/.gitignore - fix format specifiers, avoid compilation warnings - fix compilation warning when certain syscalls are not available (e.g. on kFreeBSD) - add checks for the expected results in sigbus-test - add SIGSEGV to the memtrap signal handler to make the sigbus-test work on kFreeBSD ---- a/src/.gitignore -+++ b/src/.gitignore -@@ -3,6 +3,8 @@ TAGS - *.o - *.la - *.gcno -+*.trs -+*.log - .deps - .libs - /Makefile ---- a/src/pulsecore/core-util.c -+++ b/src/pulsecore/core-util.c -@@ -3315,8 +3315,11 @@ int pa_open_cloexec(const char *fn, int - return fd; - #endif - -- if ((fd = open(fn, flags, mode)) < 0) -- return fd; -+ if ((fd = open(fn, flags, mode)) >= 0) -+ goto finish; -+ -+ /* return error */ -+ return fd; - - finish: - /* Some implementations might simply ignore O_CLOEXEC if it is not -@@ -3337,8 +3340,11 @@ int pa_socket_cloexec(int domain, int ty - return fd; - #endif - -- if ((fd = socket(domain, type, protocol)) < 0) -- return fd; -+ if ((fd = socket(domain, type, protocol)) >= 0) -+ goto finish; -+ -+ /* return error */ -+ return fd; - - finish: - /* Some implementations might simply ignore SOCK_CLOEXEC if it is -@@ -3360,8 +3366,11 @@ int pa_pipe_cloexec(int pipefd[2]) { - - #endif - -- if ((r = pipe(pipefd)) < 0) -- return r; -+ if ((r = pipe(pipefd)) >= 0) -+ goto finish; -+ -+ /* return error */ -+ return r; - - finish: - pa_make_fd_cloexec(pipefd[0]); -@@ -3382,8 +3391,11 @@ int pa_accept_cloexec(int sockfd, struct - - #endif - -- if ((fd = accept(sockfd, addr, addrlen)) < 0) -- return fd; -+ if ((fd = accept(sockfd, addr, addrlen)) >= 0) -+ goto finish; -+ -+ /* return error */ -+ return fd; - - finish: - pa_make_fd_cloexec(fd); ---- a/src/pulsecore/memtrap.c -+++ b/src/pulsecore/memtrap.c -@@ -237,5 +237,8 @@ void pa_memtrap_install(void) { - sa.sa_flags = SA_RESTART|SA_SIGINFO; - - pa_assert_se(sigaction(SIGBUS, &sa, NULL) == 0); -+#ifdef __FreeBSD_kernel__ -+ pa_assert_se(sigaction(SIGSEGV, &sa, NULL) == 0); -+#endif - #endif - } ---- a/src/tests/mcalign-test.c -+++ b/src/tests/mcalign-test.c -@@ -74,7 +74,7 @@ int main(int argc, char *argv[]) { - - c.length = (size_t) r; - pa_mcalign_push(a, &c); -- fprintf(stderr, "Read %ld bytes\n", (long)r); -+ fprintf(stderr, "Read %zd bytes\n", r); - - c.index += (size_t) r; - ---- a/src/tests/sigbus-test.c -+++ b/src/tests/sigbus-test.c -@@ -54,6 +54,7 @@ START_TEST (sigbus_test) { - /* Verify memory map */ - pa_log("Let's see if this worked: %s", (char*) p); - pa_log("And memtrap says it is good: %s", pa_yes_no(pa_memtrap_is_good(m))); -+ fail_unless(pa_memtrap_is_good(m) == true); - - /* Invalidate mapping */ - fail_unless(ftruncate(fd, 0) >= 0); -@@ -64,6 +65,7 @@ START_TEST (sigbus_test) { - /* Verify memory map */ - pa_log("Let's see if this worked: %s", (char*) p); - pa_log("And memtrap says it is good: %s", pa_yes_no(pa_memtrap_is_good(m))); -+ fail_unless(pa_memtrap_is_good(m) == false); - - pa_memtrap_remove(m); - munmap(p, PA_PAGE_SIZE); diff --git a/debian/patches/mix-Fix-mixing-of-S24-samples-stored-as-S32RE.patch b/debian/patches/mix-Fix-mixing-of-S24-samples-stored-as-S32RE.patch deleted file mode 100644 index 1bd8bf7..0000000 --- a/debian/patches/mix-Fix-mixing-of-S24-samples-stored-as-S32RE.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 1499271f46c5b7289a61a4fa508cc412544842c4 Mon Sep 17 00:00:00 2001 -From: Peter Meerwald <[email protected]> -Date: Mon, 4 Aug 2014 14:42:00 +0200 -Subject: [PATCH 1/6] mix: Fix mixing of S24 samples stored as S32RE - -pa_mix_s24_32re_c() should advance m->ptr by sizeof(int32_t) - -http://lists.freedesktop.org/archives/pulseaudio-discuss/2014-July/020998.html - -Signed-off-by: Peter Meerwald <[email protected]> ---- - src/pulsecore/mix.c | 2 +- - src/tests/mix-test.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - ---- a/src/pulsecore/mix.c -+++ b/src/pulsecore/mix.c -@@ -445,7 +445,7 @@ static void pa_mix_s24_32re_c(pa_mix_inf - v = (v * cv) >> 16; - sum += v; - } -- m->ptr = (uint8_t*) m->ptr + 3; -+ m->ptr = (uint8_t*) m->ptr + sizeof(int32_t); - } - - sum = PA_CLAMP_UNLIKELY(sum, -0x80000000LL, 0x7FFFFFFFLL); ---- a/src/tests/mix-test.c -+++ b/src/tests/mix-test.c -@@ -126,7 +126,7 @@ static const uint32_t s24_32le_result[3] - static const uint32_t s24_32be_result[3][10] = { - { 0x00000001, 0xffff0002, 0x7fff0003, 0x80000004, 0x9fff0005, 0x3fff0006, 0x00010007, 0xf0000008, 0x00200009, 0x0021000a }, - { 0x00000000, 0x65e60000, 0xf1e50000, 0x73000000, 0x0ee60000, 0xb8e50000, 0xe6000000, 0xd7000000, 0xcc1c0000, 0xb31d0000 }, --{ 0x00000000, 0xe5010200, 0x00036400, 0x0470e500, 0xf3000000, 0xe5010500, 0x0006ad00, 0x07f7e400, 0xe6010000, 0x00000800 }, -+{ 0x00000000, 0x64e60100, 0x70e50100, 0xf3000000, 0xade50100, 0xf7e40100, 0xe6010000, 0xc7010000, 0xcc3c0000, 0xb33e0000 }, - }; - - static void compare_block(const pa_sample_spec *ss, const pa_memchunk *chunk, int iter) { diff --git a/debian/patches/only-autostart-kde-version.patch b/debian/patches/only-autostart-kde-version.patch deleted file mode 100644 index 5661431..0000000 --- a/debian/patches/only-autostart-kde-version.patch +++ /dev/null @@ -1,12 +0,0 @@ -Description: Sometimes starting 2 pulseaudio daemons breaks kde login, so don't start the generic one when the kde one will start - This is fixed upstream post 5.0 by not shipping a kde-specific version -Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=705426 -Author: Török Edwin <[email protected]> -Forwarded: not-needed ---- a/src/daemon/pulseaudio.desktop.in -+++ b/src/daemon/pulseaudio.desktop.in -@@ -8,3 +8,4 @@ Type=Application - Categories= - GenericName= - X-GNOME-Autostart-Phase=Initialization -+NotShowIn=KDE; diff --git a/debian/patches/rtp-recv-fix-crash-on-empty-UDP-packets-CVE-2014-397.patch b/debian/patches/rtp-recv-fix-crash-on-empty-UDP-packets-CVE-2014-397.patch deleted file mode 100644 index 073e663..0000000 --- a/debian/patches/rtp-recv-fix-crash-on-empty-UDP-packets-CVE-2014-397.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 26b9d22dd24c17eb118d0205bf7b02b75d435e3c Mon Sep 17 00:00:00 2001 -From: "Alexander E. Patrakov" <[email protected]> -Date: Thu, 5 Jun 2014 22:29:25 +0600 -Subject: [PATCH] rtp-recv: fix crash on empty UDP packets (CVE-2014-3970) - -On FIONREAD returning 0 bytes, we cannot return success, as the caller -(rtpoll_work_cb in module-rtp-recv.c) would then try to -pa_memblock_unref(chunk.memblock) and, because memblock is NULL, trigger -an assertion. - -Also we have to read out the possible empty packet from the socket, so -that the kernel doesn't tell us again and again about it. - -Signed-off-by: Alexander E. Patrakov <[email protected]> ---- - src/modules/rtp/rtp.c | 25 +++++++++++++++++++++++-- - 1 file changed, 23 insertions(+), 2 deletions(-) - -diff --git a/src/modules/rtp/rtp.c b/src/modules/rtp/rtp.c -index 570737e..7b75e0e 100644 ---- a/src/modules/rtp/rtp.c -+++ b/src/modules/rtp/rtp.c -@@ -182,8 +182,29 @@ int pa_rtp_recv(pa_rtp_context *c, pa_memchunk *chunk, pa_mempool *pool, struct - goto fail; - } - -- if (size <= 0) -- return 0; -+ if (size <= 0) { -+ /* size can be 0 due to any of the following reasons: -+ * -+ * 1. Somebody sent us a perfectly valid zero-length UDP packet. -+ * 2. Somebody sent us a UDP packet with a bad CRC. -+ * -+ * It is unknown whether size can actually be less than zero. -+ * -+ * In the first case, the packet has to be read out, otherwise the -+ * kernel will tell us again and again about it, thus preventing -+ * reception of any further packets. So let's just read it out -+ * now and discard it later, when comparing the number of bytes -+ * received (0) with the number of bytes wanted (1, see below). -+ * -+ * In the second case, recvmsg() will fail, thus allowing us to -+ * return the error. -+ * -+ * Just to avoid passing zero-sized memchunks and NULL pointers to -+ * recvmsg(), let's force allocation of at least one byte by setting -+ * size to 1. -+ */ -+ size = 1; -+ } - - if (c->memchunk.length < (unsigned) size) { - size_t l; --- -2.0.0 - diff --git a/debian/patches/series b/debian/patches/series index 97b3013..9dd5712 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,17 +1 @@ -0001-raop-Don-t-use-incompatible-default-sample-spec-para.patch -0002-Use-the-fixed-point-speex-resampler-on-ARM.patch -0003-exit-with-X-session.patch -0004-dont-start-when-already-running.patch -kfreebsd_no_lock_and_threads_synchro.patch -only-autostart-kde-version.patch -rtp-recv-fix-crash-on-empty-UDP-packets-CVE-2014-397.patch -zsh-completion-Fix-completion-for-default-sink-sourc.patch gnu-kfreebsd.patch -mix-Fix-mixing-of-S24-samples-stored-as-S32RE.patch -tests-Cleanup-mix-test.patch -endianmacros-Fix-PA_MAYBE_INT16_SWAP-macro.patch -tests-Fix-mix-test-on-big-endian-systems.patch -util-Fix-pa_get_binary_name-on-Debian-kFreeBSD.patch -misc-cleanups-and-bug-fixes.patch -util-Try-finding-out-application-name-using-dladdr.patch -broken-PA_FLOAT32_SWAP.patch diff --git a/debian/patches/tests-Cleanup-mix-test.patch b/debian/patches/tests-Cleanup-mix-test.patch deleted file mode 100644 index e628723..0000000 --- a/debian/patches/tests-Cleanup-mix-test.patch +++ /dev/null @@ -1,41 +0,0 @@ -From e14863334b7e9267b3b3bbab08edf4a019411e89 Mon Sep 17 00:00:00 2001 -From: Peter Meerwald <[email protected]> -Date: Wed, 6 Aug 2014 11:47:33 +0200 -Subject: [PATCH 3/6] tests: Cleanup mix-test - -indentation and use of fabsf() for floats - -Signed-off-by: Peter Meerwald <[email protected]> ---- - src/tests/mix-test.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - ---- a/src/tests/mix-test.c -+++ b/src/tests/mix-test.c -@@ -202,7 +202,7 @@ static void compare_block(const pa_sampl - - for (i = 0; i < chunk->length / pa_frame_size(ss); i++) { - float uu = ss->format == PA_SAMPLE_FLOAT32NE ? *u : PA_FLOAT32_SWAP(*u); -- fail_unless(fabs(uu - *v) <= 1e-6, NULL); -+ fail_unless(fabsf(uu - *v) <= 1e-6f, NULL); - ++u; - ++v; - } -@@ -215,7 +215,7 @@ static void compare_block(const pa_sampl - - for (i = 0; i < chunk->length / pa_frame_size(ss); i++) { - float uu = ss->format == PA_SAMPLE_FLOAT32NE ? *u : PA_FLOAT32_SWAP(*u); -- fail_unless(fabs(uu - *v) <= 1e-6, NULL); -+ fail_unless(fabsf(uu - *v) <= 1e-6f, NULL); - ++u; - ++v; - } -@@ -385,7 +385,7 @@ static pa_memblock* generate_block(pa_me - for (i = 0; i < 10; i++) - u[i] = PA_FLOAT32_SWAP(float_samples[i]); - } else -- memcpy(d, float_samples, sizeof(float_samples)); -+ memcpy(d, float_samples, sizeof(float_samples)); - - break; - } diff --git a/debian/patches/tests-Fix-mix-test-on-big-endian-systems.patch b/debian/patches/tests-Fix-mix-test-on-big-endian-systems.patch deleted file mode 100644 index 0aed324..0000000 --- a/debian/patches/tests-Fix-mix-test-on-big-endian-systems.patch +++ /dev/null @@ -1,364 +0,0 @@ -From eca6217129e835e1beabd13e7ca839ef0f89ddd0 Mon Sep 17 00:00:00 2001 -From: Peter Meerwald <[email protected]> -Date: Wed, 6 Aug 2014 11:19:57 +0200 -Subject: [PATCH 5/6] tests: Fix mix-test on big-endian systems - -the mix test code never worked on big-endian systems - -patch saves a lot of duplicate test and uses more logical naming - -see -http://lists.freedesktop.org/archives/pulseaudio-discuss/2014-August/021035.html - -Signed-off-by: Peter Meerwald <[email protected]> -Reported-by: Felipe Sateler <[email protected]> ---- - src/tests/mix-test.c | 229 ++++++++++++--------------------------------------- - 1 file changed, 54 insertions(+), 175 deletions(-) - ---- a/src/tests/mix-test.c -+++ b/src/tests/mix-test.c -@@ -56,79 +56,37 @@ static const uint8_t ulaw_result[3][10] - { 0x00, 0xff, 0xff, 0x80, 0x91, 0x31, 0x00, 0xe9, 0x12, 0x13 }, - }; - --/* PA_SAMPLE_S16LE */ --static const uint16_t s16le_result[3][10] = { -+static const uint16_t s16ne_result[3][10] = { - { 0x0000, 0xffff, 0x7fff, 0x8000, 0x9fff, 0x3fff, 0x0001, 0xf000, 0x0020, 0x0021 }, - { 0x0000, 0xffff, 0x7332, 0x8ccd, 0xa998, 0x3998, 0x0000, 0xf199, 0x001c, 0x001d }, - { 0x0000, 0xfffe, 0x7fff, 0x8000, 0x8000, 0x7997, 0x0001, 0xe199, 0x003c, 0x003e }, - }; - --/* PA_SAMPLE_S16BE */ --static const uint16_t s16be_result[3][10] = { --{ 0x0000, 0xffff, 0x7fff, 0x8000, 0x9fff, 0x3fff, 0x0001, 0xf000, 0x0020, 0x0021 }, --{ 0x0000, 0xffff, 0x8bff, 0x7300, 0xa8ff, 0x52ff, 0xe600, 0xd700, 0xcc1c, 0xb31d }, --{ 0x0000, 0xfeff, 0x0aff, 0xf300, 0x47ff, 0x91fe, 0xe601, 0xc701, 0xcc3c, 0xb33e }, --}; -- --/* PA_SAMPLE_FLOAT32LE */ --static const float float32le_result[3][10] = { --{ 0.000000, -1.000000, 1.000000, 4711.000000, 0.222000, 0.330000, -0.300000, 99.000000, -0.555000, -0.123000 }, --{ 0.000000, -0.899987, 0.899987, 4239.837402, 0.199797, 0.296996, -0.269996, 89.098679, -0.499493, -0.110698 }, --{ 0.000000, -1.899987, 1.899987, 8950.837891, 0.421797, 0.626996, -0.569996, 188.098679, -1.054493, -0.233698 }, --}; -- --/* PA_SAMPLE_FLOAT32BE */ --static const float float32be_result[3][10] = { -+static const float float32ne_result[3][10] = { - { 0.000000, -1.000000, 1.000000, 4711.000000, 0.222000, 0.330000, -0.300000, 99.000000, -0.555000, -0.123000 }, - { 0.000000, -0.899987, 0.899987, 4239.837402, 0.199797, 0.296996, -0.269996, 89.098679, -0.499493, -0.110698 }, - { 0.000000, -1.899987, 1.899987, 8950.837891, 0.421797, 0.626996, -0.569996, 188.098679, -1.054493, -0.233698 }, - }; - --/* PA_SAMPLE_S32LE */ --static const uint32_t s32le_result[3][10] = { -+static const uint32_t s32ne_result[3][10] = { - { 0x00000001, 0xffff0002, 0x7fff0003, 0x80000004, 0x9fff0005, 0x3fff0006, 0x00010007, 0xf0000008, 0x00200009, 0x0021000a }, - { 0x00000000, 0xffff199b, 0x7332199c, 0x8ccd0003, 0xa998d99e, 0x3998999f, 0x0000e66c, 0xf199a007, 0x001cccc8, 0x001db32e }, - { 0x00000001, 0xfffe199d, 0x7fffffff, 0x80000000, 0x80000000, 0x799799a5, 0x0001e673, 0xe199a00f, 0x003cccd1, 0x003eb338 }, - }; - --/* PA_SAMPLE_S32BE */ --static const uint32_t s32be_result[3][10] = { --{ 0x00000001, 0xffff0002, 0x7fff0003, 0x80000004, 0x9fff0005, 0x3fff0006, 0x00010007, 0xf0000008, 0x00200009, 0x0021000a }, --{ 0x0066e600, 0x65b2cd01, 0xf117b402, 0x73989903, 0x0ee48004, 0xb8496705, 0xe6ca4c06, 0xd7303307, 0xccb21908, 0xb3190009 }, --{ 0x0066e601, 0x64b2ce03, 0x7017b505, 0xf3989907, 0xade38109, 0xf748680b, 0xe6cb4c0d, 0xc731330f, 0xccd21911, 0xb33a0013 }, --}; -- --/* PA_SAMPLE_S24LE */ --static const uint8_t s24le_result[3][30] = { --{ 0x00, 0x00, 0x01, 0xff, 0xff, 0x02, 0x7f, 0xff, 0x03, 0x80, 0x00, 0x04, 0x9f, 0xff, 0x05, 0x3f, 0xff, 0x06, 0x01, 0x00, 0x07, 0xf0, 0x00, 0x08, 0x20, 0x00, 0x09, 0x21, 0x00, 0x0a }, --{ 0x66, 0xe6, 0x00, 0x31, 0xb3, 0x02, 0x23, 0x99, 0x03, 0x0b, 0x9a, 0x03, 0x0c, 0x66, 0x05, 0x1c, 0x4c, 0x06, 0xca, 0x4c, 0x06, 0x07, 0x34, 0x07, 0xb2, 0x19, 0x08, 0x19, 0x00, 0x09 }, --{ 0x66, 0xe6, 0x01, 0x30, 0xb3, 0x05, 0xa2, 0x98, 0x07, 0x8b, 0x9a, 0x07, 0xab, 0x65, 0x0b, 0x5b, 0x4b, 0x0d, 0xcb, 0x4c, 0x0d, 0xf7, 0x34, 0x0f, 0xd2, 0x19, 0x11, 0x3a, 0x00, 0x13 }, --}; -- --/* PA_SAMPLE_S24BE */ -+/* attention: result is in BE, not NE! */ - static const uint8_t s24be_result[3][30] = { --{ 0x00, 0x00, 0x01, 0xff, 0xff, 0x02, 0x7f, 0xff, 0x03, 0x80, 0x00, 0x04, 0x9f, 0xff, 0x05, 0x3f, 0xff, 0x06, 0x01, 0x00, 0x07, -- 0xf0, 0x00, 0x08, 0x20, 0x00, 0x09, 0x21, 0x00, 0x0a }, --{ 0x00, 0x00, 0x00, 0xff, 0xff, 0x1b, 0x73, 0x32, 0x1c, 0x8c, 0xcd, 0x03, 0xa9, 0x98, 0xde, 0x39, 0x98, 0x9f, 0x00, 0xe6, 0x6c, -- 0xf1, 0x99, 0xa7, 0x1c, 0xcc, 0xc8, 0x1d, 0xb3, 0x2e }, --{ 0x00, 0x00, 0x01, 0xff, 0xfe, 0x1d, 0x7f, 0xff, 0xff, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x79, 0x97, 0xa5, 0x01, 0xe6, 0x73, -- 0xe1, 0x99, 0xaf, 0x3c, 0xcc, 0xd1, 0x3e, 0xb3, 0x38 }, -+{ 0x00, 0x00, 0x01, 0xff, 0xff, 0x02, 0x7f, 0xff, 0x03, 0x80, 0x00, 0x04, 0x9f, 0xff, 0x05, 0x3f, 0xff, 0x06, 0x01, 0x00, 0x07, 0xf0, 0x00, 0x08, 0x20, 0x00, 0x09, 0x21, 0x00, 0x0a }, -+{ 0x00, 0x00, 0x00, 0xff, 0xff, 0x1b, 0x73, 0x32, 0x1c, 0x8c, 0xcd, 0x03, 0xa9, 0x98, 0xde, 0x39, 0x98, 0x9f, 0x00, 0xe6, 0x6c, 0xf1, 0x99, 0xa7, 0x1c, 0xcc, 0xc8, 0x1d, 0xb3, 0x2e }, -+{ 0x00, 0x00, 0x01, 0xff, 0xfe, 0x1d, 0x7f, 0xff, 0xff, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x79, 0x97, 0xa5, 0x01, 0xe6, 0x73, 0xe1, 0x99, 0xaf, 0x3c, 0xcc, 0xd1, 0x3e, 0xb3, 0x38 }, - }; - --/* PA_SAMPLE_S24_32LE */ --static const uint32_t s24_32le_result[3][10] = { -+static const uint32_t s24_32ne_result[3][10] = { - { 0x00000001, 0xffff0002, 0x7fff0003, 0x80000004, 0x9fff0005, 0x3fff0006, 0x00010007, 0xf0000008, 0x00200009, 0x0021000a }, - { 0x00000000, 0x00ff199b, 0x00ff199c, 0x00000003, 0x00ff199e, 0x00ff199f, 0x0000e66c, 0x00000007, 0x001cccc8, 0x001db32e }, - { 0x00000001, 0x00fe199d, 0x00fe199f, 0x00000007, 0x00fe19a3, 0x00fe19a5, 0x0001e673, 0x0000000f, 0x003cccd1, 0x003eb338 }, - }; - --/* PA_SAMPLE_S24_32BE */ --static const uint32_t s24_32be_result[3][10] = { --{ 0x00000001, 0xffff0002, 0x7fff0003, 0x80000004, 0x9fff0005, 0x3fff0006, 0x00010007, 0xf0000008, 0x00200009, 0x0021000a }, --{ 0x00000000, 0x65e60000, 0xf1e50000, 0x73000000, 0x0ee60000, 0xb8e50000, 0xe6000000, 0xd7000000, 0xcc1c0000, 0xb31d0000 }, --{ 0x00000000, 0x64e60100, 0x70e50100, 0xf3000000, 0xade50100, 0xf7e40100, 0xe6010000, 0xc7010000, 0xcc3c0000, 0xb33e0000 }, --}; -- - static void compare_block(const pa_sample_spec *ss, const pa_memchunk *chunk, int iter) { - void *d; - unsigned i; -@@ -172,49 +130,27 @@ static void compare_block(const pa_sampl - break; - } - -- case PA_SAMPLE_S16LE: { -- const uint16_t *v = s16le_result[iter]; -- uint16_t *u = d; -- -- for (i = 0; i < chunk->length / pa_frame_size(ss); i++) { -- fail_unless(*u == *v, NULL); -- ++u; -- ++v; -- } -- break; -- } -- -- case PA_SAMPLE_S16BE: { -- const uint16_t *v = s16be_result[iter]; -+ case PA_SAMPLE_S16NE: -+ case PA_SAMPLE_S16RE: { -+ const uint16_t *v = s16ne_result[iter]; - uint16_t *u = d; - - for (i = 0; i < chunk->length / pa_frame_size(ss); i++) { -- fail_unless(*u == *v, NULL); -- ++u; -- ++v; -- } -- break; -- } -- -- case PA_SAMPLE_FLOAT32LE: { -- const float *v = float32le_result[iter]; -- float *u = d; -- -- for (i = 0; i < chunk->length / pa_frame_size(ss); i++) { -- float uu = ss->format == PA_SAMPLE_FLOAT32NE ? *u : PA_FLOAT32_SWAP(*u); -- fail_unless(fabsf(uu - *v) <= 1e-6f, NULL); -+ uint16_t uu = PA_MAYBE_UINT16_SWAP(ss->format != PA_SAMPLE_S16NE, *u); -+ fail_unless(uu == *v, NULL); - ++u; - ++v; - } - break; - } - -- case PA_SAMPLE_FLOAT32BE: { -- const float *v = float32be_result[iter]; -+ case PA_SAMPLE_FLOAT32NE: -+ case PA_SAMPLE_FLOAT32RE: { -+ const float *v = float32ne_result[iter]; - float *u = d; - - for (i = 0; i < chunk->length / pa_frame_size(ss); i++) { -- float uu = ss->format == PA_SAMPLE_FLOAT32NE ? *u : PA_FLOAT32_SWAP(*u); -+ float uu = PA_MAYBE_FLOAT32_SWAP(ss->format != PA_SAMPLE_FLOAT32NE, *u); - fail_unless(fabsf(uu - *v) <= 1e-6f, NULL); - ++u; - ++v; -@@ -222,77 +158,42 @@ static void compare_block(const pa_sampl - break; - } - -- case PA_SAMPLE_S32LE: { -- const uint32_t *v = s32le_result[iter]; -- uint32_t *u = d; -- -- for (i = 0; i < chunk->length / pa_frame_size(ss); i++) { -- fail_unless(*u == *v, NULL); -- ++u; -- ++v; -- } -- break; -- } -- -- case PA_SAMPLE_S32BE: { -- const uint32_t *v = s32be_result[iter]; -- uint32_t *u = d; -- -- for (i = 0; i < chunk->length / pa_frame_size(ss); i++) { -- fail_unless(*u == *v, NULL); -- ++u; -- ++v; -- } -- break; -- } -- -- case PA_SAMPLE_S24_32LE: { -- const uint32_t *v = s24_32le_result[iter]; -+ case PA_SAMPLE_S32NE: -+ case PA_SAMPLE_S32RE: { -+ const uint32_t *v = s32ne_result[iter]; - uint32_t *u = d; - - for (i = 0; i < chunk->length / pa_frame_size(ss); i++) { -- fail_unless(*u == *v, NULL); -+ uint32_t uu = PA_MAYBE_UINT32_SWAP(ss->format != PA_SAMPLE_S32NE, *u); -+ fail_unless(uu == *v, NULL); - ++u; - ++v; - } - break; - } - -- case PA_SAMPLE_S24_32BE: { -- const uint32_t *v = s24_32be_result[iter]; -+ case PA_SAMPLE_S24_32NE: -+ case PA_SAMPLE_S24_32RE: { -+ const uint32_t *v = s24_32ne_result[iter]; - uint32_t *u = d; - - for (i = 0; i < chunk->length / pa_frame_size(ss); i++) { -- fail_unless(*u == *v, NULL); -+ uint32_t uu = PA_MAYBE_UINT32_SWAP(ss->format != PA_SAMPLE_S24_32NE, *u); -+ fail_unless(uu == *v, NULL); - ++u; - ++v; - } - break; - } - -- case PA_SAMPLE_S24LE: { -- const uint8_t *v = s24le_result[iter]; -- uint8_t *u = d; -- -- for (i = 0; i < chunk->length / pa_frame_size(ss); i++) { -- fail_unless(*u == *v, NULL); -- fail_unless(*(u+1) == *(v+1), NULL); -- fail_unless(*(u+2) == *(v+2), NULL); -- -- u += 3; -- v += 3; -- } -- break; -- } -- -- case PA_SAMPLE_S24BE: { -+ case PA_SAMPLE_S24NE: -+ case PA_SAMPLE_S24RE: { - const uint8_t *v = s24be_result[iter]; - uint8_t *u = d; - - for (i = 0; i < chunk->length / pa_frame_size(ss); i++) { -- fail_unless(*u == *v, NULL); -- fail_unless(*(u+1) == *(v+1), NULL); -- fail_unless(*(u+2) == *(v+2), NULL); -+ uint32_t uu = ss->format == PA_SAMPLE_S24LE ? PA_READ24LE(u) : PA_READ24BE(u); -+ fail_unless(uu == PA_READ24BE(v), NULL); - - u += 3; - v += 3; -@@ -320,23 +221,18 @@ static pa_memblock* generate_block(pa_me - case PA_SAMPLE_U8: - case PA_SAMPLE_ULAW: - case PA_SAMPLE_ALAW: { -- static const uint8_t u8_samples[] = { -- 0x00, 0xFF, 0x7F, 0x80, 0x9f, -- 0x3f, 0x01, 0xF0, 0x20, 0x21 -- }; -- -- memcpy(d, u8_samples, sizeof(u8_samples)); -+ memcpy(d, u8_result[0], sizeof(u8_result[0])); - break; - } - - case PA_SAMPLE_S16NE: - case PA_SAMPLE_S16RE: { -- static const uint16_t u16_samples[] = { -- 0x0000, 0xFFFF, 0x7FFF, 0x8000, 0x9fff, -- 0x3fff, 0x0001, 0xF000, 0x0020, 0x0021 -- }; -- -- memcpy(d, u16_samples, sizeof(u16_samples)); -+ if (ss->format == PA_SAMPLE_S16RE) { -+ uint16_t *u = d; -+ for (i = 0; i < 10; i++) -+ u[i] = PA_UINT16_SWAP(s16ne_result[0][i]); -+ } else -+ memcpy(d, s16ne_result[0], sizeof(s16ne_result[0])); - break; - } - -@@ -344,48 +240,33 @@ static pa_memblock* generate_block(pa_me - case PA_SAMPLE_S24_32RE: - case PA_SAMPLE_S32NE: - case PA_SAMPLE_S32RE: { -- static const uint32_t u32_samples[] = { -- 0x00000001, 0xFFFF0002, 0x7FFF0003, 0x80000004, 0x9fff0005, -- 0x3fff0006, 0x00010007, 0xF0000008, 0x00200009, 0x0021000A -- }; -- -- memcpy(d, u32_samples, sizeof(u32_samples)); -+ if (ss->format == PA_SAMPLE_S24_32RE || ss->format == PA_SAMPLE_S32RE) { -+ uint32_t *u = d; -+ for (i = 0; i < 10; i++) -+ u[i] = PA_UINT32_SWAP(s32ne_result[0][i]); -+ } else -+ memcpy(d, s32ne_result[0], sizeof(s32ne_result[0])); - break; - } - - case PA_SAMPLE_S24NE: -- case PA_SAMPLE_S24RE: { -- /* Need to be on a byte array because they are not aligned */ -- static const uint8_t u24_samples[] = { -- 0x00, 0x00, 0x01, -- 0xFF, 0xFF, 0x02, -- 0x7F, 0xFF, 0x03, -- 0x80, 0x00, 0x04, -- 0x9f, 0xff, 0x05, -- 0x3f, 0xff, 0x06, -- 0x01, 0x00, 0x07, -- 0xF0, 0x00, 0x08, -- 0x20, 0x00, 0x09, -- 0x21, 0x00, 0x0A -- }; -- -- memcpy(d, u24_samples, sizeof(u24_samples)); -+ case PA_SAMPLE_S24RE: -+ if (ss->format == PA_SAMPLE_S24LE) { -+ uint8_t *u = d; -+ for (i = 0; i < 30; i += 3) -+ PA_WRITE24LE(&u[i], PA_READ24BE(&s24be_result[0][i])); -+ } else -+ memcpy(d, s24be_result[0], sizeof(s24be_result[0])); - break; -- } - - case PA_SAMPLE_FLOAT32NE: - case PA_SAMPLE_FLOAT32RE: { -- float *u = d; -- static const float float_samples[] = { -- 0.0f, -1.0f, 1.0f, 4711.0f, 0.222f, -- 0.33f, -.3f, 99.0f, -0.555f, -.123f -- }; -- - if (ss->format == PA_SAMPLE_FLOAT32RE) { -+ float *u = d; - for (i = 0; i < 10; i++) -- u[i] = PA_FLOAT32_SWAP(float_samples[i]); -+ u[i] = PA_FLOAT32_SWAP(float32ne_result[0][i]); - } else -- memcpy(d, float_samples, sizeof(float_samples)); -+ memcpy(d, float32ne_result[0], sizeof(float32ne_result[0])); - - break; - } -@@ -427,8 +308,6 @@ START_TEST (mix_test) { - i.length = pa_memblock_get_length(i.memblock); - i.index = 0; - -- compare_block(&a, &i, 0); -- - /* Make a copy */ - j = i; - pa_memblock_ref(j.memblock); diff --git a/debian/patches/util-Fix-pa_get_binary_name-on-Debian-kFreeBSD.patch b/debian/patches/util-Fix-pa_get_binary_name-on-Debian-kFreeBSD.patch deleted file mode 100644 index 7152d4e..0000000 --- a/debian/patches/util-Fix-pa_get_binary_name-on-Debian-kFreeBSD.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 8a4a4f408c3e71a67b2134c21b971ce54a571fd1 Mon Sep 17 00:00:00 2001 -From: Peter Meerwald <[email protected]> -Date: Mon, 4 Aug 2014 14:45:23 +0200 -Subject: [PATCH 6/6] util: Fix pa_get_binary_name() on Debian/kFreeBSD - -Debian GNU/kFreeBSD uses a FreeBSD kernel and GLIBC, -it #defines __FreeBSD_kernel__, but not __FreeBSD__ nor __linux__ -Debian GNU/kFreeBSD does have a /proc/self/exe - -FreeBSD #defines __FreeBSD__ and __FreeBSD_kernel__ - -problem reporte here: -http://lists.freedesktop.org/archives/pulseaudio-discuss/2014-July/020998.html - -http://stackoverflow.com/questions/1023306/finding-current-executables-path-without-proc-self-exe and -http://stackoverflow.com/questions/933850/how-to-find-the-location-of-the-executable-in-c have some -background info - -Signed-off-by: Peter Meerwald <[email protected]> ---- - src/pulse/util.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/src/pulse/util.c -+++ b/src/pulse/util.c -@@ -181,10 +181,10 @@ char *pa_get_binary_name(char *s, size_t - } - #endif - --#ifdef __linux__ -+#if defined(__linux__) || defined(__FreeBSD_kernel__) - { - char *rp; -- /* This works on Linux only */ -+ /* This works on Linux and Debian/kFreeBSD */ - - if ((rp = pa_readlink("/proc/self/exe"))) { - pa_strlcpy(s, pa_path_get_filename(rp), l); diff --git a/debian/patches/util-Try-finding-out-application-name-using-dladdr.patch b/debian/patches/util-Try-finding-out-application-name-using-dladdr.patch deleted file mode 100644 index 139239d..0000000 --- a/debian/patches/util-Try-finding-out-application-name-using-dladdr.patch +++ /dev/null @@ -1,78 +0,0 @@ -commit 704c96985be104396b86f6b2c0a96827b9d90501 -Author: Felipe Sateler <[email protected]> -Date: Thu Aug 14 00:43:00 2014 -0400 - - util: Try finding out application name using dladdr if available - - This fixes getting the binary name in the Hurd, or any other port using - the GNU C library, but only in the case where the library is directly - linked to. Opening with dlopen will not work. - - Change since last version: use a weak reference to main, so that we - don't crash when main cannot be found. - ---- a/configure.ac -+++ b/configure.ac -@@ -574,6 +574,8 @@ AC_SYS_LARGEFILE - # Check for open64 to know if the current system does have open64() and similar functions - AC_CHECK_FUNCS_ONCE([open64]) - -+AC_SEARCH_LIBS([dladdr], [dl], [HAVE_DLADDR=1], [HAVE_DLADDR=0]) -+AC_DEFINE(HAVE_DLADDR, [1], [Have dladdr?]) - - ################################### - # External libraries # ---- a/src/pulse/util.c -+++ b/src/pulse/util.c -@@ -24,6 +24,10 @@ - #include <config.h> - #endif - -+#ifndef _GNU_SOURCE -+#define _GNU_SOURCE 1 -+#endif -+ - #include <errno.h> - #include <limits.h> - #include <stdio.h> -@@ -32,6 +36,7 @@ - #include <time.h> - #include <unistd.h> - #include <sys/types.h> -+#include <dlfcn.h> - - #ifdef HAVE_PWD_H - #include <pwd.h> -@@ -64,6 +69,10 @@ - - #include "util.h" - -+#if defined(HAVE_DLADDR) && defined(PA_GCC_WEAKREF) -+static int _main() PA_GCC_WEAKREF(main); -+#endif -+ - char *pa_get_user_name(char *s, size_t l) { - const char *p; - char *name = NULL; -@@ -205,6 +214,21 @@ char *pa_get_binary_name(char *s, size_t - } - } - #endif -+ -+#if defined(HAVE_DLADDR) && defined(PA_GCC_WEAKREF) -+ { -+ Dl_info info; -+ if(_main) { -+ int err = dladdr(&_main, &info); -+ if (err != 0) { -+ char *p = pa_realpath(info.dli_fname); -+ if (p) { -+ return p; -+ } -+ } -+ } -+ } -+#endif - - #if defined(HAVE_SYS_PRCTL_H) && defined(PR_GET_NAME) - { diff --git a/debian/patches/zsh-completion-Fix-completion-for-default-sink-sourc.patch b/debian/patches/zsh-completion-Fix-completion-for-default-sink-sourc.patch deleted file mode 100644 index f7bea83..0000000 --- a/debian/patches/zsh-completion-Fix-completion-for-default-sink-sourc.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 3be8382fcdfdebeb3bf154631e94b3ccd5ca4576 Mon Sep 17 00:00:00 2001 -From: Felipe Sateler <[email protected]> -Date: Wed, 2 Jul 2014 11:32:38 -0400 -Subject: [PATCH] zsh-completion: Fix completion for default sink/source - ---- - shell-completion/pulseaudio-zsh-completion.zsh | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/shell-completion/pulseaudio-zsh-completion.zsh -+++ b/shell-completion/pulseaudio-zsh-completion.zsh -@@ -274,8 +274,8 @@ _pactl_completion() { - 'suspend-sink: suspend or resume a sink' - 'suspend-source: suspend or resume a source' - 'set-card-profile: set a card profile:cards:_cards' -- 'set-sink-default: set the default sink' -- 'set-source-default: set the default source' -+ 'set-default-sink: set the default sink' -+ 'set-default-source: set the default source' - 'set-sink-port: set the sink port of a sink' - 'set-source-port: set the source port of a source' - 'set-port-latency-offset: set a latency offset on a port' -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-pulseaudio/pulseaudio.git _______________________________________________ pkg-pulseaudio-devel mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-pulseaudio-devel

