[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, stable-queue, updated. v0.9.22-2-gbd769fa
Colin Guthrie
gitmailer-noreply at 0pointer.de
Thu Dec 2 06:48:32 PST 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 stable-queue branch has been updated
from 70f69ac519981d50d1242a0eefb703dcef5615ab (commit)
- Log -----------------------------------------------------------------
bd769fa rescue-streams: Fix segfault in some conditions
f6574c8 volume: Add explicit checks for ARMv6 instructions
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 33 ++++++++++++++++++++++++++++++++-
src/modules/module-rescue-streams.c | 2 +-
src/pulsecore/svolume_arm.c | 8 ++++----
3 files changed, 37 insertions(+), 6 deletions(-)
-----------------------------------------------------------------------
commit f6574c8c225859ba2b2ddefd7593d4aac97b0c05
Author: Arun Raghavan <arun.raghavan at collabora.co.uk>
Date: Fri Nov 26 11:55:57 2010 +0530
volume: Add explicit checks for ARMv6 instructions
This ensures that the build does not fail if the ssat and pkhbt
instructions are not available (armv5te and below).
Fixes: http://www.pulseaudio.org/ticket/790
diff --git a/configure.ac b/configure.ac
index dea8bb9..2c233c8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -240,7 +240,7 @@ else
[pulseaudio_cv_support_arm_atomic_ops=no])
])
AS_IF([test "$pulseaudio_cv_support_arm_atomic_ops" = "yes"], [
- AC_DEFINE([ATOMIC_ARM_INLINE_ASM], 1, [Have ARMv6 instructions.])
+ AC_DEFINE([ATOMIC_ARM_INLINE_ASM], 1, [Have ARM atomic instructions.])
need_libatomic_ops=no
])
fi
@@ -257,6 +257,37 @@ else
esac
fi
+# If we're on ARM, check for the ARMV6 instructions we need */
+case $host in
+ arm*)
+ AC_CACHE_CHECK([support for required armv6 instructions],
+ pulseaudio_cv_support_armv6,
+ [AC_COMPILE_IFELSE(
+ AC_LANG_PROGRAM([],
+ [[volatile int a = -60000, b = 0xaaaabbbb, c = 0xccccdddd;
+ asm volatile ("ldr r0, %2 \n"
+ "ldr r2, %3 \n"
+ "ldr r3, %4 \n"
+ "ssat r1, #8, r0 \n"
+ "str r1, %0 \n"
+ "pkhbt r1, r3, r2, LSL #8 \n"
+ "str r1, %1 \n"
+ : "=m" (a), "=m" (b)
+ : "m" (a), "m" (b), "m" (c)
+ : "r0", "r1", "r2", "r3", "cc");
+ return (a == -128 && b == 0xaabbdddd) ? 0 : -1;
+ ]]),
+ [pulseaudio_cv_support_armv6=yes],
+ [pulseaudio_cv_support_armv6=no])
+ ])
+ AS_IF([test "$pulseaudio_cv_support_armv6" = "yes"], [
+ AC_DEFINE([HAVE_ARMV6], 1, [Have ARMv6 instructions.])
+ ])
+ ;;
+ *)
+ ;;
+esac
+
CC_CHECK_TLS
AC_CACHE_CHECK([whether $CC knows _Bool],
diff --git a/src/pulsecore/svolume_arm.c b/src/pulsecore/svolume_arm.c
index fdd8f09..3973e51 100644
--- a/src/pulsecore/svolume_arm.c
+++ b/src/pulsecore/svolume_arm.c
@@ -35,7 +35,7 @@
#include "sample-util.h"
#include "endianmacros.h"
-#if defined (__arm__)
+#if defined (__arm__) && defined (HAVE_ARMV6)
#define MOD_INC() \
" subs r0, r6, %2 \n\t" \
@@ -182,11 +182,11 @@ static void run_test (void) {
}
#endif
-#endif /* defined (__arm__) */
+#endif /* defined (__arm__) && defined (HAVE_ARMV6) */
void pa_volume_func_init_arm (pa_cpu_arm_flag_t flags) {
-#if defined (__arm__)
+#if defined (__arm__) && defined (HAVE_ARMV6)
pa_log_info("Initialising ARM optimized functions.");
#ifdef RUN_TEST
@@ -194,5 +194,5 @@ void pa_volume_func_init_arm (pa_cpu_arm_flag_t flags) {
#endif
pa_set_volume_func (PA_SAMPLE_S16NE, (pa_do_volume_func_t) pa_volume_s16ne_arm);
-#endif /* defined (__arm__) */
+#endif /* defined (__arm__) && defined (HAVE_ARMV6) */
}
commit bd769fa98a51cbdc1fe4db7e19a0af5f19e44ac1
Author: Arun Raghavan <arun.raghavan at collabora.co.uk>
Date: Thu Dec 2 16:30:59 2010 +0530
rescue-streams: Fix segfault in some conditions
There is a call to this function where 'skip' variable is NULL. Looks
like this code doesn't get hit very often, probably because a suitable
default sink can be found to move the stream to. However, if we can't
move to the default sink and skip is NULL, there will be a segfault.
diff --git a/src/modules/module-rescue-streams.c b/src/modules/module-rescue-streams.c
index 722d84b..2fcd21f 100644
--- a/src/modules/module-rescue-streams.c
+++ b/src/modules/module-rescue-streams.c
@@ -159,7 +159,7 @@ static pa_source* find_evacuation_source(pa_core *c, pa_source_output *o, pa_sou
if (target == skip)
continue;
- if (!target->monitor_of != !skip->monitor_of)
+ if (skip && !target->monitor_of != !skip->monitor_of)
continue;
if (!PA_SOURCE_IS_LINKED(pa_source_get_state(target)))
--
hooks/post-receive
PulseAudio Sound Server
More information about the pulseaudio-commits
mailing list