[pulseaudio-discuss] [PATCH 4/4] core: initialize ARM NEON code if available

Peter Meerwald pmeerw at pmeerw.net
Thu Jan 12 08:20:09 PST 2012


From: 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 9c654a3..2deb8ce 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.4.1



More information about the pulseaudio-discuss mailing list