diff options
author | Eric Laurent <elaurent@google.com> | 2014-05-08 18:49:52 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2014-05-09 15:25:49 -0700 |
commit | 1035194cee4fbd57e35ea15c56e66cd09b63d56e (patch) | |
tree | d443c6a41767ab240292494155885f65f88d7e76 /services/audioflinger/AudioFlinger.h | |
parent | d283f68057204fcde95e6c9ba79a59f27ae58fe3 (diff) | |
download | frameworks_av-1035194cee4fbd57e35ea15c56e66cd09b63d56e.zip frameworks_av-1035194cee4fbd57e35ea15c56e66cd09b63d56e.tar.gz frameworks_av-1035194cee4fbd57e35ea15c56e66cd09b63d56e.tar.bz2 |
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
Diffstat (limited to 'services/audioflinger/AudioFlinger.h')
-rw-r--r-- | services/audioflinger/AudioFlinger.h | 9 |
1 files changed, 7 insertions, 2 deletions
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<NotificationClient> >& + 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<NotificationClient> > notificationClients() { + Mutex::Autolock _l(mLock); return mNotificationClients; } bool isNonOffloadableGlobalEffectEnabled_l(); void onNonOffloadableGlobalEffectEnable(); |