summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorAndy Hung <hunga@google.com>2014-02-03 14:11:09 -0800
committerAndy Hung <hunga@google.com>2014-02-03 22:28:41 +0000
commit83be2560d9396b3bd32919123bd67a783e6aaf7c (patch)
tree7f6cd4301b7c22ddc55e3afd0c7c9271796dcccb /services
parente983e0a0017fce81dc3d9bea36f5abb7b7bce40b (diff)
downloadframeworks_av-83be2560d9396b3bd32919123bd67a783e6aaf7c.zip
frameworks_av-83be2560d9396b3bd32919123bd67a783e6aaf7c.tar.gz
frameworks_av-83be2560d9396b3bd32919123bd67a783e6aaf7c.tar.bz2
Fix dynamic resampling for non-NEON devices
The stride by 16 code template automatically falls back to stride by 2 (as the NEON code template override does not occur). As such the stride by 2 (in the switch) was removed as it was unnecessary. Removing the if() causes the fall back to happen properly for non-NEON compilation. Change-Id: Ia7aec6ae1d88eb54377e56e2fb57f2ae5b74cf1b Signed-off-by: Andy Hung <hunga@google.com>
Diffstat (limited to 'services')
-rw-r--r--services/audioflinger/AudioResamplerDyn.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/services/audioflinger/AudioResamplerDyn.cpp b/services/audioflinger/AudioResamplerDyn.cpp
index 984548d..cd67df5 100644
--- a/services/audioflinger/AudioResamplerDyn.cpp
+++ b/services/audioflinger/AudioResamplerDyn.cpp
@@ -372,11 +372,7 @@ void AudioResamplerDyn::setSampleRate(int32_t inSampleRate) {
if (locked) {
mPhaseFraction = mPhaseFraction >> c.mShift << c.mShift; // remove fractional phase
}
- if (!USE_NEON) {
- stride = 2; // C version only
- }
- // TODO: Remove this for testing
- //stride = 2;
+
mResampleType = RESAMPLETYPE(mChannelCount, locked, stride, !!useS32);
#ifdef DEBUG_RESAMPLER
printf("channels:%d %s stride:%d %s coef:%d shift:%d\n",
@@ -392,7 +388,7 @@ void AudioResamplerDyn::resample(int32_t* out, size_t outFrameCount,
// 24 cases - this perhaps can be reduced later, as testing might take too long
switch (mResampleType) {
- // stride 16 (stride 2 for machines that do not support NEON)
+ // stride 16 (falls back to stride 2 for machines that do not support NEON)
case RESAMPLETYPE(1, true, 16, 0):
return resample<1, true, 16>(out, outFrameCount, mConstants.mFirCoefsS16, provider);
case RESAMPLETYPE(2, true, 16, 0):