diff options
Diffstat (limited to 'services/audioflinger')
-rw-r--r-- | services/audioflinger/AudioFlinger.cpp | 11 | ||||
-rw-r--r-- | services/audioflinger/AudioResampler.cpp | 16 |
2 files changed, 18 insertions, 9 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index a58f64c..88a05b2 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp @@ -7440,12 +7440,21 @@ void AudioFlinger::EffectChain::setEffectSuspendedAll_l(bool suspend) } } + +// The volume effect is used for automated tests only +#ifndef OPENSL_ES_H_ +static const effect_uuid_t SL_IID_VOLUME_ = { 0x09e8ede0, 0xddde, 0x11db, 0xb4f6, + { 0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b } }; +const effect_uuid_t * const SL_IID_VOLUME = &SL_IID_VOLUME_; +#endif //OPENSL_ES_H_ + bool AudioFlinger::EffectChain::isEffectEligibleForSuspend(const effect_descriptor_t& desc) { // auxiliary effects and visualizer are never suspended on output mix if ((mSessionId == AUDIO_SESSION_OUTPUT_MIX) && (((desc.flags & EFFECT_FLAG_TYPE_MASK) == EFFECT_FLAG_TYPE_AUXILIARY) || - (memcmp(&desc.type, SL_IID_VISUALIZATION, sizeof(effect_uuid_t)) == 0))) { + (memcmp(&desc.type, SL_IID_VISUALIZATION, sizeof(effect_uuid_t)) == 0) || + (memcmp(&desc.type, SL_IID_VOLUME, sizeof(effect_uuid_t)) == 0))) { return false; } return true; diff --git a/services/audioflinger/AudioResampler.cpp b/services/audioflinger/AudioResampler.cpp index dca795c..9ee5a30 100644 --- a/services/audioflinger/AudioResampler.cpp +++ b/services/audioflinger/AudioResampler.cpp @@ -434,9 +434,9 @@ void AudioResamplerOrder1::AsmMono16Loop(int16_t *in, int32_t* maxOutPt, int32_t // the following loop works on 2 frames - ".Y4L01:\n" + "1:\n" " cmp r8, r2\n" // curOut - maxCurOut - " bcs .Y4L02\n" + " bcs 2f\n" #define MO_ONE_FRAME \ " add r0, r1, r7, asl #1\n" /* in + inputIndex */\ @@ -460,8 +460,8 @@ void AudioResamplerOrder1::AsmMono16Loop(int16_t *in, int32_t* maxOutPt, int32_t MO_ONE_FRAME // frame 2 " cmp r7, r3\n" // inputIndex - maxInIdx - " bcc .Y4L01\n" - ".Y4L02:\n" + " bcc 1b\n" + "2:\n" " bic r6, r6, #0xC0000000\n" // phaseFraction & ... // save modified values @@ -541,9 +541,9 @@ void AudioResamplerOrder1::AsmStereo16Loop(int16_t *in, int32_t* maxOutPt, int32 // r13 sp // r14 - ".Y5L01:\n" + "3:\n" " cmp r8, r2\n" // curOut - maxCurOut - " bcs .Y5L02\n" + " bcs 4f\n" #define ST_ONE_FRAME \ " bic r6, r6, #0xC0000000\n" /* phaseFraction & ... */\ @@ -577,8 +577,8 @@ void AudioResamplerOrder1::AsmStereo16Loop(int16_t *in, int32_t* maxOutPt, int32 ST_ONE_FRAME // frame 1 " cmp r7, r3\n" // inputIndex - maxInIdx - " bcc .Y5L01\n" - ".Y5L02:\n" + " bcc 3b\n" + "4:\n" " bic r6, r6, #0xC0000000\n" // phaseFraction & ... // save modified values |