Hi,

On Fri, Mar 25, 2011 at 1:34 PM, Paul Menzel
<paulepan...@users.sourceforge.net> wrote:
> Dear Arun,
>
>
> Am Samstag, den 19.03.2011, 16:14 +0530 schrieb Arun Raghavan:
>
>> 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.
>
> My tag on the other thread [1] is ambiguous. The error is indeed caused
> by your patch. I will try to implement your recommended changes but will
> probably not get to it before Sunday.

Im including Siarhei Siamashka since he did most, if not all, of this
code and linux-bluetooth to cc.

Btw, the sbc subdir should be in sync with sbc subdir in BlueZ tree.


-- 
Luiz Augusto von Dentz
Computer Engineer
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
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss

Reply via email to