audio: porting MAXXAUDIO

  - use effect module to monitor stream's volume
  - the control(maxxaudio) monitors active device and
    changed volume from HAL, and send audio calibration
    to acdb via acdb_loader.
  - support specific USB headset

  Enabled function:
  - LR channels swap
  - load external tuning table for volume preset feature

Bug: 74360112
Test: manual effect test, usb headset test
Change-Id: I9b35436d6abebcfa250beb4857dfa0be9248f2b5
diff --git a/post_proc/Android.mk b/post_proc/Android.mk
index c31b769..dc0e260 100644
--- a/post_proc/Android.mk
+++ b/post_proc/Android.mk
@@ -73,3 +73,36 @@
 include $(BUILD_SHARED_LIBRARY)
 
 endif
+
+################################################################################
+ifeq ($(strip $(AUDIO_FEATURE_ENABLED_MAXX_AUDIO)), true)
+
+include $(CLEAR_VARS)
+
+LOCAL_CFLAGS := -D HAL_LIB_NAME=\"audio.primary."$(TARGET_BOARD_PLATFORM)".so\"
+
+LOCAL_SRC_FILES:= \
+	ma_listener.c
+
+LOCAL_CFLAGS += $(qcom_post_proc_common_cflags)
+
+LOCAL_SHARED_LIBRARIES := \
+	libcutils \
+	liblog \
+	libdl
+
+LOCAL_MODULE_RELATIVE_PATH := soundfx
+LOCAL_MODULE:= libmalistener
+LOCAL_MODULE_OWNER := google
+LOCAL_PROPRIETARY_MODULE := true
+
+LOCAL_C_INCLUDES := \
+	hardware/qcom/audio/hal \
+	system/media/audio/include/system \
+	$(call include-path-for, audio-effects)
+
+LOCAL_HEADER_LIBRARIES += libhardware_headers
+LOCAL_HEADER_LIBRARIES += libsystem_headers
+include $(BUILD_SHARED_LIBRARY)
+
+endif