summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/Effects.cpp
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2014-05-13 10:18:14 -0700
committerEric Laurent <elaurent@google.com>2014-05-13 13:09:17 -0700
commit021cf9634ab09c0753a40b7c9ef4ba603be5c3da (patch)
tree03fb2a864179983e482cae4dac6a502a6dcef136 /services/audioflinger/Effects.cpp
parentaa0315f9fdcf99e84a969a4f81192150ddaef260 (diff)
downloadframeworks_av-021cf9634ab09c0753a40b7c9ef4ba603be5c3da.zip
frameworks_av-021cf9634ab09c0753a40b7c9ef4ba603be5c3da.tar.gz
frameworks_av-021cf9634ab09c0753a40b7c9ef4ba603be5c3da.tar.bz2
AudioFlinger: add specific mutex for client lists
Add a specific mutex to protect access to mClients and mNotificationClients lists. This avoids locking the main AudioFlinger mutex from inside thread loops and allows not to worry about cross deadlocks when sending a config event with status reply while keeping the ThreadBase or AudioFlinger mutex locked. As a way of consequence, remove notification client list passed to processConfigEvents_l() and audioConfigChanged() as the list can now be accessed by locking client mutex only. Change-Id: I228022204b6709a8bb60cc96d9514a6ffe59b62e
Diffstat (limited to 'services/audioflinger/Effects.cpp')
-rw-r--r--services/audioflinger/Effects.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/audioflinger/Effects.cpp b/services/audioflinger/Effects.cpp
index 29b56db..77aca00 100644
--- a/services/audioflinger/Effects.cpp
+++ b/services/audioflinger/Effects.cpp
@@ -1162,8 +1162,8 @@ void AudioFlinger::EffectHandle::disconnect(bool unpinIfLast)
mCblk->~effect_param_cblk_t(); // destroy our shared-structure.
}
mCblkMemory.clear(); // free the shared memory before releasing the heap it belongs to
- // Client destructor must run with AudioFlinger mutex locked
- Mutex::Autolock _l(mClient->audioFlinger()->mLock);
+ // Client destructor must run with AudioFlinger client mutex locked
+ Mutex::Autolock _l(mClient->audioFlinger()->mClientLock);
mClient.clear();
}
}