Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bef0f630 authored by Jim Huang's avatar Jim Huang Committed by FUKAUMI Naoki
Browse files

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: I95a8b6212f2899c651b89f4a741410266085b5ec
parent c4e23b1c
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -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 {