Hi Paul,
On Wed, 2011-02-23 at 01:07 +0530, Arun Raghavan wrote:
[...]
> The correct fix for this, imo, is in bluez (there is a new
> sbc_primitives_armv6.h that can probably be used at least as a
> template). We need to do an sbc-udpate on the PA side anyway, and can
> pull this when we do.
Could you see if the attached patch works for you? If it does, I can
push this to the bluez folks.
Cheers,
Arun
diff --git a/src/modules/bluetooth/sbc/sbc_math.h b/src/modules/bluetooth/sbc/sbc_math.h
index b87bc81..35d5dcc 100644
--- a/src/modules/bluetooth/sbc/sbc_math.h
+++ b/src/modules/bluetooth/sbc/sbc_math.h
@@ -23,6 +23,8 @@
*
*/
+#include "sbc_primitives_armv6.h"
+
#define fabs(x) ((x) < 0 ? -(x) : (x))
/* C does not provide an explicit arithmetic shift right but this will
always be correct and every compiler *should* generate optimal code */
@@ -47,7 +49,7 @@ typedef int32_t sbc_fixed_t;
#define SBC_FIXED_0(val) { val = 0; }
#define MUL(a, b) ((a) * (b))
-#ifdef __arm__
+#ifdef SBC_HAVE_THUMB2
#define MULA(a, b, res) ({ \
int tmp = res; \
__asm__( \
diff --git a/src/modules/bluetooth/sbc/sbc_primitives_armv6.h b/src/modules/bluetooth/sbc/sbc_primitives_armv6.h
index 1862aed..e70469a 100644
--- a/src/modules/bluetooth/sbc/sbc_primitives_armv6.h
+++ b/src/modules/bluetooth/sbc/sbc_primitives_armv6.h
@@ -38,6 +38,12 @@
#define SBC_HAVE_ARMV6 1
#endif
+#if defined(__ARM_ARCH_6T2__ ) || defined(__ARM_ARCH_7__) || \
+ defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__) || \
+ defined(__ARM_ARCH_7M__)
+#define SBC_HAVE_THUMB2 1
+#endif
+
#if !defined(SBC_HIGH_PRECISION) && (SCALE_OUT_BITS == 15) && \
defined(__GNUC__) && defined(SBC_HAVE_ARMV6) && \
defined(__ARM_EABI__) && !defined(__thumb__) && \
_______________________________________________
pulseaudio-discuss mailing list
[email protected]
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss