Re: [pulseaudio-discuss] [PATCH] sbc_math.h: add explicit check for ARMv6 instructions

2011-04-11 Thread Siarhei Siamashka
On Mon, Mar 28, 2011 at 6:41 PM, Luiz Augusto von Dentz
luiz.de...@gmail.com wrote:
 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.

-#ifdef __arm__
+#ifdef SBC_HAVE_THUMB2

I think this check can be just changed to
#if defined(__arm__)  (!defined(__thumb__) || defined(__thumb2__))

MLA instruction is available on all ARM processors at least since
armv4, unless compiling code for thumb1. A similar modification can be
also added to armv6 sbc encoder optimizations. Right now armv6
assembly optimizations are disabled for both thumb1 and thumb2, while
they could be still used with thumb2.

-- 
Best regards,
Siarhei Siamashka
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH] sbc_math.h: add explicit check for ARMv6 instructions

2011-03-30 Thread Luiz Augusto von Dentz
Hi Colin,

On Tue, Mar 29, 2011 at 1:21 PM, Colin Guthrie gm...@colin.guthr.ie wrote:
 'Twas brillig, and Paul Menzel at 29/03/11 00:00 did gyre and gimble:
         commit b676f89d8579c7ec1629892342a330f1e4c35657
         Author: Colin Guthrie cguth...@mandriva.org
         Date:   Sun Mar 20 11:44:53 2011 +

             bluetooth: Run 'make update-sbc'

             Note that changes to ipc.h from 8f3ef04b had to be manually 
 reapplied.


 I ran this after checking with Luiz first.

 I've asked that the local changes to our ipc.h were pushed upstream
 after doing so to but not sure of the status of that, Luiz, I think I
 included a specific patch in the last mail... let me know if you want it
 again :)

I think it is better to add the a2dp-codecs.h header present on BlueZ
to PA too and remove the definitions Ive added to ipc.h, this should
make it easier to sync things. I just need some free time to make this
happen :D

-- 
Luiz Augusto von Dentz
Computer Engineer
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH] sbc_math.h: add explicit check for ARMv6 instructions

2011-03-30 Thread Arun Raghavan
[stripping linux-bluetooth from to-list since this is PA-specific]

On Wed, 2011-03-30 at 20:42 +0300, Luiz Augusto von Dentz wrote:
 Hi Colin,
 
 On Tue, Mar 29, 2011 at 1:21 PM, Colin Guthrie gm...@colin.guthr.ie wrote:
  'Twas brillig, and Paul Menzel at 29/03/11 00:00 did gyre and gimble:
  commit b676f89d8579c7ec1629892342a330f1e4c35657
  Author: Colin Guthrie cguth...@mandriva.org
  Date:   Sun Mar 20 11:44:53 2011 +
 
  bluetooth: Run 'make update-sbc'
 
  Note that changes to ipc.h from 8f3ef04b had to be manually 
  reapplied.
 
 
  I ran this after checking with Luiz first.
 
  I've asked that the local changes to our ipc.h were pushed upstream
  after doing so to but not sure of the status of that, Luiz, I think I
  included a specific patch in the last mail... let me know if you want it
  again :)
 
 I think it is better to add the a2dp-codecs.h header present on BlueZ
 to PA too and remove the definitions Ive added to ipc.h, this should
 make it easier to sync things. I just need some free time to make this
 happen :D

I needed to do this before pushing out MP3 support in a while anyway, so
sent a patch. I notice there's a bunch of similar defines for sample
rate etc. in ipc.h and a2dp-codecs.h, so maybe something that could be
consolidated upstream to prevent confusion.

Cheers,
Arun

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH] sbc_math.h: add explicit check for ARMv6 instructions

2011-03-29 Thread Colin Guthrie
'Twas brillig, and Paul Menzel at 29/03/11 00:00 did gyre and gimble:
 commit b676f89d8579c7ec1629892342a330f1e4c35657
 Author: Colin Guthrie cguth...@mandriva.org
 Date:   Sun Mar 20 11:44:53 2011 +
 
 bluetooth: Run 'make update-sbc'
 
 Note that changes to ipc.h from 8f3ef04b had to be manually 
 reapplied.
 

I ran this after checking with Luiz first.

I've asked that the local changes to our ipc.h were pushed upstream
after doing so to but not sure of the status of that, Luiz, I think I
included a specific patch in the last mail... let me know if you want it
again :)

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH] sbc_math.h: add explicit check for ARMv6 instructions

2011-03-28 Thread Luiz Augusto von Dentz
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


Re: [pulseaudio-discuss] [PATCH] sbc_math.h: add explicit check for ARMv6 instructions

2011-03-28 Thread Paul Menzel
Dear BlueZ folks,


Am Montag, den 28.03.2011, 18:41 +0300 schrieb Luiz Augusto von Dentz:

 On Fri, Mar 25, 2011 at 1:34 PM, Paul Menzel wrote:

  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.

to fix [1] I tried to add `#include sbc_tables.h` to
`src/modules/bluetooth/sbc/sbc_primitives.h`

diff --git a/src/modules/bluetooth/sbc/sbc_primitives.h 
b/src/modules/bluetooth/
index 3fec8d5..9544826 100644
--- a/src/modules/bluetooth/sbc/sbc_primitives.h
+++ b/src/modules/bluetooth/sbc/sbc_primitives.h
@@ -24,6 +24,8 @@
  *
  */
 
+#include sbc_tables.h
+
 #ifndef __SBC_PRIMITIVES_H
 #define __SBC_PRIMITIVES_H

But this seems to result in a need for `sbc_math.h` which leads to a
circular inclusion.

[…]
In file included from modules/bluetooth/sbc/sbc_primitives.h:27:0,
 from modules/bluetooth/sbc/sbc_primitives_armv6.h:30,
 from modules/bluetooth/sbc/sbc_math.h:27,
 from modules/bluetooth/sbc/sbc.c:46:
modules/bluetooth/sbc/sbc_tables.h:50:2: warning: implicit declaration 
of function 'ASR' [-Wimplicit-function-declaration]
modules/bluetooth/sbc/sbc_tables.h:50:2: error: 'SCALE_SPROTO4_TBL' 
undeclared here (not in a function)
modules/bluetooth/sbc/sbc_tables.h:58:2: error: initializer element is 
not constant
modules/bluetooth/sbc/sbc_tables.h:58:2: error: (near initialization 
for 'sbc_proto_4_40m1[0]')
modules/bluetooth/sbc/sbc_tables.h:58:2: error: initializer element is 
not constant
modules/bluetooth/sbc/sbc_tables.h:58:2: error: (near initialization 
for 'sbc_proto_4_40m1[1]')
modules/bluetooth/sbc/sbc_tables.h:58:2: error: initializer element is 
not constant
modules/bluetooth/sbc/sbc_tables.h:58:2: error: (near initialization 
for 'sbc_proto_4_40m1[2]')
modules/bluetooth/sbc/sbc_tables.h:58:2: error: initializer element is 
not constant
modules/bluetooth/sbc/sbc_tables.h:58:2: error: (near initialization 
for 'sbc_proto_4_40m1[3]')
modules/bluetooth/sbc/sbc_tables.h:59:2: error: initializer element is 
not constant
modules/bluetooth/sbc/sbc_tables.h:59:2: error: (near initialization 
for 'sbc_proto_4_40m1[4]')
modules/bluetooth/sbc/sbc_tables.h:59:2: error: initializer element is 
not constant
modules/bluetooth/sbc/sbc_tables.h:59:2: error: (near initialization 
for 'sbc_proto_4_40m1[5]')
modules/bluetooth/sbc/sbc_tables.h:59:2: error: initializer element is 
not constant
modules/bluetooth/sbc/sbc_tables.h:59:2: error: (near initialization 
for 'sbc_proto_4_40m1[6]')
modules/bluetooth/sbc/sbc_tables.h:59:2: error: initializer element is 
not constant
modules/bluetooth/sbc/sbc_tables.h:59:2: error: (near initialization 
for 'sbc_proto_4_40m1[7]')
modules/bluetooth/sbc/sbc_tables.h:60:2: error: initializer element is 
not constant
modules/bluetooth/sbc/sbc_tables.h:60:2: error: (near initialization 
for 'sbc_proto_4_40m1[8]')
modules/bluetooth/sbc/sbc_tables.h:60:2: error: initializer element is 
not constant
modules/bluetooth/sbc/sbc_tables.h:60:2: error: (near initialization 
for 'sbc_proto_4_40m1[9]')
modules/bluetooth/sbc/sbc_tables.h:60:2: error: initializer element is 
not constant
modules/bluetooth/sbc/sbc_tables.h:60:2: error: (near initialization 
for 'sbc_proto_4_40m1[10]')
modules/bluetooth/sbc/sbc_tables.h:60:2: error: initializer element is 
not constant
modules/bluetooth/sbc/sbc_tables.h:60:2: error: (near initialization 
for 'sbc_proto_4_40m1[11]')
modules/bluetooth/sbc/sbc_tables.h:61:2: error: initializer element is 
not constant
modules/bluetooth/sbc/sbc_tables.h:61:2: error: (near initialization 
for 'sbc_proto_4_40m1[12]')
modules/bluetooth/sbc/sbc_tables.h:61:2: error: initializer element is 
not constant
modules/bluetooth/sbc/sbc_tables.h:61:2: error: (near initialization 
for 'sbc_proto_4_40m1[13]')
modules/bluetooth/sbc/sbc_tables.h:61:2: error: initializer element is 
not constant
modules/bluetooth/sbc/sbc_tables.h:61:2: error: (near 

Re: [pulseaudio-discuss] [PATCH] sbc_math.h: add explicit check for ARMv6 instructions

2011-03-25 Thread Paul Menzel
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.


Thanks,

Paul
 

[1] 
https://tango.0pointer.de/pipermail/pulseaudio-discuss/2011-March/009594.html


signature.asc
Description: This is a digitally signed message part
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH] sbc_math.h: add explicit check for ARMv6 instructions

2011-03-19 Thread Arun Raghavan
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
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH] sbc_math.h: add explicit check for ARMv6 instructions

2011-02-22 Thread Colin Guthrie
'Twas brillig, and Arun Raghavan at 21/02/11 20:31 did gyre and gimble:
 On Sun, 2011-02-20 at 19:20 +0100, Paul Menzel wrote:
 Date: Sun, 20 Feb 2011 15:57:55 +0100

 Building PulseAudio 051d8213 [1] using OpenEmbedded with distribution 
 `minimal-uclibc` for `MACHINE=om-gta01` having an ARMv4T architecture 
 (armv4t-oe-linux-uclibceabi) compilation fails with the following error.
 [...]
  {standard input}:4099: Error: selected processor does not support Thumb 
 mode `mla r3,r2,r6,r3'
  {standard input}:4114: Error: selected processor does not support Thumb 
 mode `mla r3,r2,ip,r3'
  {standard input}:4125: Error: selected processor does not support Thumb 
 mode `mla r3,r6,r2,r3'
  make[3]: *** [libbluetooth_sbc_la-sbc.lo] Error 1

 Apply the same fix as in [2], which is similar to the patch applied in 
 OpenEmbedded since commit 976ab4b5 [3].

 [1] 
 http://git.0pointer.de/?p=pulseaudio.git;a=commit;h=051d82133f0ae6a57bf66fd200bc8e3591a7d5ca
 [2] 
 http://git.0pointer.de/?p=pulseaudio.git;a=commit;h=12b900858ae82d435c100d6eb94cb7bb22fe5e29
 [3] 
 http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=976ab4b4587d548c0483a274058c5359cb72bf1b

 Signed-off-by: Paul Menzel paulepan...@users.sourceforge.net
 CC: Marcel Holtmann mar...@holtmann.org
 ---
 I do not know if these files are just copied from linux-bluetooth upstream, 
 so I am adding Marcel to CC anyway because he is mentioned in the copyright 
 section.
 
 It does appear that the files are a copy of the bluez package. If we're
 fixing this on the PulseAudio side, I think we should include something
 like diff below configure.ac, so that we can actually verify that the
 mla instruction is available for the arch being used.
 
 -- Arun
 
 
 diff --git a/configure.ac b/configure.ac
 index 08c947a..77e9823 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -257,13 +257,14 @@ case $host in
   asm volatile (ldr r0, %2 \n
 ldr r2, %3 \n
 ldr r3, %4 \n
 +   mla r4, r1, r2, r3 \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);
 +   : r0, r1, r2, r3, r4, cc);
   return (a == -128  b == 0xaabb) ? 0 : -1;
 ]]),
   [pulseaudio_cv_support_armv6=yes],

Paul, can you confirm if this avoids the problem for you? If so, then
Arun, can you make a proper patch? You can? Awesome, thanks :)

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH] sbc_math.h: add explicit check for ARMv6 instructions

2011-02-22 Thread Arun Raghavan
On Tue, 2011-02-22 at 09:48 +, Colin Guthrie wrote:
 'Twas brillig, and Arun Raghavan at 21/02/11 20:31 did gyre and gimble:
  On Sun, 2011-02-20 at 19:20 +0100, Paul Menzel wrote:
  Date: Sun, 20 Feb 2011 15:57:55 +0100
 
  Building PulseAudio 051d8213 [1] using OpenEmbedded with distribution 
  `minimal-uclibc` for `MACHINE=om-gta01` having an ARMv4T architecture 
  (armv4t-oe-linux-uclibceabi) compilation fails with the following error.
  [...]
 {standard input}:4099: Error: selected processor does not support Thumb 
  mode `mla r3,r2,r6,r3'
 {standard input}:4114: Error: selected processor does not support Thumb 
  mode `mla r3,r2,ip,r3'
 {standard input}:4125: Error: selected processor does not support Thumb 
  mode `mla r3,r6,r2,r3'
 make[3]: *** [libbluetooth_sbc_la-sbc.lo] Error 1
 
  Apply the same fix as in [2], which is similar to the patch applied in 
  OpenEmbedded since commit 976ab4b5 [3].
 
  [1] 
  http://git.0pointer.de/?p=pulseaudio.git;a=commit;h=051d82133f0ae6a57bf66fd200bc8e3591a7d5ca
  [2] 
  http://git.0pointer.de/?p=pulseaudio.git;a=commit;h=12b900858ae82d435c100d6eb94cb7bb22fe5e29
  [3] 
  http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=976ab4b4587d548c0483a274058c5359cb72bf1b
 
  Signed-off-by: Paul Menzel paulepan...@users.sourceforge.net
  CC: Marcel Holtmann mar...@holtmann.org
  ---
  I do not know if these files are just copied from linux-bluetooth 
  upstream, so I am adding Marcel to CC anyway because he is mentioned in 
  the copyright section.

Looking at src/Makefile.am, it looks like at some point of time, we
pulled bluez files directly from git (the update-sbc rule). Does anyone
know what the plan was with regards to keeping these files up-to-date?
There seem to be a bunch of armv6 updates upstream as well.

[...]
 Paul, can you confirm if this avoids the problem for you? If so, then
 Arun, can you make a proper patch? You can? Awesome, thanks :)

:D Once we've resolved what the situation is with bluez files, I'm happy
to help with this.

Cheers,
Arun

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH] sbc_math.h: add explicit check for ARMv6 instructions

2011-02-22 Thread Colin Guthrie
'Twas brillig, and Arun Raghavan at 22/02/11 10:29 did gyre and gimble:
 Looking at src/Makefile.am, it looks like at some point of time, we
 pulled bluez files directly from git (the update-sbc rule). Does anyone
 know what the plan was with regards to keeping these files up-to-date?
 There seem to be a bunch of armv6 updates upstream as well.

Oh yeah I remember seeing those rules. No idea. You'll have to ask
Lennart I guess. Perhaps when we've strapped him into the chair on Thursday?

  Paul, can you confirm if this avoids the problem for you? If so, then
  Arun, can you make a proper patch? You can? Awesome, thanks :)
 :D Once we've resolved what the situation is with bluez files, I'm happy
 to help with this.

Coolio.

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH] sbc_math.h: add explicit check for ARMv6 instructions

2011-02-22 Thread Paul Menzel
Am Dienstag, den 22.02.2011, 09:48 + schrieb Colin Guthrie:
 'Twas brillig, and Arun Raghavan at 21/02/11 20:31 did gyre and gimble:
  On Sun, 2011-02-20 at 19:20 +0100, Paul Menzel wrote:
  Date: Sun, 20 Feb 2011 15:57:55 +0100
 
  Building PulseAudio 051d8213 [1] using OpenEmbedded with distribution 
  `minimal-uclibc` for `MACHINE=om-gta01` having an ARMv4T architecture 
  (armv4t-oe-linux-uclibceabi) compilation fails with the following error.
  [...]
 {standard input}:4099: Error: selected processor does not support Thumb 
  mode `mla r3,r2,r6,r3'
 {standard input}:4114: Error: selected processor does not support Thumb 
  mode `mla r3,r2,ip,r3'
 {standard input}:4125: Error: selected processor does not support Thumb 
  mode `mla r3,r6,r2,r3'
 make[3]: *** [libbluetooth_sbc_la-sbc.lo] Error 1
 
  Apply the same fix as in [2], which is similar to the patch applied in 
  OpenEmbedded since commit 976ab4b5 [3].
 
  [1] 
  http://git.0pointer.de/?p=pulseaudio.git;a=commit;h=051d82133f0ae6a57bf66fd200bc8e3591a7d5ca
  [2] 
  http://git.0pointer.de/?p=pulseaudio.git;a=commit;h=12b900858ae82d435c100d6eb94cb7bb22fe5e29
  [3] 
  http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=976ab4b4587d548c0483a274058c5359cb72bf1b
 
  Signed-off-by: Paul Menzel paulepan...@users.sourceforge.net
  CC: Marcel Holtmann mar...@holtmann.org
  ---
  I do not know if these files are just copied from linux-bluetooth 
  upstream, so I am adding Marcel to CC anyway because he is mentioned in 
  the copyright section.
  
  It does appear that the files are a copy of the bluez package. If we're
  fixing this on the PulseAudio side, I think we should include something
  like diff below configure.ac, so that we can actually verify that the
  mla instruction is available for the arch being used.
  
  -- Arun
  
  
  diff --git a/configure.ac b/configure.ac
  index 08c947a..77e9823 100644
  --- a/configure.ac
  +++ b/configure.ac
  @@ -257,13 +257,14 @@ case $host in
asm volatile (ldr r0, %2 \n
  ldr r2, %3 \n
  ldr r3, %4 \n
  +   mla r4, r1, r2, r3 \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);
  +   : r0, r1, r2, r3, r4, cc);
return (a == -128  b == 0xaabb) ? 0 : -1;
  ]]),
[pulseaudio_cv_support_armv6=yes],
 
 Paul, can you confirm if this avoids the problem for you? If so, then
 Arun, can you make a proper patch? You can? Awesome, thanks :)

Does not Arun’s patch just improve the check for `HAVE_ARMV6`? My patch
just adds the check `if defined(HAVE_ARMV6)` to `sbc_math.h`. Without
that addition all the configure checks are not evaluated at all in
`sbc_math.h`.


Thanks,

Paul


signature.asc
Description: This is a digitally signed message part
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH] sbc_math.h: add explicit check for ARMv6 instructions

2011-02-22 Thread Arun Raghavan
Hi Paul,

On Tue, 2011-02-22 at 12:33 +0100, Paul Menzel wrote:
 Am Dienstag, den 22.02.2011, 09:48 + schrieb Colin Guthrie:
  'Twas brillig, and Arun Raghavan at 21/02/11 20:31 did gyre and gimble:
   On Sun, 2011-02-20 at 19:20 +0100, Paul Menzel wrote:
   Date: Sun, 20 Feb 2011 15:57:55 +0100
  
   Building PulseAudio 051d8213 [1] using OpenEmbedded with distribution 
   `minimal-uclibc` for `MACHINE=om-gta01` having an ARMv4T architecture 
   (armv4t-oe-linux-uclibceabi) compilation fails with the following error.
   [...]
{standard input}:4099: Error: selected processor does not support Thumb 
   mode `mla r3,r2,r6,r3'
{standard input}:4114: Error: selected processor does not support Thumb 
   mode `mla r3,r2,ip,r3'
{standard input}:4125: Error: selected processor does not support Thumb 
   mode `mla r3,r6,r2,r3'
make[3]: *** [libbluetooth_sbc_la-sbc.lo] Error 1
  
   Apply the same fix as in [2], which is similar to the patch applied in 
   OpenEmbedded since commit 976ab4b5 [3].
  
   [1] 
   http://git.0pointer.de/?p=pulseaudio.git;a=commit;h=051d82133f0ae6a57bf66fd200bc8e3591a7d5ca
   [2] 
   http://git.0pointer.de/?p=pulseaudio.git;a=commit;h=12b900858ae82d435c100d6eb94cb7bb22fe5e29
   [3] 
   http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=976ab4b4587d548c0483a274058c5359cb72bf1b
  
   Signed-off-by: Paul Menzel paulepan...@users.sourceforge.net
   CC: Marcel Holtmann mar...@holtmann.org
   ---
   I do not know if these files are just copied from linux-bluetooth 
   upstream, so I am adding Marcel to CC anyway because he is mentioned in 
   the copyright section.
   
   It does appear that the files are a copy of the bluez package. If we're
   fixing this on the PulseAudio side, I think we should include something
   like diff below configure.ac, so that we can actually verify that the
   mla instruction is available for the arch being used.
   
   -- Arun
   
   
   diff --git a/configure.ac b/configure.ac
   index 08c947a..77e9823 100644
   --- a/configure.ac
   +++ b/configure.ac
   @@ -257,13 +257,14 @@ case $host in
 asm volatile (ldr r0, %2 \n
   ldr r2, %3 \n
   ldr r3, %4 \n
   +   mla r4, r1, r2, r3 \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);
   +   : r0, r1, r2, r3, r4, cc);
 return (a == -128  b == 0xaabb) ? 0 : -1;
   ]]),
 [pulseaudio_cv_support_armv6=yes],
  
  Paul, can you confirm if this avoids the problem for you? If so, then
  Arun, can you make a proper patch? You can? Awesome, thanks :)
 
 Does not Arun’s patch just improve the check for `HAVE_ARMV6`? My patch
 just adds the check `if defined(HAVE_ARMV6)` to `sbc_math.h`. Without
 that addition all the configure checks are not evaluated at all in
 `sbc_math.h`.

For bits other than bluez, we need ARMv6 or above. For the MLA
instruction that's triggering the error you see, we need a version of
ARMv6 or above that also supports Thumb2 [1].

So your patch is incorrect in that it will fail on (e.g.) ARMv6K. My
patch above, on the other hand, will make PA not use v6 asm on ARMv6K
even if bluez support is disabled, which is also incorrect.

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.

Cheers,
Arun

[1]
http://infocenter.arm.com/help/topic/com.arm.doc.qrc0001m/QRC0001_UAL.pdf

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH] sbc_math.h: add explicit check for ARMv6 instructions

2011-02-21 Thread Arun Raghavan
On Sun, 2011-02-20 at 19:20 +0100, Paul Menzel wrote:
 Date: Sun, 20 Feb 2011 15:57:55 +0100
 
 Building PulseAudio 051d8213 [1] using OpenEmbedded with distribution 
 `minimal-uclibc` for `MACHINE=om-gta01` having an ARMv4T architecture 
 (armv4t-oe-linux-uclibceabi) compilation fails with the following error.
[...]
   {standard input}:4099: Error: selected processor does not support Thumb 
 mode `mla r3,r2,r6,r3'
   {standard input}:4114: Error: selected processor does not support Thumb 
 mode `mla r3,r2,ip,r3'
   {standard input}:4125: Error: selected processor does not support Thumb 
 mode `mla r3,r6,r2,r3'
   make[3]: *** [libbluetooth_sbc_la-sbc.lo] Error 1
 
 Apply the same fix as in [2], which is similar to the patch applied in 
 OpenEmbedded since commit 976ab4b5 [3].
 
 [1] 
 http://git.0pointer.de/?p=pulseaudio.git;a=commit;h=051d82133f0ae6a57bf66fd200bc8e3591a7d5ca
 [2] 
 http://git.0pointer.de/?p=pulseaudio.git;a=commit;h=12b900858ae82d435c100d6eb94cb7bb22fe5e29
 [3] 
 http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=976ab4b4587d548c0483a274058c5359cb72bf1b
 
 Signed-off-by: Paul Menzel paulepan...@users.sourceforge.net
 CC: Marcel Holtmann mar...@holtmann.org
 ---
 I do not know if these files are just copied from linux-bluetooth upstream, 
 so I am adding Marcel to CC anyway because he is mentioned in the copyright 
 section.

It does appear that the files are a copy of the bluez package. If we're
fixing this on the PulseAudio side, I think we should include something
like diff below configure.ac, so that we can actually verify that the
mla instruction is available for the arch being used.

-- Arun


diff --git a/configure.ac b/configure.ac
index 08c947a..77e9823 100644
--- a/configure.ac
+++ b/configure.ac
@@ -257,13 +257,14 @@ case $host in
  asm volatile (ldr r0, %2 \n
ldr r2, %3 \n
ldr r3, %4 \n
+   mla r4, r1, r2, r3 \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);
+   : r0, r1, r2, r3, r4, cc);
  return (a == -128  b == 0xaabb) ? 0 : -1;
]]),
  [pulseaudio_cv_support_armv6=yes],

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


[pulseaudio-discuss] [PATCH] sbc_math.h: add explicit check for ARMv6 instructions

2011-02-20 Thread Paul Menzel
Date: Sun, 20 Feb 2011 15:57:55 +0100

Building PulseAudio 051d8213 [1] using OpenEmbedded with distribution 
`minimal-uclibc` for `MACHINE=om-gta01` having an ARMv4T architecture 
(armv4t-oe-linux-uclibceabi) compilation fails with the following error.

[…]
modules/bluetooth/sbc.c:485:10: warning: cannot optimize possibly 
infinite loops [-Wunsafe-loop-optimizations]
{standard input}: Assembler messages:
{standard input}:3628: Error: selected processor does not support Thumb 
mode `mla r3,r0,r1,r3'
{standard input}:3635: Error: selected processor does not support Thumb 
mode `mla r3,r2,r0,r3'
{standard input}:3643: Error: selected processor does not support Thumb 
mode `mla r3,r1,r0,r3'
{standard input}:3705: Error: selected processor does not support Thumb 
mode `mla r3,r7,ip,r3'
{standard input}:3717: Error: selected processor does not support Thumb 
mode `mla r3,r7,ip,r3'
{standard input}:3729: Error: selected processor does not support Thumb 
mode `mla r3,r7,ip,r3'
{standard input}:3741: Error: selected processor does not support Thumb 
mode `mla r3,r7,ip,r3'
{standard input}:3753: Error: selected processor does not support Thumb 
mode `mla r3,r7,ip,r3'
{standard input}:3767: Error: selected processor does not support Thumb 
mode `mla r3,r7,ip,r3'
{standard input}:3780: Error: selected processor does not support Thumb 
mode `mla r3,r7,ip,r3'
{standard input}:3786: Error: selected processor does not support Thumb 
mode `mla r3,r4,r7,r3'
{standard input}:3794: Error: selected processor does not support Thumb 
mode `mla r3,r0,r4,r3'
{standard input}:3895: Error: selected processor does not support Thumb 
mode `mla r1,r5,r6,r1'
{standard input}:3902: Error: selected processor does not support Thumb 
mode `mla r1,r5,r6,r1'
{standard input}:3909: Error: selected processor does not support Thumb 
mode `mla r1,r5,r6,r1'
{standard input}:3916: Error: selected processor does not support Thumb 
mode `mla r1,r5,r6,r1'
{standard input}:3923: Error: selected processor does not support Thumb 
mode `mla r1,r5,r6,r1'
{standard input}:3930: Error: selected processor does not support Thumb 
mode `mla r1,r5,r6,r1'
{standard input}:3937: Error: selected processor does not support Thumb 
mode `mla r1,r5,r6,r1'
{standard input}:4018: Error: selected processor does not support Thumb 
mode `mla r3,r6,r2,r3'
{standard input}:4034: Error: selected processor does not support Thumb 
mode `mla r3,r2,ip,r3'
{standard input}:4045: Error: selected processor does not support Thumb 
mode `mla r3,r2,r6,r3'
{standard input}:4061: Error: selected processor does not support Thumb 
mode `mla r3,r2,ip,r3'
{standard input}:4072: Error: selected processor does not support Thumb 
mode `mla r3,r2,r6,r3'
{standard input}:4088: Error: selected processor does not support Thumb 
mode `mla r3,r2,ip,r3'
{standard input}:4099: Error: selected processor does not support Thumb 
mode `mla r3,r2,r6,r3'
{standard input}:4114: Error: selected processor does not support Thumb 
mode `mla r3,r2,ip,r3'
{standard input}:4125: Error: selected processor does not support Thumb 
mode `mla r3,r6,r2,r3'
make[3]: *** [libbluetooth_sbc_la-sbc.lo] Error 1

Apply the same fix as in [2], which is similar to the patch applied in 
OpenEmbedded since commit 976ab4b5 [3].

[1] 
http://git.0pointer.de/?p=pulseaudio.git;a=commit;h=051d82133f0ae6a57bf66fd200bc8e3591a7d5ca
[2] 
http://git.0pointer.de/?p=pulseaudio.git;a=commit;h=12b900858ae82d435c100d6eb94cb7bb22fe5e29
[3] 
http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=976ab4b4587d548c0483a274058c5359cb72bf1b

Signed-off-by: Paul Menzel paulepan...@users.sourceforge.net
CC: Marcel Holtmann mar...@holtmann.org
---
I do not know if these files are just copied from linux-bluetooth upstream, so 
I am adding Marcel to CC anyway because he is mentioned in the copyright 
section.
---
 src/modules/bluetooth/sbc_math.h |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/modules/bluetooth/sbc_math.h b/src/modules/bluetooth/sbc_math.h
index b87bc81..b0f46e5 100644
--- a/src/modules/bluetooth/sbc_math.h
+++ b/src/modules/bluetooth/sbc_math.h
@@ -47,7 +47,7 @@ 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(HAVE_ARMV6)
 #define MULA(a, b, res) ({ \
int tmp = res;  \
__asm__(\
@@ -57,4 +57,4 @@ typedef int32_t sbc_fixed_t;
tmp; })
 #else
 #define MULA(a, b, res)  ((a) * (b) + (res))
-#endif
+#endif /* defined (__arm__)  defined (HAVE_ARMV6) */
-- 
1.7.4.1


signature.asc
Description: This is a digitally signed message part

Re: [pulseaudio-discuss] [PATCH] sbc_math.h: add explicit check for ARMv6 instructions

2011-02-20 Thread Colin Guthrie
'Twas brillig, and Paul Menzel at 20/02/11 18:20 did gyre and gimble:
 Date: Sun, 20 Feb 2011 15:57:55 +0100
 
 Building PulseAudio 051d8213 [1] using OpenEmbedded with distribution
 `minimal-uclibc` for `MACHINE=om-gta01` having an ARMv4T
 architecture (armv4t-oe-linux-uclibceabi) compilation fails with the
 following error.
 

Arun, Kurt, seeing as you are fiddling with ARM stuff, is this similar
to your Thumb issues in svolume?

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss