diff options
author | Eric Laurent <elaurent@google.com> | 2013-10-12 16:17:46 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2013-10-12 16:37:00 -0700 |
commit | d72b7c0180ee83fc3754629ed68fc5887a125c4c (patch) | |
tree | 9c6bef31eaca96d7420a65fcdd2438666c5668dd /services | |
parent | 15ad2470b2f2ac34473eb568b606ad75e8e63ac6 (diff) | |
download | frameworks_av-d72b7c0180ee83fc3754629ed68fc5887a125c4c.zip frameworks_av-d72b7c0180ee83fc3754629ed68fc5887a125c4c.tar.gz frameworks_av-d72b7c0180ee83fc3754629ed68fc5887a125c4c.tar.bz2 |
audioflinger: enable effects after registration if needed
This fixes a bug where effects were not properly reenabled after
being moved from one playback thread to another. The effect
is enabled but the audio policy manager sees it as disabled.
Bug: 11181933.
Change-Id: I19cac7acbaf61c546e667fd85ed7d4eda1c716d8
Diffstat (limited to 'services')
-rw-r--r-- | services/audioflinger/AudioFlinger.cpp | 2 | ||||
-rw-r--r-- | services/audioflinger/Tracks.cpp | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index a9c9b56..6919721 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp @@ -2335,6 +2335,7 @@ status_t AudioFlinger::moveEffectChain_l(int sessionId, strategy, sessionId, effect->id()); + AudioSystem::setEffectEnabled(effect->id(), effect->isEnabled()); } effect = chain->getEffectFromId_l(0); } @@ -2349,6 +2350,7 @@ status_t AudioFlinger::moveEffectChain_l(int sessionId, strategy, sessionId, removed[i]->id()); + AudioSystem::setEffectEnabled(effect->id(), effect->isEnabled()); } } } diff --git a/services/audioflinger/Tracks.cpp b/services/audioflinger/Tracks.cpp index 9c6e724..8cbb10b 100644 --- a/services/audioflinger/Tracks.cpp +++ b/services/audioflinger/Tracks.cpp @@ -829,6 +829,7 @@ status_t AudioFlinger::PlaybackThread::Track::attachAuxEffect(int EffectId) dstChain->strategy(), AUDIO_SESSION_OUTPUT_MIX, effect->id()); + AudioSystem::setEffectEnabled(effect->id(), effect->isEnabled()); } status = playbackThread->attachAuxEffect(this, EffectId); } |