OSDN Git Service

DO NOT MERGE ANYWHERE - improve audio effect framwework thread safety
authorEric Laurent <elaurent@google.com>
Thu, 1 Dec 2016 23:28:29 +0000 (15:28 -0800)
committerEric Laurent <elaurent@google.com>
Fri, 16 Dec 2016 01:31:12 +0000 (17:31 -0800)
commitb37f28adaea5e64ba61fc6533ed9a7f5a76b9f78
tree4f33d868a5057f6bbf77f6efc29119d3f8f7b207
parentf574a9722f1f80fc03091f5ccdcfc123c7198730
DO NOT MERGE ANYWHERE - improve audio effect framwework thread safety

- Reorganize handle effect creation code to make sure the effect engine
is created with both thread and effect chain mutex held.
- Reorganize handle disconnect code to make sure the effect engine
is released with both thread and effect chain mutex held.
- Protect IEffect interface methods in EffectHande with a Mutex.
- Only pin effect if the session was acquired first.
- Do not use strong pointer to EffectModule in EffectHandles:
only the EffectChain has a single strong reference to the EffectModule.

Bug: 32707507
Bug: 32095713
Change-Id: Ia1098cba2cd32cc2d1c9dfdff4adc2388dfed80e
services/audioflinger/AudioFlinger.cpp
services/audioflinger/AudioFlinger.h
services/audioflinger/Effects.cpp
services/audioflinger/Effects.h
services/audioflinger/Threads.cpp
services/audioflinger/Threads.h
services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp