summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2015-08-06 23:22:43 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-08-06 23:22:43 +0000
commit821b6c29d3d5782ae17aedc77f406c9eaf2ab2fb (patch)
tree776e091df251940c2bf3b0c908ccdcffc8aadcba
parentdc21af06560005f5e1cbb29ad60555ea08a5cf93 (diff)
parent45aabc3578f2362b82f5a425d44e75d4266b1c8c (diff)
downloadframeworks_av-821b6c29d3d5782ae17aedc77f406c9eaf2ab2fb.zip
frameworks_av-821b6c29d3d5782ae17aedc77f406c9eaf2ab2fb.tar.gz
frameworks_av-821b6c29d3d5782ae17aedc77f406c9eaf2ab2fb.tar.bz2
Merge "audio policy: populate attributes for attached capture devices" into mnc-dev
-rw-r--r--services/audiopolicy/managerdefault/AudioPolicyManager.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
index 7530dcc..fc27789 100644
--- a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
+++ b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
@@ -2854,8 +2854,12 @@ AudioPolicyManager::AudioPolicyManager(AudioPolicyClientInterface *clientInterfa
ssize_t index =
mAvailableInputDevices.indexOf(inProfile->mSupportedDevices[k]);
// give a valid ID to an attached device once confirmed it is reachable
- if (index >= 0 && !mAvailableInputDevices[index]->isAttached()) {
- mAvailableInputDevices[index]->attach(mHwModules[i]);
+ if (index >= 0) {
+ sp<DeviceDescriptor> devDesc = mAvailableInputDevices[index];
+ if (!devDesc->isAttached()) {
+ devDesc->attach(mHwModules[i]);
+ devDesc->importAudioPort(inProfile);
+ }
}
}
mpClientInterface->closeInput(input);