summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorJim Huang <jim.huang@linaro.org>2011-04-06 14:19:29 +0800
committerJim Huang <jserv@0xlab.org>2011-04-07 21:08:39 +0800
commit0c0a1c0c37dbd2646a732da706d6777283c83e44 (patch)
treecfd6eb43fd04ff7cc23e8930bc2355b599d2b8c3 /services
parentba0de09f9a221f14e812e2b6498b48cf782c7396 (diff)
downloadframeworks_av-0c0a1c0c37dbd2646a732da706d6777283c83e44.zip
frameworks_av-0c0a1c0c37dbd2646a732da706d6777283c83e44.tar.gz
frameworks_av-0c0a1c0c37dbd2646a732da706d6777283c83e44.tar.bz2
audioflinger: Enable ARMv5TE optimized resampler
Previously, the optimized asm option is only enabled when __ARM_ARCH_5E__ is defined, which is assigned in armv5te.mk rather than armv7-a series targets. This patch checks the ARM CPU feature about half-word multiply instructions to enable ARMv5TE resampler optimization routines properly. Change-Id: I4c5a5d8c932416f23bedb0b389db958349f21ea4
Diffstat (limited to 'services')
-rw-r--r--services/audioflinger/AudioResampler.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/services/audioflinger/AudioResampler.cpp b/services/audioflinger/AudioResampler.cpp
index 5dabacb..245bfdf 100644
--- a/services/audioflinger/AudioResampler.cpp
+++ b/services/audioflinger/AudioResampler.cpp
@@ -26,11 +26,15 @@
#include "AudioResamplerSinc.h"
#include "AudioResamplerCubic.h"
+#ifdef __arm__
+#include <machine/cpu-features.h>
+#endif
+
namespace android {
-#ifdef __ARM_ARCH_5E__ // optimized asm option
+#ifdef __ARM_HAVE_HALFWORD_MULTIPLY // optimized asm option
#define ASM_ARM_RESAMP1 // enable asm optimisation for ResamplerOrder1
-#endif // __ARM_ARCH_5E__
+#endif // __ARM_HAVE_HALFWORD_MULTIPLY
// ----------------------------------------------------------------------------
class AudioResamplerOrder1 : public AudioResampler {