policy_hal: close input descriptor during device switch
closeAllInputs is not closing the input descriptor of all the
inputs before clearing input list. current active input count
on the profile is not getting decremented due to this reason
Called close on input descriptor to update curActiveCount
correctly
CRs-Fixed: 2217362
Change-Id: I8b0739ab179d2f9eaf92ee105d6bcfdcfca34de0
diff --git a/policy_hal/AudioPolicyManager.cpp b/policy_hal/AudioPolicyManager.cpp
index 1037e4b..e9b6139 100644
--- a/policy_hal/AudioPolicyManager.cpp
+++ b/policy_hal/AudioPolicyManager.cpp
@@ -2286,6 +2286,7 @@
patchRemoved = true;
}
mpClientInterface->closeInput(mInputs.keyAt(input_index-1));
+ inputDesc->close();
}
mInputs.clear();
SoundTrigger::setCaptureState(false);