audio: Fix remote submix behavior with multiple inputs

Align the behavior of the new implementation with the legacy
implementation in the case when the client opens multiple
input streams on the same remote submix device.

Reduce the HAL buffer size to match legacy behavior.

Bug: 264712385
Test: atest CtsVirtualDevicesTestCases --test-filter=".*VirtualAudioTest.*"
(cherry picked from commit a83c8a5518234d0744f7453222db3cf2d8b876c2)
Change-Id: I6f5e6a2c133059c66269b1bdd8a30392db282c4d
diff --git a/audio/aidl/default/r_submix/SubmixRoute.cpp b/audio/aidl/default/r_submix/SubmixRoute.cpp
index f04e607..235c9a3 100644
--- a/audio/aidl/default/r_submix/SubmixRoute.cpp
+++ b/audio/aidl/default/r_submix/SubmixRoute.cpp
@@ -98,6 +98,9 @@
         }
         mStreamInStandby = true;
         mReadCounterFrames = 0;
+        if (mSink != nullptr) {
+            mSink->shutdown(false);
+        }
     } else {
         mStreamOutOpen = true;
     }
@@ -106,8 +109,7 @@
 void SubmixRoute::closeStream(bool isInput) {
     std::lock_guard guard(mLock);
     if (isInput) {
-        mInputRefCount--;
-        if (mInputRefCount == 0) {
+        if (--mInputRefCount == 0) {
             mStreamInOpen = false;
             if (mSink != nullptr) {
                 mSink->shutdown(true);