Permalink
Browse files

qcom/camera: new camera HAL implementation

This HAL is taken from the following project:
	remote: git://codeaurora.org/platform/hardware/qcom/camera.git
	SHA: 72226d4d1cda595b55ded993571de114c8ec9893

In addition, the makefiles have been patched so that it builds within AOSP.

Change-Id: I87125fd134838f41c75a0027da98440f63cfedb5
Signed-off-by: Iliyan Malchev <malchev@google.com>
  • Loading branch information...
1 parent ac6775d commit 6f83d735d8e3b918da42e6b559fcd0efb78133e5 Iliyan Malchev committed Apr 3, 2013
Showing with 69,656 additions and 47,365 deletions.
  1. +9 −132 Android.mk
  2. +0 −75 Makefile.am
  3. +1 −1 QCamera/Android.mk
  4. +1 −1 QCamera/HAL/Android.mk
  5. +44 −24 QCamera/HAL/core/Android.mk
  6. +5 −2 QCamera/HAL/core/inc/QCameraHAL.h
  7. +297 −165 QCamera/HAL/core/inc/QCameraHWI.h
  8. +6 −6 QCamera/HAL/core/inc/QCameraHWI_Mem.h
  9. +186 −246 QCamera/HAL/core/inc/QCameraStream.h
  10. +24 −34 QCamera/HAL/core/src/QCameraHAL.cpp
  11. +2,395 −1,278 QCamera/HAL/core/src/QCameraHWI.cpp
  12. +13 −240 QCamera/HAL/core/src/QCameraHWI_Mem.cpp
  13. +1,271 −1,065 QCamera/HAL/core/src/QCameraHWI_Parm.cpp
  14. +452 −879 QCamera/HAL/core/src/QCameraHWI_Preview.cpp
  15. +235 −0 QCamera/HAL/core/src/QCameraHWI_Rdi.cpp
  16. +158 −441 QCamera/HAL/core/src/QCameraHWI_Record.cpp
  17. +130 −2,406 QCamera/HAL/core/src/QCameraHWI_Still.cpp
  18. +97 −89 { → QCamera/HAL/core/src}/QCameraParameters.cpp
  19. +256 −270 QCamera/HAL/core/src/QCameraStream.cpp
  20. +1 −1 QCamera/HAL/test/Android.mk
  21. +49 −0 QCamera/HAL/usbcamcore/inc/QCameraMjpegDecode.h
  22. +178 −0 QCamera/HAL/usbcamcore/inc/QCameraUsbParm.h
  23. +202 −0 QCamera/HAL/usbcamcore/inc/QCameraUsbPriv.h
  24. +243 −0 QCamera/HAL/usbcamcore/inc/QualcommUsbCamera.h
  25. +701 −0 QCamera/HAL/usbcamcore/src/QCameraMjpegDecode.cpp
  26. +683 −0 QCamera/HAL/usbcamcore/src/QCameraUsbParm.cpp
  27. +2,963 −0 QCamera/HAL/usbcamcore/src/QualcommUsbCamera.cpp
  28. +59 −36 QCamera/HAL/wrapper/QualcommCamera.cpp
  29. +2 −0 QCamera/HAL/wrapper/QualcommCamera.h
  30. +3 −0 QCamera/HAL2/Android.mk
  31. +81 −0 QCamera/HAL2/core/Android.mk
  32. +6 −2 { → QCamera/HAL2/core/inc}/QCameraHAL.h
  33. +158 −129 { → QCamera/HAL2/core/inc}/QCameraHWI.h
  34. +254 −0 QCamera/HAL2/core/inc/QCameraParameters.h
  35. +302 −0 QCamera/HAL2/core/inc/QCameraStream.h
  36. +2,698 −0 QCamera/HAL2/core/inc/QCamera_Intf.h
  37. +47 −38 { → QCamera/HAL2/core/src}/QCameraHAL.cpp
  38. +492 −0 QCamera/HAL2/core/src/QCameraHWI.cpp
  39. +746 −0 QCamera/HAL2/core/src/QCameraHWI_Metatags.cpp
  40. +466 −0 QCamera/HAL2/core/src/QCameraStream.cpp
  41. +591 −0 QCamera/HAL2/core/src/QCameraStream_Preview.cpp
  42. +1 −0 QCamera/HAL2/test/Android.mk
  43. +282 −160 QualcommCamera2.cpp → QCamera/HAL2/wrapper/QualcommCamera.cpp
  44. +119 −0 QCamera/HAL2/wrapper/QualcommCamera.h
  45. +1 −1 QCamera/stack/Android.mk
  46. 0 QCamera/stack/common/cam_list.h
  47. +63 −47 QCamera/stack/mm-camera-interface/Android.mk
  48. +88 −13 QCamera/stack/mm-camera-interface/inc/mm_camera.h
  49. +4 −3 QCamera/stack/mm-camera-interface/inc/mm_camera_dbg.h
  50. +137 −28 QCamera/stack/mm-camera-interface/inc/mm_camera_interface.h
  51. 0 QCamera/stack/mm-camera-interface/inc/mm_camera_sock.h
  52. +459 −65 QCamera/stack/mm-camera-interface/src/mm_camera.c
  53. +583 −249 QCamera/stack/mm-camera-interface/src/mm_camera_channel.c
  54. +24 −5 QCamera/stack/mm-camera-interface/src/mm_camera_data.c
  55. +0 −263 QCamera/stack/mm-camera-interface/src/mm_camera_helper.c
  56. +383 −15 QCamera/stack/mm-camera-interface/src/mm_camera_interface.c
  57. +224 −224 QCamera/stack/mm-camera-interface/src/mm_camera_sock.c
  58. +250 −141 QCamera/stack/mm-camera-interface/src/mm_camera_stream.c
  59. +3 −4 QCamera/stack/mm-camera-interface/src/mm_camera_thread.c
  60. +12 −11 QCamera/stack/mm-camera-test/Android.mk
  61. +44 −13 QCamera/stack/mm-camera-test/inc/mm_qcamera_app.h
  62. 0 QCamera/stack/mm-camera-test/inc/mm_qcamera_display_dimensions.h
  63. +2 −9 QCamera/stack/mm-camera-test/inc/mm_qcamera_main_menu.h
  64. +1 −0 QCamera/stack/mm-camera-test/inc/mm_qcamera_unit_test.h
  65. +239 −24 QCamera/stack/mm-camera-test/src/mm_qcamera_app.c
  66. +3 −5 QCamera/stack/mm-camera-test/src/mm_qcamera_display.c
  67. +1,573 −202 QCamera/stack/mm-camera-test/src/mm_qcamera_dual_test.c
  68. +47 −45 QCamera/stack/mm-camera-test/src/mm_qcamera_main_menu.c
  69. +963 −0 QCamera/stack/mm-camera-test/src/mm_qcamera_pp.c
  70. +633 −125 QCamera/stack/mm-camera-test/src/mm_qcamera_preview.c
  71. +145 −47 QCamera/stack/mm-camera-test/src/mm_qcamera_rdi.c
  72. +534 −716 QCamera/stack/mm-camera-test/src/mm_qcamera_snapshot.c
  73. +247 −49 QCamera/stack/mm-camera-test/src/mm_qcamera_unit_test.c
  74. +335 −319 QCamera/stack/mm-camera-test/src/mm_qcamera_video.c
  75. +10 −3 QCamera/stack/mm-jpeg-interface/Android.mk
  76. +6 −4 QCamera/stack/mm-jpeg-interface/inc/mm_jpeg.h
  77. +1 −1 QCamera/stack/mm-jpeg-interface/inc/mm_jpeg_dbg.h
  78. +217 −209 QCamera/stack/mm-jpeg-interface/inc/mm_jpeg_interface.h
  79. +200 −80 QCamera/stack/mm-jpeg-interface/src/mm_jpeg.c
  80. +32 −3 QCamera/stack/mm-jpeg-interface/src/mm_jpeg_interface.c
  81. +23 −1 QCamera/stack/mm-jpeg-interface/src/mm_jpeg_queue.c
  82. +3 −0 QCamera2/Android.mk
  83. +43 −0 QCamera2/HAL/Android.mk
  84. +208 −0 QCamera2/HAL/QCamera2Factory.cpp
  85. +30 −37 inc/omx_debug.h → QCamera2/HAL/QCamera2Factory.h
  86. +4,113 −0 QCamera2/HAL/QCamera2HWI.cpp
  87. +427 −0 QCamera2/HAL/QCamera2HWI.h
  88. +1,286 −0 QCamera2/HAL/QCamera2HWICallbacks.cpp
  89. +49 −0 QCamera2/HAL/QCamera2Hal.cpp
  90. +52 −0 QCamera2/HAL/QCameraAllocator.h
  91. +782 −0 QCamera2/HAL/QCameraChannel.cpp
  92. +131 −0 QCamera2/HAL/QCameraChannel.h
  93. +190 −0 QCamera2/HAL/QCameraCmdThread.cpp
  94. +73 −0 QCamera2/HAL/QCameraCmdThread.h
  95. +1,315 −0 QCamera2/HAL/QCameraMem.cpp
  96. +181 −0 QCamera2/HAL/QCameraMem.h
  97. +5,978 −0 QCamera2/HAL/QCameraParameters.cpp
  98. +589 −0 QCamera2/HAL/QCameraParameters.h
  99. +1,673 −0 QCamera2/HAL/QCameraPostProc.cpp
  100. +162 −0 QCamera2/HAL/QCameraPostProc.h
  101. +295 −0 QCamera2/HAL/QCameraQueue.cpp
  102. +67 −0 QCamera2/HAL/QCameraQueue.h
  103. +2,466 −0 QCamera2/HAL/QCameraStateMachine.cpp
  104. +207 −0 QCamera2/HAL/QCameraStateMachine.h
  105. +879 −0 QCamera2/HAL/QCameraStream.cpp
  106. +134 −0 QCamera2/HAL/QCameraStream.h
  107. +162 −0 QCamera2/HAL/QCameraThermalAdapter.cpp
  108. +85 −0 QCamera2/HAL/QCameraThermalAdapter.h
  109. +33 −0 QCamera2/HAL/test/Android.mk
  110. +985 −0 QCamera2/HAL/test/qcamera_test.cpp
  111. +126 −0 QCamera2/HAL/test/qcamera_test.h
  112. +5 −0 QCamera2/stack/Android.mk
  113. +300 −0 QCamera2/stack/common/cam_intf.h
  114. +83 −0 QCamera2/stack/common/cam_list.h
  115. +130 −0 QCamera2/stack/common/cam_queue.h
  116. +85 −0 QCamera2/stack/common/cam_semaphore.h
  117. +787 −0 QCamera2/stack/common/cam_types.h
  118. +628 −0 QCamera2/stack/common/mm_camera_interface.h
  119. +187 −0 QCamera2/stack/common/mm_jpeg_interface.h
  120. +44 −0 QCamera2/stack/mm-camera-interface/Android.mk
  121. +559 −0 QCamera2/stack/mm-camera-interface/inc/mm_camera.h
  122. +71 −0 QCamera2/stack/mm-camera-interface/inc/mm_camera_dbg.h
  123. +57 −0 QCamera2/stack/mm-camera-interface/inc/mm_camera_sock.h
  124. +1,623 −0 QCamera2/stack/mm-camera-interface/src/mm_camera.c
  125. +1,878 −0 QCamera2/stack/mm-camera-interface/src/mm_camera_channel.c
  126. +1,371 −0 QCamera2/stack/mm-camera-interface/src/mm_camera_interface.c
  127. +54 −49 {mm-camera-interface → QCamera2/stack/mm-camera-interface/src}/mm_camera_sock.c
  128. +2,540 −0 QCamera2/stack/mm-camera-interface/src/mm_camera_stream.c
  129. +560 −0 QCamera2/stack/mm-camera-interface/src/mm_camera_thread.c
  130. +70 −0 QCamera2/stack/mm-camera-test/Android.mk
  131. +259 −0 QCamera2/stack/mm-camera-test/inc/mm_qcamera_app.h
  132. +71 −0 QCamera2/stack/mm-camera-test/inc/mm_qcamera_dbg.h
  133. +788 −0 QCamera2/stack/mm-camera-test/src/mm_qcamera_app.c
  134. +1,936 −0 QCamera2/stack/mm-camera-test/src/mm_qcamera_dual_test.c
  135. +409 −0 QCamera2/stack/mm-camera-test/src/mm_qcamera_preview.c
  136. +297 −0 QCamera2/stack/mm-camera-test/src/mm_qcamera_rdi.c
  137. +413 −0 QCamera2/stack/mm-camera-test/src/mm_qcamera_snapshot.c
  138. +641 −0 QCamera2/stack/mm-camera-test/src/mm_qcamera_unit_test.c
  139. +253 −0 QCamera2/stack/mm-camera-test/src/mm_qcamera_video.c
  140. +32 −0 QCamera2/stack/mm-jpeg-interface/Android.mk
  141. +198 −0 QCamera2/stack/mm-jpeg-interface/inc/mm_jpeg.h
  142. +70 −0 QCamera2/stack/mm-jpeg-interface/inc/mm_jpeg_dbg.h
  143. +2,240 −0 QCamera2/stack/mm-jpeg-interface/src/mm_jpeg.c
  144. +270 −0 QCamera2/stack/mm-jpeg-interface/src/mm_jpeg_exif.c
  145. +344 −0 QCamera2/stack/mm-jpeg-interface/src/mm_jpeg_interface.c
  146. +155 −0 QCamera2/stack/mm-jpeg-interface/src/mm_jpeg_queue.c
  147. +37 −0 QCamera2/stack/mm-jpeg-interface/test/Android.mk
  148. +132 −0 QCamera2/stack/mm-jpeg-interface/test/mm_jpeg_ionbuf.c
  149. +81 −0 QCamera2/stack/mm-jpeg-interface/test/mm_jpeg_ionbuf.h
  150. +327 −0 QCamera2/stack/mm-jpeg-interface/test/mm_jpeg_test.c
  151. +0 −2,769 QCameraHWI.cpp
  152. +0 −76 QCameraHWI_Display.cpp
  153. +0 −69 QCameraHWI_Display.h
  154. +0 −405 QCameraHWI_Mem.cpp
  155. +0 −109 QCameraHWI_Mem.h
  156. +0 −4,315 QCameraHWI_Parm.cpp
  157. +0 −1,499 QCameraHWI_Preview.cpp
  158. +0 −900 QCameraHWI_Preview_7x27A.cpp
  159. +0 −581 QCameraHWI_Record.cpp
  160. +0 −254 QCameraHWI_Record_7x27A.cpp
  161. +0 −2,877 QCameraHWI_Still.cpp
  162. +0 −362 QCameraStream.cpp
  163. +0 −391 QCameraStream.h
  164. +154 −1,776 QCamera_Intf.h
  165. +0 −702 QualcommCamera.cpp
  166. +0 −95 QualcommCamera.h
  167. +0 −108 QualcommCamera2.h
  168. +0 −10,027 QualcommCameraHardware.cpp
  169. +0 −651 QualcommCameraHardware.h
  170. +0 −81 configure.ac
  171. +0 −302 inc/omx_jpeg_common.h
  172. +0 −121 inc/omx_jpeg_ext.h
  173. +0 −35 mm-camera-interface/Android.mk
  174. +0 −1,132 mm-camera-interface/mm_camera.c
  175. +0 −355 mm-camera-interface/mm_camera.h
  176. +0 −767 mm-camera-interface/mm_camera_channel.c
  177. +0 −70 mm-camera-interface/mm_camera_dbg.h
  178. +0 −335 mm-camera-interface/mm_camera_helper.c
  179. +0 −996 mm-camera-interface/mm_camera_interface2.c
  180. +0 −528 mm-camera-interface/mm_camera_interface2.h
  181. +0 −849 mm-camera-interface/mm_camera_notify.c
  182. +0 −466 mm-camera-interface/mm_camera_poll_thread.c
  183. +0 −57 mm-camera-interface/mm_camera_sock.h
  184. +0 −895 mm-camera-interface/mm_camera_stream.c
  185. +0 −717 mm-camera-interface/mm_jpeg_encoder.c
  186. +0 −75 mm-camera-interface/mm_jpeg_encoder.h
  187. +0 −806 mm-camera-interface/mm_omx_jpeg_encoder.c
  188. +0 −82 mm-camera-interface/mm_omx_jpeg_encoder.h
  189. +3 −0 mm-image-codec/Android.mk
  190. +1,728 −0 mm-image-codec/qexif/qexif.h
  191. +27 −0 mm-image-codec/qomx_core/Android.mk
  192. +201 −0 mm-image-codec/qomx_core/QOMX_JpegExtensions.h
  193. +345 −0 mm-image-codec/qomx_core/qomx_core.c
  194. +96 −0 mm-image-codec/qomx_core/qomx_core.h
View
141 Android.mk 100755 → 100644
@@ -1,135 +1,12 @@
-LOCAL_PATH:= $(call my-dir)
+MM_V4L2_DRIVER_LIST += msm8960
+MM_V4L2_DRIVER_LIST += msm8974
-ifeq ($(TARGET_BOARD_PLATFORM),msm8960)
-ifneq ($(USE_CAMERA_STUB),true)
-ifneq ($(USE_DEVICE_SPECIFIC_CAMERA),true)
-
- # When zero we link against libmmcamera; when 1, we dlopen libmmcamera.
- DLOPEN_LIBMMCAMERA:=1
- ifneq ($(BUILD_TINY_ANDROID),true)
- V4L2_BASED_LIBCAM := true
-
- LOCAL_PATH1:= $(call my-dir)
- include $(CLEAR_VARS)
-
- LOCAL_CFLAGS:= -DDLOPEN_LIBMMCAMERA=$(DLOPEN_LIBMMCAMERA)
-
- #define BUILD_UNIFIED_CODE
- ifeq ($(TARGET_BOARD_PLATFORM),msm7627a)
- BUILD_UNIFIED_CODE := true
- else
- BUILD_UNIFIED_CODE := false
- endif
-
- ifeq ($(TARGET_BOARD_PLATFORM),msm7627a)
- LOCAL_CFLAGS+= -DVFE_7X27A
- endif
-
- ifeq ($(strip $(TARGET_USES_ION)),true)
- LOCAL_CFLAGS += -DUSE_ION
- endif
-
- LOCAL_CFLAGS += -DCAMERA_ION_HEAP_ID=ION_CP_MM_HEAP_ID # 8660=SMI, Rest=EBI
- LOCAL_CFLAGS += -DCAMERA_ZSL_ION_HEAP_ID=ION_CP_MM_HEAP_ID
- ifeq ($(TARGET_BOARD_PLATFORM),msm8960)
- LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_MM_HEAP
- LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP
- LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID
- LOCAL_CFLAGS += -DCAMERA_ZSL_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID
- LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0
- else ifeq ($(TARGET_BOARD_PLATFORM),msm8660)
- LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_CAMERA_HEAP
- LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_CAMERA_HEAP # Don't Care
- LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_CAMERA_HEAP_ID # EBI
- LOCAL_CFLAGS += -DCAMERA_ZSL_ION_FALLBACK_HEAP_ID=ION_CAMERA_HEAP_ID
- LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0
- else
- LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_ADSP_HEAP
- LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_ADSP_HEAP # Don't Care
- LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=GRALLOC_USAGE_PRIVATE_UNCACHED #uncached
- endif
-
- ifeq ($(V4L2_BASED_LIBCAM),true)
- ifeq ($(TARGET_BOARD_PLATFORM),msm7627a)
- LOCAL_HAL_FILES := QCameraHAL.cpp QCameraHWI_Parm.cpp\
- QCameraHWI.cpp QCameraHWI_Preview.cpp \
- QCameraHWI_Record_7x27A.cpp QCameraHWI_Still.cpp \
- QCameraHWI_Mem.cpp QCameraHWI_Display.cpp \
- QCameraStream.cpp QualcommCamera2.cpp
- else
- LOCAL_HAL_FILES := QCameraHAL.cpp QCameraHWI_Parm.cpp\
- QCameraHWI.cpp QCameraHWI_Preview.cpp \
- QCameraHWI_Record.cpp QCameraHWI_Still.cpp \
- QCameraHWI_Mem.cpp QCameraHWI_Display.cpp \
- QCameraStream.cpp QualcommCamera2.cpp QCameraParameters.cpp
- endif
-
- else
- LOCAL_HAL_FILES := QualcommCamera.cpp QualcommCameraHardware.cpp
- endif
-
- LOCAL_CFLAGS+= -DHW_ENCODE
-
- # if debug service layer and up , use stub camera!
- LOCAL_C_INCLUDES += \
- frameworks/base/services/camera/libcameraservice #
-
- LOCAL_SRC_FILES := $(MM_CAM_FILES) $(LOCAL_HAL_FILES)
-
- ifeq ($(TARGET_BOARD_PLATFORM),msm7627a)
- LOCAL_CFLAGS+= -DNUM_PREVIEW_BUFFERS=6 -D_ANDROID_
- else
- LOCAL_CFLAGS+= -DNUM_PREVIEW_BUFFERS=4 -D_ANDROID_
+ifeq ($(call is-board-platform-in-list,$(MM_V4L2_DRIVER_LIST)),true)
+ ifneq ($(USE_CAMERA_STUB),true)
+ ifneq ($(USE_DEVICE_SPECIFIC_CAMERA),true)
+ ifneq ($(BUILD_TINY_ANDROID),true)
+ include $(call all-subdir-makefiles)
endif
-
- # To Choose neon/C routines for YV12 conversion
- LOCAL_CFLAGS+= -DUSE_NEON_CONVERSION
- # Uncomment below line to enable smooth zoom
- #LOCAL_CFLAGS+= -DCAMERA_SMOOTH_ZOOM
-
- ifeq ($(V4L2_BASED_LIBCAM),true)
- LOCAL_C_INCLUDES+= hardware/qcom/media/mm-core/inc
- LOCAL_C_INCLUDES+= $(LOCAL_PATH)/mm-camera-interface
- endif
-
- LOCAL_C_INCLUDES+= hardware/qcom/display/libgralloc
- LOCAL_C_INCLUDES+= hardware/qcom/display/libgenlock
- LOCAL_C_INCLUDES+= hardware/qcom/media/libstagefrighthw
-
-
- ifeq ($(V4L2_BASED_LIBCAM),true)
- LOCAL_SHARED_LIBRARIES:= libutils libui libcamera_client liblog libcutils
- LOCAL_SHARED_LIBRARIES += libmmcamera_interface2
- else
- LOCAL_SHARED_LIBRARIES:= libutils libui libcamera_client liblog libcutils libmmjpeg
- endif
-
- LOCAL_SHARED_LIBRARIES+= libgenlock libbinder
- ifneq ($(DLOPEN_LIBMMCAMERA),1)
- LOCAL_SHARED_LIBRARIES+= liboemcamera
- else
- LOCAL_SHARED_LIBRARIES+= libdl
- endif
-
- LOCAL_CFLAGS += -include bionic/libc/include/sys/socket.h
-
- LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
- LOCAL_MODULE:= camera.$(TARGET_DEVICE)
- LOCAL_MODULE_TAGS := optional
- include $(BUILD_SHARED_LIBRARY)
-
- endif # BUILD_TINY_ANDROID
-endif # USE_CAMERA_STUB
-
-ifneq ($(USE_DEVICE_SPECIFIC_CAMERA),true)
-ifeq ($(V4L2_BASED_LIBCAM),true)
-include $(LOCAL_PATH)/mm-camera-interface/Android.mk
-endif
-
-#Enable only to compile new interafece and HAL files.
-ifeq ($(V4L2_BASED_LIBCAM),true)
-#include $(LOCAL_PATH1)/QCamera/Android.mk
-endif
-endif
-endif
+ endif
+ endif
endif
View
@@ -1,75 +0,0 @@
-ACLOCAL_AMFLAGS = -I m4
-
-#libcamera.so
-lib_LTLIBRARIES = libcamera.la
-
-libcamera_la_CFLAGS := $(DEBUG_CFLAGS)
-libcamera_la_CFLAGS += -DAMSS_VERSION=$(AMSS_VERSION)
-libcamera_la_CFLAGS += -DMSM_CAMERA_GCC
-libcamera_la_CFLAGS += -DLINUX_ENABLED
-libcamera_la_CFLAGS += -Dstrlcpy=g_strlcpy
-libcamera_la_CFLAGS += -fPIC
-
-LOCAL_CFLAGS:= -DDLOPEN_LIBMMCAMERA=1
-
-libcamera_la_CFLAGS += -DHW_ENCODE
-
-if MSM7X27A
-libcamera_la_CFLAGS+= -DNUM_PREVIEW_BUFFERS=6
-libcamera_la_CFLAGS+= -DVFE_7X27A
-else
-libcamera_la_CFLAGS+= -DNUM_PREVIEW_BUFFERS=4
-endif
-
-# To Choose neon/C routines for YV12 conversion
-libcamera_la_CFLAGS+= -DUSE_NEON_CONVERSION
-# Uncomment below line to enable smooth zoom
-#libcamera_la_CFLAGS+= -DCAMERA_SMOOTH_ZOOM
-
-libcamera_la_SOURCES := mm_camera.c
-libcamera_la_SOURCES += mm_camera_channel.c
-libcamera_la_SOURCES += mm_camera_helper.c
-libcamera_la_SOURCES += mm_camera_interface2.c
-libcamera_la_SOURCES += mm_camera_notify.c
-libcamera_la_SOURCES += mm_camera_poll_thread.c
-libcamera_la_SOURCES += mm_camera_sock.c
-libcamera_la_SOURCES += mm_camera_stream.c
-
-if BUILD_JPEG
-libcamera_la_SOURCES += mm_jpeg_encoder.c
-libcamera_la_SOURCES += mm_omx_jpeg_encoder.c
-endif
-
-if BUILD_UNIFIED_CODE
-if MSM8960
-libcamera_la_SOURCES += QCameraHAL.cpp
-libcamera_la_SOURCES += QCameraHWI_Parm.cpp
-libcamera_la_SOURCES += QCameraHWI.cpp
-libcamera_la_SOURCES += QCameraHWI_Preview.cpp
-libcamera_la_SOURCES += QCameraHWI_Record.cpp
-libcamera_la_SOURCES += QCameraHWI_Still.cpp
-libcamera_la_SOURCES += QCameraHWI_Mem.cpp
-libcamera_la_SOURCES += QCameraHWI_Display.cpp
-libcamera_la_SOURCES += QCameraStream.cpp
-libcamera_la_SOURCES += QualcommCamera2.cpp
-elif MSM7X27A
-libcamera_la_SOURCES += QCameraHAL.cpp
-libcamera_la_SOURCES += QCameraHWI_Parm.cpp
-libcamera_la_SOURCES += QCameraHWI.cpp
-libcamera_la_SOURCES += QCameraHWI_Preview_7x27A.cpp
-libcamera_la_SOURCES += QCameraHWI_Record_7x27A.cpp
-libcamera_la_SOURCES += QCameraHWI_Still.cpp
-libcamera_la_SOURCES += QCameraHWI_Mem.cpp
-libcamera_la_SOURCES += QCameraHWI_Display.cpp
-libcamera_la_SOURCES += QCameraStream.cpp
-libcamera_la_SOURCES += QualcommCamera2.cpp
-endif
-endif
-
-libcamera_la_LDFLAGS := $(DEBUG_LDFLAGS)
-libcamera_la_LDFLAGS += -shared
-libcamera_la_LIBADD = -ldl
-
-dirs :=
-SUBDIRS = $(dirs)
-
View
2 QCamera/Android.mk 100644 → 100755
@@ -1,3 +1,3 @@
ifeq ($(TARGET_ARCH),arm)
- include $(call all-subdir-makefiles)
+# include $(call all-subdir-makefiles)
endif
View
2 QCamera/HAL/Android.mk 100644 → 100755
@@ -1,3 +1,3 @@
LOCAL_PATH:= $(call my-dir)
-#include $(LOCAL_PATH)/core/Android.mk
+include $(LOCAL_PATH)/core/Android.mk
#include $(LOCAL_PATH)/test/Android.mk
View
68 QCamera/HAL/core/Android.mk 100644 → 100755
@@ -1,40 +1,50 @@
-
-#ifeq ($(call is-board-platform,msm8960),true)
OLD_LOCAL_PATH := $(LOCAL_PATH)
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
-ifeq ($(strip $(TARGET_USES_ION)),true)
-LOCAL_CFLAGS += -DUSE_ION
-endif
-
DLOPEN_LIBMMCAMERA:=0
LOCAL_CFLAGS:= -DDLOPEN_LIBMMCAMERA=$(DLOPEN_LIBMMCAMERA)
+ifeq ($(strip $(TARGET_USES_ION)),true)
+ LOCAL_CFLAGS += -DUSE_ION
+endif
+
LOCAL_CFLAGS += -DCAMERA_ION_HEAP_ID=ION_CP_MM_HEAP_ID # 8660=SMI, Rest=EBI
LOCAL_CFLAGS += -DCAMERA_ZSL_ION_HEAP_ID=ION_CP_MM_HEAP_ID
LOCAL_CFLAGS+= -DHW_ENCODE
LOCAL_CFLAGS+= -DUSE_NEON_CONVERSION
-ifeq ($(call is-board-platform,msm8960),true)
+ifeq ($(call is-board-platform,msm8974),true)
LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_MM_HEAP
LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP
LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID
LOCAL_CFLAGS += -DCAMERA_ZSL_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID
LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0
+ LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=9
+else ifeq ($(call is-board-platform,msm8960),true)
+ LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_MM_HEAP
+ LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP
+ LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID
+ LOCAL_CFLAGS += -DCAMERA_ZSL_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID
+ LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0
+ LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=5
else ifeq ($(call is-chipset-prefix-in-board-platform,msm8660),true)
LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_CAMERA_HEAP
- LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_CAMERA_HEAP # Don't Care
- LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_CAMERA_HEAP_ID # EBI
- LOCAL_CFLAGS += -DCAMERA_ZSL_ION_FALLBACK_HEAP_ID=ION_CAMERA_HEAP_ID
+ LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_IOMMU_HEAP # Don't Care
+ LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID # EBI
+ LOCAL_CFLAGS += -DCAMERA_ZSL_ION_FALLBACK_HEAP_ID=ION_IOMMU_HEAP_ID
LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=0
+ LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=5
else
- LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_ADSP_HEAP
- LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_ADSP_HEAP # Don't Care
+ LOCAL_CFLAGS += -DCAMERA_GRALLOC_HEAP_ID=GRALLOC_USAGE_PRIVATE_CAMERA_HEAP
+ LOCAL_CFLAGS += -DCAMERA_GRALLOC_FALLBACK_HEAP_ID=GRALLOC_USAGE_PRIVATE_CAMERA_HEAP # Don't Care
LOCAL_CFLAGS += -DCAMERA_GRALLOC_CACHING_ID=GRALLOC_USAGE_PRIVATE_UNCACHED #uncached
+ LOCAL_CFLAGS += -DCAMERA_ION_FALLBACK_HEAP_ID=ION_CAMERA_HEAP_ID
+ LOCAL_CFLAGS += -DCAMERA_ZSL_ION_FALLBACK_HEAP_ID=ION_CAMERA_HEAP_ID
+ LOCAL_CFLAGS += -DNUM_RECORDING_BUFFERS=5
endif
LOCAL_HAL_FILES := \
@@ -44,20 +54,30 @@ LOCAL_HAL_FILES := \
src/QCameraHWI_Preview.cpp \
src/QCameraHWI_Record.cpp \
src/QCameraHWI_Still.cpp \
+ src/QCameraHWI_Rdi.cpp \
src/QCameraHWI_Mem.cpp \
- src/QCameraStream.cpp
+ src/QCameraParameters.cpp\
+ src/QCameraStream.cpp\
+ ../usbcamcore/src/QualcommUsbCamera.cpp\
+ ../usbcamcore/src/QCameraMjpegDecode.cpp\
+ ../usbcamcore/src/QCameraUsbParm.cpp
LOCAL_HAL_WRAPPER_FILES := ../wrapper/QualcommCamera.cpp
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../wrapper \
$(LOCAL_PATH)/inc \
- $(TARGET_OUT_INTERMEDIATES)/include/mm-camera-interface_badger \
-
-# may need remove this includes
-LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-camera
-LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-still \
- $(TARGET_OUT_HEADERS)/mm-still/jpeg
+ $(LOCAL_PATH)/../usbcamcore/inc\
+ $(LOCAL_PATH)/../../stack/mm-camera-interface/inc \
+ $(LOCAL_PATH)/../../stack/mm-jpeg-interface/inc \
+ $(LOCAL_PATH)/../../../ \
+ $(TARGET_OUT_INTERMEDIATES)/include/mm-camera-interface \
+# $(TARGET_OUT_INTERMEDIATES)/include/mm-jpeg-interface\
+
+# may need remove this includes
+LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-camera
+#LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-still
+LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-still/jpeg
#end
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
@@ -76,14 +96,14 @@ LOCAL_SRC_FILES := \
$(LOCAL_HAL_WRAPPER_FILES) \
$(LOCAL_HAL_FILES)
-LOCAL_SHARED_LIBRARIES := libutils libui libcamera_client liblog libcutils
-LOCAL_SHARED_LIBRARIES += libmmcamera_interface_badger
-LOCAL_SHARED_LIBRARIES+= libgenlock libbinder
+LOCAL_SHARED_LIBRARIES := libutils libui libcamera_client liblog libcutils libmmjpeg
+LOCAL_SHARED_LIBRARIES += libmmcamera_interface
+LOCAL_SHARED_LIBRARIES += libgenlock libbinder libmmjpeg_interface libhardware
-LOCAL_CFLAGS += -include bionic/libc/include/sys/socket.h
+LOCAL_CFLAGS += -include bionic/libc/kernel/common/linux/socket.h
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
-LOCAL_MODULE:= camera_badger.$(TARGET_BOARD_PLATFORM)
+LOCAL_MODULE:= camera.$(TARGET_BOARD_PLATFORM)
LOCAL_MODULE_TAGS := optional
include $(BUILD_SHARED_LIBRARY)
View
7 QCamera/HAL/core/inc/QCameraHAL.h 100644 → 100755
@@ -1,5 +1,8 @@
/*
-** Copyright (c) 2011 The Linux Foundation. All rights reserved.
+** Copyright (c) 2011-2012 The Linux Foundation. All rights reserved.
+**
+** Not a Contribution, Apache license notifications and license are retained
+** for attribution purposes only.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
@@ -21,7 +24,7 @@
#include "QCameraHWI.h"
extern "C" {
-#include <mm_camera_interface2.h>
+#include <mm_camera_interface.h>
}
namespace android {
Oops, something went wrong.

0 comments on commit 6f83d73

Please sign in to comment.