Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c840184f authored by Eric Laurent's avatar Eric Laurent Committed by Android Git Automerger
Browse files

am 821b6c29: Merge "audio policy: populate attributes for attached capture devices" into mnc-dev

* commit '821b6c29':
  audio policy: populate attributes for attached capture devices
parents 0f95f8a7 821b6c29
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -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);