summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/pulseaudio/pulseaudio-0.9.22/armv4+v5asm.patch
blob: 4ce5a48a07980367f8d99cce6b808b4b9cefa75e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Derived from OE by Dongxiao Xu <dongxiao.xu@intel.com>

Upstream-Status: Inappropriate [embedded specific]

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__(				\