diff options
author | Jean-Michel Trivi <jmtrivi@google.com> | 2015-04-08 18:16:39 -0700 |
---|---|---|
committer | Jean-Michel Trivi <jmtrivi@google.com> | 2015-04-08 18:19:16 -0700 |
commit | dacc06f5e8d00ace9d16a149fc41ff65323ffbb3 (patch) | |
tree | 66fc2772a1a663554e871dabc96f9e1cd5a740fc /services/audiopolicy/managerdefault | |
parent | e41b5f31148f9cfb7316295c900c7d3c695510b2 (diff) | |
download | frameworks_av-dacc06f5e8d00ace9d16a149fc41ff65323ffbb3.zip frameworks_av-dacc06f5e8d00ace9d16a149fc41ff65323ffbb3.tar.gz frameworks_av-dacc06f5e8d00ace9d16a149fc41ff65323ffbb3.tar.bz2 |
Fix AudioPolicyManager dynamic policy initialization
AudioPolicyManager::getInputForAttr() is initializing the AudioMix
for the new AudioInputDescriptor.
The audio policy manager refactoring introduced a regression where
the association of an existing AudioMix (registered when the
associated AudioPolicy was registered) with the input descriptor
copied a value of local scope, instead of referencing the
AudioMix in the list of mixes.
Bug 20081375
Change-Id: Iddd57fed8525880afd1d4a5493f97130aabe4816
Diffstat (limited to 'services/audiopolicy/managerdefault')
-rw-r--r-- | services/audiopolicy/managerdefault/AudioPolicyManager.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp index 797a2b4..67a5c80 100644 --- a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp +++ b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp @@ -1189,7 +1189,7 @@ status_t AudioPolicyManager::getInputForAttr(const audio_attributes_t *attr, if (inputSource == AUDIO_SOURCE_REMOTE_SUBMIX && strncmp(attr->tags, "addr=", strlen("addr=")) == 0) { - status_t ret = mPolicyMixes.getInputMixForAttr(*attr, policyMix); + status_t ret = mPolicyMixes.getInputMixForAttr(*attr, &policyMix); if (ret != NO_ERROR) { return ret; } @@ -1308,7 +1308,7 @@ status_t AudioPolicyManager::getInputForAttr(const audio_attributes_t *attr, inputDesc->mIsSoundTrigger = isSoundTrigger; inputDesc->mPolicyMix = policyMix; - ALOGV("getInputForAttr() returns input type = %d", inputType); + ALOGV("getInputForAttr() returns input type = %d", *inputType); addInput(*input, inputDesc); mpClientInterface->onAudioPortListUpdate(); @@ -3032,7 +3032,7 @@ status_t AudioPolicyManager::checkOutputsForDevice(const sp<DeviceDescriptor> de address.string()); } policyMix->setOutput(desc); - desc->mPolicyMix = &(policyMix->getMix()); + desc->mPolicyMix = policyMix->getMix(); } else if ((desc->mFlags & AUDIO_OUTPUT_FLAG_DIRECT) == 0) { // no duplicated output for direct outputs and |