Rashed Abdel-Tawab | b8ac142 | 2018-08-25 11:10:25 -0700 | [diff] [blame] | 1 | # Bring in Qualcomm helper macros |
| 2 | include vendor/lineage/build/core/qcom_utils.mk |
| 3 | |
| 4 | B_FAMILY := msm8226 msm8610 msm8974 |
| 5 | B64_FAMILY := msm8992 msm8994 |
| 6 | BR_FAMILY := msm8909 msm8916 |
| 7 | UM_3_18_FAMILY := msm8937 msm8953 msm8996 |
| 8 | UM_4_4_FAMILY := msm8998 sdm660 |
| 9 | UM_4_9_FAMILY := sdm845 |
| 10 | UM_PLATFORMS := $(UM_3_18_FAMILY) $(UM_4_4_FAMILY) $(UM_4_9_FAMILY) |
| 11 | |
| 12 | BOARD_USES_ADRENO := true |
| 13 | |
| 14 | # UM platforms no longer need this set on O+ |
| 15 | ifneq ($(call is-board-platform-in-list, $(UM_PLATFORMS)),true) |
| 16 | TARGET_USES_QCOM_BSP := true |
| 17 | endif |
| 18 | |
| 19 | # Tell HALs that we're compiling an AOSP build with an in-line kernel |
| 20 | TARGET_COMPILE_WITH_MSM_KERNEL := true |
| 21 | |
| 22 | ifneq ($(filter msm7x27a msm7x30 msm8660 msm8960,$(TARGET_BOARD_PLATFORM)),) |
| 23 | TARGET_USES_QCOM_BSP_LEGACY := true |
| 24 | # Enable legacy audio functions |
| 25 | ifeq ($(BOARD_USES_LEGACY_ALSA_AUDIO),true) |
| 26 | USE_CUSTOM_AUDIO_POLICY := 1 |
| 27 | endif |
| 28 | endif |
| 29 | |
| 30 | # Enable media extensions |
| 31 | TARGET_USES_MEDIA_EXTENSIONS := true |
| 32 | |
| 33 | # Allow building audio encoders |
| 34 | TARGET_USES_QCOM_MM_AUDIO := true |
| 35 | |
| 36 | # Enable color metadata for every UM platform |
| 37 | ifeq ($(call is-board-platform-in-list, $(UM_PLATFORMS)),true) |
| 38 | TARGET_USES_COLOR_METADATA := true |
| 39 | endif |
| 40 | |
| 41 | # Enable DRM PP driver on UM platforms that support it |
| 42 | ifeq ($(call is-board-platform-in-list, $(UM_4_9_FAMILY)),true) |
| 43 | TARGET_USES_DRM_PP := true |
| 44 | endif |
| 45 | |
| 46 | # List of targets that use master side content protection |
| 47 | MASTER_SIDE_CP_TARGET_LIST := msm8996 msm8998 sdm660 sdm845 |
| 48 | |
| 49 | ifeq ($(call is-board-platform-in-list, $(B_FAMILY)),true) |
| 50 | MSM_VIDC_TARGET_LIST := $(B_FAMILY) |
| 51 | QCOM_HARDWARE_VARIANT := msm8974 |
| 52 | else |
| 53 | ifeq ($(call is-board-platform-in-list, $(B64_FAMILY)),true) |
| 54 | MSM_VIDC_TARGET_LIST := $(B64_FAMILY) |
| 55 | QCOM_HARDWARE_VARIANT := msm8994 |
| 56 | else |
| 57 | ifeq ($(call is-board-platform-in-list, $(BR_FAMILY)),true) |
| 58 | MSM_VIDC_TARGET_LIST := $(BR_FAMILY) |
| 59 | QCOM_HARDWARE_VARIANT := msm8916 |
| 60 | else |
| 61 | ifeq ($(call is-board-platform-in-list, $(UM_3_18_FAMILY)),true) |
| 62 | MSM_VIDC_TARGET_LIST := $(UM_3_18_FAMILY) |
| 63 | QCOM_HARDWARE_VARIANT := msm8996 |
| 64 | else |
| 65 | ifeq ($(call is-board-platform-in-list, $(UM_4_4_FAMILY)),true) |
| 66 | MSM_VIDC_TARGET_LIST := $(UM_4_4_FAMILY) |
| 67 | QCOM_HARDWARE_VARIANT := msm8998 |
| 68 | else |
| 69 | ifeq ($(call is-board-platform-in-list, $(UM_4_9_FAMILY)),true) |
| 70 | MSM_VIDC_TARGET_LIST := $(UM_4_9_FAMILY) |
| 71 | QCOM_HARDWARE_VARIANT := sdm845 |
| 72 | else |
| 73 | MSM_VIDC_TARGET_LIST := $(TARGET_BOARD_PLATFORM) |
| 74 | QCOM_HARDWARE_VARIANT := $(TARGET_BOARD_PLATFORM) |
| 75 | endif |
| 76 | endif |
| 77 | endif |
| 78 | endif |
| 79 | endif |
| 80 | endif |
| 81 | |
Rashed Abdel-Tawab | a94cf0c | 2018-08-25 11:17:23 -0700 | [diff] [blame] | 82 | PRODUCT_SOONG_NAMESPACES += \ |
| 83 | hardware/qcom/audio-caf/$(QCOM_HARDWARE_VARIANT) \ |
| 84 | hardware/qcom/display-caf/$(QCOM_HARDWARE_VARIANT) \ |
| 85 | hardware/qcom/media-caf/$(QCOM_HARDWARE_VARIANT) |
| 86 | |
Rashed Abdel-Tawab | b8ac142 | 2018-08-25 11:10:25 -0700 | [diff] [blame] | 87 | # QCOM HW crypto |
| 88 | ifeq ($(TARGET_HW_DISK_ENCRYPTION),true) |
| 89 | TARGET_CRYPTFS_HW_PATH ?= vendor/qcom/opensource/cryptfs_hw |
| 90 | endif |