From 1035194cee4fbd57e35ea15c56e66cd09b63d56e Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Thu, 8 May 2014 18:49:52 -0700 Subject: audioflinger: refactor thread config events Merge config events and set parameters messaging mechanism. - setting parameters now uses the config event mechanism - config event now allow to wait for a condition and synchronize caller binder thread with execution thread and return an execution status. - simplify locking mechanism to avoid unlocking the thread mutex while processing events. Change-Id: Ia49cb3e617abec4bacb6c1f9a8cb304c4ed3902e --- services/audioflinger/AudioFlinger.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'services/audioflinger/AudioFlinger.h') diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h index ec32edd..bfbc46c 100644 --- a/services/audioflinger/AudioFlinger.h +++ b/services/audioflinger/AudioFlinger.h @@ -452,7 +452,11 @@ private: // no range check, doesn't check per-thread stream volume, AudioFlinger::mLock held float streamVolume_l(audio_stream_type_t stream) const { return mStreamTypes[stream].volume; } - void audioConfigChanged_l(int event, audio_io_handle_t ioHandle, const void *param2); + void audioConfigChanged_l(const DefaultKeyedVector< pid_t,sp >& + notificationClients, + int event, + audio_io_handle_t ioHandle, + const void *param2); // Allocate an audio_io_handle_t, session ID, effect ID, or audio_module_handle_t. // They all share the same ID space, but the namespaces are actually independent @@ -477,7 +481,8 @@ private: void removeClient_l(pid_t pid); void removeNotificationClient(pid_t pid); - + DefaultKeyedVector< pid_t,sp > notificationClients() { + Mutex::Autolock _l(mLock); return mNotificationClients; } bool isNonOffloadableGlobalEffectEnabled_l(); void onNonOffloadableGlobalEffectEnable(); -- cgit v1.1