Update Andriod.bp for hals.

* Add driver/profiler build rule for all hals.

Test: mma
Change-Id: I98325f7af14fec7dd1bb64b1668de8c7c20ace92
diff --git a/audio/effect/2.0/Android.bp b/audio/effect/2.0/Android.bp
index ee76a0e..98d6cfe 100644
--- a/audio/effect/2.0/Android.bp
+++ b/audio/effect/2.0/Android.bp
@@ -160,3 +160,213 @@
         "android.hidl.base@1.0",
     ],
 }
+
+genrule {
+    name: "android.hardware.audio.effect.vts.driver@2.0_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.audio.effect@2.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/audio/effect/2.0/ $(genDir)/android/hardware/audio/effect/2.0/",
+    srcs: [
+        "types.hal",
+        "IAcousticEchoCancelerEffect.hal",
+        "IAutomaticGainControlEffect.hal",
+        "IBassBoostEffect.hal",
+        "IDownmixEffect.hal",
+        "IEffect.hal",
+        "IEffectBufferProviderCallback.hal",
+        "IEffectsFactory.hal",
+        "IEnvironmentalReverbEffect.hal",
+        "IEqualizerEffect.hal",
+        "ILoudnessEnhancerEffect.hal",
+        "INoiseSuppressionEffect.hal",
+        "IPresetReverbEffect.hal",
+        "IVirtualizerEffect.hal",
+        "IVisualizerEffect.hal",
+    ],
+    out: [
+        "android/hardware/audio/effect/2.0/types.vts.cpp",
+        "android/hardware/audio/effect/2.0/AcousticEchoCancelerEffect.vts.cpp",
+        "android/hardware/audio/effect/2.0/AutomaticGainControlEffect.vts.cpp",
+        "android/hardware/audio/effect/2.0/BassBoostEffect.vts.cpp",
+        "android/hardware/audio/effect/2.0/DownmixEffect.vts.cpp",
+        "android/hardware/audio/effect/2.0/Effect.vts.cpp",
+        "android/hardware/audio/effect/2.0/EffectBufferProviderCallback.vts.cpp",
+        "android/hardware/audio/effect/2.0/EffectsFactory.vts.cpp",
+        "android/hardware/audio/effect/2.0/EnvironmentalReverbEffect.vts.cpp",
+        "android/hardware/audio/effect/2.0/EqualizerEffect.vts.cpp",
+        "android/hardware/audio/effect/2.0/LoudnessEnhancerEffect.vts.cpp",
+        "android/hardware/audio/effect/2.0/NoiseSuppressionEffect.vts.cpp",
+        "android/hardware/audio/effect/2.0/PresetReverbEffect.vts.cpp",
+        "android/hardware/audio/effect/2.0/VirtualizerEffect.vts.cpp",
+        "android/hardware/audio/effect/2.0/VisualizerEffect.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.audio.effect.vts.driver@2.0_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.audio.effect@2.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/audio/effect/2.0/ $(genDir)/android/hardware/audio/effect/2.0/",
+    srcs: [
+        "types.hal",
+        "IAcousticEchoCancelerEffect.hal",
+        "IAutomaticGainControlEffect.hal",
+        "IBassBoostEffect.hal",
+        "IDownmixEffect.hal",
+        "IEffect.hal",
+        "IEffectBufferProviderCallback.hal",
+        "IEffectsFactory.hal",
+        "IEnvironmentalReverbEffect.hal",
+        "IEqualizerEffect.hal",
+        "ILoudnessEnhancerEffect.hal",
+        "INoiseSuppressionEffect.hal",
+        "IPresetReverbEffect.hal",
+        "IVirtualizerEffect.hal",
+        "IVisualizerEffect.hal",
+    ],
+    out: [
+        "android/hardware/audio/effect/2.0/types.vts.h",
+        "android/hardware/audio/effect/2.0/AcousticEchoCancelerEffect.vts.h",
+        "android/hardware/audio/effect/2.0/AutomaticGainControlEffect.vts.h",
+        "android/hardware/audio/effect/2.0/BassBoostEffect.vts.h",
+        "android/hardware/audio/effect/2.0/DownmixEffect.vts.h",
+        "android/hardware/audio/effect/2.0/Effect.vts.h",
+        "android/hardware/audio/effect/2.0/EffectBufferProviderCallback.vts.h",
+        "android/hardware/audio/effect/2.0/EffectsFactory.vts.h",
+        "android/hardware/audio/effect/2.0/EnvironmentalReverbEffect.vts.h",
+        "android/hardware/audio/effect/2.0/EqualizerEffect.vts.h",
+        "android/hardware/audio/effect/2.0/LoudnessEnhancerEffect.vts.h",
+        "android/hardware/audio/effect/2.0/NoiseSuppressionEffect.vts.h",
+        "android/hardware/audio/effect/2.0/PresetReverbEffect.vts.h",
+        "android/hardware/audio/effect/2.0/VirtualizerEffect.vts.h",
+        "android/hardware/audio/effect/2.0/VisualizerEffect.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.audio.effect.vts.driver@2.0",
+    generated_sources: ["android.hardware.audio.effect.vts.driver@2.0_genc++"],
+    generated_headers: ["android.hardware.audio.effect.vts.driver@2.0_genc++_headers"],
+    export_generated_headers: ["android.hardware.audio.effect.vts.driver@2.0_genc++_headers"],
+    shared_libs: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "liblog",
+        "libutils",
+        "libcutils",
+        "libvts_common",
+        "libvts_datatype",
+        "libvts_measurement",
+        "libvts_multidevice_proto",
+        "libcamera_metadata",
+        "libprotobuf-cpp-full",
+        "android.hardware.audio.common@2.0",
+        "android.hidl.base@1.0",
+        "android.hardware.audio.effect@2.0",
+    ],
+    export_shared_lib_headers: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "libutils",
+        "android.hardware.audio.common@2.0",
+        "android.hidl.base@1.0",
+    ],
+}
+
+genrule {
+    name: "android.hardware.audio.effect@2.0-vts.profiler_genc++",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.audio.effect@2.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/audio/effect/2.0/ $(genDir)/android/hardware/audio/effect/2.0/",
+    srcs: [
+        "types.hal",
+        "IAcousticEchoCancelerEffect.hal",
+        "IAutomaticGainControlEffect.hal",
+        "IBassBoostEffect.hal",
+        "IDownmixEffect.hal",
+        "IEffect.hal",
+        "IEffectBufferProviderCallback.hal",
+        "IEffectsFactory.hal",
+        "IEnvironmentalReverbEffect.hal",
+        "IEqualizerEffect.hal",
+        "ILoudnessEnhancerEffect.hal",
+        "INoiseSuppressionEffect.hal",
+        "IPresetReverbEffect.hal",
+        "IVirtualizerEffect.hal",
+        "IVisualizerEffect.hal",
+    ],
+    out: [
+        "android/hardware/audio/effect/2.0/types.vts.cpp",
+        "android/hardware/audio/effect/2.0/AcousticEchoCancelerEffect.vts.cpp",
+        "android/hardware/audio/effect/2.0/AutomaticGainControlEffect.vts.cpp",
+        "android/hardware/audio/effect/2.0/BassBoostEffect.vts.cpp",
+        "android/hardware/audio/effect/2.0/DownmixEffect.vts.cpp",
+        "android/hardware/audio/effect/2.0/Effect.vts.cpp",
+        "android/hardware/audio/effect/2.0/EffectBufferProviderCallback.vts.cpp",
+        "android/hardware/audio/effect/2.0/EffectsFactory.vts.cpp",
+        "android/hardware/audio/effect/2.0/EnvironmentalReverbEffect.vts.cpp",
+        "android/hardware/audio/effect/2.0/EqualizerEffect.vts.cpp",
+        "android/hardware/audio/effect/2.0/LoudnessEnhancerEffect.vts.cpp",
+        "android/hardware/audio/effect/2.0/NoiseSuppressionEffect.vts.cpp",
+        "android/hardware/audio/effect/2.0/PresetReverbEffect.vts.cpp",
+        "android/hardware/audio/effect/2.0/VirtualizerEffect.vts.cpp",
+        "android/hardware/audio/effect/2.0/VisualizerEffect.vts.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.audio.effect@2.0-vts.profiler_genc++_headers",
+    tools: ["hidl-gen", "vtsc"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.audio.effect@2.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/audio/effect/2.0/ $(genDir)/android/hardware/audio/effect/2.0/",
+    srcs: [
+        "types.hal",
+        "IAcousticEchoCancelerEffect.hal",
+        "IAutomaticGainControlEffect.hal",
+        "IBassBoostEffect.hal",
+        "IDownmixEffect.hal",
+        "IEffect.hal",
+        "IEffectBufferProviderCallback.hal",
+        "IEffectsFactory.hal",
+        "IEnvironmentalReverbEffect.hal",
+        "IEqualizerEffect.hal",
+        "ILoudnessEnhancerEffect.hal",
+        "INoiseSuppressionEffect.hal",
+        "IPresetReverbEffect.hal",
+        "IVirtualizerEffect.hal",
+        "IVisualizerEffect.hal",
+    ],
+    out: [
+        "android/hardware/audio/effect/2.0/types.vts.h",
+        "android/hardware/audio/effect/2.0/AcousticEchoCancelerEffect.vts.h",
+        "android/hardware/audio/effect/2.0/AutomaticGainControlEffect.vts.h",
+        "android/hardware/audio/effect/2.0/BassBoostEffect.vts.h",
+        "android/hardware/audio/effect/2.0/DownmixEffect.vts.h",
+        "android/hardware/audio/effect/2.0/Effect.vts.h",
+        "android/hardware/audio/effect/2.0/EffectBufferProviderCallback.vts.h",
+        "android/hardware/audio/effect/2.0/EffectsFactory.vts.h",
+        "android/hardware/audio/effect/2.0/EnvironmentalReverbEffect.vts.h",
+        "android/hardware/audio/effect/2.0/EqualizerEffect.vts.h",
+        "android/hardware/audio/effect/2.0/LoudnessEnhancerEffect.vts.h",
+        "android/hardware/audio/effect/2.0/NoiseSuppressionEffect.vts.h",
+        "android/hardware/audio/effect/2.0/PresetReverbEffect.vts.h",
+        "android/hardware/audio/effect/2.0/VirtualizerEffect.vts.h",
+        "android/hardware/audio/effect/2.0/VisualizerEffect.vts.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.audio.effect@2.0-vts.profiler",
+    generated_sources: ["android.hardware.audio.effect@2.0-vts.profiler_genc++"],
+    generated_headers: ["android.hardware.audio.effect@2.0-vts.profiler_genc++_headers"],
+    export_generated_headers: ["android.hardware.audio.effect@2.0-vts.profiler_genc++_headers"],
+    shared_libs: [
+        "libbase",
+        "libhidlbase",
+        "libhidltransport",
+        "libvts_profiling",
+        "libvts_multidevice_proto",
+        "libprotobuf-cpp-full",
+        "android.hardware.audio.common@2.0",
+        "android.hidl.base@1.0",
+        "android.hardware.audio.effect@2.0",
+    ],
+}