pulseaudio: made 0.9.21 compile for armv4 and armv5 too
authorFrans Meulenbroeks <fransmeulenbroeks@gmail.com>
Thu, 9 Sep 2010 19:08:12 +0000 (21:08 +0200)
committerFrans Meulenbroeks <fransmeulenbroeks@gmail.com>
Thu, 9 Sep 2010 19:10:00 +0000 (21:10 +0200)
there was some armv6 asm in here.
Fortunately the function with much inline asm was only
called for armv6 or higher so this is ifdef'd out for all
armv4 and armv5 variants.
Also there was a single instruction but the code also had a C
alternative so again only some defines were needed

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
recipes/pulseaudio/pulseaudio-0.9.21/armv4+v5asm.patch [new file with mode: 0644]
recipes/pulseaudio/pulseaudio.inc
recipes/pulseaudio/pulseaudio_0.9.21.bb

diff --git a/recipes/pulseaudio/pulseaudio-0.9.21/armv4+v5asm.patch b/recipes/pulseaudio/pulseaudio-0.9.21/armv4+v5asm.patch
new file mode 100644 (file)
index 0000000..b5ecae9
--- /dev/null
@@ -0,0 +1,57 @@
+Index: pulseaudio-0.9.21/src/pulsecore/svolume_arm.c
+===================================================================
+--- pulseaudio-0.9.21.orig/src/pulsecore/svolume_arm.c
++++ pulseaudio-0.9.21/src/pulsecore/svolume_arm.c
+@@ -37,6 +37,14 @@
+ #if defined (__arm__)
++/*
++   the code below uses armv6 instructions; we can safely ifdef this away as the code is only
++   called if the arm architecture is v6 or higher
++*/
++#if (!defined (__ARM_ARCH_4__) && !defined (__ARM_ARCH_4T__) \
++      && !defined (__ARM_ARCH_5__)&& !defined (__ARM_ARCH_5E__) && !defined (__ARM_ARCH_5T__) \
++      && !defined (__ARM_ARCH_5TE__) && !defined (__ARM_ARCH_5TEJ__))
++
+ #define MOD_INC() \
+     " subs  r0, r6, %2              \n\t" \
+     " addcs r0, %1                  \n\t" \
+@@ -179,11 +187,15 @@ static void run_test (void) {
+ }
+ #endif
++#endif /* (!defined (__ARM_ARCH_4__) && !defined (__ARM_ARCH_4T__) ... */
+ #endif /* defined (__arm__) */
+ void pa_volume_func_init_arm (pa_cpu_arm_flag_t flags) {
+ #if defined (__arm__)
++#if (!defined (__ARM_ARCH_4__) && !defined (__ARM_ARCH_4T__) \
++      && !defined (__ARM_ARCH_5__)&& !defined (__ARM_ARCH_5E__) && !defined (__ARM_ARCH_5T__) \
++      && !defined (__ARM_ARCH_5TE__) && !defined (__ARM_ARCH_5TEJ__))
+     pa_log_info("Initialising ARM optimized functions.");
+ #ifdef RUN_TEST
+@@ -191,5 +203,6 @@ void pa_volume_func_init_arm (pa_cpu_arm
+ #endif
+     pa_set_volume_func (PA_SAMPLE_S16NE,     (pa_do_volume_func_t) pa_volume_s16ne_arm);
++#endif /* (!defined (__ARM_ARCH_4__) && !defined (__ARM_ARCH_4T__) ... */
+ #endif /* defined (__arm__) */
+ }
+Index: pulseaudio-0.9.21/src/modules/bluetooth/sbc_math.h
+===================================================================
+--- pulseaudio-0.9.21.orig/src/modules/bluetooth/sbc_math.h
++++ pulseaudio-0.9.21/src/modules/bluetooth/sbc_math.h
+@@ -47,7 +47,9 @@ typedef int32_t sbc_fixed_t;
+ #define SBC_FIXED_0(val) { val = 0; }
+ #define MUL(a, b)        ((a) * (b))
+-#ifdef __arm__
++#if (defined(__arm__) && !defined (__ARM_ARCH_4__) && !defined (__ARM_ARCH_4T__) \
++      && !defined (__ARM_ARCH_5__)&& !defined (__ARM_ARCH_5E__) && !defined (__ARM_ARCH_5T__) \
++      && !defined (__ARM_ARCH_5TE__) && !defined (__ARM_ARCH_5TEJ__))
+ #define MULA(a, b, res) ({                            \
+               int tmp = res;                  \
+               __asm__(                                \
index a733038..138c0b6 100644 (file)
@@ -6,7 +6,7 @@ LICENSE = "LGPL"
 DEPENDS = "bluez4 libatomics-ops liboil avahi libsamplerate0 libsndfile1 libtool hal virtual/libx11"
 # optional
 DEPENDS += "alsa-lib glib-2.0 dbus consolekit hal openssl"
-INC_PR = "r10"
+INC_PR = "r0"
 
 SRC_URI = "http://0pointer.de/lennart/projects/pulseaudio/pulseaudio-${PV}.tar.gz \
            file://gcc4-compile-fix.patch \
index 8be0ea2..4fcd189 100644 (file)
@@ -1,5 +1,7 @@
 require pulseaudio.inc
 
+PR = ${INC_PR}.1
+
 DEPENDS += "gdbm speex"
 
 DEFAULT_PREFERENCE_om-gta01 = "-1"
@@ -13,6 +15,7 @@ SRC_URI += "\
   file://autoconf_version.patch \
   file://tls_m4.patch \
   file://configure_silent_rules.patch \
+  file://armv4+v5asm.patch \
 "
 
 do_compile_prepend() {