[PATCH v2 4/6] core: initialize ARM NEON code if available

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Peter Meerwald <p.meerwald@xxxxxxxxxxxxxxxxxx>

---
 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



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux