GraphicBufferMapper &mapper = GraphicBufferMapper::get();
buffer_handle_t bufferHandle = (buffer_handle_t) handle;
private_handle_t *priv_hnd = (private_handle_t *) bufferHandle;
- Rect bounds(width, height);
+ Rect bounds((uint32_t)width, (uint32_t)height);
ExynosVideoPlane *vplanes = (ExynosVideoPlane *) planes;
void *vaddr[MAX_BUFFER_PLANE];
#define MB_1 (1024*1024)
+
+//these are no longer defined, but we DO support them, so let's keep that knowledge alive for potential binary-blob users
+#define HAL_PIXEL_FORMAT_sRGB_A_8888 12
+#define HAL_PIXEL_FORMAT_sRGB_X_8888 13
+
+
+
+
+
+
+
/*****************************************************************************/
struct gralloc_context_t {
bpp = 3;
break;
case HAL_PIXEL_FORMAT_RGB_565:
- case HAL_PIXEL_FORMAT_RAW_SENSOR:
+ case HAL_PIXEL_FORMAT_RAW16:
bpp = 2;
break;
case HAL_PIXEL_FORMAT_BLOB:
const uint8_t Sensor::kColorFilterArrangement = ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB;
const uint32_t kAvailableFormats[5] = {
- HAL_PIXEL_FORMAT_RAW_SENSOR,
+ HAL_PIXEL_FORMAT_RAW16,
HAL_PIXEL_FORMAT_BLOB,
HAL_PIXEL_FORMAT_RGBA_8888,
HAL_PIXEL_FORMAT_YV12,
static hw_module_methods_t camera_module_methods = {
- open : HAL2_camera_device_open
+ .open = HAL2_camera_device_open
};
extern "C" {
struct camera_module HAL_MODULE_INFO_SYM = {
- common : {
- tag : HARDWARE_MODULE_TAG,
- module_api_version : CAMERA_MODULE_API_VERSION_2_0,
- hal_api_version : HARDWARE_HAL_API_VERSION,
- id : CAMERA_HARDWARE_MODULE_ID,
- name : "Exynos Camera HAL2",
- author : "Samsung Corporation",
- methods : &camera_module_methods,
- dso : NULL,
- reserved : {0},
+ .common = {
+ .tag = HARDWARE_MODULE_TAG,
+ .module_api_version = CAMERA_MODULE_API_VERSION_2_0,
+ .hal_api_version = HARDWARE_HAL_API_VERSION,
+ .id = CAMERA_HARDWARE_MODULE_ID,
+ .name = "Exynos Camera HAL2",
+ .author = "Samsung Corporation",
+ .methods = &camera_module_methods,
},
- get_number_of_cameras : HAL2_getNumberOfCameras,
- get_camera_info : HAL2_getCameraInfo,
- set_callbacks : NULL,
- get_vendor_tag_ops : NULL,
- open_legacy : NULL,
- reserved : {0}
+ .get_number_of_cameras = HAL2_getNumberOfCameras,
+ .get_camera_info = HAL2_getCameraInfo,
};
}
#define LOG_TAG "ExynosJpegForCamera"
#include <utils/Log.h>
+#include <string.h>
#include "ExynosJpegEncoderForCamera.h"
*/
#define LOG_TAG "libcsc"
#include <cutils/log.h>
+#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <hardware/hardware.h>
-#include <hardware/keymaster.h>
+#include <hardware/keymaster0.h>
#include <openssl/evp.h>
#include <openssl/bio.h>
};
typedef UniquePtr<RSA, RSA_Delete> Unique_RSA;
-typedef UniquePtr<keymaster_device_t> Unique_keymaster_device_t;
+typedef UniquePtr<keymaster0_device_t> Unique_keymaster0_device_t;
/**
* Many OpenSSL APIs take ownership of an argument on success but don't free the argument
ERR_remove_state(0);
}
-static int exynos_km_generate_keypair(const keymaster_device_t* dev,
+static int exynos_km_generate_keypair(const keymaster0_device_t* dev,
const keymaster_keypair_t key_type, const void* key_params,
uint8_t** keyBlob, size_t* keyBlobLength) {
teeResult_t ret = TEE_ERR_NONE;
return 0;
}
-static int exynos_km_import_keypair(const keymaster_device_t* dev,
+static int exynos_km_import_keypair(const keymaster0_device_t* dev,
const uint8_t* key, const size_t key_length,
uint8_t** key_blob, size_t* key_blob_length) {
uint8_t kbuf[RSA_KEY_BUFFER_SIZE];
return 0;
}
-static int exynos_km_get_keypair_public(const struct keymaster_device* dev,
+static int exynos_km_get_keypair_public(const struct keymaster0_device* dev,
const uint8_t* key_blob, const size_t key_blob_length,
uint8_t** x509_data, size_t* x509_data_length) {
uint32_t bin_mod_len;
return 0;
}
-static int exynos_km_sign_data(const keymaster_device_t* dev,
+static int exynos_km_sign_data(const keymaster0_device_t* dev,
const void* params,
const uint8_t* keyBlob, const size_t keyBlobLength,
const uint8_t* data, const size_t dataLength,
return 0;
}
-static int exynos_km_verify_data(const keymaster_device_t* dev,
+static int exynos_km_verify_data(const keymaster0_device_t* dev,
const void* params,
const uint8_t* keyBlob, const size_t keyBlobLength,
const uint8_t* signedData, const size_t signedDataLength,
if (strcmp(name, KEYSTORE_KEYMASTER) != 0)
return -EINVAL;
- Unique_keymaster_device_t dev(new keymaster_device_t);
+ Unique_keymaster0_device_t dev(new keymaster0_device_t);
if (dev.get() == NULL)
return -ENOMEM;
# Application wide Cflags
GLOBAL_INCLUDES := bionic \
- external/stlport/stlport \
+ external/libcxx \
$(COMP_PATH_MobiCore)/inc \
$(COMP_PATH_MobiCoreDriverMod)/Public \
$(COMP_PATH_MobiCore)/inc/TlCm
-GLOBAL_LIBRARIES := libstlport
+GLOBAL_LIBRARIES := libc++
# Include the Daemon
include $(MOBICORE_PROJECT_PATH)/daemon/Android.mk
#include <unistd.h>
#include <stdio.h>
+#include <string.h>
#include <android/log.h>
/** LOG_I(fmt, args...)
#define LOG_I(fmt, args...) DUMMY_FUNCTION()
#define LOG_W(fmt, args...) DUMMY_FUNCTION()
#else
- #define LOG_I(...) _LOG_x("I",__VA_ARGS__)
- #define LOG_W(...) _LOG_x("W",__VA_ARGS__)
+ #define LOG_I(...) _LOG_x("I", __VA_ARGS__)
+ #define LOG_W(...) _LOG_x("W", __VA_ARGS__)
#endif
- #define _LOG_E(...) _LOG_x("E",__VA_ARGS__)
+ #define _LOG_E(...) _LOG_x("E", __VA_ARGS__)
#endif //defined(LOG_ANDROID)
do \
{ \
_LOG_E(" *****************************"); \
- _LOG_E(" *** ERROR: "__VA_ARGS__); \
+ _LOG_E(" *** ERROR: " __VA_ARGS__); \
_LOG_E(" *** Detected in %s:%i/%s()", __FILE__, __LINE__, __FUNCTION__); \
_LOG_E(" *****************************"); \
} while(1!=1)
struct nlmsghdr *nlh = NULL;
struct iovec iov;
struct msghdr msg;
- uint32_t len;
+ int32_t len;
memset(&src_addr, 0, sizeof(src_addr));
src_addr.nl_family = AF_NETLINK;
src_addr.nl_pid = MC_DAEMON_PID; /* daemon pid */
src_addr.nl_groups = 0; /* not in mcast groups */
- if (bind(serverSock, (struct sockaddr *)&src_addr, sizeof(src_addr)) < 0) {
+ if (::bind(serverSock, (struct sockaddr *)&src_addr, sizeof(src_addr)) < 0) {
LOG_ERRNO("Binding to server socket failed, because bind");
close(serverSock);
break;