diff options
author | Jim Huang <jim.huang@linaro.org> | 2011-04-06 14:19:29 +0800 |
---|---|---|
committer | Jim Huang <jserv@0xlab.org> | 2011-04-07 21:08:39 +0800 |
commit | 592a6d976887e7d5f5aca42db52ef6c6576648f5 (patch) | |
tree | 3deec7c47357544dc34171ecff2df503236142d3 /services | |
parent | 9907d161584415c81de1099678f160da172fd1a6 (diff) | |
download | frameworks_base-592a6d976887e7d5f5aca42db52ef6c6576648f5.zip frameworks_base-592a6d976887e7d5f5aca42db52ef6c6576648f5.tar.gz frameworks_base-592a6d976887e7d5f5aca42db52ef6c6576648f5.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.cpp | 8 |
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 { |