From 6bffdb8b598a2399e57f6ca48660fb7bdb2490b5 Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Fri, 23 Sep 2011 08:40:41 -0700 Subject: Fix issue 5355047: Automated effect tests fail. Fixed several regressions in automated audio effect tests due to changes in effect framework and visualizer FFT output range. - Do not suspend Volume effect on session 0 when effects are enabled on specific sessions. - Adapt energy detection thresholds to new visualizer FFT range. - Leave more time for BassBoost and Virtualizer effects to ramp up before measuring the effect. - Removed second insert reverb left by mistake on the player session in preset reverb test. Change-Id: I7a1ad1372d783fa7900eb9dd1d3b47f54d8d766f --- services/audioflinger/AudioFlinger.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'services') 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; -- cgit v1.1