1 2 #ifeq ($(call is-board-platform,msm8960),true) 3 OLD_LOCAL_PATH := $(LOCAL_PATH) 4 LOCAL_PATH := $(call my-dir) 5 6 include $(CLEAR_VARS) 7 8 ifeq ($(strip $(TARGET_USES_ION)),true) 9 LOCAL_CFLAGS += -DUSE_ION 10 endif 11 12 DLOPEN_LIBMMCAMERA:=0 13 14 LOCAL_CFLAGS:= -DDLOPEN_LIBMMCAMERA=$(DLOPEN_LIBMMCAMERA) 15 16 LOCAL_CFLAGS += -DCAMERA_ION_HEAP_ID=ION_CP_MM_HEAP_ID # 8660=SMI, Rest=EBI 17 LOCAL_CFLAGS += -DCAMERA_ZSL_ION_HEAP_ID=ION_CP_MM_HEAP_ID 18 19 LOCAL_CFLAGS+= -DHW_ENCODE 20 LOCAL_CFLAGS+= -DUSE_NEON_CONVERSION 21 22 ifeq ($(call is-board-platform,msm8960),true) 23 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 24 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 25 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 26 LOCAL_CFLAGS += -DCAMERA_ZSL_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID 27 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 28 else ifeq ($(call is-chipset-prefix-in-board-platform,msm8660),true) 29 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_CAMERA_HEAP 30 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_CAMERA_HEAP # Don't Care 31 LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_CAMERA_HEAP_ID # EBI 32 LOCAL_CFLAGS += -DCAMERA_ZSL_ION_FALLBACK_HEAP_ID=ION_CAMERA_HEAP_ID 33 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0 34 else 35 LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_ADSP_HEAP 36 LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_ADSP_HEAP # Don't Care 37 LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=GRALLOC_USAGE_PRIVATE_UNCACHED #uncached 38 endif 39 40 LOCAL_HAL_FILES := \ 41 src/QCameraHAL.cpp \ 42 src/QCameraHWI_Parm.cpp \ 43 src/QCameraHWI.cpp \ 44 src/QCameraHWI_Preview.cpp \ 45 src/QCameraHWI_Record.cpp \ 46 src/QCameraHWI_Still.cpp \ 47 src/QCameraHWI_Mem.cpp \ 48 src/QCameraStream.cpp 49 50 LOCAL_HAL_WRAPPER_FILES := ../wrapper/QualcommCamera.cpp 51 52 LOCAL_C_INCLUDES := \ 53 $(LOCAL_PATH)/../wrapper \ 54 $(LOCAL_PATH)/inc \ 55 $(TARGET_OUT_INTERMEDIATES)/include/mm-camera-interface_badger \ 56 57 # may need remove this includes 58 LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-camera 59 LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-still \ 60 $(TARGET_OUT_HEADERS)/mm-still/jpeg 61 #end 62 63 LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include 64 LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include/media 65 LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr 66 67 LOCAL_C_INCLUDES += hardware/qcom/display/msm8960/libgralloc \ 68 hardware/qcom/display/msm8960/libgenlock \ 69 hardware/qcom/media/libstagefrighthw 70 71 # if debug service layer and up , use stub camera! 72 LOCAL_C_INCLUDES += \ 73 frameworks/base/services/camera/libcameraservice 74 75 LOCAL_SRC_FILES := \ 76 $(LOCAL_HAL_WRAPPER_FILES) \ 77 $(LOCAL_HAL_FILES) 78 79 LOCAL_SHARED_LIBRARIES := libutils libui libcamera_client liblog libcutils 80 LOCAL_SHARED_LIBRARIES += libmmcamera_interface_badger 81 LOCAL_SHARED_LIBRARIES+= libgenlock libbinder 82 83 LOCAL_CFLAGS += -include bionic/libc/include/sys/socket.h 84 85 LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw 86 LOCAL_MODULE:= camera_badger.$(TARGET_BOARD_PLATFORM) 87 LOCAL_MODULE_TAGS := optional 88 include $(BUILD_SHARED_LIBRARY) 89 90 LOCAL_PATH := $(OLD_LOCAL_PATH) 91 92