Audio V4: Make effect default wrapper device independent

What was done in this patch:
 # move headers in all-versions/default folder for qualified inclusion
mkdir -p audio/effect/all-versions/include/effect/all-versions/default/
mv audio/effect/all-versions/*[hp] $_
 # Go in the all-versions header folder
cd $_
 # Use a macro for the version
sed -i '/^#/!s/V2_0/AUDIO_HAL_VERSION/g' *
 #Remove 2.0 includes
sed -i "/include.*2.0/d" *
 # Add include guard to make sure AUDIO_HAL_VERSION is set
sed -i '/limitations under the License/!b;N;a\n#include <common/all-versions/IncludeGuard.h>' *
 # Remove guard include macro
sed -i '/^#.*[H_]$/d' *
 # Remove LOG_TAG
sed -i '/LOG_TAG/d' *
 # Remove local include (include "XXX")
sed -i '/include.*"/{N;/\n$/d;D}' *
 # Replace implementation with inclusion
cd audio/effect/2.0/
git checkout HEAD^^
ls *h *cpp| sed -r 's/.*h$/\0 \0/;s/(.*)cpp/\1impl.h \0/' |xargs -L1 printf '1h;2,$H;$!d;g;s$namespace.*}[^\\n]*$#define AUDIO_HAL_VERSION V2_0\\\n#include <effect/all-versions/default/%s>\\\n#undef AUDIO_HAL_VERSION$\000%s\000'|xargs -0 -n2 sed -i
+ manual update of Android.bp and removal of duplicate include

Bug: 38184704
Test: compile
Change-Id: If99871516f3069fcb9e699ab670a665d7d507e7d
diff --git a/audio/effect/2.0/default/AcousticEchoCancelerEffect.cpp b/audio/effect/2.0/default/AcousticEchoCancelerEffect.cpp
new file mode 100644
index 0000000..cadc2f1
--- /dev/null
+++ b/audio/effect/2.0/default/AcousticEchoCancelerEffect.cpp
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "AEC_Effect_HAL"
+
+#include "AcousticEchoCancelerEffect.h"
+
+#define AUDIO_HAL_VERSION V2_0
+#include <effect/all-versions/default/AcousticEchoCancelerEffect.impl.h>
+#undef AUDIO_HAL_VERSION
diff --git a/audio/effect/2.0/default/AcousticEchoCancelerEffect.h b/audio/effect/2.0/default/AcousticEchoCancelerEffect.h
new file mode 100644
index 0000000..d36335c
--- /dev/null
+++ b/audio/effect/2.0/default/AcousticEchoCancelerEffect.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_ACOUSTICECHOCANCELEREFFECT_H
+#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_ACOUSTICECHOCANCELEREFFECT_H
+
+#include <android/hardware/audio/effect/2.0/IAcousticEchoCancelerEffect.h>
+
+#include "Effect.h"
+
+#define AUDIO_HAL_VERSION V2_0
+#include <effect/all-versions/default/AcousticEchoCancelerEffect.h>
+#undef AUDIO_HAL_VERSION
+
+#endif  // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_ACOUSTICECHOCANCELEREFFECT_H
diff --git a/audio/effect/all-versions/Android.bp b/audio/effect/2.0/default/Android.bp
similarity index 91%
rename from audio/effect/all-versions/Android.bp
rename to audio/effect/2.0/default/Android.bp
index f2b36d3..db00988 100644
--- a/audio/effect/all-versions/Android.bp
+++ b/audio/effect/2.0/default/Android.bp
@@ -39,6 +39,8 @@
     ],
 
     header_libs: [
+        "android.hardware.audio.common.util@all-versions",
+        "android.hardware.audio.effect@all-versions-impl",
         "libaudio_system_headers",
         "libaudioclient_headers",
         "libeffects_headers",
diff --git a/audio/effect/2.0/default/AudioBufferManager.cpp b/audio/effect/2.0/default/AudioBufferManager.cpp
new file mode 100644
index 0000000..39918dd
--- /dev/null
+++ b/audio/effect/2.0/default/AudioBufferManager.cpp
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "AudioBufferManager.h"
+
+#define AUDIO_HAL_VERSION V2_0
+#include <effect/all-versions/default/AudioBufferManager.impl.h>
+#undef AUDIO_HAL_VERSION
diff --git a/audio/effect/2.0/default/AudioBufferManager.h b/audio/effect/2.0/default/AudioBufferManager.h
new file mode 100644
index 0000000..789fbd1
--- /dev/null
+++ b/audio/effect/2.0/default/AudioBufferManager.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_AUDIO_BUFFER_MANAGER_H_
+#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_AUDIO_BUFFER_MANAGER_H_
+
+#include <android/hardware/audio/effect/2.0/types.h>
+
+#define AUDIO_HAL_VERSION V2_0
+#include <effect/all-versions/default/AudioBufferManager.h>
+#undef AUDIO_HAL_VERSION
+
+#endif  // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_AUDIO_BUFFER_MANAGER_H_
diff --git a/audio/effect/2.0/default/AutomaticGainControlEffect.cpp b/audio/effect/2.0/default/AutomaticGainControlEffect.cpp
new file mode 100644
index 0000000..7e00a80
--- /dev/null
+++ b/audio/effect/2.0/default/AutomaticGainControlEffect.cpp
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "AGC_Effect_HAL"
+
+#include "AutomaticGainControlEffect.h"
+
+#define AUDIO_HAL_VERSION V2_0
+#include <effect/all-versions/default/AutomaticGainControlEffect.impl.h>
+#undef AUDIO_HAL_VERSION
diff --git a/audio/effect/2.0/default/AutomaticGainControlEffect.h b/audio/effect/2.0/default/AutomaticGainControlEffect.h
new file mode 100644
index 0000000..ef440d2
--- /dev/null
+++ b/audio/effect/2.0/default/AutomaticGainControlEffect.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_AUTOMATICGAINCONTROLEFFECT_H
+#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_AUTOMATICGAINCONTROLEFFECT_H
+
+#include <android/hardware/audio/effect/2.0/IAutomaticGainControlEffect.h>
+
+#include "Effect.h"
+
+#define AUDIO_HAL_VERSION V2_0
+#include <effect/all-versions/default/AutomaticGainControlEffect.h>
+#undef AUDIO_HAL_VERSION
+
+#endif  // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_AUTOMATICGAINCONTROLEFFECT_H
diff --git a/audio/effect/2.0/default/BassBoostEffect.cpp b/audio/effect/2.0/default/BassBoostEffect.cpp
new file mode 100644
index 0000000..df9e892
--- /dev/null
+++ b/audio/effect/2.0/default/BassBoostEffect.cpp
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "BassBoost_HAL"
+
+#include "BassBoostEffect.h"
+
+#define AUDIO_HAL_VERSION V2_0
+#include <effect/all-versions/default/BassBoostEffect.impl.h>
+#undef AUDIO_HAL_VERSION
diff --git a/audio/effect/2.0/default/BassBoostEffect.h b/audio/effect/2.0/default/BassBoostEffect.h
new file mode 100644
index 0000000..83179e2
--- /dev/null
+++ b/audio/effect/2.0/default/BassBoostEffect.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_BASSBOOSTEFFECT_H
+#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_BASSBOOSTEFFECT_H
+
+#include <android/hardware/audio/effect/2.0/IBassBoostEffect.h>
+
+#include <hidl/MQDescriptor.h>
+
+#include "Effect.h"
+
+#define AUDIO_HAL_VERSION V2_0
+#include <effect/all-versions/default/BassBoostEffect.h>
+#undef AUDIO_HAL_VERSION
+
+#endif  // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_BASSBOOSTEFFECT_H
diff --git a/audio/effect/2.0/default/Conversions.cpp b/audio/effect/2.0/default/Conversions.cpp
new file mode 100644
index 0000000..b59752c
--- /dev/null
+++ b/audio/effect/2.0/default/Conversions.cpp
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "Conversions.h"
+#include "HidlUtils.h"
+
+using ::android::hardware::audio::common::V2_0::HidlUtils;
+
+#define AUDIO_HAL_VERSION V2_0
+#include <effect/all-versions/default/Conversions.impl.h>
+#undef AUDIO_HAL_VERSION
diff --git a/audio/effect/2.0/default/Conversions.h b/audio/effect/2.0/default/Conversions.h
new file mode 100644
index 0000000..94c7f66
--- /dev/null
+++ b/audio/effect/2.0/default/Conversions.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_CONVERSIONS_H_
+#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_CONVERSIONS_H_
+
+#include <android/hardware/audio/effect/2.0/types.h>
+
+#define AUDIO_HAL_VERSION V2_0
+#include <effect/all-versions/default/Conversions.h>
+#undef AUDIO_HAL_VERSION
+
+#endif  // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_CONVERSIONS_H_
diff --git a/audio/effect/2.0/default/DownmixEffect.cpp b/audio/effect/2.0/default/DownmixEffect.cpp
new file mode 100644
index 0000000..1a51e13
--- /dev/null
+++ b/audio/effect/2.0/default/DownmixEffect.cpp
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "Downmix_HAL"
+
+#include "DownmixEffect.h"
+
+#define AUDIO_HAL_VERSION V2_0
+#include <effect/all-versions/default/DownmixEffect.impl.h>
+#undef AUDIO_HAL_VERSION
diff --git a/audio/effect/2.0/default/DownmixEffect.h b/audio/effect/2.0/default/DownmixEffect.h
new file mode 100644
index 0000000..6dbbb32
--- /dev/null
+++ b/audio/effect/2.0/default/DownmixEffect.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_DOWNMIXEFFECT_H
+#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_DOWNMIXEFFECT_H
+
+#include <android/hardware/audio/effect/2.0/IDownmixEffect.h>
+
+#include "Effect.h"
+
+#define AUDIO_HAL_VERSION V2_0
+#include <effect/all-versions/default/DownmixEffect.h>
+#undef AUDIO_HAL_VERSION
+
+#endif  // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_DOWNMIXEFFECT_H
diff --git a/audio/effect/2.0/default/Effect.cpp b/audio/effect/2.0/default/Effect.cpp
new file mode 100644
index 0000000..e234e52
--- /dev/null
+++ b/audio/effect/2.0/default/Effect.cpp
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <memory.h>
+
+#define LOG_TAG "EffectHAL"
+#define ATRACE_TAG ATRACE_TAG_AUDIO
+
+#include "Conversions.h"
+#include "Effect.h"
+#include "common/all-versions/default/EffectMap.h"
+
+#define AUDIO_HAL_VERSION V2_0
+#include <effect/all-versions/default/Effect.impl.h>
+#undef AUDIO_HAL_VERSION
diff --git a/audio/effect/2.0/default/Effect.h b/audio/effect/2.0/default/Effect.h
new file mode 100644
index 0000000..a4d194d
--- /dev/null
+++ b/audio/effect/2.0/default/Effect.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_EFFECT_H
+#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_EFFECT_H
+
+#include <android/hardware/audio/effect/2.0/IEffect.h>
+
+#include "AudioBufferManager.h"
+
+#define AUDIO_HAL_VERSION V2_0
+#include <effect/all-versions/default/Effect.h>
+#undef AUDIO_HAL_VERSION
+
+#endif  // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_EFFECT_H
diff --git a/audio/effect/2.0/default/EffectsFactory.cpp b/audio/effect/2.0/default/EffectsFactory.cpp
new file mode 100644
index 0000000..a48a85f
--- /dev/null
+++ b/audio/effect/2.0/default/EffectsFactory.cpp
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "EffectFactoryHAL"
+#include "EffectsFactory.h"
+#include "AcousticEchoCancelerEffect.h"
+#include "AutomaticGainControlEffect.h"
+#include "BassBoostEffect.h"
+#include "Conversions.h"
+#include "DownmixEffect.h"
+#include "Effect.h"
+#include "EnvironmentalReverbEffect.h"
+#include "EqualizerEffect.h"
+#include "HidlUtils.h"
+#include "LoudnessEnhancerEffect.h"
+#include "NoiseSuppressionEffect.h"
+#include "PresetReverbEffect.h"
+#include "VirtualizerEffect.h"
+#include "VisualizerEffect.h"
+#include "common/all-versions/default/EffectMap.h"
+
+using ::android::hardware::audio::common::V2_0::HidlUtils;
+
+#define AUDIO_HAL_VERSION V2_0
+#include <effect/all-versions/default/EffectsFactory.impl.h>
+#undef AUDIO_HAL_VERSION
diff --git a/audio/effect/2.0/default/EffectsFactory.h b/audio/effect/2.0/default/EffectsFactory.h
new file mode 100644
index 0000000..f1bfbcf
--- /dev/null
+++ b/audio/effect/2.0/default/EffectsFactory.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_EFFECTSFACTORY_H
+#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_EFFECTSFACTORY_H
+
+#include <system/audio_effect.h>
+
+#include <android/hardware/audio/effect/2.0/IEffectsFactory.h>
+
+#include <hidl/MQDescriptor.h>
+#define AUDIO_HAL_VERSION V2_0
+#include <effect/all-versions/default/EffectsFactory.h>
+#undef AUDIO_HAL_VERSION
+
+#endif  // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_EFFECTSFACTORY_H
diff --git a/audio/effect/2.0/default/EnvironmentalReverbEffect.cpp b/audio/effect/2.0/default/EnvironmentalReverbEffect.cpp
new file mode 100644
index 0000000..017dd1f
--- /dev/null
+++ b/audio/effect/2.0/default/EnvironmentalReverbEffect.cpp
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "EnvReverb_HAL"
+#include <android/log.h>
+
+#include "EnvironmentalReverbEffect.h"
+
+#define AUDIO_HAL_VERSION V2_0
+#include <effect/all-versions/default/EnvironmentalReverbEffect.impl.h>
+#undef AUDIO_HAL_VERSION
diff --git a/audio/effect/2.0/default/EnvironmentalReverbEffect.h b/audio/effect/2.0/default/EnvironmentalReverbEffect.h
new file mode 100644
index 0000000..d93a53f
--- /dev/null
+++ b/audio/effect/2.0/default/EnvironmentalReverbEffect.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_ENVIRONMENTALREVERBEFFECT_H
+#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_ENVIRONMENTALREVERBEFFECT_H
+
+#include <system/audio_effects/effect_environmentalreverb.h>
+
+#include <android/hardware/audio/effect/2.0/IEnvironmentalReverbEffect.h>
+
+#include "Effect.h"
+
+#define AUDIO_HAL_VERSION V2_0
+#include <effect/all-versions/default/EnvironmentalReverbEffect.h>
+#undef AUDIO_HAL_VERSION
+
+#endif  // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_ENVIRONMENTALREVERBEFFECT_H
diff --git a/audio/effect/2.0/default/EqualizerEffect.cpp b/audio/effect/2.0/default/EqualizerEffect.cpp
new file mode 100644
index 0000000..d6e056c
--- /dev/null
+++ b/audio/effect/2.0/default/EqualizerEffect.cpp
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "Equalizer_HAL"
+
+#include "EqualizerEffect.h"
+
+#define AUDIO_HAL_VERSION V2_0
+#include <effect/all-versions/default/EqualizerEffect.impl.h>
+#undef AUDIO_HAL_VERSION
diff --git a/audio/effect/2.0/default/EqualizerEffect.h b/audio/effect/2.0/default/EqualizerEffect.h
new file mode 100644
index 0000000..54cdd50
--- /dev/null
+++ b/audio/effect/2.0/default/EqualizerEffect.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_EQUALIZEREFFECT_H
+#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_EQUALIZEREFFECT_H
+
+#include <android/hardware/audio/effect/2.0/IEqualizerEffect.h>
+
+#include "Effect.h"
+
+#define AUDIO_HAL_VERSION V2_0
+#include <effect/all-versions/default/EqualizerEffect.h>
+#undef AUDIO_HAL_VERSION
+
+#endif  // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_EQUALIZEREFFECT_H
diff --git a/audio/effect/2.0/default/LoudnessEnhancerEffect.cpp b/audio/effect/2.0/default/LoudnessEnhancerEffect.cpp
new file mode 100644
index 0000000..2dca0f4
--- /dev/null
+++ b/audio/effect/2.0/default/LoudnessEnhancerEffect.cpp
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "LoudnessEnhancer_HAL"
+
+#include "LoudnessEnhancerEffect.h"
+
+#define AUDIO_HAL_VERSION V2_0
+#include <effect/all-versions/default/LoudnessEnhancerEffect.impl.h>
+#undef AUDIO_HAL_VERSION
diff --git a/audio/effect/2.0/default/LoudnessEnhancerEffect.h b/audio/effect/2.0/default/LoudnessEnhancerEffect.h
new file mode 100644
index 0000000..992e238
--- /dev/null
+++ b/audio/effect/2.0/default/LoudnessEnhancerEffect.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_LOUDNESSENHANCEREFFECT_H
+#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_LOUDNESSENHANCEREFFECT_H
+
+#include <android/hardware/audio/effect/2.0/ILoudnessEnhancerEffect.h>
+
+#include "Effect.h"
+
+#define AUDIO_HAL_VERSION V2_0
+#include <effect/all-versions/default/LoudnessEnhancerEffect.h>
+#undef AUDIO_HAL_VERSION
+
+#endif  // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_LOUDNESSENHANCEREFFECT_H
diff --git a/audio/effect/2.0/default/NoiseSuppressionEffect.cpp b/audio/effect/2.0/default/NoiseSuppressionEffect.cpp
new file mode 100644
index 0000000..089e811
--- /dev/null
+++ b/audio/effect/2.0/default/NoiseSuppressionEffect.cpp
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "NS_Effect_HAL"
+
+#include "NoiseSuppressionEffect.h"
+
+#define AUDIO_HAL_VERSION V2_0
+#include <effect/all-versions/default/NoiseSuppressionEffect.impl.h>
+#undef AUDIO_HAL_VERSION
diff --git a/audio/effect/2.0/default/NoiseSuppressionEffect.h b/audio/effect/2.0/default/NoiseSuppressionEffect.h
new file mode 100644
index 0000000..0eee4b5
--- /dev/null
+++ b/audio/effect/2.0/default/NoiseSuppressionEffect.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_NOISESUPPRESSIONEFFECT_H
+#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_NOISESUPPRESSIONEFFECT_H
+
+#include <android/hardware/audio/effect/2.0/INoiseSuppressionEffect.h>
+
+#include "Effect.h"
+
+#define AUDIO_HAL_VERSION V2_0
+#include <effect/all-versions/default/NoiseSuppressionEffect.h>
+#undef AUDIO_HAL_VERSION
+
+#endif  // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_NOISESUPPRESSIONEFFECT_H
diff --git a/audio/effect/2.0/default/PresetReverbEffect.cpp b/audio/effect/2.0/default/PresetReverbEffect.cpp
new file mode 100644
index 0000000..0648f6a
--- /dev/null
+++ b/audio/effect/2.0/default/PresetReverbEffect.cpp
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "PresetReverb_HAL"
+
+#include "PresetReverbEffect.h"
+
+#define AUDIO_HAL_VERSION V2_0
+#include <effect/all-versions/default/PresetReverbEffect.impl.h>
+#undef AUDIO_HAL_VERSION
diff --git a/audio/effect/2.0/default/PresetReverbEffect.h b/audio/effect/2.0/default/PresetReverbEffect.h
new file mode 100644
index 0000000..1ea1626
--- /dev/null
+++ b/audio/effect/2.0/default/PresetReverbEffect.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_PRESETREVERBEFFECT_H
+#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_PRESETREVERBEFFECT_H
+
+#include <android/hardware/audio/effect/2.0/IPresetReverbEffect.h>
+
+#include "Effect.h"
+
+#define AUDIO_HAL_VERSION V2_0
+#include <effect/all-versions/default/PresetReverbEffect.h>
+#undef AUDIO_HAL_VERSION
+
+#endif  // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_PRESETREVERBEFFECT_H
diff --git a/audio/effect/2.0/default/VirtualizerEffect.cpp b/audio/effect/2.0/default/VirtualizerEffect.cpp
new file mode 100644
index 0000000..63d3eb9
--- /dev/null
+++ b/audio/effect/2.0/default/VirtualizerEffect.cpp
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "Virtualizer_HAL"
+
+#include "VirtualizerEffect.h"
+
+#define AUDIO_HAL_VERSION V2_0
+#include <effect/all-versions/default/VirtualizerEffect.impl.h>
+#undef AUDIO_HAL_VERSION
diff --git a/audio/effect/2.0/default/VirtualizerEffect.h b/audio/effect/2.0/default/VirtualizerEffect.h
new file mode 100644
index 0000000..04f93c4
--- /dev/null
+++ b/audio/effect/2.0/default/VirtualizerEffect.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_VIRTUALIZEREFFECT_H
+#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_VIRTUALIZEREFFECT_H
+
+#include <android/hardware/audio/effect/2.0/IVirtualizerEffect.h>
+
+#include "Effect.h"
+
+#define AUDIO_HAL_VERSION V2_0
+#include <effect/all-versions/default/VirtualizerEffect.h>
+#undef AUDIO_HAL_VERSION
+
+#endif  // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_VIRTUALIZEREFFECT_H
diff --git a/audio/effect/2.0/default/VisualizerEffect.cpp b/audio/effect/2.0/default/VisualizerEffect.cpp
new file mode 100644
index 0000000..5235524
--- /dev/null
+++ b/audio/effect/2.0/default/VisualizerEffect.cpp
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "Visualizer_HAL"
+
+#include "VisualizerEffect.h"
+
+#define AUDIO_HAL_VERSION V2_0
+#include <effect/all-versions/default/VisualizerEffect.impl.h>
+#undef AUDIO_HAL_VERSION
diff --git a/audio/effect/2.0/default/VisualizerEffect.h b/audio/effect/2.0/default/VisualizerEffect.h
new file mode 100644
index 0000000..940f15d
--- /dev/null
+++ b/audio/effect/2.0/default/VisualizerEffect.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_VISUALIZEREFFECT_H
+#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_VISUALIZEREFFECT_H
+
+#include <android/hardware/audio/effect/2.0/IVisualizerEffect.h>
+
+#include "Effect.h"
+
+#define AUDIO_HAL_VERSION V2_0
+#include <effect/all-versions/default/VisualizerEffect.h>
+#undef AUDIO_HAL_VERSION
+
+#endif  // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_VISUALIZEREFFECT_H
diff --git a/audio/effect/all-versions/default/Android.bp b/audio/effect/all-versions/default/Android.bp
new file mode 100644
index 0000000..ed2a093
--- /dev/null
+++ b/audio/effect/all-versions/default/Android.bp
@@ -0,0 +1,31 @@
+cc_library_headers {
+    name: "android.hardware.audio.effect@all-versions-impl",
+    defaults: ["hidl_defaults"],
+    vendor: true,
+    relative_install_path: "hw",
+
+    export_include_dirs: ["include"],
+
+    shared_libs: [
+        "libbase",
+        "libcutils",
+        "libeffects",
+        "libfmq",
+        "libhidlbase",
+        "libhidlmemory",
+        "libhidltransport",
+        "liblog",
+        "libutils",
+        "android.hardware.audio.common-util",
+        "android.hidl.memory@1.0",
+    ],
+
+    header_libs: [
+        "libaudio_system_headers",
+        "libaudioclient_headers",
+        "libeffects_headers",
+        "libhardware_headers",
+        "libmedia_headers",
+        "android.hardware.audio.common.util@all-versions",
+    ],
+}
diff --git a/audio/effect/all-versions/AcousticEchoCancelerEffect.h b/audio/effect/all-versions/default/include/effect/all-versions/default/AcousticEchoCancelerEffect.h
similarity index 87%
rename from audio/effect/all-versions/AcousticEchoCancelerEffect.h
rename to audio/effect/all-versions/default/include/effect/all-versions/default/AcousticEchoCancelerEffect.h
index b9833bd..b63f2fb 100644
--- a/audio/effect/all-versions/AcousticEchoCancelerEffect.h
+++ b/audio/effect/all-versions/default/include/effect/all-versions/default/AcousticEchoCancelerEffect.h
@@ -14,25 +14,21 @@
  * limitations under the License.
  */
 
-#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_ACOUSTICECHOCANCELEREFFECT_H
-#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_ACOUSTICECHOCANCELEREFFECT_H
+#include <common/all-versions/IncludeGuard.h>
 
-#include <android/hardware/audio/effect/2.0/IAcousticEchoCancelerEffect.h>
 #include <hidl/Status.h>
 
 #include <hidl/MQDescriptor.h>
 
-#include "Effect.h"
-
 namespace android {
 namespace hardware {
 namespace audio {
 namespace effect {
-namespace V2_0 {
+namespace AUDIO_HAL_VERSION {
 namespace implementation {
 
-using ::android::hardware::audio::effect::V2_0::IAcousticEchoCancelerEffect;
-using ::android::hardware::audio::effect::V2_0::Result;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IAcousticEchoCancelerEffect;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::Result;
 using ::android::hardware::Return;
 using ::android::hardware::Void;
 using ::android::hardware::hidl_vec;
@@ -42,7 +38,7 @@
 struct AcousticEchoCancelerEffect : public IAcousticEchoCancelerEffect {
     explicit AcousticEchoCancelerEffect(effect_handle_t handle);
 
-    // Methods from ::android::hardware::audio::effect::V2_0::IEffect follow.
+    // Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffect follow.
     Return<Result> init() override;
     Return<Result> setConfig(
         const EffectConfig& config, const sp<IEffectBufferProviderCallback>& inputBufferProvider,
@@ -86,7 +82,8 @@
                                               const hidl_vec<uint8_t>& configData) override;
     Return<Result> close() override;
 
-    // Methods from ::android::hardware::audio::effect::V2_0::IAcousticEchoCancelerEffect follow.
+    // Methods from
+    // ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IAcousticEchoCancelerEffect follow.
     Return<Result> setEchoDelay(uint32_t echoDelayMs) override;
     Return<void> getEchoDelay(getEchoDelay_cb _hidl_cb) override;
 
@@ -97,10 +94,8 @@
 };
 
 }  // namespace implementation
-}  // namespace V2_0
+}  // namespace AUDIO_HAL_VERSION
 }  // namespace effect
 }  // namespace audio
 }  // namespace hardware
 }  // namespace android
-
-#endif  // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_ACOUSTICECHOCANCELEREFFECT_H
diff --git a/audio/effect/all-versions/AcousticEchoCancelerEffect.cpp b/audio/effect/all-versions/default/include/effect/all-versions/default/AcousticEchoCancelerEffect.impl.h
similarity index 94%
rename from audio/effect/all-versions/AcousticEchoCancelerEffect.cpp
rename to audio/effect/all-versions/default/include/effect/all-versions/default/AcousticEchoCancelerEffect.impl.h
index 9315e3e..bee3607 100644
--- a/audio/effect/all-versions/AcousticEchoCancelerEffect.cpp
+++ b/audio/effect/all-versions/default/include/effect/all-versions/default/AcousticEchoCancelerEffect.impl.h
@@ -14,17 +14,16 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "AEC_Effect_HAL"
+#include <common/all-versions/IncludeGuard.h>
+
 #include <android/log.h>
 #include <system/audio_effects/effect_aec.h>
 
-#include "AcousticEchoCancelerEffect.h"
-
 namespace android {
 namespace hardware {
 namespace audio {
 namespace effect {
-namespace V2_0 {
+namespace AUDIO_HAL_VERSION {
 namespace implementation {
 
 AcousticEchoCancelerEffect::AcousticEchoCancelerEffect(effect_handle_t handle)
@@ -32,7 +31,7 @@
 
 AcousticEchoCancelerEffect::~AcousticEchoCancelerEffect() {}
 
-// Methods from ::android::hardware::audio::effect::V2_0::IEffect follow.
+// Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffect follow.
 Return<Result> AcousticEchoCancelerEffect::init() {
     return mEffect->init();
 }
@@ -162,7 +161,8 @@
     return mEffect->close();
 }
 
-// Methods from ::android::hardware::audio::effect::V2_0::IAcousticEchoCancelerEffect follow.
+// Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IAcousticEchoCancelerEffect
+// follow.
 Return<Result> AcousticEchoCancelerEffect::setEchoDelay(uint32_t echoDelayMs) {
     return mEffect->setParam(AEC_PARAM_ECHO_DELAY, echoDelayMs);
 }
@@ -172,7 +172,7 @@
 }
 
 }  // namespace implementation
-}  // namespace V2_0
+}  // namespace AUDIO_HAL_VERSION
 }  // namespace effect
 }  // namespace audio
 }  // namespace hardware
diff --git a/audio/effect/all-versions/AudioBufferManager.h b/audio/effect/all-versions/default/include/effect/all-versions/default/AudioBufferManager.h
similarity index 79%
rename from audio/effect/all-versions/AudioBufferManager.h
rename to audio/effect/all-versions/default/include/effect/all-versions/default/AudioBufferManager.h
index e19db12..34dea2d 100644
--- a/audio/effect/all-versions/AudioBufferManager.h
+++ b/audio/effect/all-versions/default/include/effect/all-versions/default/AudioBufferManager.h
@@ -14,26 +14,24 @@
  * limitations under the License.
  */
 
-#ifndef android_hardware_audio_effect_V2_0_AudioBufferManager_H_
-#define android_hardware_audio_effect_V2_0_AudioBufferManager_H_
+#include <common/all-versions/IncludeGuard.h>
 
 #include <mutex>
 
-#include <android/hardware/audio/effect/2.0/types.h>
 #include <android/hidl/memory/1.0/IMemory.h>
 #include <system/audio_effect.h>
 #include <utils/KeyedVector.h>
 #include <utils/RefBase.h>
 #include <utils/Singleton.h>
 
-using ::android::hardware::audio::effect::V2_0::AudioBuffer;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::AudioBuffer;
 using ::android::hidl::memory::V1_0::IMemory;
 
 namespace android {
 namespace hardware {
 namespace audio {
 namespace effect {
-namespace V2_0 {
+namespace AUDIO_HAL_VERSION {
 namespace implementation {
 
 class AudioBufferWrapper : public RefBase {
@@ -53,13 +51,13 @@
 };
 
 }  // namespace implementation
-}  // namespace V2_0
+}  // namespace AUDIO_HAL_VERSION
 }  // namespace effect
 }  // namespace audio
 }  // namespace hardware
 }  // namespace android
 
-using ::android::hardware::audio::effect::V2_0::implementation::AudioBufferWrapper;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::implementation::AudioBufferWrapper;
 
 namespace android {
 
@@ -69,7 +67,7 @@
     bool wrap(const AudioBuffer& buffer, sp<AudioBufferWrapper>* wrapper);
 
    private:
-    friend class hardware::audio::effect::V2_0::implementation::AudioBufferWrapper;
+    friend class hardware::audio::effect::AUDIO_HAL_VERSION::implementation::AudioBufferWrapper;
 
     // Called by AudioBufferWrapper.
     void removeEntry(uint64_t id);
@@ -79,5 +77,3 @@
 };
 
 }  // namespace android
-
-#endif  // android_hardware_audio_effect_V2_0_AudioBufferManager_H_
diff --git a/audio/effect/all-versions/AudioBufferManager.cpp b/audio/effect/all-versions/default/include/effect/all-versions/default/AudioBufferManager.impl.h
similarity index 95%
rename from audio/effect/all-versions/AudioBufferManager.cpp
rename to audio/effect/all-versions/default/include/effect/all-versions/default/AudioBufferManager.impl.h
index 3d4d3d5..71ccd2d 100644
--- a/audio/effect/all-versions/AudioBufferManager.cpp
+++ b/audio/effect/all-versions/default/include/effect/all-versions/default/AudioBufferManager.impl.h
@@ -14,12 +14,12 @@
  * limitations under the License.
  */
 
+#include <common/all-versions/IncludeGuard.h>
+
 #include <atomic>
 
 #include <hidlmemory/mapping.h>
 
-#include "AudioBufferManager.h"
-
 namespace android {
 
 ANDROID_SINGLETON_STATIC_INSTANCE(AudioBufferManager);
@@ -53,7 +53,7 @@
 namespace hardware {
 namespace audio {
 namespace effect {
-namespace V2_0 {
+namespace AUDIO_HAL_VERSION {
 namespace implementation {
 
 AudioBufferWrapper::AudioBufferWrapper(const AudioBuffer& buffer)
@@ -83,7 +83,7 @@
 }
 
 }  // namespace implementation
-}  // namespace V2_0
+}  // namespace AUDIO_HAL_VERSION
 }  // namespace effect
 }  // namespace audio
 }  // namespace hardware
diff --git a/audio/effect/all-versions/AutomaticGainControlEffect.h b/audio/effect/all-versions/default/include/effect/all-versions/default/AutomaticGainControlEffect.h
similarity index 88%
rename from audio/effect/all-versions/AutomaticGainControlEffect.h
rename to audio/effect/all-versions/default/include/effect/all-versions/default/AutomaticGainControlEffect.h
index 5536e14..941f45d 100644
--- a/audio/effect/all-versions/AutomaticGainControlEffect.h
+++ b/audio/effect/all-versions/default/include/effect/all-versions/default/AutomaticGainControlEffect.h
@@ -14,27 +14,23 @@
  * limitations under the License.
  */
 
-#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_AUTOMATICGAINCONTROLEFFECT_H
-#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_AUTOMATICGAINCONTROLEFFECT_H
+#include <common/all-versions/IncludeGuard.h>
 
 #include <system/audio_effects/effect_agc.h>
 
-#include <android/hardware/audio/effect/2.0/IAutomaticGainControlEffect.h>
 #include <hidl/Status.h>
 
 #include <hidl/MQDescriptor.h>
 
-#include "Effect.h"
-
 namespace android {
 namespace hardware {
 namespace audio {
 namespace effect {
-namespace V2_0 {
+namespace AUDIO_HAL_VERSION {
 namespace implementation {
 
-using ::android::hardware::audio::effect::V2_0::IAutomaticGainControlEffect;
-using ::android::hardware::audio::effect::V2_0::Result;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IAutomaticGainControlEffect;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::Result;
 using ::android::hardware::Return;
 using ::android::hardware::Void;
 using ::android::hardware::hidl_vec;
@@ -44,7 +40,7 @@
 struct AutomaticGainControlEffect : public IAutomaticGainControlEffect {
     explicit AutomaticGainControlEffect(effect_handle_t handle);
 
-    // Methods from ::android::hardware::audio::effect::V2_0::IEffect follow.
+    // Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffect follow.
     Return<Result> init() override;
     Return<Result> setConfig(
         const EffectConfig& config, const sp<IEffectBufferProviderCallback>& inputBufferProvider,
@@ -88,7 +84,8 @@
                                               const hidl_vec<uint8_t>& configData) override;
     Return<Result> close() override;
 
-    // Methods from ::android::hardware::audio::effect::V2_0::IAutomaticGainControlEffect follow.
+    // Methods from
+    // ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IAutomaticGainControlEffect follow.
     Return<Result> setTargetLevel(int16_t targetLevelMb) override;
     Return<void> getTargetLevel(getTargetLevel_cb _hidl_cb) override;
     Return<Result> setCompGain(int16_t compGainMb) override;
@@ -111,10 +108,8 @@
 };
 
 }  // namespace implementation
-}  // namespace V2_0
+}  // namespace AUDIO_HAL_VERSION
 }  // namespace effect
 }  // namespace audio
 }  // namespace hardware
 }  // namespace android
-
-#endif  // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_AUTOMATICGAINCONTROLEFFECT_H
diff --git a/audio/effect/all-versions/AutomaticGainControlEffect.cpp b/audio/effect/all-versions/default/include/effect/all-versions/default/AutomaticGainControlEffect.impl.h
similarity index 95%
rename from audio/effect/all-versions/AutomaticGainControlEffect.cpp
rename to audio/effect/all-versions/default/include/effect/all-versions/default/AutomaticGainControlEffect.impl.h
index 382a4bc..af05d9b 100644
--- a/audio/effect/all-versions/AutomaticGainControlEffect.cpp
+++ b/audio/effect/all-versions/default/include/effect/all-versions/default/AutomaticGainControlEffect.impl.h
@@ -14,16 +14,15 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "AGC_Effect_HAL"
-#include <android/log.h>
+#include <common/all-versions/IncludeGuard.h>
 
-#include "AutomaticGainControlEffect.h"
+#include <android/log.h>
 
 namespace android {
 namespace hardware {
 namespace audio {
 namespace effect {
-namespace V2_0 {
+namespace AUDIO_HAL_VERSION {
 namespace implementation {
 
 AutomaticGainControlEffect::AutomaticGainControlEffect(effect_handle_t handle)
@@ -45,7 +44,7 @@
     halProperties->limiterEnabled = properties.limiterEnabled;
 }
 
-// Methods from ::android::hardware::audio::effect::V2_0::IEffect follow.
+// Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffect follow.
 Return<Result> AutomaticGainControlEffect::init() {
     return mEffect->init();
 }
@@ -175,7 +174,8 @@
     return mEffect->close();
 }
 
-// Methods from ::android::hardware::audio::effect::V2_0::IAutomaticGainControlEffect follow.
+// Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IAutomaticGainControlEffect
+// follow.
 Return<Result> AutomaticGainControlEffect::setTargetLevel(int16_t targetLevelMb) {
     return mEffect->setParam(AGC_PARAM_TARGET_LEVEL, targetLevelMb);
 }
@@ -217,7 +217,7 @@
 }
 
 }  // namespace implementation
-}  // namespace V2_0
+}  // namespace AUDIO_HAL_VERSION
 }  // namespace effect
 }  // namespace audio
 }  // namespace hardware
diff --git a/audio/effect/all-versions/BassBoostEffect.h b/audio/effect/all-versions/default/include/effect/all-versions/default/BassBoostEffect.h
similarity index 87%
rename from audio/effect/all-versions/BassBoostEffect.h
rename to audio/effect/all-versions/default/include/effect/all-versions/default/BassBoostEffect.h
index 278f37b..0092621 100644
--- a/audio/effect/all-versions/BassBoostEffect.h
+++ b/audio/effect/all-versions/default/include/effect/all-versions/default/BassBoostEffect.h
@@ -14,25 +14,21 @@
  * limitations under the License.
  */
 
-#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_BASSBOOSTEFFECT_H
-#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_BASSBOOSTEFFECT_H
+#include <common/all-versions/IncludeGuard.h>
 
-#include <android/hardware/audio/effect/2.0/IBassBoostEffect.h>
 #include <hidl/Status.h>
 
 #include <hidl/MQDescriptor.h>
 
-#include "Effect.h"
-
 namespace android {
 namespace hardware {
 namespace audio {
 namespace effect {
-namespace V2_0 {
+namespace AUDIO_HAL_VERSION {
 namespace implementation {
 
-using ::android::hardware::audio::effect::V2_0::IBassBoostEffect;
-using ::android::hardware::audio::effect::V2_0::Result;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IBassBoostEffect;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::Result;
 using ::android::hardware::Return;
 using ::android::hardware::Void;
 using ::android::hardware::hidl_vec;
@@ -42,7 +38,7 @@
 struct BassBoostEffect : public IBassBoostEffect {
     explicit BassBoostEffect(effect_handle_t handle);
 
-    // Methods from ::android::hardware::audio::effect::V2_0::IEffect follow.
+    // Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffect follow.
     Return<Result> init() override;
     Return<Result> setConfig(
         const EffectConfig& config, const sp<IEffectBufferProviderCallback>& inputBufferProvider,
@@ -86,7 +82,7 @@
                                               const hidl_vec<uint8_t>& configData) override;
     Return<Result> close() override;
 
-    // Methods from ::android::hardware::audio::effect::V2_0::IBassBoostEffect follow.
+    // Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IBassBoostEffect follow.
     Return<void> isStrengthSupported(isStrengthSupported_cb _hidl_cb) override;
     Return<Result> setStrength(uint16_t strength) override;
     Return<void> getStrength(getStrength_cb _hidl_cb) override;
@@ -98,10 +94,8 @@
 };
 
 }  // namespace implementation
-}  // namespace V2_0
+}  // namespace AUDIO_HAL_VERSION
 }  // namespace effect
 }  // namespace audio
 }  // namespace hardware
 }  // namespace android
-
-#endif  // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_BASSBOOSTEFFECT_H
diff --git a/audio/effect/all-versions/BassBoostEffect.cpp b/audio/effect/all-versions/default/include/effect/all-versions/default/BassBoostEffect.impl.h
similarity index 94%
rename from audio/effect/all-versions/BassBoostEffect.cpp
rename to audio/effect/all-versions/default/include/effect/all-versions/default/BassBoostEffect.impl.h
index 3366fcc..1fc8d1b 100644
--- a/audio/effect/all-versions/BassBoostEffect.cpp
+++ b/audio/effect/all-versions/default/include/effect/all-versions/default/BassBoostEffect.impl.h
@@ -14,24 +14,23 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "BassBoost_HAL"
+#include <common/all-versions/IncludeGuard.h>
+
 #include <android/log.h>
 #include <system/audio_effects/effect_bassboost.h>
 
-#include "BassBoostEffect.h"
-
 namespace android {
 namespace hardware {
 namespace audio {
 namespace effect {
-namespace V2_0 {
+namespace AUDIO_HAL_VERSION {
 namespace implementation {
 
 BassBoostEffect::BassBoostEffect(effect_handle_t handle) : mEffect(new Effect(handle)) {}
 
 BassBoostEffect::~BassBoostEffect() {}
 
-// Methods from ::android::hardware::audio::effect::V2_0::IEffect follow.
+// Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffect follow.
 Return<Result> BassBoostEffect::init() {
     return mEffect->init();
 }
@@ -158,7 +157,7 @@
     return mEffect->close();
 }
 
-// Methods from ::android::hardware::audio::effect::V2_0::IBassBoostEffect follow.
+// Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IBassBoostEffect follow.
 Return<void> BassBoostEffect::isStrengthSupported(isStrengthSupported_cb _hidl_cb) {
     return mEffect->getIntegerParam(BASSBOOST_PARAM_STRENGTH_SUPPORTED, _hidl_cb);
 }
@@ -172,7 +171,7 @@
 }
 
 }  // namespace implementation
-}  // namespace V2_0
+}  // namespace AUDIO_HAL_VERSION
 }  // namespace effect
 }  // namespace audio
 }  // namespace hardware
diff --git a/audio/effect/all-versions/Conversions.h b/audio/effect/all-versions/default/include/effect/all-versions/default/Conversions.h
similarity index 76%
rename from audio/effect/all-versions/Conversions.h
rename to audio/effect/all-versions/default/include/effect/all-versions/default/Conversions.h
index e13f36b..3f9317f 100644
--- a/audio/effect/all-versions/Conversions.h
+++ b/audio/effect/all-versions/default/include/effect/all-versions/default/Conversions.h
@@ -14,32 +14,28 @@
  * limitations under the License.
  */
 
-#ifndef android_hardware_audio_effect_V2_0_Conversions_H_
-#define android_hardware_audio_effect_V2_0_Conversions_H_
+#include <common/all-versions/IncludeGuard.h>
 
 #include <string>
 
-#include <android/hardware/audio/effect/2.0/types.h>
 #include <system/audio_effect.h>
 
 namespace android {
 namespace hardware {
 namespace audio {
 namespace effect {
-namespace V2_0 {
+namespace AUDIO_HAL_VERSION {
 namespace implementation {
 
-using ::android::hardware::audio::effect::V2_0::EffectDescriptor;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectDescriptor;
 
 void effectDescriptorFromHal(const effect_descriptor_t& halDescriptor,
                              EffectDescriptor* descriptor);
 std::string uuidToString(const effect_uuid_t& halUuid);
 
 }  // namespace implementation
-}  // namespace V2_0
+}  // namespace AUDIO_HAL_VERSION
 }  // namespace effect
 }  // namespace audio
 }  // namespace hardware
 }  // namespace android
-
-#endif  // android_hardware_audio_effect_V2_0_Conversions_H_
diff --git a/audio/effect/all-versions/Conversions.cpp b/audio/effect/all-versions/default/include/effect/all-versions/default/Conversions.impl.h
similarity index 90%
rename from audio/effect/all-versions/Conversions.cpp
rename to audio/effect/all-versions/default/include/effect/all-versions/default/Conversions.impl.h
index 0b485d5..44adf4b 100644
--- a/audio/effect/all-versions/Conversions.cpp
+++ b/audio/effect/all-versions/default/include/effect/all-versions/default/Conversions.impl.h
@@ -14,19 +14,18 @@
  * limitations under the License.
  */
 
+#include <common/all-versions/IncludeGuard.h>
+
 #include <memory.h>
 #include <stdio.h>
 
-#include "Conversions.h"
-#include "HidlUtils.h"
-
-using ::android::hardware::audio::common::V2_0::HidlUtils;
+using ::android::hardware::audio::common::AUDIO_HAL_VERSION::HidlUtils;
 
 namespace android {
 namespace hardware {
 namespace audio {
 namespace effect {
-namespace V2_0 {
+namespace AUDIO_HAL_VERSION {
 namespace implementation {
 
 void effectDescriptorFromHal(const effect_descriptor_t& halDescriptor,
@@ -50,7 +49,7 @@
 }
 
 }  // namespace implementation
-}  // namespace V2_0
+}  // namespace AUDIO_HAL_VERSION
 }  // namespace effect
 }  // namespace audio
 }  // namespace hardware
diff --git a/audio/effect/all-versions/DownmixEffect.h b/audio/effect/all-versions/default/include/effect/all-versions/default/DownmixEffect.h
similarity index 87%
rename from audio/effect/all-versions/DownmixEffect.h
rename to audio/effect/all-versions/default/include/effect/all-versions/default/DownmixEffect.h
index edcc95a..e461ca8 100644
--- a/audio/effect/all-versions/DownmixEffect.h
+++ b/audio/effect/all-versions/default/include/effect/all-versions/default/DownmixEffect.h
@@ -14,25 +14,21 @@
  * limitations under the License.
  */
 
-#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_DOWNMIXEFFECT_H
-#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_DOWNMIXEFFECT_H
+#include <common/all-versions/IncludeGuard.h>
 
-#include <android/hardware/audio/effect/2.0/IDownmixEffect.h>
 #include <hidl/Status.h>
 
 #include <hidl/MQDescriptor.h>
 
-#include "Effect.h"
-
 namespace android {
 namespace hardware {
 namespace audio {
 namespace effect {
-namespace V2_0 {
+namespace AUDIO_HAL_VERSION {
 namespace implementation {
 
-using ::android::hardware::audio::effect::V2_0::IDownmixEffect;
-using ::android::hardware::audio::effect::V2_0::Result;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IDownmixEffect;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::Result;
 using ::android::hardware::Return;
 using ::android::hardware::Void;
 using ::android::hardware::hidl_vec;
@@ -42,7 +38,7 @@
 struct DownmixEffect : public IDownmixEffect {
     explicit DownmixEffect(effect_handle_t handle);
 
-    // Methods from ::android::hardware::audio::effect::V2_0::IEffect follow.
+    // Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffect follow.
     Return<Result> init() override;
     Return<Result> setConfig(
         const EffectConfig& config, const sp<IEffectBufferProviderCallback>& inputBufferProvider,
@@ -86,7 +82,7 @@
                                               const hidl_vec<uint8_t>& configData) override;
     Return<Result> close() override;
 
-    // Methods from ::android::hardware::audio::effect::V2_0::IDownmixEffect follow.
+    // Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IDownmixEffect follow.
     Return<Result> setType(IDownmixEffect::Type preset) override;
     Return<void> getType(getType_cb _hidl_cb) override;
 
@@ -97,10 +93,8 @@
 };
 
 }  // namespace implementation
-}  // namespace V2_0
+}  // namespace AUDIO_HAL_VERSION
 }  // namespace effect
 }  // namespace audio
 }  // namespace hardware
 }  // namespace android
-
-#endif  // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_DOWNMIXEFFECT_H
diff --git a/audio/effect/all-versions/DownmixEffect.cpp b/audio/effect/all-versions/default/include/effect/all-versions/default/DownmixEffect.impl.h
similarity index 94%
rename from audio/effect/all-versions/DownmixEffect.cpp
rename to audio/effect/all-versions/default/include/effect/all-versions/default/DownmixEffect.impl.h
index e45f996..98710f8 100644
--- a/audio/effect/all-versions/DownmixEffect.cpp
+++ b/audio/effect/all-versions/default/include/effect/all-versions/default/DownmixEffect.impl.h
@@ -14,24 +14,23 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "Downmix_HAL"
+#include <common/all-versions/IncludeGuard.h>
+
 #include <android/log.h>
 #include <system/audio_effects/effect_downmix.h>
 
-#include "DownmixEffect.h"
-
 namespace android {
 namespace hardware {
 namespace audio {
 namespace effect {
-namespace V2_0 {
+namespace AUDIO_HAL_VERSION {
 namespace implementation {
 
 DownmixEffect::DownmixEffect(effect_handle_t handle) : mEffect(new Effect(handle)) {}
 
 DownmixEffect::~DownmixEffect() {}
 
-// Methods from ::android::hardware::audio::effect::V2_0::IEffect follow.
+// Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffect follow.
 Return<Result> DownmixEffect::init() {
     return mEffect->init();
 }
@@ -158,7 +157,7 @@
     return mEffect->close();
 }
 
-// Methods from ::android::hardware::audio::effect::V2_0::IDownmixEffect follow.
+// Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IDownmixEffect follow.
 Return<Result> DownmixEffect::setType(IDownmixEffect::Type preset) {
     return mEffect->setParam(DOWNMIX_PARAM_TYPE, static_cast<downmix_type_t>(preset));
 }
@@ -171,7 +170,7 @@
 }
 
 }  // namespace implementation
-}  // namespace V2_0
+}  // namespace AUDIO_HAL_VERSION
 }  // namespace effect
 }  // namespace audio
 }  // namespace hardware
diff --git a/audio/effect/all-versions/Effect.h b/audio/effect/all-versions/default/include/effect/all-versions/default/Effect.h
similarity index 90%
rename from audio/effect/all-versions/Effect.h
rename to audio/effect/all-versions/default/include/effect/all-versions/default/Effect.h
index 8f95e5e..81b0b24 100644
--- a/audio/effect/all-versions/Effect.h
+++ b/audio/effect/all-versions/default/include/effect/all-versions/default/Effect.h
@@ -14,14 +14,12 @@
  * limitations under the License.
  */
 
-#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_EFFECT_H
-#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_EFFECT_H
+#include <common/all-versions/IncludeGuard.h>
 
 #include <atomic>
 #include <memory>
 #include <vector>
 
-#include <android/hardware/audio/effect/2.0/IEffect.h>
 #include <fmq/EventFlag.h>
 #include <fmq/MessageQueue.h>
 #include <hidl/MQDescriptor.h>
@@ -30,28 +28,26 @@
 
 #include <hardware/audio_effect.h>
 
-#include "AudioBufferManager.h"
-
 namespace android {
 namespace hardware {
 namespace audio {
 namespace effect {
-namespace V2_0 {
+namespace AUDIO_HAL_VERSION {
 namespace implementation {
 
-using ::android::hardware::audio::common::V2_0::AudioDevice;
-using ::android::hardware::audio::common::V2_0::AudioMode;
-using ::android::hardware::audio::common::V2_0::AudioSource;
-using ::android::hardware::audio::common::V2_0::Uuid;
-using ::android::hardware::audio::effect::V2_0::AudioBuffer;
-using ::android::hardware::audio::effect::V2_0::EffectAuxChannelsConfig;
-using ::android::hardware::audio::effect::V2_0::EffectConfig;
-using ::android::hardware::audio::effect::V2_0::EffectDescriptor;
-using ::android::hardware::audio::effect::V2_0::EffectFeature;
-using ::android::hardware::audio::effect::V2_0::EffectOffloadParameter;
-using ::android::hardware::audio::effect::V2_0::IEffect;
-using ::android::hardware::audio::effect::V2_0::IEffectBufferProviderCallback;
-using ::android::hardware::audio::effect::V2_0::Result;
+using ::android::hardware::audio::common::AUDIO_HAL_VERSION::AudioDevice;
+using ::android::hardware::audio::common::AUDIO_HAL_VERSION::AudioMode;
+using ::android::hardware::audio::common::AUDIO_HAL_VERSION::AudioSource;
+using ::android::hardware::audio::common::AUDIO_HAL_VERSION::Uuid;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::AudioBuffer;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectAuxChannelsConfig;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectConfig;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectDescriptor;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectFeature;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectOffloadParameter;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffect;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffectBufferProviderCallback;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::Result;
 using ::android::hardware::Return;
 using ::android::hardware::Void;
 using ::android::hardware::hidl_vec;
@@ -65,7 +61,7 @@
 
     explicit Effect(effect_handle_t handle);
 
-    // Methods from ::android::hardware::audio::effect::V2_0::IEffect follow.
+    // Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffect follow.
     Return<Result> init() override;
     Return<Result> setConfig(
         const EffectConfig& config, const sp<IEffectBufferProviderCallback>& inputBufferProvider,
@@ -235,10 +231,8 @@
 };
 
 }  // namespace implementation
-}  // namespace V2_0
+}  // namespace AUDIO_HAL_VERSION
 }  // namespace effect
 }  // namespace audio
 }  // namespace hardware
 }  // namespace android
-
-#endif  // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_EFFECT_H
diff --git a/audio/effect/all-versions/Effect.cpp b/audio/effect/all-versions/default/include/effect/all-versions/default/Effect.impl.h
similarity index 97%
rename from audio/effect/all-versions/Effect.cpp
rename to audio/effect/all-versions/default/include/effect/all-versions/default/Effect.impl.h
index 487bbe6..d376146 100644
--- a/audio/effect/all-versions/Effect.cpp
+++ b/audio/effect/all-versions/default/include/effect/all-versions/default/Effect.impl.h
@@ -14,29 +14,26 @@
  * limitations under the License.
  */
 
+#include <common/all-versions/IncludeGuard.h>
+
 #include <memory.h>
 
-#define LOG_TAG "EffectHAL"
 #define ATRACE_TAG ATRACE_TAG_AUDIO
 
 #include <android/log.h>
 #include <media/EffectsFactoryApi.h>
 #include <utils/Trace.h>
 
-#include "Conversions.h"
-#include "Effect.h"
-#include "common/all-versions/default/EffectMap.h"
-
 namespace android {
 namespace hardware {
 namespace audio {
 namespace effect {
-namespace V2_0 {
+namespace AUDIO_HAL_VERSION {
 namespace implementation {
 
-using ::android::hardware::audio::common::V2_0::AudioChannelMask;
-using ::android::hardware::audio::common::V2_0::AudioFormat;
-using ::android::hardware::audio::effect::V2_0::MessageQueueFlagBits;
+using ::android::hardware::audio::common::AUDIO_HAL_VERSION::AudioChannelMask;
+using ::android::hardware::audio::common::AUDIO_HAL_VERSION::AudioFormat;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::MessageQueueFlagBits;
 
 namespace {
 
@@ -479,7 +476,7 @@
                                       &halParamBuffer[0]);
 }
 
-// Methods from ::android::hardware::audio::effect::V2_0::IEffect follow.
+// Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffect follow.
 Return<Result> Effect::init() {
     return sendCommandReturningStatus(EFFECT_CMD_INIT, "INIT");
 }
@@ -707,7 +704,7 @@
 }
 
 }  // namespace implementation
-}  // namespace V2_0
+}  // namespace AUDIO_HAL_VERSION
 }  // namespace effect
 }  // namespace audio
 }  // namespace hardware
diff --git a/audio/effect/all-versions/EffectsFactory.h b/audio/effect/all-versions/default/include/effect/all-versions/default/EffectsFactory.h
similarity index 72%
rename from audio/effect/all-versions/EffectsFactory.h
rename to audio/effect/all-versions/default/include/effect/all-versions/default/EffectsFactory.h
index 34bdb40..e586abb 100644
--- a/audio/effect/all-versions/EffectsFactory.h
+++ b/audio/effect/all-versions/default/include/effect/all-versions/default/EffectsFactory.h
@@ -14,12 +14,11 @@
  * limitations under the License.
  */
 
-#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_EFFECTSFACTORY_H
-#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_EFFECTSFACTORY_H
+#include <common/all-versions/IncludeGuard.h>
 
+#include <hardware/audio_effect.h>
 #include <system/audio_effect.h>
 
-#include <android/hardware/audio/effect/2.0/IEffectsFactory.h>
 #include <hidl/Status.h>
 
 #include <hidl/MQDescriptor.h>
@@ -27,14 +26,14 @@
 namespace hardware {
 namespace audio {
 namespace effect {
-namespace V2_0 {
+namespace AUDIO_HAL_VERSION {
 namespace implementation {
 
-using ::android::hardware::audio::common::V2_0::Uuid;
-using ::android::hardware::audio::effect::V2_0::EffectDescriptor;
-using ::android::hardware::audio::effect::V2_0::IEffect;
-using ::android::hardware::audio::effect::V2_0::IEffectsFactory;
-using ::android::hardware::audio::effect::V2_0::Result;
+using ::android::hardware::audio::common::AUDIO_HAL_VERSION::Uuid;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectDescriptor;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffect;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffectsFactory;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::Result;
 using ::android::hardware::Return;
 using ::android::hardware::Void;
 using ::android::hardware::hidl_vec;
@@ -42,7 +41,7 @@
 using ::android::sp;
 
 struct EffectsFactory : public IEffectsFactory {
-    // Methods from ::android::hardware::audio::effect::V2_0::IEffectsFactory follow.
+    // Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffectsFactory follow.
     Return<void> getAllDescriptors(getAllDescriptors_cb _hidl_cb) override;
     Return<void> getDescriptor(const Uuid& uid, getDescriptor_cb _hidl_cb) override;
     Return<void> createEffect(const Uuid& uid, int32_t session, int32_t ioHandle,
@@ -57,10 +56,8 @@
 extern "C" IEffectsFactory* HIDL_FETCH_IEffectsFactory(const char* name);
 
 }  // namespace implementation
-}  // namespace V2_0
+}  // namespace AUDIO_HAL_VERSION
 }  // namespace effect
 }  // namespace audio
 }  // namespace hardware
 }  // namespace android
-
-#endif  // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_EFFECTSFACTORY_H
diff --git a/audio/effect/all-versions/EffectsFactory.cpp b/audio/effect/all-versions/default/include/effect/all-versions/default/EffectsFactory.impl.h
similarity index 89%
rename from audio/effect/all-versions/EffectsFactory.cpp
rename to audio/effect/all-versions/default/include/effect/all-versions/default/EffectsFactory.impl.h
index 67fd22a..b2a36a9 100644
--- a/audio/effect/all-versions/EffectsFactory.cpp
+++ b/audio/effect/all-versions/default/include/effect/all-versions/default/EffectsFactory.impl.h
@@ -14,7 +14,8 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "EffectFactoryHAL"
+#include <common/all-versions/IncludeGuard.h>
+
 #include <android/log.h>
 #include <media/EffectsFactoryApi.h>
 #include <system/audio_effects/effect_aec.h>
@@ -29,30 +30,13 @@
 #include <system/audio_effects/effect_virtualizer.h>
 #include <system/audio_effects/effect_visualizer.h>
 
-#include "AcousticEchoCancelerEffect.h"
-#include "AutomaticGainControlEffect.h"
-#include "BassBoostEffect.h"
-#include "Conversions.h"
-#include "DownmixEffect.h"
-#include "Effect.h"
-#include "EffectsFactory.h"
-#include "EnvironmentalReverbEffect.h"
-#include "EqualizerEffect.h"
-#include "HidlUtils.h"
-#include "LoudnessEnhancerEffect.h"
-#include "NoiseSuppressionEffect.h"
-#include "PresetReverbEffect.h"
-#include "VirtualizerEffect.h"
-#include "VisualizerEffect.h"
-#include "common/all-versions/default/EffectMap.h"
-
-using ::android::hardware::audio::common::V2_0::HidlUtils;
+using ::android::hardware::audio::common::AUDIO_HAL_VERSION::HidlUtils;
 
 namespace android {
 namespace hardware {
 namespace audio {
 namespace effect {
-namespace V2_0 {
+namespace AUDIO_HAL_VERSION {
 namespace implementation {
 
 // static
@@ -85,7 +69,7 @@
     return new Effect(handle);
 }
 
-// Methods from ::android::hardware::audio::effect::V2_0::IEffectsFactory follow.
+// Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffectsFactory follow.
 Return<void> EffectsFactory::getAllDescriptors(getAllDescriptors_cb _hidl_cb) {
     Result retval(Result::OK);
     hidl_vec<EffectDescriptor> result;
@@ -199,7 +183,7 @@
 }
 
 }  // namespace implementation
-}  // namespace V2_0
+}  // namespace AUDIO_HAL_VERSION
 }  // namespace effect
 }  // namespace audio
 }  // namespace hardware
diff --git a/audio/effect/all-versions/EnvironmentalReverbEffect.h b/audio/effect/all-versions/default/include/effect/all-versions/default/EnvironmentalReverbEffect.h
similarity index 82%
rename from audio/effect/all-versions/EnvironmentalReverbEffect.h
rename to audio/effect/all-versions/default/include/effect/all-versions/default/EnvironmentalReverbEffect.h
index a0ae546..8351e55 100644
--- a/audio/effect/all-versions/EnvironmentalReverbEffect.h
+++ b/audio/effect/all-versions/default/include/effect/all-versions/default/EnvironmentalReverbEffect.h
@@ -14,37 +14,33 @@
  * limitations under the License.
  */
 
-#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_ENVIRONMENTALREVERBEFFECT_H
-#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_ENVIRONMENTALREVERBEFFECT_H
+#include <common/all-versions/IncludeGuard.h>
 
 #include <system/audio_effects/effect_environmentalreverb.h>
 
-#include <android/hardware/audio/effect/2.0/IEnvironmentalReverbEffect.h>
 #include <hidl/Status.h>
 
 #include <hidl/MQDescriptor.h>
 
-#include "Effect.h"
-
 namespace android {
 namespace hardware {
 namespace audio {
 namespace effect {
-namespace V2_0 {
+namespace AUDIO_HAL_VERSION {
 namespace implementation {
 
-using ::android::hardware::audio::common::V2_0::AudioDevice;
-using ::android::hardware::audio::common::V2_0::AudioMode;
-using ::android::hardware::audio::common::V2_0::AudioSource;
-using ::android::hardware::audio::effect::V2_0::AudioBuffer;
-using ::android::hardware::audio::effect::V2_0::EffectAuxChannelsConfig;
-using ::android::hardware::audio::effect::V2_0::EffectConfig;
-using ::android::hardware::audio::effect::V2_0::EffectDescriptor;
-using ::android::hardware::audio::effect::V2_0::EffectOffloadParameter;
-using ::android::hardware::audio::effect::V2_0::IEffect;
-using ::android::hardware::audio::effect::V2_0::IEffectBufferProviderCallback;
-using ::android::hardware::audio::effect::V2_0::IEnvironmentalReverbEffect;
-using ::android::hardware::audio::effect::V2_0::Result;
+using ::android::hardware::audio::common::AUDIO_HAL_VERSION::AudioDevice;
+using ::android::hardware::audio::common::AUDIO_HAL_VERSION::AudioMode;
+using ::android::hardware::audio::common::AUDIO_HAL_VERSION::AudioSource;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::AudioBuffer;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectAuxChannelsConfig;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectConfig;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectDescriptor;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectOffloadParameter;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffect;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffectBufferProviderCallback;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEnvironmentalReverbEffect;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::Result;
 using ::android::hardware::Return;
 using ::android::hardware::Void;
 using ::android::hardware::hidl_vec;
@@ -54,7 +50,7 @@
 struct EnvironmentalReverbEffect : public IEnvironmentalReverbEffect {
     explicit EnvironmentalReverbEffect(effect_handle_t handle);
 
-    // Methods from ::android::hardware::audio::effect::V2_0::IEffect follow.
+    // Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffect follow.
     Return<Result> init() override;
     Return<Result> setConfig(
         const EffectConfig& config, const sp<IEffectBufferProviderCallback>& inputBufferProvider,
@@ -98,7 +94,8 @@
                                               const hidl_vec<uint8_t>& configData) override;
     Return<Result> close() override;
 
-    // Methods from ::android::hardware::audio::effect::V2_0::IEnvironmentalReverbEffect follow.
+    // Methods from
+    // ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEnvironmentalReverbEffect follow.
     Return<Result> setBypass(bool bypass) override;
     Return<void> getBypass(getBypass_cb _hidl_cb) override;
     Return<Result> setRoomLevel(int16_t roomLevel) override;
@@ -137,10 +134,8 @@
 };
 
 }  // namespace implementation
-}  // namespace V2_0
+}  // namespace AUDIO_HAL_VERSION
 }  // namespace effect
 }  // namespace audio
 }  // namespace hardware
 }  // namespace android
-
-#endif  // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_ENVIRONMENTALREVERBEFFECT_H
diff --git a/audio/effect/all-versions/EnvironmentalReverbEffect.cpp b/audio/effect/all-versions/default/include/effect/all-versions/default/EnvironmentalReverbEffect.impl.h
similarity index 96%
rename from audio/effect/all-versions/EnvironmentalReverbEffect.cpp
rename to audio/effect/all-versions/default/include/effect/all-versions/default/EnvironmentalReverbEffect.impl.h
index a10ad0e..9090b8a 100644
--- a/audio/effect/all-versions/EnvironmentalReverbEffect.cpp
+++ b/audio/effect/all-versions/default/include/effect/all-versions/default/EnvironmentalReverbEffect.impl.h
@@ -14,16 +14,15 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "EnvReverb_HAL"
-#include <android/log.h>
+#include <common/all-versions/IncludeGuard.h>
 
-#include "EnvironmentalReverbEffect.h"
+#include <android/log.h>
 
 namespace android {
 namespace hardware {
 namespace audio {
 namespace effect {
-namespace V2_0 {
+namespace AUDIO_HAL_VERSION {
 namespace implementation {
 
 EnvironmentalReverbEffect::EnvironmentalReverbEffect(effect_handle_t handle)
@@ -59,7 +58,7 @@
     halProperties->density = properties.density;
 }
 
-// Methods from ::android::hardware::audio::effect::V2_0::IEffect follow.
+// Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffect follow.
 Return<Result> EnvironmentalReverbEffect::init() {
     return mEffect->init();
 }
@@ -189,7 +188,8 @@
     return mEffect->close();
 }
 
-// Methods from ::android::hardware::audio::effect::V2_0::IEnvironmentalReverbEffect follow.
+// Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEnvironmentalReverbEffect
+// follow.
 Return<Result> EnvironmentalReverbEffect::setBypass(bool bypass) {
     return mEffect->setParam(REVERB_PARAM_BYPASS, bypass);
 }
@@ -295,7 +295,7 @@
 }
 
 }  // namespace implementation
-}  // namespace V2_0
+}  // namespace AUDIO_HAL_VERSION
 }  // namespace effect
 }  // namespace audio
 }  // namespace hardware
diff --git a/audio/effect/all-versions/EqualizerEffect.h b/audio/effect/all-versions/default/include/effect/all-versions/default/EqualizerEffect.h
similarity index 81%
rename from audio/effect/all-versions/EqualizerEffect.h
rename to audio/effect/all-versions/default/include/effect/all-versions/default/EqualizerEffect.h
index 4f73f8e..c2b8ef8 100644
--- a/audio/effect/all-versions/EqualizerEffect.h
+++ b/audio/effect/all-versions/default/include/effect/all-versions/default/EqualizerEffect.h
@@ -14,39 +14,35 @@
  * limitations under the License.
  */
 
-#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_EQUALIZEREFFECT_H
-#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_EQUALIZEREFFECT_H
+#include <common/all-versions/IncludeGuard.h>
 
 #include <vector>
 
 #include <system/audio_effects/effect_equalizer.h>
 
-#include <android/hardware/audio/effect/2.0/IEqualizerEffect.h>
 #include <hidl/Status.h>
 
 #include <hidl/MQDescriptor.h>
 
-#include "Effect.h"
-
 namespace android {
 namespace hardware {
 namespace audio {
 namespace effect {
-namespace V2_0 {
+namespace AUDIO_HAL_VERSION {
 namespace implementation {
 
-using ::android::hardware::audio::common::V2_0::AudioDevice;
-using ::android::hardware::audio::common::V2_0::AudioMode;
-using ::android::hardware::audio::common::V2_0::AudioSource;
-using ::android::hardware::audio::effect::V2_0::AudioBuffer;
-using ::android::hardware::audio::effect::V2_0::EffectAuxChannelsConfig;
-using ::android::hardware::audio::effect::V2_0::EffectConfig;
-using ::android::hardware::audio::effect::V2_0::EffectDescriptor;
-using ::android::hardware::audio::effect::V2_0::EffectOffloadParameter;
-using ::android::hardware::audio::effect::V2_0::IEffect;
-using ::android::hardware::audio::effect::V2_0::IEffectBufferProviderCallback;
-using ::android::hardware::audio::effect::V2_0::IEqualizerEffect;
-using ::android::hardware::audio::effect::V2_0::Result;
+using ::android::hardware::audio::common::AUDIO_HAL_VERSION::AudioDevice;
+using ::android::hardware::audio::common::AUDIO_HAL_VERSION::AudioMode;
+using ::android::hardware::audio::common::AUDIO_HAL_VERSION::AudioSource;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::AudioBuffer;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectAuxChannelsConfig;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectConfig;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectDescriptor;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectOffloadParameter;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffect;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffectBufferProviderCallback;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEqualizerEffect;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::Result;
 using ::android::hardware::Return;
 using ::android::hardware::Void;
 using ::android::hardware::hidl_vec;
@@ -56,7 +52,7 @@
 struct EqualizerEffect : public IEqualizerEffect {
     explicit EqualizerEffect(effect_handle_t handle);
 
-    // Methods from ::android::hardware::audio::effect::V2_0::IEffect follow.
+    // Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffect follow.
     Return<Result> init() override;
     Return<Result> setConfig(
         const EffectConfig& config, const sp<IEffectBufferProviderCallback>& inputBufferProvider,
@@ -100,7 +96,7 @@
                                               const hidl_vec<uint8_t>& configData) override;
     Return<Result> close() override;
 
-    // Methods from ::android::hardware::audio::effect::V2_0::IEqualizerEffect follow.
+    // Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEqualizerEffect follow.
     Return<void> getNumBands(getNumBands_cb _hidl_cb) override;
     Return<void> getLevelRange(getLevelRange_cb _hidl_cb) override;
     Return<Result> setBandLevel(uint16_t band, int16_t level) override;
@@ -126,10 +122,8 @@
 };
 
 }  // namespace implementation
-}  // namespace V2_0
+}  // namespace AUDIO_HAL_VERSION
 }  // namespace effect
 }  // namespace audio
 }  // namespace hardware
 }  // namespace android
-
-#endif  // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_EQUALIZEREFFECT_H
diff --git a/audio/effect/all-versions/EqualizerEffect.cpp b/audio/effect/all-versions/default/include/effect/all-versions/default/EqualizerEffect.impl.h
similarity index 96%
rename from audio/effect/all-versions/EqualizerEffect.cpp
rename to audio/effect/all-versions/default/include/effect/all-versions/default/EqualizerEffect.impl.h
index d587c93..78485e4 100644
--- a/audio/effect/all-versions/EqualizerEffect.cpp
+++ b/audio/effect/all-versions/default/include/effect/all-versions/default/EqualizerEffect.impl.h
@@ -14,18 +14,17 @@
  * limitations under the License.
  */
 
+#include <common/all-versions/IncludeGuard.h>
+
 #include <memory.h>
 
-#define LOG_TAG "Equalizer_HAL"
 #include <android/log.h>
 
-#include "EqualizerEffect.h"
-
 namespace android {
 namespace hardware {
 namespace audio {
 namespace effect {
-namespace V2_0 {
+namespace AUDIO_HAL_VERSION {
 namespace implementation {
 
 EqualizerEffect::EqualizerEffect(effect_handle_t handle) : mEffect(new Effect(handle)) {}
@@ -54,7 +53,7 @@
     return halBuffer;
 }
 
-// Methods from ::android::hardware::audio::effect::V2_0::IEffect follow.
+// Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffect follow.
 Return<Result> EqualizerEffect::init() {
     return mEffect->init();
 }
@@ -181,7 +180,7 @@
     return mEffect->close();
 }
 
-// Methods from ::android::hardware::audio::effect::V2_0::IEqualizerEffect follow.
+// Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEqualizerEffect follow.
 Return<void> EqualizerEffect::getNumBands(getNumBands_cb _hidl_cb) {
     return mEffect->getIntegerParam(EQ_PARAM_NUM_BANDS, _hidl_cb);
 }
@@ -284,7 +283,7 @@
 }
 
 }  // namespace implementation
-}  // namespace V2_0
+}  // namespace AUDIO_HAL_VERSION
 }  // namespace effect
 }  // namespace audio
 }  // namespace hardware
diff --git a/audio/effect/all-versions/LoudnessEnhancerEffect.h b/audio/effect/all-versions/default/include/effect/all-versions/default/LoudnessEnhancerEffect.h
similarity index 76%
rename from audio/effect/all-versions/LoudnessEnhancerEffect.h
rename to audio/effect/all-versions/default/include/effect/all-versions/default/LoudnessEnhancerEffect.h
index 73d45e3..e4f1bd5 100644
--- a/audio/effect/all-versions/LoudnessEnhancerEffect.h
+++ b/audio/effect/all-versions/default/include/effect/all-versions/default/LoudnessEnhancerEffect.h
@@ -14,35 +14,31 @@
  * limitations under the License.
  */
 
-#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_LOUDNESSENHANCEREFFECT_H
-#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_LOUDNESSENHANCEREFFECT_H
+#include <common/all-versions/IncludeGuard.h>
 
-#include <android/hardware/audio/effect/2.0/ILoudnessEnhancerEffect.h>
 #include <hidl/Status.h>
 
 #include <hidl/MQDescriptor.h>
 
-#include "Effect.h"
-
 namespace android {
 namespace hardware {
 namespace audio {
 namespace effect {
-namespace V2_0 {
+namespace AUDIO_HAL_VERSION {
 namespace implementation {
 
-using ::android::hardware::audio::common::V2_0::AudioDevice;
-using ::android::hardware::audio::common::V2_0::AudioMode;
-using ::android::hardware::audio::common::V2_0::AudioSource;
-using ::android::hardware::audio::effect::V2_0::AudioBuffer;
-using ::android::hardware::audio::effect::V2_0::EffectAuxChannelsConfig;
-using ::android::hardware::audio::effect::V2_0::EffectConfig;
-using ::android::hardware::audio::effect::V2_0::EffectDescriptor;
-using ::android::hardware::audio::effect::V2_0::EffectOffloadParameter;
-using ::android::hardware::audio::effect::V2_0::IEffect;
-using ::android::hardware::audio::effect::V2_0::IEffectBufferProviderCallback;
-using ::android::hardware::audio::effect::V2_0::ILoudnessEnhancerEffect;
-using ::android::hardware::audio::effect::V2_0::Result;
+using ::android::hardware::audio::common::AUDIO_HAL_VERSION::AudioDevice;
+using ::android::hardware::audio::common::AUDIO_HAL_VERSION::AudioMode;
+using ::android::hardware::audio::common::AUDIO_HAL_VERSION::AudioSource;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::AudioBuffer;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectAuxChannelsConfig;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectConfig;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectDescriptor;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectOffloadParameter;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffect;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffectBufferProviderCallback;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::ILoudnessEnhancerEffect;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::Result;
 using ::android::hardware::Return;
 using ::android::hardware::Void;
 using ::android::hardware::hidl_vec;
@@ -52,7 +48,7 @@
 struct LoudnessEnhancerEffect : public ILoudnessEnhancerEffect {
     explicit LoudnessEnhancerEffect(effect_handle_t handle);
 
-    // Methods from ::android::hardware::audio::effect::V2_0::IEffect follow.
+    // Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffect follow.
     Return<Result> init() override;
     Return<Result> setConfig(
         const EffectConfig& config, const sp<IEffectBufferProviderCallback>& inputBufferProvider,
@@ -96,7 +92,8 @@
                                               const hidl_vec<uint8_t>& configData) override;
     Return<Result> close() override;
 
-    // Methods from ::android::hardware::audio::effect::V2_0::ILoudnessEnhancerEffect follow.
+    // Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::ILoudnessEnhancerEffect
+    // follow.
     Return<Result> setTargetGain(int32_t targetGainMb) override;
     Return<void> getTargetGain(getTargetGain_cb _hidl_cb) override;
 
@@ -107,10 +104,8 @@
 };
 
 }  // namespace implementation
-}  // namespace V2_0
+}  // namespace AUDIO_HAL_VERSION
 }  // namespace effect
 }  // namespace audio
 }  // namespace hardware
 }  // namespace android
-
-#endif  // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_LOUDNESSENHANCEREFFECT_H
diff --git a/audio/effect/all-versions/LoudnessEnhancerEffect.cpp b/audio/effect/all-versions/default/include/effect/all-versions/default/LoudnessEnhancerEffect.impl.h
similarity index 94%
rename from audio/effect/all-versions/LoudnessEnhancerEffect.cpp
rename to audio/effect/all-versions/default/include/effect/all-versions/default/LoudnessEnhancerEffect.impl.h
index 7c25579..3f4f379 100644
--- a/audio/effect/all-versions/LoudnessEnhancerEffect.cpp
+++ b/audio/effect/all-versions/default/include/effect/all-versions/default/LoudnessEnhancerEffect.impl.h
@@ -14,19 +14,18 @@
  * limitations under the License.
  */
 
+#include <common/all-versions/IncludeGuard.h>
+
 #include <system/audio_effects/effect_loudnessenhancer.h>
 
-#define LOG_TAG "LoudnessEnhancer_HAL"
 #include <android/log.h>
 #include <system/audio_effects/effect_aec.h>
 
-#include "LoudnessEnhancerEffect.h"
-
 namespace android {
 namespace hardware {
 namespace audio {
 namespace effect {
-namespace V2_0 {
+namespace AUDIO_HAL_VERSION {
 namespace implementation {
 
 LoudnessEnhancerEffect::LoudnessEnhancerEffect(effect_handle_t handle)
@@ -34,7 +33,7 @@
 
 LoudnessEnhancerEffect::~LoudnessEnhancerEffect() {}
 
-// Methods from ::android::hardware::audio::effect::V2_0::IEffect follow.
+// Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffect follow.
 Return<Result> LoudnessEnhancerEffect::init() {
     return mEffect->init();
 }
@@ -161,7 +160,8 @@
     return mEffect->close();
 }
 
-// Methods from ::android::hardware::audio::effect::V2_0::ILoudnessEnhancerEffect follow.
+// Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::ILoudnessEnhancerEffect
+// follow.
 Return<Result> LoudnessEnhancerEffect::setTargetGain(int32_t targetGainMb) {
     return mEffect->setParam(LOUDNESS_ENHANCER_DEFAULT_TARGET_GAIN_MB, targetGainMb);
 }
@@ -180,7 +180,7 @@
 }
 
 }  // namespace implementation
-}  // namespace V2_0
+}  // namespace AUDIO_HAL_VERSION
 }  // namespace effect
 }  // namespace audio
 }  // namespace hardware
diff --git a/audio/effect/all-versions/NoiseSuppressionEffect.h b/audio/effect/all-versions/default/include/effect/all-versions/default/NoiseSuppressionEffect.h
similarity index 79%
rename from audio/effect/all-versions/NoiseSuppressionEffect.h
rename to audio/effect/all-versions/default/include/effect/all-versions/default/NoiseSuppressionEffect.h
index d833441..7b64ba0 100644
--- a/audio/effect/all-versions/NoiseSuppressionEffect.h
+++ b/audio/effect/all-versions/default/include/effect/all-versions/default/NoiseSuppressionEffect.h
@@ -14,37 +14,33 @@
  * limitations under the License.
  */
 
-#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_NOISESUPPRESSIONEFFECT_H
-#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_NOISESUPPRESSIONEFFECT_H
+#include <common/all-versions/IncludeGuard.h>
 
 #include <system/audio_effects/effect_ns.h>
 
-#include <android/hardware/audio/effect/2.0/INoiseSuppressionEffect.h>
 #include <hidl/Status.h>
 
 #include <hidl/MQDescriptor.h>
 
-#include "Effect.h"
-
 namespace android {
 namespace hardware {
 namespace audio {
 namespace effect {
-namespace V2_0 {
+namespace AUDIO_HAL_VERSION {
 namespace implementation {
 
-using ::android::hardware::audio::common::V2_0::AudioDevice;
-using ::android::hardware::audio::common::V2_0::AudioMode;
-using ::android::hardware::audio::common::V2_0::AudioSource;
-using ::android::hardware::audio::effect::V2_0::AudioBuffer;
-using ::android::hardware::audio::effect::V2_0::EffectAuxChannelsConfig;
-using ::android::hardware::audio::effect::V2_0::EffectConfig;
-using ::android::hardware::audio::effect::V2_0::EffectDescriptor;
-using ::android::hardware::audio::effect::V2_0::EffectOffloadParameter;
-using ::android::hardware::audio::effect::V2_0::IEffect;
-using ::android::hardware::audio::effect::V2_0::IEffectBufferProviderCallback;
-using ::android::hardware::audio::effect::V2_0::INoiseSuppressionEffect;
-using ::android::hardware::audio::effect::V2_0::Result;
+using ::android::hardware::audio::common::AUDIO_HAL_VERSION::AudioDevice;
+using ::android::hardware::audio::common::AUDIO_HAL_VERSION::AudioMode;
+using ::android::hardware::audio::common::AUDIO_HAL_VERSION::AudioSource;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::AudioBuffer;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectAuxChannelsConfig;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectConfig;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectDescriptor;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectOffloadParameter;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffect;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffectBufferProviderCallback;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::INoiseSuppressionEffect;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::Result;
 using ::android::hardware::Return;
 using ::android::hardware::Void;
 using ::android::hardware::hidl_vec;
@@ -54,7 +50,7 @@
 struct NoiseSuppressionEffect : public INoiseSuppressionEffect {
     explicit NoiseSuppressionEffect(effect_handle_t handle);
 
-    // Methods from ::android::hardware::audio::effect::V2_0::IEffect follow.
+    // Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffect follow.
     Return<Result> init() override;
     Return<Result> setConfig(
         const EffectConfig& config, const sp<IEffectBufferProviderCallback>& inputBufferProvider,
@@ -98,7 +94,8 @@
                                               const hidl_vec<uint8_t>& configData) override;
     Return<Result> close() override;
 
-    // Methods from ::android::hardware::audio::effect::V2_0::INoiseSuppressionEffect follow.
+    // Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::INoiseSuppressionEffect
+    // follow.
     Return<Result> setSuppressionLevel(INoiseSuppressionEffect::Level level) override;
     Return<void> getSuppressionLevel(getSuppressionLevel_cb _hidl_cb) override;
     Return<Result> setSuppressionType(INoiseSuppressionEffect::Type type) override;
@@ -119,10 +116,8 @@
 };
 
 }  // namespace implementation
-}  // namespace V2_0
+}  // namespace AUDIO_HAL_VERSION
 }  // namespace effect
 }  // namespace audio
 }  // namespace hardware
 }  // namespace android
-
-#endif  // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_NOISESUPPRESSIONEFFECT_H
diff --git a/audio/effect/all-versions/NoiseSuppressionEffect.cpp b/audio/effect/all-versions/default/include/effect/all-versions/default/NoiseSuppressionEffect.impl.h
similarity index 95%
rename from audio/effect/all-versions/NoiseSuppressionEffect.cpp
rename to audio/effect/all-versions/default/include/effect/all-versions/default/NoiseSuppressionEffect.impl.h
index fe30421..e5fc454 100644
--- a/audio/effect/all-versions/NoiseSuppressionEffect.cpp
+++ b/audio/effect/all-versions/default/include/effect/all-versions/default/NoiseSuppressionEffect.impl.h
@@ -14,16 +14,15 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "NS_Effect_HAL"
-#include <android/log.h>
+#include <common/all-versions/IncludeGuard.h>
 
-#include "NoiseSuppressionEffect.h"
+#include <android/log.h>
 
 namespace android {
 namespace hardware {
 namespace audio {
 namespace effect {
-namespace V2_0 {
+namespace AUDIO_HAL_VERSION {
 namespace implementation {
 
 NoiseSuppressionEffect::NoiseSuppressionEffect(effect_handle_t handle)
@@ -43,7 +42,7 @@
     halProperties->type = static_cast<uint32_t>(properties.type);
 }
 
-// Methods from ::android::hardware::audio::effect::V2_0::IEffect follow.
+// Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffect follow.
 Return<Result> NoiseSuppressionEffect::init() {
     return mEffect->init();
 }
@@ -170,7 +169,8 @@
     return mEffect->close();
 }
 
-// Methods from ::android::hardware::audio::effect::V2_0::INoiseSuppressionEffect follow.
+// Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::INoiseSuppressionEffect
+// follow.
 Return<Result> NoiseSuppressionEffect::setSuppressionLevel(INoiseSuppressionEffect::Level level) {
     return mEffect->setParam(NS_PARAM_LEVEL, static_cast<int32_t>(level));
 }
@@ -210,7 +210,7 @@
 }
 
 }  // namespace implementation
-}  // namespace V2_0
+}  // namespace AUDIO_HAL_VERSION
 }  // namespace effect
 }  // namespace audio
 }  // namespace hardware
diff --git a/audio/effect/all-versions/PresetReverbEffect.h b/audio/effect/all-versions/default/include/effect/all-versions/default/PresetReverbEffect.h
similarity index 77%
rename from audio/effect/all-versions/PresetReverbEffect.h
rename to audio/effect/all-versions/default/include/effect/all-versions/default/PresetReverbEffect.h
index fc83651..3114acd 100644
--- a/audio/effect/all-versions/PresetReverbEffect.h
+++ b/audio/effect/all-versions/default/include/effect/all-versions/default/PresetReverbEffect.h
@@ -14,35 +14,31 @@
  * limitations under the License.
  */
 
-#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_PRESETREVERBEFFECT_H
-#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_PRESETREVERBEFFECT_H
+#include <common/all-versions/IncludeGuard.h>
 
-#include <android/hardware/audio/effect/2.0/IPresetReverbEffect.h>
 #include <hidl/Status.h>
 
 #include <hidl/MQDescriptor.h>
 
-#include "Effect.h"
-
 namespace android {
 namespace hardware {
 namespace audio {
 namespace effect {
-namespace V2_0 {
+namespace AUDIO_HAL_VERSION {
 namespace implementation {
 
-using ::android::hardware::audio::common::V2_0::AudioDevice;
-using ::android::hardware::audio::common::V2_0::AudioMode;
-using ::android::hardware::audio::common::V2_0::AudioSource;
-using ::android::hardware::audio::effect::V2_0::AudioBuffer;
-using ::android::hardware::audio::effect::V2_0::EffectAuxChannelsConfig;
-using ::android::hardware::audio::effect::V2_0::EffectConfig;
-using ::android::hardware::audio::effect::V2_0::EffectDescriptor;
-using ::android::hardware::audio::effect::V2_0::EffectOffloadParameter;
-using ::android::hardware::audio::effect::V2_0::IEffect;
-using ::android::hardware::audio::effect::V2_0::IEffectBufferProviderCallback;
-using ::android::hardware::audio::effect::V2_0::IPresetReverbEffect;
-using ::android::hardware::audio::effect::V2_0::Result;
+using ::android::hardware::audio::common::AUDIO_HAL_VERSION::AudioDevice;
+using ::android::hardware::audio::common::AUDIO_HAL_VERSION::AudioMode;
+using ::android::hardware::audio::common::AUDIO_HAL_VERSION::AudioSource;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::AudioBuffer;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectAuxChannelsConfig;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectConfig;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectDescriptor;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectOffloadParameter;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffect;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffectBufferProviderCallback;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IPresetReverbEffect;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::Result;
 using ::android::hardware::Return;
 using ::android::hardware::Void;
 using ::android::hardware::hidl_vec;
@@ -52,7 +48,7 @@
 struct PresetReverbEffect : public IPresetReverbEffect {
     explicit PresetReverbEffect(effect_handle_t handle);
 
-    // Methods from ::android::hardware::audio::effect::V2_0::IEffect follow.
+    // Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffect follow.
     Return<Result> init() override;
     Return<Result> setConfig(
         const EffectConfig& config, const sp<IEffectBufferProviderCallback>& inputBufferProvider,
@@ -96,7 +92,8 @@
                                               const hidl_vec<uint8_t>& configData) override;
     Return<Result> close() override;
 
-    // Methods from ::android::hardware::audio::effect::V2_0::IPresetReverbEffect follow.
+    // Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IPresetReverbEffect
+    // follow.
     Return<Result> setPreset(IPresetReverbEffect::Preset preset) override;
     Return<void> getPreset(getPreset_cb _hidl_cb) override;
 
@@ -107,10 +104,8 @@
 };
 
 }  // namespace implementation
-}  // namespace V2_0
+}  // namespace AUDIO_HAL_VERSION
 }  // namespace effect
 }  // namespace audio
 }  // namespace hardware
 }  // namespace android
-
-#endif  // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_PRESETREVERBEFFECT_H
diff --git a/audio/effect/all-versions/PresetReverbEffect.cpp b/audio/effect/all-versions/default/include/effect/all-versions/default/PresetReverbEffect.impl.h
similarity index 94%
rename from audio/effect/all-versions/PresetReverbEffect.cpp
rename to audio/effect/all-versions/default/include/effect/all-versions/default/PresetReverbEffect.impl.h
index 4f1ccd3..32198d5 100644
--- a/audio/effect/all-versions/PresetReverbEffect.cpp
+++ b/audio/effect/all-versions/default/include/effect/all-versions/default/PresetReverbEffect.impl.h
@@ -14,24 +14,23 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "PresetReverb_HAL"
+#include <common/all-versions/IncludeGuard.h>
+
 #include <android/log.h>
 #include <system/audio_effects/effect_presetreverb.h>
 
-#include "PresetReverbEffect.h"
-
 namespace android {
 namespace hardware {
 namespace audio {
 namespace effect {
-namespace V2_0 {
+namespace AUDIO_HAL_VERSION {
 namespace implementation {
 
 PresetReverbEffect::PresetReverbEffect(effect_handle_t handle) : mEffect(new Effect(handle)) {}
 
 PresetReverbEffect::~PresetReverbEffect() {}
 
-// Methods from ::android::hardware::audio::effect::V2_0::IEffect follow.
+// Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffect follow.
 Return<Result> PresetReverbEffect::init() {
     return mEffect->init();
 }
@@ -158,7 +157,7 @@
     return mEffect->close();
 }
 
-// Methods from ::android::hardware::audio::effect::V2_0::IPresetReverbEffect follow.
+// Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IPresetReverbEffect follow.
 Return<Result> PresetReverbEffect::setPreset(IPresetReverbEffect::Preset preset) {
     return mEffect->setParam(REVERB_PARAM_PRESET, static_cast<t_reverb_presets>(preset));
 }
@@ -171,7 +170,7 @@
 }
 
 }  // namespace implementation
-}  // namespace V2_0
+}  // namespace AUDIO_HAL_VERSION
 }  // namespace effect
 }  // namespace audio
 }  // namespace hardware
diff --git a/audio/effect/all-versions/VirtualizerEffect.h b/audio/effect/all-versions/default/include/effect/all-versions/default/VirtualizerEffect.h
similarity index 78%
rename from audio/effect/all-versions/VirtualizerEffect.h
rename to audio/effect/all-versions/default/include/effect/all-versions/default/VirtualizerEffect.h
index 911ceca..3715894 100644
--- a/audio/effect/all-versions/VirtualizerEffect.h
+++ b/audio/effect/all-versions/default/include/effect/all-versions/default/VirtualizerEffect.h
@@ -14,36 +14,32 @@
  * limitations under the License.
  */
 
-#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_VIRTUALIZEREFFECT_H
-#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_VIRTUALIZEREFFECT_H
+#include <common/all-versions/IncludeGuard.h>
 
-#include <android/hardware/audio/effect/2.0/IVirtualizerEffect.h>
 #include <hidl/Status.h>
 
 #include <hidl/MQDescriptor.h>
 
-#include "Effect.h"
-
 namespace android {
 namespace hardware {
 namespace audio {
 namespace effect {
-namespace V2_0 {
+namespace AUDIO_HAL_VERSION {
 namespace implementation {
 
-using ::android::hardware::audio::common::V2_0::AudioChannelMask;
-using ::android::hardware::audio::common::V2_0::AudioDevice;
-using ::android::hardware::audio::common::V2_0::AudioMode;
-using ::android::hardware::audio::common::V2_0::AudioSource;
-using ::android::hardware::audio::effect::V2_0::AudioBuffer;
-using ::android::hardware::audio::effect::V2_0::EffectAuxChannelsConfig;
-using ::android::hardware::audio::effect::V2_0::EffectConfig;
-using ::android::hardware::audio::effect::V2_0::EffectDescriptor;
-using ::android::hardware::audio::effect::V2_0::EffectOffloadParameter;
-using ::android::hardware::audio::effect::V2_0::IEffect;
-using ::android::hardware::audio::effect::V2_0::IEffectBufferProviderCallback;
-using ::android::hardware::audio::effect::V2_0::IVirtualizerEffect;
-using ::android::hardware::audio::effect::V2_0::Result;
+using ::android::hardware::audio::common::AUDIO_HAL_VERSION::AudioChannelMask;
+using ::android::hardware::audio::common::AUDIO_HAL_VERSION::AudioDevice;
+using ::android::hardware::audio::common::AUDIO_HAL_VERSION::AudioMode;
+using ::android::hardware::audio::common::AUDIO_HAL_VERSION::AudioSource;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::AudioBuffer;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectAuxChannelsConfig;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectConfig;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectDescriptor;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectOffloadParameter;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffect;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffectBufferProviderCallback;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IVirtualizerEffect;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::Result;
 using ::android::hardware::Return;
 using ::android::hardware::Void;
 using ::android::hardware::hidl_vec;
@@ -53,7 +49,7 @@
 struct VirtualizerEffect : public IVirtualizerEffect {
     explicit VirtualizerEffect(effect_handle_t handle);
 
-    // Methods from ::android::hardware::audio::effect::V2_0::IEffect follow.
+    // Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffect follow.
     Return<Result> init() override;
     Return<Result> setConfig(
         const EffectConfig& config, const sp<IEffectBufferProviderCallback>& inputBufferProvider,
@@ -97,7 +93,8 @@
                                               const hidl_vec<uint8_t>& configData) override;
     Return<Result> close() override;
 
-    // Methods from ::android::hardware::audio::effect::V2_0::IVirtualizerEffect follow.
+    // Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IVirtualizerEffect
+    // follow.
     Return<bool> isStrengthSupported() override;
     Return<Result> setStrength(uint16_t strength) override;
     Return<void> getStrength(getStrength_cb _hidl_cb) override;
@@ -116,10 +113,8 @@
 };
 
 }  // namespace implementation
-}  // namespace V2_0
+}  // namespace AUDIO_HAL_VERSION
 }  // namespace effect
 }  // namespace audio
 }  // namespace hardware
 }  // namespace android
-
-#endif  // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_VIRTUALIZEREFFECT_H
diff --git a/audio/effect/all-versions/VirtualizerEffect.cpp b/audio/effect/all-versions/default/include/effect/all-versions/default/VirtualizerEffect.impl.h
similarity index 95%
rename from audio/effect/all-versions/VirtualizerEffect.cpp
rename to audio/effect/all-versions/default/include/effect/all-versions/default/VirtualizerEffect.impl.h
index bb96855..6fb8005 100644
--- a/audio/effect/all-versions/VirtualizerEffect.cpp
+++ b/audio/effect/all-versions/default/include/effect/all-versions/default/VirtualizerEffect.impl.h
@@ -14,19 +14,18 @@
  * limitations under the License.
  */
 
+#include <common/all-versions/IncludeGuard.h>
+
 #include <memory.h>
 
-#define LOG_TAG "Virtualizer_HAL"
 #include <android/log.h>
 #include <system/audio_effects/effect_virtualizer.h>
 
-#include "VirtualizerEffect.h"
-
 namespace android {
 namespace hardware {
 namespace audio {
 namespace effect {
-namespace V2_0 {
+namespace AUDIO_HAL_VERSION {
 namespace implementation {
 
 VirtualizerEffect::VirtualizerEffect(effect_handle_t handle) : mEffect(new Effect(handle)) {}
@@ -43,7 +42,7 @@
     }
 }
 
-// Methods from ::android::hardware::audio::effect::V2_0::IEffect follow.
+// Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffect follow.
 Return<Result> VirtualizerEffect::init() {
     return mEffect->init();
 }
@@ -170,7 +169,7 @@
     return mEffect->close();
 }
 
-// Methods from ::android::hardware::audio::effect::V2_0::IVirtualizerEffect follow.
+// Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IVirtualizerEffect follow.
 Return<bool> VirtualizerEffect::isStrengthSupported() {
     bool halSupported = false;
     mEffect->getParam(VIRTUALIZER_PARAM_STRENGTH_SUPPORTED, halSupported);
@@ -222,7 +221,7 @@
 }
 
 }  // namespace implementation
-}  // namespace V2_0
+}  // namespace AUDIO_HAL_VERSION
 }  // namespace effect
 }  // namespace audio
 }  // namespace hardware
diff --git a/audio/effect/all-versions/VisualizerEffect.h b/audio/effect/all-versions/default/include/effect/all-versions/default/VisualizerEffect.h
similarity index 79%
rename from audio/effect/all-versions/VisualizerEffect.h
rename to audio/effect/all-versions/default/include/effect/all-versions/default/VisualizerEffect.h
index 58a3dbf..8050221 100644
--- a/audio/effect/all-versions/VisualizerEffect.h
+++ b/audio/effect/all-versions/default/include/effect/all-versions/default/VisualizerEffect.h
@@ -14,35 +14,31 @@
  * limitations under the License.
  */
 
-#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_VISUALIZEREFFECT_H
-#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_VISUALIZEREFFECT_H
+#include <common/all-versions/IncludeGuard.h>
 
-#include <android/hardware/audio/effect/2.0/IVisualizerEffect.h>
 #include <hidl/Status.h>
 
 #include <hidl/MQDescriptor.h>
 
-#include "Effect.h"
-
 namespace android {
 namespace hardware {
 namespace audio {
 namespace effect {
-namespace V2_0 {
+namespace AUDIO_HAL_VERSION {
 namespace implementation {
 
-using ::android::hardware::audio::common::V2_0::AudioDevice;
-using ::android::hardware::audio::common::V2_0::AudioMode;
-using ::android::hardware::audio::common::V2_0::AudioSource;
-using ::android::hardware::audio::effect::V2_0::AudioBuffer;
-using ::android::hardware::audio::effect::V2_0::EffectAuxChannelsConfig;
-using ::android::hardware::audio::effect::V2_0::EffectConfig;
-using ::android::hardware::audio::effect::V2_0::EffectDescriptor;
-using ::android::hardware::audio::effect::V2_0::EffectOffloadParameter;
-using ::android::hardware::audio::effect::V2_0::IEffect;
-using ::android::hardware::audio::effect::V2_0::IEffectBufferProviderCallback;
-using ::android::hardware::audio::effect::V2_0::IVisualizerEffect;
-using ::android::hardware::audio::effect::V2_0::Result;
+using ::android::hardware::audio::common::AUDIO_HAL_VERSION::AudioDevice;
+using ::android::hardware::audio::common::AUDIO_HAL_VERSION::AudioMode;
+using ::android::hardware::audio::common::AUDIO_HAL_VERSION::AudioSource;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::AudioBuffer;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectAuxChannelsConfig;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectConfig;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectDescriptor;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::EffectOffloadParameter;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffect;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffectBufferProviderCallback;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IVisualizerEffect;
+using ::android::hardware::audio::effect::AUDIO_HAL_VERSION::Result;
 using ::android::hardware::Return;
 using ::android::hardware::Void;
 using ::android::hardware::hidl_vec;
@@ -52,7 +48,7 @@
 struct VisualizerEffect : public IVisualizerEffect {
     explicit VisualizerEffect(effect_handle_t handle);
 
-    // Methods from ::android::hardware::audio::effect::V2_0::IEffect follow.
+    // Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffect follow.
     Return<Result> init() override;
     Return<Result> setConfig(
         const EffectConfig& config, const sp<IEffectBufferProviderCallback>& inputBufferProvider,
@@ -96,7 +92,7 @@
                                               const hidl_vec<uint8_t>& configData) override;
     Return<Result> close() override;
 
-    // Methods from ::android::hardware::audio::effect::V2_0::IVisualizerEffect follow.
+    // Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IVisualizerEffect follow.
     Return<Result> setCaptureSize(uint16_t captureSize) override;
     Return<void> getCaptureSize(getCaptureSize_cb _hidl_cb) override;
     Return<Result> setScalingMode(IVisualizerEffect::ScalingMode scalingMode) override;
@@ -117,10 +113,8 @@
 };
 
 }  // namespace implementation
-}  // namespace V2_0
+}  // namespace AUDIO_HAL_VERSION
 }  // namespace effect
 }  // namespace audio
 }  // namespace hardware
 }  // namespace android
-
-#endif  // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_VISUALIZEREFFECT_H
diff --git a/audio/effect/all-versions/VisualizerEffect.cpp b/audio/effect/all-versions/default/include/effect/all-versions/default/VisualizerEffect.impl.h
similarity index 95%
rename from audio/effect/all-versions/VisualizerEffect.cpp
rename to audio/effect/all-versions/default/include/effect/all-versions/default/VisualizerEffect.impl.h
index bac3a03..0351453 100644
--- a/audio/effect/all-versions/VisualizerEffect.cpp
+++ b/audio/effect/all-versions/default/include/effect/all-versions/default/VisualizerEffect.impl.h
@@ -14,17 +14,16 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "Visualizer_HAL"
+#include <common/all-versions/IncludeGuard.h>
+
 #include <android/log.h>
 #include <system/audio_effects/effect_visualizer.h>
 
-#include "VisualizerEffect.h"
-
 namespace android {
 namespace hardware {
 namespace audio {
 namespace effect {
-namespace V2_0 {
+namespace AUDIO_HAL_VERSION {
 namespace implementation {
 
 VisualizerEffect::VisualizerEffect(effect_handle_t handle)
@@ -32,7 +31,7 @@
 
 VisualizerEffect::~VisualizerEffect() {}
 
-// Methods from ::android::hardware::audio::effect::V2_0::IEffect follow.
+// Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IEffect follow.
 Return<Result> VisualizerEffect::init() {
     return mEffect->init();
 }
@@ -159,7 +158,7 @@
     return mEffect->close();
 }
 
-// Methods from ::android::hardware::audio::effect::V2_0::IVisualizerEffect follow.
+// Methods from ::android::hardware::audio::effect::AUDIO_HAL_VERSION::IVisualizerEffect follow.
 Return<Result> VisualizerEffect::setCaptureSize(uint16_t captureSize) {
     Result retval = mEffect->setParam(VISUALIZER_PARAM_CAPTURE_SIZE, captureSize);
     if (retval == Result::OK) {
@@ -246,7 +245,7 @@
 }
 
 }  // namespace implementation
-}  // namespace V2_0
+}  // namespace AUDIO_HAL_VERSION
 }  // namespace effect
 }  // namespace audio
 }  // namespace hardware