Effects: Fix write mode for disabled effects

This case is generally not encountered; we are fixing this
to ensure correctness for future code.

Test: No regression with MP3 effects and solo tester
Bug:118775810
Change-Id: I016e23101d42ffeee1e66102b6f6276f17c47684
diff --git a/services/audioflinger/Effects.cpp b/services/audioflinger/Effects.cpp
index 73882a6..6ab6369 100644
--- a/services/audioflinger/Effects.cpp
+++ b/services/audioflinger/Effects.cpp
@@ -480,7 +480,12 @@
         // accumulate input onto output
         sp<EffectChain> chain = mChain.promote();
         if (chain.get() != nullptr && chain->activeTrackCnt() != 0) {
-            accumulateInputToOutput();
+            // similar handling with data_bypass above.
+            if (mConfig.outputCfg.accessMode == EFFECT_BUFFER_ACCESS_ACCUMULATE) {
+                accumulateInputToOutput();
+            } else { // EFFECT_BUFFER_ACCESS_WRITE
+                copyInputToOutput();
+            }
         }
     }
 }