Effects: Update to audio_utils mutex
Test: atest AudioTrackTest AudioRecordTest
Test: atest AAudioTests AudioTrackOffloadTest
Test: atest AudioPlaybackCaptureTest
Test: Camera YouTube
Bug: 298534151
Change-Id: I2ff0b2748110b56da238db7dd74b3c6692ffce39
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index 204e819..fdef98b 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -4446,7 +4446,7 @@
// If we do not take the dstChain lock, it is possible that processing is ongoing
// while we are starting the effect. This can cause glitches with volume,
// see b/202360137.
- dstChain->lock();
+ dstChain->mutex().lock();
for (const auto& effect : removed) {
if (effect->state() == IAfEffectModule::ACTIVE ||
effect->state() == IAfEffectModule::STOPPING) {
@@ -4454,7 +4454,7 @@
effect->start();
}
}
- dstChain->unlock();
+ dstChain->mutex().unlock();
}
if (status != NO_ERROR) {