AudioFlinger: put effect desc lookup under mutex for createEffect am: a41770b682 am: ef52b30f9c am: b6a54df739
am: a504d888d4
Change-Id: I1bfe1527a07a30701408edc802a93954da585d66
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index bdd39c6..687b5a6 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -3001,6 +3001,8 @@
}
{
+ Mutex::Autolock _l(mLock);
+
if (!EffectsFactoryHalInterface::isNullUuid(&pDesc->uuid)) {
// if uuid is specified, request effect descriptor
lStatus = mEffectsFactoryHal->getDescriptor(&pDesc->uuid, &desc);
@@ -3056,6 +3058,8 @@
desc = d;
}
}
+ }
+ {
// Do not allow auxiliary effects on a session different from 0 (output mix)
if (sessionId != AUDIO_SESSION_OUTPUT_MIX &&