From 275e8e9de2e11b4b344f5a201f1f0e51fda02d9c Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Sun, 30 Nov 2014 15:14:47 -0800 Subject: audio policy: add support for custom mixes Add support for custom mixes in AudioPolicyManager. Two methods are added to register or unregister a list of custom mixes with their attributes and format. getOutputForAttr() and getInputForAttr() first look for a match in registered mixes before defaulting to normal output/input selection Remote submix device connection disconnection now takes address into account to identify the correspnoding custom mix. Bug: 16009464. Change-Id: I3f1c2a485a0fb71b1f984ed0adc9b68aa971e408 --- services/audioflinger/Threads.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'services/audioflinger') diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp index dab6d91..1c3cf5d 100644 --- a/services/audioflinger/Threads.cpp +++ b/services/audioflinger/Threads.cpp @@ -2180,7 +2180,13 @@ void AudioFlinger::PlaybackThread::threadLoop_drain() void AudioFlinger::PlaybackThread::threadLoop_exit() { - // Default implementation has nothing to do + { + Mutex::Autolock _l(mLock); + for (size_t i = 0; i < mTracks.size(); i++) { + sp track = mTracks[i]; + track->invalidate(); + } + } } /* -- cgit v1.1