Revert "audio: Fix remote submix behavior with multiple inputs"
Revert submission 2862771-cuttlefish_aidl_audio-2
Reason for revert: b/316027906
Reverted changes: /q/submissionid:2862771-cuttlefish_aidl_audio-2
Change-Id: I68932be8dad4b4fd4214d0ae6fc01202727f1658
diff --git a/audio/aidl/default/r_submix/SubmixRoute.cpp b/audio/aidl/default/r_submix/SubmixRoute.cpp
index 235c9a3..f04e607 100644
--- a/audio/aidl/default/r_submix/SubmixRoute.cpp
+++ b/audio/aidl/default/r_submix/SubmixRoute.cpp
@@ -98,9 +98,6 @@
}
mStreamInStandby = true;
mReadCounterFrames = 0;
- if (mSink != nullptr) {
- mSink->shutdown(false);
- }
} else {
mStreamOutOpen = true;
}
@@ -109,7 +106,8 @@
void SubmixRoute::closeStream(bool isInput) {
std::lock_guard guard(mLock);
if (isInput) {
- if (--mInputRefCount == 0) {
+ mInputRefCount--;
+ if (mInputRefCount == 0) {
mStreamInOpen = false;
if (mSink != nullptr) {
mSink->shutdown(true);