OSDN Git Service

DO NOT MERGE - 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 02:22:49 +0000 (18:22 -0800)
commit84c392104e905bfacc753ec0ddb96ce7813d1889
tree0e240354e488fc2694c20c30404dbc1cc98833b3
parent98c2151dc33db451ebf7351bdbcb70c163f602b9
DO NOT MERGE - 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.
- Check reply size before writing status in EffectHandle::command()

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/AudioPolicyInterfaceImpl.cpp