agm: Don't use LOCAL_COPY_HEADERS_TO.
- handle local_copy_headers_to of
a)mm-audio/agm
b)mm-audio/qti-agm-server,
c)mm-audio/snd-card-parser.
- For mm-audio/agm related headers, move headers to agm/ folder.
and export headers with header library.
- For rest, export headers along with the shared libray.
- Remove unused BUILD_TINY_ANDROID as it is no longer used.
- Remove use of LOCAL_USE_VNDK from makes files where it was used to
support LOCAL_COPY_HEADERS_TO compilation.
Change-Id: I88d925ccba2675bd66d8e959d42cd46f606ca5cd
diff --git a/ipc/Android.mk b/ipc/Android.mk
index db72859..7001289 100644
--- a/ipc/Android.mk
+++ b/ipc/Android.mk
@@ -1,6 +1,3 @@
ifeq ($(call is-board-platform-in-list, sdm845 msmnile kona lahaina taro bengal),true)
-
include $(call all-subdir-makefiles)
-
-
endif # is-board-platform-in-list
diff --git a/ipc/HwBinders/Android.mk b/ipc/HwBinders/Android.mk
index af4ed3e..7001289 100644
--- a/ipc/HwBinders/Android.mk
+++ b/ipc/HwBinders/Android.mk
@@ -1,22 +1,3 @@
ifeq ($(call is-board-platform-in-list, sdm845 msmnile kona lahaina taro bengal),true)
-
include $(call all-subdir-makefiles)
-
-
-
-
-
-
-
-
-#----------------------------------------------------------------------------
-# Common definitons
-#----------------------------------------------------------------------------
-
-
-
-#LOCAL_C_INCLUDES := $(LOCAL_PATH)/inc
-
-#LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/gsl
-
endif # is-board-platform-in-list
diff --git a/ipc/HwBinders/agm_ipc_client/Android.mk b/ipc/HwBinders/agm_ipc_client/Android.mk
index 2aa7e42..58ede6f 100644
--- a/ipc/HwBinders/agm_ipc_client/Android.mk
+++ b/ipc/HwBinders/agm_ipc_client/Android.mk
@@ -1,10 +1,10 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/include/mm-audio/agm
LOCAL_MODULE := libagmclient
LOCAL_MODULE_OWNER := qti
LOCAL_VENDOR_MODULE := true
+
LOCAL_SRC_FILES := \
src/agm_client_wrapper.cpp\
src/AGMCallback.cpp
@@ -18,4 +18,6 @@
libbase \
vendor.qti.hardware.AGMIPC@1.0
+LOCAL_HEADER_LIBRARIES := libagm_headers
+
include $(BUILD_SHARED_LIBRARY)
diff --git a/ipc/HwBinders/agm_ipc_client/inc/AGMCallback.h b/ipc/HwBinders/agm_ipc_client/inc/AGMCallback.h
index 2b39052..1f070d8 100644
--- a/ipc/HwBinders/agm_ipc_client/inc/AGMCallback.h
+++ b/ipc/HwBinders/agm_ipc_client/inc/AGMCallback.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2019, 2021 The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -32,7 +32,7 @@
#include <vendor/qti/hardware/AGMIPC/1.0/IAGMCallback.h>
#include <hidl/MQDescriptor.h>
#include <hidl/Status.h>
-#include "agm_api.h"
+#include <agm/agm_api.h>
using AgmMediaConfig = ::vendor::qti::hardware::AGMIPC::V1_0::AgmMediaConfig;
diff --git a/ipc/HwBinders/agm_ipc_client/src/agm_client_wrapper.cpp b/ipc/HwBinders/agm_ipc_client/src/agm_client_wrapper.cpp
index a8cfd1d..cf1d5be 100644
--- a/ipc/HwBinders/agm_ipc_client/src/agm_client_wrapper.cpp
+++ b/ipc/HwBinders/agm_ipc_client/src/agm_client_wrapper.cpp
@@ -34,7 +34,7 @@
#include <unistd.h>
#include <vendor/qti/hardware/AGMIPC/1.0/IAGM.h>
-#include "agm_api.h"
+#include <agm/agm_api.h>
#include "inc/AGMCallback.h"
using android::hardware::Return;
diff --git a/ipc/HwBinders/agm_ipc_service/Android.mk b/ipc/HwBinders/agm_ipc_service/Android.mk
index 0ac8e3a..69ab5eb 100644
--- a/ipc/HwBinders/agm_ipc_service/Android.mk
+++ b/ipc/HwBinders/agm_ipc_service/Android.mk
@@ -1,7 +1,6 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/include/mm-audio/agm
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/include/mm-audio/ar/gsl
LOCAL_C_INCLUDES += $(TOP)/vendor/qcom/opensource/agm/ipc/HwBinders/agm_ipc_client/
LOCAL_MODULE := vendor.qti.hardware.AGMIPC@1.0-impl
@@ -25,7 +24,6 @@
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
-LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/include/mm-audio/agm
LOCAL_C_INCLUDES += $(TOP)/vendor/qcom/opensource/agm/ipc/HwBinders/agm_ipc_client/
LOCAL_MODULE := vendor.qti.hardware.AGMIPC@1.0-service
LOCAL_INIT_RC := vendor.qti.hardware.AGMIPC@1.0-service.rc
diff --git a/ipc/HwBinders/agm_ipc_service/inc/agm_server_wrapper.h b/ipc/HwBinders/agm_ipc_service/inc/agm_server_wrapper.h
index 703c5e2..4e0b54a 100644
--- a/ipc/HwBinders/agm_ipc_service/inc/agm_server_wrapper.h
+++ b/ipc/HwBinders/agm_ipc_service/inc/agm_server_wrapper.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2019, 2021 The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -34,7 +34,7 @@
#include <hidl/Status.h>
#include <vector>
#include <cutils/list.h>
-#include "agm_api.h"
+#include <agm/agm_api.h>
#include "inc/AGMCallback.h"
/*
diff --git a/ipc/SwBinders/agm_server/Android.mk b/ipc/SwBinders/agm_server/Android.mk
index 62adc5c..69e6b55 100644
--- a/ipc/SwBinders/agm_server/Android.mk
+++ b/ipc/SwBinders/agm_server/Android.mk
@@ -19,9 +19,7 @@
LOCAL_MODULE := libagmproxy
LOCAL_MODULE_TAGS := optional
-LOCAL_COPY_HEADERS_TO := mm-audio/qti-agm-server
-LOCAL_COPY_HEADERS := \
- ipc_interface.h
+LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
diff --git a/plugins/tinyalsa/Android.mk b/plugins/tinyalsa/Android.mk
index 1937223..a613234 100644
--- a/plugins/tinyalsa/Android.mk
+++ b/plugins/tinyalsa/Android.mk
@@ -1,17 +1,13 @@
ifeq ($(call is-board-platform-in-list, sdm845 msmnile kona lahaina taro bengal),true)
-ifneq ($(BUILD_TINY_ANDROID),true)
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_USE_VNDK := true
LOCAL_C_INCLUDES += $(TOP)/vendor/qcom/opensource/tinyalsa/include
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/include/mm-audio/
-LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/include/mm-audio/snd-card-parser/
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/include/mm-audio/ar/ar_osal
-LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/include/mm-audio/agm/
-LOCAL_C_INCLUDES += $(call include-path-for, agm) \
+LOCAL_HEADER_LIBRARIES := libagm_headers
LOCAL_SRC_FILES := src/agm_pcm_plugin.c
LOCAL_MODULE := libagm_pcm_plugin
@@ -40,14 +36,11 @@
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
-LOCAL_USE_VNDK := true
LOCAL_C_INCLUDES += $(TOP)/vendor/qcom/opensource/tinyalsa/include
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/include/mm-audio/
-LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/include/mm-audio/snd-card-parser/
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/include/mm-audio/ar/ar_osal
-LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/include/mm-audio/agm/
-LOCAL_C_INCLUDES += $(call include-path-for, agm) \
+LOCAL_HEADER_LIBRARIES := libagm_headers
LOCAL_SRC_FILES := src/agm_mixer_plugin.c
LOCAL_MODULE := libagm_mixer_plugin
@@ -75,18 +68,14 @@
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
-LOCAL_USE_VNDK := true
LOCAL_C_INCLUDES += $(TOP)/vendor/qcom/opensource/tinyalsa/include
LOCAL_C_INCLUDES += $(TOP)/vendor/qcom/opensource/tinycompress/include
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/include/mm-audio/
-LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/include/mm-audio/agm/
-LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/include/mm-audio/snd-card-parser/
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/include/mm-audio/ar/ar_osal
-LOCAL_C_INCLUDES += $(call include-path-for, agm) \
LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
-
+LOCAL_HEADER_LIBRARIES := libagm_headers
LOCAL_SRC_FILES := src/agm_compress_plugin.c
LOCAL_MODULE := libagm_compress_plugin
@@ -115,4 +104,3 @@
include $(BUILD_SHARED_LIBRARY)
endif
-endif
diff --git a/plugins/tinyalsa/src/agm_compress_plugin.c b/plugins/tinyalsa/src/agm_compress_plugin.c
index 183ed0e..7bff28f 100644
--- a/plugins/tinyalsa/src/agm_compress_plugin.c
+++ b/plugins/tinyalsa/src/agm_compress_plugin.c
@@ -47,7 +47,7 @@
#include <tinyalsa/asoundlib.h>
#include <sound/compress_params.h>
#include <sound/compress_offload.h>
-#include "utils.h"
+#include <agm/utils.h>
#ifdef DYNAMIC_LOG_ENABLED
#include <log_xml_parser.h>
diff --git a/plugins/tinyalsa/src/agm_dummy_impl.c b/plugins/tinyalsa/src/agm_dummy_impl.c
index 44d6fe2..051b1a9 100644
--- a/plugins/tinyalsa/src/agm_dummy_impl.c
+++ b/plugins/tinyalsa/src/agm_dummy_impl.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2019, 2021 The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -33,8 +33,8 @@
#include <stdbool.h>
#include <string.h>
-#include "agm_api.h"
-#include "utils.h"
+#include <agm/agm_api.h>
+#include <agm/utils.h>
#define ARRAY_SIZE(a) \
(sizeof(a) / sizeof(a[0]))
diff --git a/plugins/tinyalsa/src/agm_mixer_plugin.c b/plugins/tinyalsa/src/agm_mixer_plugin.c
index 5d5dc6f..6253270 100644
--- a/plugins/tinyalsa/src/agm_mixer_plugin.c
+++ b/plugins/tinyalsa/src/agm_mixer_plugin.c
@@ -1,5 +1,5 @@
/*
-** Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
+** Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
@@ -50,7 +50,7 @@
#include <snd-card-def.h>
#include <agm/agm_list.h>
-#include "utils.h"
+#include <agm/utils.h>
#ifdef DYNAMIC_LOG_ENABLED
#include <log_xml_parser.h>
diff --git a/plugins/tinyalsa/src/agm_pcm_plugin.c b/plugins/tinyalsa/src/agm_pcm_plugin.c
index 65b9c2a..56671e1 100644
--- a/plugins/tinyalsa/src/agm_pcm_plugin.c
+++ b/plugins/tinyalsa/src/agm_pcm_plugin.c
@@ -1,5 +1,5 @@
/*
-** Copyright (c) 2019, The Linux Foundation. All rights reserved.
+** Copyright (c) 2019, 2021 The Linux Foundation. All rights reserved.
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
@@ -43,7 +43,7 @@
#include <tinyalsa/pcm_plugin.h>
#include <snd-card-def.h>
#include <tinyalsa/asoundlib.h>
-#include "utils.h"
+#include <agm/utils.h>
#ifdef DYNAMIC_LOG_ENABLED
#include <log_xml_parser.h>
#define LOG_MASK AGM_MOD_FILE_AGM_PCM_PLUGIN
diff --git a/plugins/tinyalsa/test/Android.mk b/plugins/tinyalsa/test/Android.mk
index a3766a3..46a1514 100644
--- a/plugins/tinyalsa/test/Android.mk
+++ b/plugins/tinyalsa/test/Android.mk
@@ -1,5 +1,4 @@
ifeq ($(call is-board-platform-in-list, sdm845 msmnile kona lahaina taro bengal),true)
-ifneq ($(BUILD_TINY_ANDROID),true)
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
@@ -19,6 +18,7 @@
libqti-tinyalsa \
libexpat
+LOCAL_HEADER_LIBRARIES := libagm_headers
LOCAL_VENDOR_MODULE := true
include $(BUILD_SHARED_LIBRARY)
@@ -39,6 +39,7 @@
libqti-tinyalsa\
libagmmixer
+LOCAL_HEADER_LIBRARIES := libagm_headers
LOCAL_VENDOR_MODULE := true
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
@@ -59,6 +60,7 @@
libqti-tinyalsa\
libagmmixer
+LOCAL_HEADER_LIBRARIES := libagm_headers
LOCAL_VENDOR_MODULE := true
include $(BUILD_EXECUTABLE)
@@ -85,6 +87,7 @@
libqti-tinycompress\
libagmmixer
+LOCAL_HEADER_LIBRARIES := libagm_headers
LOCAL_VENDOR_MODULE := true
include $(BUILD_EXECUTABLE)
@@ -106,7 +109,7 @@
libqti-tinyalsa\
libagmmixer
+LOCAL_HEADER_LIBRARIES := libagm_headers
LOCAL_VENDOR_MODULE := true
include $(BUILD_EXECUTABLE)
endif
-endif
diff --git a/service/Android.mk b/service/Android.mk
index ac42bea..5350d93 100644
--- a/service/Android.mk
+++ b/service/Android.mk
@@ -1,12 +1,8 @@
ifeq ($(call is-board-platform-in-list, sdm845 msmnile kona lahaina taro bengal),true)
-ifneq ($(BUILD_TINY_ANDROID),true)
-
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_USE_VNDK := true
-
#----------------------------------------------------------------------------
# Common definitons
#----------------------------------------------------------------------------
@@ -63,14 +59,16 @@
libexpat
endif
-LOCAL_COPY_HEADERS_TO := mm-audio/agm
-LOCAL_COPY_HEADERS := inc/agm_api.h
-LOCAL_COPY_HEADERS += inc/utils.h
-LOCAL_COPY_HEADERS += inc/agm_list.h
-
+LOCAL_HEADER_LIBRARIES += libagm_headers
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/inc/private
+LOCAL_EXPORT_HEADER_LIBRARY_HEADERS := libagm_headers
LOCAL_VENDOR_MODULE := true
-
include $(BUILD_SHARED_LIBRARY)
-endif # BUILD_TINY_ANDROID
+include $(CLEAR_VARS)
+LOCAL_MODULE := libagm_headers
+LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/inc/public
+LOCAL_VENDOR_MODULE := true
+include $(BUILD_HEADER_LIBRARY)
+
endif # is-board-platform-in-list
diff --git a/service/inc/agm_priv.h b/service/inc/private/agm/agm_priv.h
similarity index 95%
rename from service/inc/agm_priv.h
rename to service/inc/private/agm/agm_priv.h
index c3f4393..df7046b 100644
--- a/service/inc/agm_priv.h
+++ b/service/inc/private/agm/agm_priv.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2019, 2021 The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -30,7 +30,7 @@
#ifndef _AGM_PRIV_H_
#define _AGM_PRIV_H_
-#include "agm_api.h"
+#include <agm/agm_api.h>
/**
* Key Vector
diff --git a/service/inc/device.h b/service/inc/private/agm/device.h
similarity index 97%
rename from service/inc/device.h
rename to service/inc/private/agm/device.h
index 4b58e93..0d995e0 100644
--- a/service/inc/device.h
+++ b/service/inc/private/agm/device.h
@@ -1,5 +1,5 @@
/*
-** Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
+** Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
@@ -31,7 +31,7 @@
#define __AGM_DEVICE_H__
#include <pthread.h>
-#include "agm_priv.h"
+#include <agm/agm_priv.h>
#ifdef DEVICE_USES_ALSALIB
#include <alsa/asoundlib.h>
#endif
diff --git a/service/inc/graph.h b/service/inc/private/agm/graph.h
similarity index 98%
rename from service/inc/graph.h
rename to service/inc/private/agm/graph.h
index c347653..7b0b4eb 100644
--- a/service/inc/graph.h
+++ b/service/inc/private/agm/graph.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -30,10 +30,10 @@
#ifndef GPH_OBJ_H
#define GPH_OBJ_H
-#include "agm_list.h"
-#include "device.h"
-#include "session_obj.h"
-#include "agm_priv.h"
+#include <agm/agm_list.h>
+#include <agm/device.h>
+#include <agm/session_obj.h>
+#include <agm/agm_priv.h>
#define ATTRIBUTES_DATA_MODE_MASK 0x3
#define DATA_MODE_FLAG_SHMEM 0x0 /**< shared memory mode */
diff --git a/service/inc/graph_module.h b/service/inc/private/agm/graph_module.h
similarity index 97%
rename from service/inc/graph_module.h
rename to service/inc/private/agm/graph_module.h
index 278e7b7..7863968 100644
--- a/service/inc/graph_module.h
+++ b/service/inc/private/agm/graph_module.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -29,8 +29,8 @@
#ifndef GPH_MODULE_H
#define GPH_MODULE_H
-#include "agm_list.h"
-#include "device.h"
+#include <agm/agm_list.h>
+#include <agm/device.h>
/*Platfrom Key Value file, defines tag keys and their values*/
#include "kvh2xml.h"
diff --git a/service/inc/metadata.h b/service/inc/private/agm/metadata.h
similarity index 95%
rename from service/inc/metadata.h
rename to service/inc/private/agm/metadata.h
index 7f06cf0..ab8a636 100644
--- a/service/inc/metadata.h
+++ b/service/inc/private/agm/metadata.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2019, 2021 The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -31,7 +31,7 @@
#define _METADATA_H_
#include <stdarg.h>
-#include "agm_priv.h"
+#include <agm/agm_priv.h>
struct agm_meta_data_gsl* metadata_merge(int num, ...);
int metadata_copy(struct agm_meta_data_gsl *dest, uint32_t size, uint8_t *payload);
diff --git a/service/inc/session_obj.h b/service/inc/private/agm/session_obj.h
similarity index 97%
rename from service/inc/session_obj.h
rename to service/inc/private/agm/session_obj.h
index fbe9a56..992394f 100644
--- a/service/inc/session_obj.h
+++ b/service/inc/private/agm/session_obj.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -34,10 +34,10 @@
#include <stdlib.h>
#include <stdio.h>
#include <pthread.h>
-#include "agm_list.h"
-#include "agm_priv.h"
-#include "metadata.h"
-#include "graph.h"
+#include <agm/agm_list.h>
+#include <agm/agm_priv.h>
+#include <agm/metadata.h>
+#include <agm/graph.h>
enum aif_state {
AIF_CLOSED,
diff --git a/service/inc/agm_api.h b/service/inc/public/agm/agm_api.h
similarity index 100%
rename from service/inc/agm_api.h
rename to service/inc/public/agm/agm_api.h
diff --git a/service/inc/agm_list.h b/service/inc/public/agm/agm_list.h
similarity index 100%
rename from service/inc/agm_list.h
rename to service/inc/public/agm/agm_list.h
diff --git a/service/inc/utils.h b/service/inc/public/agm/utils.h
similarity index 100%
rename from service/inc/utils.h
rename to service/inc/public/agm/utils.h
diff --git a/service/src/agm.c b/service/src/agm.c
index d12397d..2e35f72 100644
--- a/service/src/agm.c
+++ b/service/src/agm.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -27,10 +27,10 @@
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#define LOG_TAG "AGM: API"
-#include "agm_api.h"
-#include "device.h"
-#include "session_obj.h"
-#include "utils.h"
+#include <agm/agm_api.h>
+#include <agm/device.h>
+#include <agm/session_obj.h>
+#include <agm/utils.h>
#include "ats.h"
#include <stdio.h>
#include <stdbool.h>
diff --git a/service/src/device.c b/service/src/device.c
index 3182554..abe711b 100644
--- a/service/src/device.c
+++ b/service/src/device.c
@@ -1,5 +1,5 @@
/*
-** Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
+** Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
@@ -39,9 +39,9 @@
#include <unistd.h>
#include <limits.h>
#include <stdbool.h>
-#include "device.h"
-#include "metadata.h"
-#include "utils.h"
+#include <agm/device.h>
+#include <agm/metadata.h>
+#include <agm/utils.h>
#ifdef DEVICE_USES_ALSALIB
#include <alsa/asoundlib.h>
#else
diff --git a/service/src/device_hw_ep.c b/service/src/device_hw_ep.c
index 0602f48..9b43e6b 100644
--- a/service/src/device_hw_ep.c
+++ b/service/src/device_hw_ep.c
@@ -1,5 +1,5 @@
/*
-** Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
+** Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
@@ -34,8 +34,8 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include "utils.h"
-#include "device.h"
+#include <agm/utils.h>
+#include <agm/device.h>
#ifdef DYNAMIC_LOG_ENABLED
#include <log_xml_parser.h>
diff --git a/service/src/graph.c b/service/src/graph.c
index 5312af2..10a71a6 100644
--- a/service/src/graph.c
+++ b/service/src/graph.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -37,10 +37,10 @@
#include <dlfcn.h>
#include <unistd.h>
#include "gsl_intf.h"
-#include "graph.h"
-#include "graph_module.h"
-#include "metadata.h"
-#include "utils.h"
+#include <agm/graph.h>
+#include <agm/graph_module.h>
+#include <agm/metadata.h>
+#include <agm/utils.h>
#ifdef DYNAMIC_LOG_ENABLED
#include <log_xml_parser.h>
diff --git a/service/src/graph_module.c b/service/src/graph_module.c
index 8fa4232..ac6ea00 100644
--- a/service/src/graph_module.c
+++ b/service/src/graph_module.c
@@ -32,10 +32,10 @@
#include <errno.h>
#include <pthread.h>
#include "gsl_intf.h"
-#include "graph.h"
-#include "graph_module.h"
-#include "metadata.h"
-#include "utils.h"
+#include <agm/graph.h>
+#include <agm/graph_module.h>
+#include <agm/metadata.h>
+#include <agm/utils.h>
#ifdef DYNAMIC_LOG_ENABLED
#include <log_xml_parser.h>
diff --git a/service/src/metadata.c b/service/src/metadata.c
index 07d9255..7b0f99c 100644
--- a/service/src/metadata.c
+++ b/service/src/metadata.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -31,8 +31,8 @@
#include <malloc.h>
#include <string.h>
-#include "metadata.h"
-#include "utils.h"
+#include <agm/metadata.h>
+#include <agm/utils.h>
#ifdef DYNAMIC_LOG_ENABLED
#include <log_xml_parser.h>
diff --git a/service/src/session_obj.c b/service/src/session_obj.c
index 1d9d3d6..348a414 100644
--- a/service/src/session_obj.c
+++ b/service/src/session_obj.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -30,8 +30,8 @@
#include <malloc.h>
#include <string.h>
-#include "session_obj.h"
-#include "utils.h"
+#include <agm/session_obj.h>
+#include <agm/utils.h>
#ifdef DYNAMIC_LOG_ENABLED
#include <log_xml_parser.h>
diff --git a/service/src/utils.c b/service/src/utils.c
index 2148018..6eba3a6 100644
--- a/service/src/utils.c
+++ b/service/src/utils.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -30,7 +30,7 @@
#include<errno.h>
-#include "utils.h"
+#include <agm/utils.h>
/* ERROR STRING */
#define AR_EOK_STR "AR_EOK"
diff --git a/service/test/src/agm_test.c b/service/test/src/agm_test.c
index 3b935fd..e2f0078 100644
--- a/service/test/src/agm_test.c
+++ b/service/test/src/agm_test.c
@@ -1,5 +1,5 @@
/*
-** Copyright (c) 2019, The Linux Foundation. All rights reserved.
+** Copyright (c) 2019, 2021 The Linux Foundation. All rights reserved.
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
@@ -28,7 +28,7 @@
**/
//#include "pch.h"
-#include "agm_api.h"
+#include <agm/agm_api.h>
#include <stdio.h>
typedef int(*testcase)(void);
diff --git a/snd_parser/Android.mk b/snd_parser/Android.mk
index bc399f8..507b1f6 100644
--- a/snd_parser/Android.mk
+++ b/snd_parser/Android.mk
@@ -1,12 +1,8 @@
ifeq ($(call is-board-platform-in-list, msmnile kona lahaina taro bengal),true)
-ifneq ($(BUILD_TINY_ANDROID),true)
-
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_USE_VNDK := true
-
#----------------------------------------------------------------------------
# Make the Shared library (libsndcardparser)
#----------------------------------------------------------------------------
@@ -17,6 +13,7 @@
LOCAL_CFLAGS := -Wno-unused-parameter
LOCAL_CFLAGS += -DCARD_DEF_FILE=\"/vendor/etc/card-defs.xml\"
LOCAL_CFLAGS += -Wall
+LOCAL_HEADER_LIBRARIES := libagm_headers
LOCAL_SRC_FILES := src/snd-card-parser.c
@@ -25,15 +22,12 @@
LOCAL_MODULE_TAGS := optional
LOCAL_SHARED_LIBRARIES := \
- libexpat \
- libcutils
+ libexpat \
+ libcutils
-LOCAL_COPY_HEADERS_TO := mm-audio/snd-card-parser
-LOCAL_COPY_HEADERS := inc/snd-card-def.h
-
+LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/inc
LOCAL_VENDOR_MODULE := true
include $(BUILD_SHARED_LIBRARY)
-endif # BUILD_TINY_ANDROID
endif # is-board-platform-in-list