diff options
author | Eric Laurent <elaurent@google.com> | 2011-10-19 11:44:54 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2011-10-19 11:44:54 -0700 |
commit | 7fa1cee12c12231b5d72c95dc72512867713ff1b (patch) | |
tree | 747e597778768c37e6c4e82b5820324184a88aca /services/audioflinger/AudioFlinger.h | |
parent | 70ac412b2fe7be2507189a9fdfb30c43b36d56ac (diff) | |
download | frameworks_base-7fa1cee12c12231b5d72c95dc72512867713ff1b.zip frameworks_base-7fa1cee12c12231b5d72c95dc72512867713ff1b.tar.gz frameworks_base-7fa1cee12c12231b5d72c95dc72512867713ff1b.tar.bz2 |
Fix issue 381905: BassBoostTest CTS tests fail...
When AudioEffectTest is executed, an Equalizer is created
and enabled on a MediaPlayer session. Effects on the output
mix are therefore suspended.
Then the MediaPlayer is released with the effect still enabled.
In this case, Audioflinger::purgeStaleEffects_l() fails to restore
the suspended effects when the effect attached to the released audio session
is removed.
When subsequent tests are executed on output mix effects, these effects cannot be
enabled as they are still suspended.
Fixed purgeStaleEffects_l() to restore suspended effects if the effect removed is enabled.
Also fixed EffectHandle::disconnect() to only restore suspended effects if the disconnected
handle actually has control over the effect.
Change-Id: I67232e7c34680b0cc01abfd57d5d510a524e5d4f
Diffstat (limited to 'services/audioflinger/AudioFlinger.h')
-rw-r--r-- | services/audioflinger/AudioFlinger.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h index ed9d81e..4b794ef 100644 --- a/services/audioflinger/AudioFlinger.h +++ b/services/audioflinger/AudioFlinger.h @@ -492,10 +492,12 @@ private: int sessionId = AUDIO_SESSION_OUTPUT_MIX); // check if some effects must be suspended/restored when an effect is enabled // or disabled - virtual void checkSuspendOnEffectEnabled(const sp<EffectModule>& effect, + void checkSuspendOnEffectEnabled(const sp<EffectModule>& effect, bool enabled, int sessionId = AUDIO_SESSION_OUTPUT_MIX); - + void checkSuspendOnEffectEnabled_l(const sp<EffectModule>& effect, + bool enabled, + int sessionId = AUDIO_SESSION_OUTPUT_MIX); mutable Mutex mLock; protected: @@ -1299,7 +1301,7 @@ private: // suspend all eligible effects void setEffectSuspendedAll_l(bool suspend); // check if effects should be suspend or restored when a given effect is enable or disabled - virtual void checkSuspendOnEffectEnabled(const sp<EffectModule>& effect, + void checkSuspendOnEffectEnabled(const sp<EffectModule>& effect, bool enabled); status_t dump(int fd, const Vector<String16>& args); |