diff options
author | Eric Laurent <elaurent@google.com> | 2015-07-09 14:52:47 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2015-07-10 10:58:41 -0700 |
commit | 7c1ec5f038e63a5eb8b04434577c25bc23f5f410 (patch) | |
tree | f6b8feda43ba0bb6666171b57318ad3cea48a45e /services/audiopolicy/managerdefault | |
parent | 54c0659b9efa72d11997c590c4d377c44789c7fd (diff) | |
download | frameworks_av-7c1ec5f038e63a5eb8b04434577c25bc23f5f410.zip frameworks_av-7c1ec5f038e63a5eb8b04434577c25bc23f5f410.tar.gz frameworks_av-7c1ec5f038e63a5eb8b04434577c25bc23f5f410.tar.bz2 |
audio: several fixes in audio routing callbacks
- audio policy:
Force device change to ensure new audio patch creation
upon first track activity on a given output.
Fix function device_distinguishes_on_address() which could mistake
some output device with remote submix input device.
- audio flinger:
Reduce number of binder calls upon new client registration by only
sending ioConfigChanged() callbacks to newly registered client.
Fix first patch after output thread creation not triggering an
ioConfigChanged() callback.
-audio system:
Force client registration upon routing callback installation to force
new ioConfigChanged() callback from audio flinger.
Bug: 22381136.
Change-Id: Ieb0d9f92f563a40552eb31bc0499c8ac65f78ce4
Diffstat (limited to 'services/audiopolicy/managerdefault')
-rw-r--r-- | services/audiopolicy/managerdefault/AudioPolicyManager.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp index de204e5..6d99640 100644 --- a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp +++ b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp @@ -1076,6 +1076,9 @@ status_t AudioPolicyManager::startSource(sp<AudioOutputDescriptor> outputDesc, beaconMuteLatency = handleEventForBeacon(STARTING_OUTPUT); } + // check active before incrementing usage count + bool force = !outputDesc->isActive(); + // increment usage count for this stream on the requested output: // NOTE that the usage count is the same for duplicated output and hardware output which is // necessary for a correct control of hardware output routing by startOutput() and stopOutput() @@ -1091,7 +1094,6 @@ status_t AudioPolicyManager::startSource(sp<AudioOutputDescriptor> outputDesc, (strategy == STRATEGY_SONIFICATION_RESPECTFUL) || (beaconMuteLatency > 0); uint32_t waitMs = beaconMuteLatency; - bool force = false; for (size_t i = 0; i < mOutputs.size(); i++) { sp<AudioOutputDescriptor> desc = mOutputs.valueAt(i); if (desc != outputDesc) { |