audio: effect: prevents spurious call to remove/add device effects

Bug: 268441977
Test: make

When multiple clients are using a same input, each time a client is
added/removed, the audio path will be recreated, thus leading to
removing/adding the device effect on audio hal if a device effect is
used.
This CL prevents from removing/adding a device effect when a patch handle
is reused, by checking if it involves same sink device/source mix or sink mix
/source device.

Change-Id: I9545f701835a4269a870b66e4f68351aca384683
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
diff --git a/services/audioflinger/DeviceEffectManager.h b/services/audioflinger/DeviceEffectManager.h
index 3a33a71..a0cf65f 100644
--- a/services/audioflinger/DeviceEffectManager.h
+++ b/services/audioflinger/DeviceEffectManager.h
@@ -62,6 +62,9 @@
     void onCreateAudioPatch(audio_patch_handle_t handle,
                             const PatchPanel::Patch& patch) override;
     void onReleaseAudioPatch(audio_patch_handle_t handle) override;
+    void onUpdateAudioPatch(audio_patch_handle_t oldHandle,
+                            audio_patch_handle_t newHandle,
+                            const PatchPanel::Patch& patch) override;
 
 private:
     status_t checkEffectCompatibility(const effect_descriptor_t *desc);