[pulseaudio-discuss] [PATCH 1/6 v3] core: Initialize ARM NEON code if available

Peter Meerwald pmeerw at pmeerw.net
Tue Jul 24 01:20:31 PDT 2012


From: Peter Meerwald <p.meerwald at bct-electronic.com>

Signed-off-by: Peter Meerwald <p.meerwald at bct-electronic.com>
---
 src/pulsecore/cpu-arm.c |    7 ++++++-
 src/pulsecore/cpu-arm.h |    4 ++++
 2 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/src/pulsecore/cpu-arm.c b/src/pulsecore/cpu-arm.c
index a724309..8ed5847 100644
--- a/src/pulsecore/cpu-arm.c
+++ b/src/pulsecore/cpu-arm.c
@@ -132,7 +132,12 @@ pa_bool_t pa_cpu_init_arm(pa_cpu_arm_flag_t *flags) {
           (*flags & PA_CPU_ARM_NEON) ? "NEON " : "",
           (*flags & PA_CPU_ARM_VFPV3) ? "VFPV3 " : "");
 
-    if (*flags & PA_CPU_ARM_V6)
+    if (*flags & PA_CPU_ARM_NEON) {
+        pa_volume_func_init_neon(*flags);
+        pa_remap_func_init_neon(*flags);
+        pa_convert_func_init_neon(*flags);
+    }
+    else if (*flags & PA_CPU_ARM_V6)
         pa_volume_func_init_arm(*flags);
 
     return TRUE;
diff --git a/src/pulsecore/cpu-arm.h b/src/pulsecore/cpu-arm.h
index f0f49ef..4117fce 100644
--- a/src/pulsecore/cpu-arm.h
+++ b/src/pulsecore/cpu-arm.h
@@ -40,4 +40,8 @@ pa_bool_t pa_cpu_init_arm(pa_cpu_arm_flag_t *flags);
 /* some optimized functions */
 void pa_volume_func_init_arm(pa_cpu_arm_flag_t flags);
 
+void pa_volume_func_init_neon(pa_cpu_arm_flag_t flags);
+void pa_remap_func_init_neon(pa_cpu_arm_flag_t flags);
+void pa_convert_func_init_neon(pa_cpu_arm_flag_t flags);
+
 #endif /* foocpuarmhfoo */
-- 
1.7.5.4



More information about the pulseaudio-discuss mailing list