Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 1 | ifeq ($(strip $(BOARD_USES_ALSA_AUDIO)),true) |
| 2 | |
| 3 | LOCAL_PATH := $(call my-dir) |
| 4 | |
| 5 | include $(CLEAR_VARS) |
| 6 | |
| 7 | LOCAL_ARM_MODE := arm |
| 8 | |
Ajay Dudani | be3335a | 2013-08-19 18:47:21 -0700 | [diff] [blame] | 9 | AUDIO_PLATFORM := $(TARGET_BOARD_PLATFORM) |
Jean-Michel Trivi | c075069 | 2015-10-12 12:12:32 -0700 | [diff] [blame] | 10 | ifneq ($(filter msm8960,$(TARGET_BOARD_PLATFORM)),) |
| 11 | LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="2" |
| 12 | endif |
Thierry Strudel | 8a8deaa | 2016-12-15 13:34:42 -0800 | [diff] [blame] | 13 | ifneq ($(filter msm8974 msm8226 msm8084 msm8992 msm8994 msm8996 msm8998,$(TARGET_BOARD_PLATFORM)),) |
Ajay Dudani | be3335a | 2013-08-19 18:47:21 -0700 | [diff] [blame] | 14 | # B-family platform uses msm8974 code base |
| 15 | AUDIO_PLATFORM = msm8974 |
Jean-Michel Trivi | 7246fb6 | 2015-10-08 20:20:48 -0700 | [diff] [blame] | 16 | ifneq ($(filter msm8974,$(TARGET_BOARD_PLATFORM)),) |
Ed Tam | 70b5c14 | 2016-03-21 19:14:29 -0700 | [diff] [blame] | 17 | LOCAL_CFLAGS := -DPLATFORM_MSM8974 |
Jean-Michel Trivi | 7246fb6 | 2015-10-08 20:20:48 -0700 | [diff] [blame] | 18 | LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="2" |
| 19 | endif |
Ravi Kumar Alamanda | 8e6e98f | 2013-11-05 15:57:39 -0800 | [diff] [blame] | 20 | ifneq ($(filter msm8226,$(TARGET_BOARD_PLATFORM)),) |
Ed Tam | 70b5c14 | 2016-03-21 19:14:29 -0700 | [diff] [blame] | 21 | LOCAL_CFLAGS := -DPLATFORM_MSM8x26 |
Prashant Malani | c92c596 | 2015-08-11 15:10:18 -0700 | [diff] [blame] | 22 | LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="2" |
Ravi Kumar Alamanda | 8e6e98f | 2013-11-05 15:57:39 -0800 | [diff] [blame] | 23 | endif |
Ravi Kumar Alamanda | 83281a9 | 2014-05-19 18:14:57 -0700 | [diff] [blame] | 24 | ifneq ($(filter msm8084,$(TARGET_BOARD_PLATFORM)),) |
Ed Tam | 70b5c14 | 2016-03-21 19:14:29 -0700 | [diff] [blame] | 25 | LOCAL_CFLAGS := -DPLATFORM_MSM8084 |
Prashant Malani | c92c596 | 2015-08-11 15:10:18 -0700 | [diff] [blame] | 26 | LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="2" |
Ravi Kumar Alamanda | 83281a9 | 2014-05-19 18:14:57 -0700 | [diff] [blame] | 27 | endif |
Patrick Tjin | 11c2e2d | 2015-03-12 11:44:18 -0700 | [diff] [blame] | 28 | ifneq ($(filter msm8992,$(TARGET_BOARD_PLATFORM)),) |
Ed Tam | 70b5c14 | 2016-03-21 19:14:29 -0700 | [diff] [blame] | 29 | LOCAL_CFLAGS := -DPLATFORM_MSM8994 |
Prashant Malani | c92c596 | 2015-08-11 15:10:18 -0700 | [diff] [blame] | 30 | LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="4" |
Ravi Kumar Alamanda | 533bb72 | 2015-09-23 13:47:03 -0700 | [diff] [blame] | 31 | LOCAL_CFLAGS += -DKPI_OPTIMIZE_ENABLED |
Patrick Tjin | 11c2e2d | 2015-03-12 11:44:18 -0700 | [diff] [blame] | 32 | endif |
| 33 | ifneq ($(filter msm8994,$(TARGET_BOARD_PLATFORM)),) |
Ed Tam | 70b5c14 | 2016-03-21 19:14:29 -0700 | [diff] [blame] | 34 | LOCAL_CFLAGS := -DPLATFORM_MSM8994 |
Prashant Malani | c92c596 | 2015-08-11 15:10:18 -0700 | [diff] [blame] | 35 | LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="4" |
Ravi Kumar Alamanda | 533bb72 | 2015-09-23 13:47:03 -0700 | [diff] [blame] | 36 | LOCAL_CFLAGS += -DKPI_OPTIMIZE_ENABLED |
Patrick Tjin | 11c2e2d | 2015-03-12 11:44:18 -0700 | [diff] [blame] | 37 | endif |
vivek mehta | 295916b | 2016-02-04 14:47:22 -0800 | [diff] [blame] | 38 | ifneq ($(filter msm8996,$(TARGET_BOARD_PLATFORM)),) |
Ed Tam | 70b5c14 | 2016-03-21 19:14:29 -0700 | [diff] [blame] | 39 | LOCAL_CFLAGS := -DPLATFORM_MSM8996 |
vivek mehta | 295916b | 2016-02-04 14:47:22 -0800 | [diff] [blame] | 40 | LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="4" |
| 41 | LOCAL_CFLAGS += -DKPI_OPTIMIZE_ENABLED |
vivek mehta | de4849c | 2016-03-03 17:23:38 -0800 | [diff] [blame] | 42 | MULTIPLE_HW_VARIANTS_ENABLED := true |
vivek mehta | 295916b | 2016-02-04 14:47:22 -0800 | [diff] [blame] | 43 | endif |
Thierry Strudel | 8a8deaa | 2016-12-15 13:34:42 -0800 | [diff] [blame] | 44 | ifneq ($(filter msm8998,$(TARGET_BOARD_PLATFORM)),) |
| 45 | LOCAL_CFLAGS := -DPLATFORM_MSM8998 |
Thierry Strudel | 0cfc50a | 2016-10-26 23:58:53 -0700 | [diff] [blame] | 46 | LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="4" |
| 47 | LOCAL_CFLAGS += -DKPI_OPTIMIZE_ENABLED |
| 48 | MULTIPLE_HW_VARIANTS_ENABLED := true |
| 49 | endif |
Ajay Dudani | be3335a | 2013-08-19 18:47:21 -0700 | [diff] [blame] | 50 | endif |
| 51 | |
Yamit Mehta | 6b4b127 | 2016-06-10 15:12:50 +0530 | [diff] [blame] | 52 | ifneq ($(filter msm8916 msm8909 msm8952,$(TARGET_BOARD_PLATFORM)),) |
| 53 | AUDIO_PLATFORM = msm8916 |
| 54 | LOCAL_CFLAGS := -DPLATFORM_MSM8916 |
| 55 | ifneq ($(filter msm8909,$(TARGET_BOARD_PLATFORM)),) |
| 56 | LOCAL_CFLAGS := -DPLATFORM_MSM8909 |
| 57 | endif |
| 58 | LOCAL_CFLAGS += -DMAX_TARGET_SPECIFIC_CHANNEL_CNT="2" |
| 59 | LOCAL_CFLAGS += -DKPI_OPTIMIZE_ENABLED |
| 60 | MULTIPLE_HW_VARIANTS_ENABLED := true |
| 61 | endif |
| 62 | |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 63 | LOCAL_SRC_FILES := \ |
| 64 | audio_hw.c \ |
Vineeta Srivastava | 4b89e37 | 2014-06-19 14:21:42 -0700 | [diff] [blame] | 65 | voice.c \ |
Haynes Mathew George | 5bc1884 | 2014-06-16 16:36:20 -0700 | [diff] [blame] | 66 | platform_info.c \ |
Eric Laurent | 0499d4f | 2014-08-25 22:39:29 -0500 | [diff] [blame] | 67 | audio_extn/ext_speaker.c \ |
Ravi Kumar Alamanda | 533bb72 | 2015-09-23 13:47:03 -0700 | [diff] [blame] | 68 | audio_extn/audio_extn.c \ |
Yamit Mehta | e3b9956 | 2016-09-16 22:44:00 +0530 | [diff] [blame] | 69 | audio_extn/utils.c \ |
vivek mehta | 0fb1131 | 2017-05-15 19:35:32 -0700 | [diff] [blame] | 70 | $(AUDIO_PLATFORM)/platform.c \ |
| 71 | acdb.c |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 72 | |
vivek mehta | de4849c | 2016-03-03 17:23:38 -0800 | [diff] [blame] | 73 | ifdef MULTIPLE_HW_VARIANTS_ENABLED |
| 74 | LOCAL_CFLAGS += -DHW_VARIANTS_ENABLED |
| 75 | LOCAL_SRC_FILES += $(AUDIO_PLATFORM)/hw_info.c |
| 76 | endif |
| 77 | |
David Lin | ee3fe40 | 2017-03-13 10:00:42 -0700 | [diff] [blame] | 78 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_USB_TUNNEL)),true) |
| 79 | LOCAL_CFLAGS += -DUSB_TUNNEL_ENABLED |
| 80 | LOCAL_SRC_FILES += audio_extn/usb.c |
| 81 | endif |
| 82 | |
vivek mehta | 9093387 | 2017-06-15 18:04:39 -0700 | [diff] [blame] | 83 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_USB_SIDETONE_VOLUME)),true) |
| 84 | LOCAL_CFLAGS += -DUSB_SIDETONE_VOLUME |
| 85 | endif |
| 86 | |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 87 | LOCAL_SHARED_LIBRARIES := \ |
Andy Hung | fc044e1 | 2017-03-20 09:24:22 -0700 | [diff] [blame] | 88 | libaudioutils \ |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 89 | liblog \ |
| 90 | libcutils \ |
| 91 | libtinyalsa \ |
Ravi Kumar Alamanda | 4e02e55 | 2013-07-17 15:22:04 -0700 | [diff] [blame] | 92 | libtinycompress \ |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 93 | libaudioroute \ |
Haynes Mathew George | 5bc1884 | 2014-06-16 16:36:20 -0700 | [diff] [blame] | 94 | libdl \ |
| 95 | libexpat |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 96 | |
| 97 | LOCAL_C_INCLUDES += \ |
| 98 | external/tinyalsa/include \ |
Ravi Kumar Alamanda | 4e02e55 | 2013-07-17 15:22:04 -0700 | [diff] [blame] | 99 | external/tinycompress/include \ |
Ravi Kumar Alamanda | f70ffb4 | 2013-04-16 15:55:53 -0700 | [diff] [blame] | 100 | $(call include-path-for, audio-route) \ |
Eric Laurent | b23d528 | 2013-05-14 15:27:20 -0700 | [diff] [blame] | 101 | $(call include-path-for, audio-effects) \ |
Ravi Kumar Alamanda | 8e6e98f | 2013-11-05 15:57:39 -0800 | [diff] [blame] | 102 | $(LOCAL_PATH)/$(AUDIO_PLATFORM) \ |
Vineeta Srivastava | 4b89e37 | 2014-06-19 14:21:42 -0700 | [diff] [blame] | 103 | $(LOCAL_PATH)/audio_extn \ |
Haynes Mathew George | 5bc1884 | 2014-06-16 16:36:20 -0700 | [diff] [blame] | 104 | $(LOCAL_PATH)/voice_extn \ |
| 105 | external/expat/lib |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 106 | |
Alain Vongsouvanh | 13f26e8 | 2016-11-18 14:39:11 -0800 | [diff] [blame] | 107 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_SMART_PA_TFA_98XX)),true) |
| 108 | LOCAL_SHARED_LIBRARIES += libexTfa98xx |
| 109 | LOCAL_CFLAGS += -DSMART_PA_TFA_98XX_SUPPORTED |
| 110 | LOCAL_SRC_FILES += audio_extn/tfa_98xx.c |
| 111 | endif |
| 112 | |
Chirayu Desai | 259a5a3 | 2014-11-13 09:08:13 +0530 | [diff] [blame] | 113 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include |
| 114 | LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr |
| 115 | |
Vineeta Srivastava | 4b89e37 | 2014-06-19 14:21:42 -0700 | [diff] [blame] | 116 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS)),true) |
| 117 | LOCAL_CFLAGS += -DMULTI_VOICE_SESSION_ENABLED |
| 118 | LOCAL_SRC_FILES += voice_extn/voice_extn.c |
| 119 | endif |
| 120 | |
Ravi Kumar Alamanda | 8e6e98f | 2013-11-05 15:57:39 -0800 | [diff] [blame] | 121 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HFP)),true) |
| 122 | LOCAL_CFLAGS += -DHFP_ENABLED |
| 123 | LOCAL_SRC_FILES += audio_extn/hfp.c |
| 124 | endif |
| 125 | |
Uday Kishore Pasupuleti | 075842f | 2015-07-28 15:18:31 -0700 | [diff] [blame] | 126 | ifeq ($(strip $(AUDIO_FEATURE_SUPPORTED_EXTERNAL_BT)),true) |
| 127 | LOCAL_CFLAGS += -DEXTERNAL_BT_SUPPORTED |
| 128 | endif |
| 129 | |
Uday Kishore Pasupuleti | cec8ad8 | 2015-04-15 10:34:06 -0700 | [diff] [blame] | 130 | ifeq ($(strip $(AUDIO_FEATURE_NO_AUDIO_OUT)),true) |
| 131 | LOCAL_CFLAGS += -DNO_AUDIO_OUT |
| 132 | endif |
| 133 | |
Ravi Kumar Alamanda | a417cc5 | 2015-05-01 16:41:56 -0700 | [diff] [blame] | 134 | ifeq ($(strip $(BOARD_SUPPORTS_SOUND_TRIGGER)),true) |
| 135 | LOCAL_CFLAGS += -DSOUND_TRIGGER_ENABLED |
| 136 | LOCAL_CFLAGS += -DSOUND_TRIGGER_PLATFORM_NAME=$(TARGET_BOARD_PLATFORM) |
| 137 | LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/sound_trigger |
| 138 | LOCAL_SRC_FILES += audio_extn/soundtrigger.c |
Vijay Venkatraman | 49543ea | 2017-02-28 17:29:29 -0800 | [diff] [blame] | 139 | ifneq ($(filter msm8996,$(TARGET_BOARD_PLATFORM)),) |
| 140 | LOCAL_HEADER_LIBRARIES := sound_trigger.primary_headers |
| 141 | endif |
| 142 | |
Ravi Kumar Alamanda | a417cc5 | 2015-05-01 16:41:56 -0700 | [diff] [blame] | 143 | endif |
| 144 | |
Ravi Kumar Alamanda | 6386300 | 2015-04-22 11:15:25 -0700 | [diff] [blame] | 145 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_SPKR_PROTECTION)),true) |
| 146 | LOCAL_CFLAGS += -DSPKR_PROT_ENABLED |
| 147 | LOCAL_SRC_FILES += audio_extn/spkr_protection.c |
| 148 | endif |
| 149 | |
zhaoyang yin | 4211fad | 2015-06-04 21:13:25 +0800 | [diff] [blame] | 150 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DSM_FEEDBACK)),true) |
| 151 | LOCAL_CFLAGS += -DDSM_FEEDBACK_ENABLED |
| 152 | LOCAL_SRC_FILES += audio_extn/dsm_feedback.c |
| 153 | endif |
| 154 | |
Thierry Strudel | 8a8deaa | 2016-12-15 13:34:42 -0800 | [diff] [blame] | 155 | ifneq ($(filter msm8992 msm8994 msm8996 msm8998,$(TARGET_BOARD_PLATFORM)),) |
Ravi Kumar Alamanda | 7631557 | 2015-04-23 13:13:56 -0700 | [diff] [blame] | 156 | # push codec/mad calibration to HW dep node |
| 157 | # applicable to msm8992/8994 or newer platforms |
| 158 | LOCAL_CFLAGS += -DHWDEP_CAL_ENABLED |
| 159 | LOCAL_SRC_FILES += audio_extn/hwdep_cal.c |
| 160 | endif |
| 161 | |
Haynes Mathew George | c735fb0 | 2016-06-30 18:00:28 -0700 | [diff] [blame] | 162 | ifeq ($(strip $(AUDIO_FEATURE_ENABLED_SND_MONITOR)), true) |
| 163 | LOCAL_CFLAGS += -DSND_MONITOR_ENABLED |
| 164 | LOCAL_SRC_FILES += audio_extn/sndmonitor.c |
| 165 | endif |
| 166 | |
Jiyong Park | 6431fe6 | 2017-06-29 15:15:58 +0900 | [diff] [blame] | 167 | LOCAL_HEADER_LIBRARIES += libhardware_headers |
| 168 | |
Ravi Kumar Alamanda | 80e2d86 | 2014-05-05 16:00:33 -0700 | [diff] [blame] | 169 | LOCAL_MODULE := audio.primary.$(TARGET_BOARD_PLATFORM) |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 170 | |
Isaac Chen | 7c4fca2 | 2017-02-24 20:47:31 +0800 | [diff] [blame] | 171 | LOCAL_MODULE_RELATIVE_PATH := hw |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 172 | |
| 173 | LOCAL_MODULE_TAGS := optional |
| 174 | |
Diego Wilson | 8c83e0a | 2017-03-17 15:29:43 -0700 | [diff] [blame] | 175 | LOCAL_MODULE_OWNER := qcom |
| 176 | |
| 177 | LOCAL_PROPRIETARY_MODULE := true |
| 178 | |
Glenn Kasten | cf4cddf | 2016-11-09 10:49:03 -0800 | [diff] [blame] | 179 | LOCAL_CFLAGS += -Werror |
| 180 | |
Ravi Kumar Alamanda | 2dfba2b | 2013-01-17 16:50:22 -0800 | [diff] [blame] | 181 | include $(BUILD_SHARED_LIBRARY) |
| 182 | |
| 183 | endif |