Add thread safe annotation in audio flinger effects
Bug: 315995877
Test: atest AudioTrackTest AudioRecordTest audioeffect_tests
Change-Id: I90406c48660aef25ab4402a70a2a45deb6651335
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index f5ac109..bdbd4d6 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -4483,7 +4483,7 @@
if (effect->state() == IAfEffectModule::ACTIVE ||
effect->state() == IAfEffectModule::STOPPING) {
++started;
- effect->start();
+ effect->start_l();
}
}
dstChain->mutex().unlock();
@@ -4586,7 +4586,7 @@
// removeEffect_l() has stopped the effect if it was active so it must be restarted
if (effect->state() == IAfEffectModule::ACTIVE ||
effect->state() == IAfEffectModule::STOPPING) {
- effect->start();
+ effect->start_l();
}
}