Skip to content

Commit

Permalink
ido: Fix building camera HAL inside lineage env
Browse files Browse the repository at this point in the history
Change-Id: I29ba4643edf87fc13386fc99b338581fed943440
  • Loading branch information
HighwayStar authored and Anik1199 committed Mar 30, 2017
1 parent f0ce063 commit f27111b
Show file tree
Hide file tree
Showing 13 changed files with 31 additions and 20 deletions.
2 changes: 2 additions & 0 deletions camera/Android.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
ifeq ($(call my-dir),$(call project-path-for,qcom-camera))
MM_V4L2_DRIVER_LIST += msm8960
MM_V4L2_DRIVER_LIST += msm8974
MM_V4L2_DRIVER_LIST += msm8226
Expand All @@ -11,3 +12,4 @@ ifeq ($(call is-board-platform-in-list,$(MM_V4L2_DRIVER_LIST)),true)
include $(call all-subdir-makefiles)
endif
endif
endif
2 changes: 1 addition & 1 deletion camera/CleanSpec.mk
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@
#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f)
#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*)

$(call add-clean-step, find $(OUT_DIR) -name "camera.msm8960*" -print0 | xargs -0 rm -rf)
$(call add-clean-step, find $(OUT_DIR) -name "camera.msm8916*" -print0 | xargs -0 rm -rf)
7 changes: 4 additions & 3 deletions camera/QCamera/HAL/core/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,10 @@ LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include/media
LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr

LOCAL_C_INCLUDES += hardware/qcom/display/libgralloc \
hardware/qcom/display/libgenlock \
hardware/qcom/media/libstagefrighthw
LOCAL_C_INCLUDES += $(call project-path-for,qcom-display)/libgralloc \
$(call project-path-for,qcom-display)/libgenlock \
$(call project-path-for,qcom-media)/libstagefrighthw


# if debug service layer and up , use stub camera!
LOCAL_C_INCLUDES += \
Expand Down
6 changes: 3 additions & 3 deletions camera/QCamera/HAL2/core/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../../stack/mm-jpeg-interface/inc\
$(TARGET_OUT_INTERMEDIATES)/include/mm-camera-interface_badger \

LOCAL_C_INCLUDES += hardware/qcom/display/libgralloc \
hardware/qcom/display/libgenlock \
hardware/qcom/media/libstagefrighthw \
LOCAL_C_INCLUDES += $(call project-path-for,qcom-display)/libgralloc \
$(call project-path-for,qcom-display)/libgenlock \
$(call project-path-for,qcom-media)/libstagefrighthw \
system/media/camera/include

# if debug service layer and up , use stub camera!
Expand Down
2 changes: 1 addition & 1 deletion camera/QCamera/stack/mm-camera-interface/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ LOCAL_C_INCLUDES += \
$(TARGET_OUT_HEADERS)/mm-still/mm-omx
# (END) Need to remove later once dependency on jpeg removed

LOCAL_C_INCLUDES+= hardware/qcom/media/mm-core/inc
LOCAL_C_INCLUDES+= LOCAL_C_INCLUDES+= $(call project-path-for,qcom-media)/mm-core/inc
LOCAL_CFLAGS += -include bionic/libc/kernel/common/linux/socket.h
LOCAL_CFLAGS += -include bionic/libc/kernel/common/linux/un.h

Expand Down
10 changes: 5 additions & 5 deletions camera/QCamera2/HAL/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ endif
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../stack/common \
frameworks/native/include/media/openmax \
hardware/qcom/display/libgralloc \
hardware/qcom/display/libqdutils \
hardware/qcom/media/libstagefrighthw \
$(call project-path-for,qcom-display)/libgralloc \
$(call project-path-for,qcom-display)/libqdutils \
$(call project-path-for,qcom-media)/libstagefrighthw \
system/media/camera/include \
$(LOCAL_PATH)/../../mm-image-codec/qexif \
$(LOCAL_PATH)/../../mm-image-codec/qomx_core \
Expand All @@ -49,7 +49,7 @@ endif
#ifeq ($(TARGET_USE_VENDOR_CAMERA_EXT),true)
#LOCAL_C_INCLUDES += hardware/qcom/display/msm8974/libgralloc
#else
LOCAL_C_INCLUDES += hardware/qcom/display/libgralloc
#LOCAL_C_INCLUDES += hardware/qcom/display/libgralloc
#endif
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include/media
Expand All @@ -71,4 +71,4 @@ LOCAL_MODULE_TAGS := optional

include $(BUILD_SHARED_LIBRARY)

include $(LOCAL_PATH)/test/Android.mk
#include $(LOCAL_PATH)/test/Android.mk
5 changes: 4 additions & 1 deletion camera/QCamera2/HAL/QCamera2Hal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ camera_module_t HAL_MODULE_INFO_SYM = {
#ifndef USE_KK_CODE
open_legacy: NULL,
#endif
reserved: {0}
set_torch_mode: NULL,
init: NULL,
reserved: {0}

//#endif
};
2 changes: 1 addition & 1 deletion camera/QCamera2/HAL/test/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ LOCAL_C_INCLUDES += \
frameworks/base/include/media \
external/skia/include/core \
external/skia/include/images \
hardware/qcom/display/libgralloc \
$(call project-path-for,qcom-display)/libgralloc \
frameworks/av/include/media/stagefright \
frameworks/native/include/media/openmax \

Expand Down
2 changes: 2 additions & 0 deletions camera/QCamera2/stack/common/cam_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
#define __CAMLIST_H

#include <stddef.h>
#include <string.h>
#include <stdlib.h>

#define member_of(ptr, type, member) ({ \
const typeof(((type *)0)->member) *__mptr = (ptr); \
Expand Down
2 changes: 2 additions & 0 deletions camera/QCamera2/stack/common/cam_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
#include <pthread.h>
#include <inttypes.h>
#include <media/msmb_camera.h>
#include <stdlib.h>
#include <string.h>

#define CAM_MAX_NUM_BUFS_PER_STREAM (24)
#define MAX_METADATA_PAYLOAD_SIZE (1024)
Expand Down
2 changes: 1 addition & 1 deletion camera/QCamera2/stack/mm-camera-interface/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include/media
LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr

LOCAL_C_INCLUDES += hardware/qcom/media/mm-core/inc
LOCAL_C_INCLUDES += $(call project-path-for,qcom-media)/mm-core/inc
ifeq ($(call is-platform-sdk-version-at-least,20),true)
LOCAL_C_INCLUDES += system/media/camera/include
endif
Expand Down
8 changes: 4 additions & 4 deletions camera/QCamera2/stack/mm-jpeg-interface/test/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ LOCAL_CFLAGS += -DUSE_ION
endif

OMX_HEADER_DIR := frameworks/native/include/media/openmax
OMX_CORE_DIR := hardware/qcom/camera/mm-image-codec
OMX_CORE_DIR := $(call project-path-for,qcom-camera)/mm-image-codec

LOCAL_C_INCLUDES := $(MM_JPEG_TEST_PATH)
LOCAL_C_INCLUDES += $(MM_JPEG_TEST_PATH)/../inc
Expand All @@ -27,7 +27,7 @@ LOCAL_C_INCLUDES += $(OMX_CORE_DIR)/qomx_core

ifneq ($(strip $(USE_BIONIC_HEADER)),true)
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
LOCAL_C_INCLUDES += hardware/qcom/camera
LOCAL_C_INCLUDES += $(call project-path-for,qcom-camera)
endif
LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr

Expand Down Expand Up @@ -60,7 +60,7 @@ LOCAL_CFLAGS += -DUSE_ION
endif

OMX_HEADER_DIR := frameworks/native/include/media/openmax
OMX_CORE_DIR := hardware/qcom/camera/mm-image-codec
OMX_CORE_DIR := $(call project-path-for,qcom-camera)/mm-image-codec

LOCAL_C_INCLUDES := $(MM_JPEG_TEST_PATH)
LOCAL_C_INCLUDES += $(MM_JPEG_TEST_PATH)/../inc
Expand All @@ -71,7 +71,7 @@ LOCAL_C_INCLUDES += $(OMX_CORE_DIR)/qomx_core

ifneq ($(strip $(USE_BIONIC_HEADER)),true)
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
LOCAL_C_INCLUDES += hardware/qcom/camera
OCAL_C_INCLUDES += $(call project-path-for,qcom-camera)
endif
LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr

Expand Down
1 change: 1 addition & 0 deletions camera/mm-image-codec/qomx_core/qomx_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.*/
#include <pthread.h>
#include <dlfcn.h>
#include <stdlib.h>
#include <string.h>
#include "OMX_Component.h"

#define TRUE 1
Expand Down

0 comments on commit f27111b

Please sign in to comment.