EffectChain setVolume_l with EffectChainmutex held
Bug: 315995877
Test: atest AudioTrackTest; atest AudioRecordTest
Test: flush to Pixel and test audio functionality
Change-Id: I933314a2cd3b0911091e9cfc1ffe00e58166827f
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index 244a262..67a0bd1 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -5497,6 +5497,7 @@
if (masterMute) {
masterVolume = 0;
}
+
// Delegate master volume control to effect in output mix effect chain if needed
sp<IAfEffectChain> chain = getEffectChain_l(AUDIO_SESSION_OUTPUT_MIX);
if (chain != 0) {
@@ -5836,7 +5837,7 @@
mixedTracks++;
- // track->mainBuffer() != mSinkBuffer or mMixerBuffer means
+ // track->mainBuffer() != mSinkBuffer and mMixerBuffer means
// there is an effect chain connected to the track
chain.clear();
if (track->mainBuffer() != mSinkBuffer &&