summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormauimauer <sebastian@n-unity.de>2012-02-17 13:30:04 +0100
committermauimauer <sebastian@n-unity.de>2012-02-17 13:30:04 +0100
commitdc27c42df6c819a816660e86060d4dfa14c9f217 (patch)
tree9199ec864fdd64d07a3f1968af0a0b02c0f29c5e
parent72114c1c1583d3834c66b0e28cfe9999d9fd00ba (diff)
downloaddevice_samsung_n7000-dc27c42df6c819a816660e86060d4dfa14c9f217.zip
device_samsung_n7000-dc27c42df6c819a816660e86060d4dfa14c9f217.tar.gz
device_samsung_n7000-dc27c42df6c819a816660e86060d4dfa14c9f217.tar.bz2
Updated stuff for I9220ZSLP1
-rwxr-xr-xBoardConfig.mk16
-rw-r--r--camera/Android.mk15
-rw-r--r--camera/CameraWrapper.cpp510
-rwxr-xr-xcm.mk4
-rwxr-xr-xconfigs/asound.conf134
-rwxr-xr-x[-rw-r--r--]configs/audio_effects.conf0
-rwxr-xr-xconfigs/gps.conf13
-rwxr-xr-xconfigs/gps.xml10
-rwxr-xr-x[-rw-r--r--]configs/media_profiles.xml779
-rwxr-xr-x[-rw-r--r--]configs/secomxregistry0
-rwxr-xr-x[-rw-r--r--]configs/somxreg.conf0
-rwxr-xr-xconfigs/vold.fstab57
-rwxr-xr-xgalaxynote.mk20
-rwxr-xr-xgpswrapper/Android.mk2
-rwxr-xr-xgpswrapper/gps.c2
-rwxr-xr-xinit.smdk4210.rc201
-rwxr-xr-xinit.smdk4210.usb.rc27
-rwxr-xr-xkernelbin4476792 -> 8387840 bytes
-rwxr-xr-xliblights/lights.c1
-rwxr-xr-xmodules/Si4709_driver.kobin287238 -> 23496 bytes
-rwxr-xr-xmodules/bthid.kobin98788 -> 0 bytes
-rwxr-xr-xmodules/cifs.kobin3464017 -> 0 bytes
-rwxr-xr-xmodules/dhd.kobin0 -> 422788 bytes
-rwxr-xr-xmodules/gspca_main.kobin224282 -> 0 bytes
-rwxr-xr-xmodules/j4fs.kobin339647 -> 47596 bytes
-rwxr-xr-xmodules/scsi_wait_scan.kobin35291 -> 1900 bytes
-rwxr-xr-xmodules/vibrator.kobin134288 -> 0 bytes
-rwxr-xr-xreleasetools/galaxynote_edify_generator.py9
-rwxr-xr-xreleasetools/galaxynote_ota_from_target_files18
-rw-r--r--tvout/Android.mk16
-rw-r--r--tvout/AndroidManifest.xml24
-rw-r--r--tvout/proguard.flags1
-rw-r--r--tvout/src/android/hardware/Tvout.java102
-rw-r--r--tvout/src/com/teamhacksung/tvout/BootCompletedReceiver.java12
-rw-r--r--tvout/src/com/teamhacksung/tvout/TvOutService.java116
-rw-r--r--tvouthack/Android.mk27
-rw-r--r--tvouthack/main.cpp52
-rwxr-xr-xueventd.smdk4210.rc2
38 files changed, 1641 insertions, 529 deletions
diff --git a/BoardConfig.mk b/BoardConfig.mk
index c7fc766..2536afe 100755
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -16,7 +16,7 @@
# This variable is set first, so it can be overridden
# by BoardConfigVendor.mk
-USE_CAMERA_STUB := true
+USE_CAMERA_STUB := false
BOARD_USES_GENERIC_AUDIO := false
BOARD_USES_LIBSECRIL_STUB := true
@@ -26,10 +26,11 @@ TARGET_CPU_ABI2 := armeabi
TARGET_CPU_SMP := true
TARGET_ARCH_VARIANT := armv7-a-neon
TARGET_ARCH_VARIANT_CPU := cortex-a9
+ARCH_ARM_HAVE_NEON := true
ARCH_ARM_HAVE_TLS_REGISTER := true
TARGET_GLOBAL_CFLAGS += -mtune=cortex-a9 -mfpu=neon -mfloat-abi=softfp
TARGET_GLOBAL_CPPFLAGS += -mtune=cortex-a9 -mfpu=neon -mfloat-abi=softfp
-TARGET_BOARD_PLATFORM := s5pc210
+TARGET_BOARD_PLATFORM := exynos4
TARGET_BOOTLOADER_BOARD_NAME := smdk4210
TARGET_BOARD_INFO_FILE := device/samsung/galaxynote/board-info.txt
@@ -67,13 +68,14 @@ TARGET_RELEASETOOL_IMG_FROM_TARGET_SCRIPT := ./device/samsung/galaxynote/release
BOARD_EGL_CFG := device/samsung/galaxynote/configs/egl.cfg
USE_OPENGL_RENDERER := true
BOARD_USES_HWCOMPOSER := true
-BOARD_USES_LEGACY_EGL := true
-COMMON_GLOBAL_CFLAGS += -DMISSING_EGL_EXTERNAL_IMAGE -DMISSING_EGL_PIXEL_FORMAT_YV12 -DMISSING_GRALLOC_BUFFERS
BOARD_USE_SECTVOUT := true
# Audio
BOARD_USE_YAMAHAPLAYER := true
+# OMX
+BOARD_USE_SAMSUNG_OMX := true
+
# Camera
ifeq ($(USE_CAMERA_STUB),false)
BOARD_CAMERA_LIBRARIES := libcamera
@@ -109,15 +111,19 @@ BOARD_HAVE_BLUETOOTH_BCM := true
# Vold
BOARD_VOLD_MAX_PARTITIONS := 12
BOARD_VOLD_EMMC_SHARES_DEV_MAJOR := true
+BOARD_VOLD_DISC_HAS_MULTIPLE_MAJORS := true
TARGET_USE_CUSTOM_LUN_FILE_PATH := "/sys/devices/platform/usb_mass_storage/lun%d/file"
+# MTP
+BOARD_MTP_DEVICE := "/dev/usb_mtp_gadget"
+
# Vibrator
BOARD_HAS_VIBRATOR_IMPLEMENTATION := ../../device/samsung/galaxynote/vibrator/tspdrv.c
# Recovery
BOARD_CUSTOM_RECOVERY_KEYMAPPING := ../../device/samsung/galaxynote/recovery/recovery_keys.c
BOARD_CUSTOM_GRAPHICS := ../../../device/samsung/galaxynote/recovery/graphics.c
-BOARD_UMS_LUNFILE := /sys/devices/platform/usb_mass_storage/lun0/file
+BOARD_UMS_LUNFILE := "/sys/class/android_usb/f_mass_storage/lun0/file"
BOARD_USES_MMCUTILS := true
BOARD_HAS_NO_MISC_PARTITION := true
BOARD_HAS_NO_SELECT_BUTTON := true
diff --git a/camera/Android.mk b/camera/Android.mk
new file mode 100644
index 0000000..6005a54
--- /dev/null
+++ b/camera/Android.mk
@@ -0,0 +1,15 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:= \
+ CameraWrapper.cpp
+
+LOCAL_SHARED_LIBRARIES:= \
+ libhardware liblog
+
+LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
+LOCAL_MODULE:= camera.$(TARGET_BOARD_PLATFORM)
+LOCAL_MODULE_TAGS:= optional
+
+include $(BUILD_SHARED_LIBRARY)
+#include $(BUILD_HEAPTRACKED_SHARED_LIBRARY)
diff --git a/camera/CameraWrapper.cpp b/camera/CameraWrapper.cpp
new file mode 100644
index 0000000..c1f066d
--- /dev/null
+++ b/camera/CameraWrapper.cpp
@@ -0,0 +1,510 @@
+/*
+ * Copyright (C) Hacsksung
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+* @file CameraWrapper.cpp
+*
+* This file wraps a vendor camera module.
+*
+*/
+
+#define LOG_NDEBUG 0
+#define LOG_TAG "CameraWrapper"
+#include <cutils/log.h>
+
+#include <utils/threads.h>
+#include <hardware/hardware.h>
+#include <hardware/camera.h>
+
+static android::Mutex gCameraWrapperLock;
+static camera_module_t *gVendorModule = 0;
+
+static int camera_device_open(const hw_module_t* module, const char* name,
+ hw_device_t** device);
+static int camera_device_close(hw_device_t* device);
+static int camera_get_number_of_cameras(void);
+static int camera_get_camera_info(int camera_id, struct camera_info *info);
+
+static struct hw_module_methods_t camera_module_methods = {
+ open: camera_device_open
+};
+
+camera_module_t HAL_MODULE_INFO_SYM = {
+ common: {
+ tag: HARDWARE_MODULE_TAG,
+ version_major: 1,
+ version_minor: 0,
+ id: CAMERA_HARDWARE_MODULE_ID,
+ name: "Exynos Camera Wrapper",
+ author: "Hacksung",
+ methods: &camera_module_methods,
+ dso: NULL, /* remove compilation warnings */
+ reserved: {0}, /* remove compilation warnings */
+ },
+ get_number_of_cameras: camera_get_number_of_cameras,
+ get_camera_info: camera_get_camera_info,
+};
+
+typedef struct wrapper_camera_device {
+ camera_device_t base;
+ camera_device_t *vendor;
+} wrapper_camera_device_t;
+
+#define VENDOR_CALL(device, func, ...) ({ \
+ wrapper_camera_device_t *__wrapper_dev = (wrapper_camera_device_t*) device; \
+ __wrapper_dev->vendor->ops->func(__wrapper_dev->vendor, ##__VA_ARGS__); \
+})
+
+static int check_vendor_module()
+{
+ int rv = 0;
+ LOGV("%s", __FUNCTION__);
+
+ if(gVendorModule)
+ return 0;
+
+ rv = hw_get_module("vendor-camera", (const hw_module_t **)&gVendorModule);
+ if (rv)
+ LOGE("failed to open vendor camera module");
+ return rv;
+}
+
+/*******************************************************************
+ * implementation of camera_device_ops functions
+ *******************************************************************/
+
+int camera_set_preview_window(struct camera_device * device,
+ struct preview_stream_ops *window)
+{
+ LOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
+
+ if(!device)
+ return -EINVAL;
+
+ return VENDOR_CALL(device, set_preview_window, window);
+}
+
+void camera_set_callbacks(struct camera_device * device,
+ camera_notify_callback notify_cb,
+ camera_data_callback data_cb,
+ camera_data_timestamp_callback data_cb_timestamp,
+ camera_request_memory get_memory,
+ void *user)
+{
+ LOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
+ LOGV("%s", __FUNCTION__);
+
+ if(!device)
+ return;
+
+ VENDOR_CALL(device, set_callbacks, notify_cb, data_cb, data_cb_timestamp, get_memory, user);
+}
+
+void camera_enable_msg_type(struct camera_device * device, int32_t msg_type)
+{
+ LOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
+ LOGV("%s", __FUNCTION__);
+
+ if(!device)
+ return;
+
+ VENDOR_CALL(device, enable_msg_type, msg_type);
+}
+
+void camera_disable_msg_type(struct camera_device * device, int32_t msg_type)
+{
+ LOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
+ LOGV("%s", __FUNCTION__);
+
+ if(!device)
+ return;
+
+ VENDOR_CALL(device, disable_msg_type, msg_type);
+}
+
+int camera_msg_type_enabled(struct camera_device * device, int32_t msg_type)
+{
+ LOGV("%s", __FUNCTION__);
+ LOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
+
+ if(!device)
+ return 0;
+
+ return VENDOR_CALL(device, msg_type_enabled, msg_type);
+}
+
+int camera_start_preview(struct camera_device * device)
+{
+ LOGV("%s", __FUNCTION__);
+ LOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
+
+ if(!device)
+ return -EINVAL;
+
+ return VENDOR_CALL(device, start_preview);
+}
+
+void camera_stop_preview(struct camera_device * device)
+{
+ LOGV("%s", __FUNCTION__);
+ LOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
+
+ if(!device)
+ return;
+
+ VENDOR_CALL(device, stop_preview);
+}
+
+int camera_preview_enabled(struct camera_device * device)
+{
+ LOGV("%s", __FUNCTION__);
+ LOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
+
+ if(!device)
+ return -EINVAL;
+
+ return VENDOR_CALL(device, preview_enabled);
+}
+
+int camera_store_meta_data_in_buffers(struct camera_device * device, int enable)
+{
+ LOGV("%s", __FUNCTION__);
+ LOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
+
+ if(!device)
+ return -EINVAL;
+
+ return VENDOR_CALL(device, store_meta_data_in_buffers, enable);
+}
+
+int camera_start_recording(struct camera_device * device)
+{
+ LOGV("%s", __FUNCTION__);
+ LOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
+
+ if(!device)
+ return EINVAL;
+
+ return VENDOR_CALL(device, start_recording);
+}
+
+void camera_stop_recording(struct camera_device * device)
+{
+ LOGV("%s", __FUNCTION__);
+ LOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
+
+ if(!device)
+ return;
+
+
+ VENDOR_CALL(device, stop_recording);
+}
+
+int camera_recording_enabled(struct camera_device * device)
+{
+ LOGV("%s", __FUNCTION__);
+ LOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
+
+ if(!device)
+ return -EINVAL;
+
+ return VENDOR_CALL(device, recording_enabled);
+}
+
+void camera_release_recording_frame(struct camera_device * device,
+ const void *opaque)
+{
+ LOGV("%s", __FUNCTION__);
+ LOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
+
+ if(!device)
+ return;
+
+ VENDOR_CALL(device, release_recording_frame, opaque);
+}
+
+int camera_auto_focus(struct camera_device * device)
+{
+ LOGV("%s", __FUNCTION__);
+ LOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
+
+ if(!device)
+ return -EINVAL;
+
+
+ return VENDOR_CALL(device, auto_focus);
+}
+
+int camera_cancel_auto_focus(struct camera_device * device)
+{
+ LOGV("%s", __FUNCTION__);
+ LOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
+
+ if(!device)
+ return -EINVAL;
+
+
+ return VENDOR_CALL(device, cancel_auto_focus);
+}
+
+int camera_take_picture(struct camera_device * device)
+{
+ LOGV("%s", __FUNCTION__);
+ LOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
+
+ if(!device)
+ return -EINVAL;
+
+ return VENDOR_CALL(device, take_picture);
+}
+
+int camera_cancel_picture(struct camera_device * device)
+{
+ LOGV("%s", __FUNCTION__);
+ LOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
+
+ if(!device)
+ return -EINVAL;
+
+ return VENDOR_CALL(device, take_picture);
+}
+
+int camera_set_parameters(struct camera_device * device, const char *params)
+{
+ LOGV("%s", __FUNCTION__);
+ LOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
+
+ if(!device)
+ return -EINVAL;
+
+ return VENDOR_CALL(device, set_parameters, params);
+}
+
+char* camera_get_parameters(struct camera_device * device)
+{
+ LOGV("%s", __FUNCTION__);
+ LOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
+
+ if(!device)
+ return NULL;
+
+ return VENDOR_CALL(device, get_parameters);
+}
+
+static void camera_put_parameters(struct camera_device *device, char *parms)
+{
+ LOGV("%s", __FUNCTION__);
+ LOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
+
+ if(!device)
+ return;
+
+ VENDOR_CALL(device, put_parameters, parms);
+}
+
+int camera_send_command(struct camera_device * device,
+ int32_t cmd, int32_t arg1, int32_t arg2)
+{
+ LOGV("%s", __FUNCTION__);
+ LOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
+
+ if(!device)
+ return -EINVAL;
+
+ return VENDOR_CALL(device, send_command, cmd, arg1, arg2);
+}
+
+void camera_release(struct camera_device * device)
+{
+ LOGV("%s", __FUNCTION__);
+ LOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
+
+ if(!device)
+ return;
+
+ VENDOR_CALL(device, release);
+}
+
+int camera_dump(struct camera_device * device, int fd)
+{
+ if(!device)
+ return -EINVAL;
+
+ return VENDOR_CALL(device, dump, fd);
+}
+
+extern "C" void heaptracker_free_leaked_memory(void);
+
+int camera_device_close(hw_device_t* device)
+{
+ int ret = 0;
+ wrapper_camera_device_t *wrapper_dev = NULL;
+
+ LOGV("%s", __FUNCTION__);
+
+ android::Mutex::Autolock lock(gCameraWrapperLock);
+
+ if (!device) {
+ ret = -EINVAL;
+ goto done;
+ }
+
+ wrapper_dev = (wrapper_camera_device_t*) device;
+
+ wrapper_dev->vendor->common.close((hw_device_t*)wrapper_dev->vendor);
+ if (wrapper_dev->base.ops)
+ free(wrapper_dev->base.ops);
+ free(wrapper_dev);
+done:
+#ifdef HEAPTRACKER
+ heaptracker_free_leaked_memory();
+#endif
+ return ret;
+}
+
+/*******************************************************************
+ * implementation of camera_module functions
+ *******************************************************************/
+
+/* open device handle to one of the cameras
+ *
+ * assume camera service will keep singleton of each camera
+ * so this function will always only be called once per camera instance
+ */
+
+int camera_device_open(const hw_module_t* module, const char* name,
+ hw_device_t** device)
+{
+ int rv = 0;
+ int num_cameras = 0;
+ int cameraid;
+ wrapper_camera_device_t* camera_device = NULL;
+ camera_device_ops_t* camera_ops = NULL;
+
+ android::Mutex::Autolock lock(gCameraWrapperLock);
+
+ LOGV("camera_device open");
+
+ if (name != NULL) {
+ if (check_vendor_module())
+ return -EINVAL;
+
+ cameraid = atoi(name);
+ num_cameras = gVendorModule->get_number_of_cameras();
+
+ if(cameraid > num_cameras)
+ {
+ LOGE("camera service provided cameraid out of bounds, "
+ "cameraid = %d, num supported = %d",
+ cameraid, num_cameras);
+ rv = -EINVAL;
+ goto fail;
+ }
+
+ camera_device = (wrapper_camera_device_t*)malloc(sizeof(*camera_device));
+ if(!camera_device)
+ {
+ LOGE("camera_device allocation fail");
+ rv = -ENOMEM;
+ goto fail;
+ }
+ memset(camera_device, 0, sizeof(*camera_device));
+
+ if(rv = gVendorModule->common.methods->open((const hw_module_t*)gVendorModule, name, (hw_device_t**)&(camera_device->vendor)))
+ {
+ LOGE("vendor camera open fail");
+ goto fail;
+ }
+ LOGV("%s: got vendor camera device 0x%08X", __FUNCTION__, (uintptr_t)(camera_device->vendor));
+
+ camera_ops = (camera_device_ops_t*)malloc(sizeof(*camera_ops));
+ if(!camera_ops)
+ {
+ LOGE("camera_ops allocation fail");
+ rv = -ENOMEM;
+ goto fail;
+ }
+
+ memset(camera_ops, 0, sizeof(*camera_ops));
+
+ camera_device->base.common.tag = HARDWARE_DEVICE_TAG;
+ camera_device->base.common.version = 0;
+ camera_device->base.common.module = (hw_module_t *)(module);
+ camera_device->base.common.close = camera_device_close;
+ camera_device->base.ops = camera_ops;
+
+ camera_ops->set_preview_window = camera_set_preview_window;
+ camera_ops->set_callbacks = camera_set_callbacks;
+ camera_ops->enable_msg_type = camera_enable_msg_type;
+ camera_ops->disable_msg_type = camera_disable_msg_type;
+ camera_ops->msg_type_enabled = camera_msg_type_enabled;
+ camera_ops->start_preview = camera_start_preview;
+ camera_ops->stop_preview = camera_stop_preview;
+ camera_ops->preview_enabled = camera_preview_enabled;
+ camera_ops->store_meta_data_in_buffers = camera_store_meta_data_in_buffers;
+ camera_ops->start_recording = camera_start_recording;
+ camera_ops->stop_recording = camera_stop_recording;
+ camera_ops->recording_enabled = camera_recording_enabled;
+ camera_ops->release_recording_frame = camera_release_recording_frame;
+ camera_ops->auto_focus = camera_auto_focus;
+ camera_ops->cancel_auto_focus = camera_cancel_auto_focus;
+ camera_ops->take_picture = camera_take_picture;
+ camera_ops->cancel_picture = camera_cancel_picture;
+ camera_ops->set_parameters = camera_set_parameters;
+ camera_ops->get_parameters = camera_get_parameters;
+ camera_ops->put_parameters = camera_put_parameters;
+ camera_ops->send_command = camera_send_command;
+ camera_ops->release = camera_release;
+ camera_ops->dump = camera_dump;
+
+ *device = &camera_device->base.common;
+ }
+
+ return rv;
+
+fail:
+ if(camera_device) {
+ free(camera_device);
+ camera_device = NULL;
+ }
+ if(camera_ops) {
+ free(camera_ops);
+ camera_ops = NULL;
+ }
+ *device = NULL;
+ return rv;
+}
+
+int camera_get_number_of_cameras(void)
+{
+ LOGV("%s", __FUNCTION__);
+ if (check_vendor_module())
+ return 0;
+ return gVendorModule->get_number_of_cameras();
+}
+
+int camera_get_camera_info(int camera_id, struct camera_info *info)
+{
+ LOGV("%s", __FUNCTION__);
+ if (check_vendor_module())
+ return 0;
+ return gVendorModule->get_camera_info(camera_id, info);
+}
+
+
+
+
+
diff --git a/cm.mk b/cm.mk
index c71c9f4..d87489e 100755
--- a/cm.mk
+++ b/cm.mk
@@ -14,7 +14,7 @@ $(call inherit-product, device/samsung/galaxynote/full_galaxynote.mk)
PRODUCT_DEVICE := galaxynote
PRODUCT_NAME := cm_galaxynote
PRODUCT_BRAND := Samsung
-PRODUCT_MODEL := Galaxy Note
+PRODUCT_MODEL := GT-N7000
#Set build fingerprint / ID / Prduct Name ect.
-PRODUCT_BUILD_PROP_OVERRIDES += PRODUCT_NAME=GT-N7000 TARGET_DEVICE=GT-N7000 BUILD_ID=GRJ22 BUILD_DISPLAY_ID=IML74K BUILD_FINGERPRINT=samsung/GT-N7000/GT-N7000:2.3.6/GINGERBREAD/XXKK9:user/release-keys PRIVATE_BUILD_DESC="GT-N7000-user 2.3.6 GINGERBREAD XXKK9 release-keys"
+PRODUCT_BUILD_PROP_OVERRIDES += PRODUCT_NAME=GT-N7000 BUILD_ID=IML74K BUILD_DISPLAY_ID=IML74K BUILD_FINGERPRINT=Android/GT-N7000/GT-N7000:4.0.3/IML74K/901:user/release-keys PRIVATE_BUILD_DESC="GT-N7000-user 4.0.3 IML74K 901 release-keys"
diff --git a/configs/asound.conf b/configs/asound.conf
index 26524b9..1163934 100755
--- a/configs/asound.conf
+++ b/configs/asound.conf
@@ -1,61 +1,73 @@
-#
-# Copyright(c) 2010 Yamaha Corporation
-#
-
-# ----------------------------------------
-# PCM Interface
-#
-
-pcm.hifi {
- type plug
- slave.pcm {
- type hw
- card 0
- device 0
- format S16_LE
- channels 2
- rate 44100
- }
-}
-
-pcm.voice {
- type plug
- slave.pcm {
- type hw
- card 0
- device 1
- format S16_LE
- channels 1
- rate 8000
- }
-}
-
-pcm.bluetooth {
- type plug
- slave.pcm {
- type hw
- card 0
- device 2
- format S16_LE
- channels 1
- rate 8000
- }
-}
-
-# ----------------------------------------
-# Mixer Interface
-#
-
-ctl.mc1n2 {
- type hw
- card 0
-}
-
-# ----------------------------------------
-# Hardware Dependant Interface
-#
-
-hwdep.mc1n2 {
- type hw
- card 0
-}
+#
+# Copyright(c) 2010 Yamaha Corporation
+#
+
+# ----------------------------------------
+# PCM Interface
+#
+
+pcm.hifi {
+ type plug
+ slave.pcm {
+ type hw
+ card 0
+ device 0
+ format S16_LE
+ channels 2
+ rate 44100
+ }
+}
+
+pcm.voice {
+ type plug
+ slave.pcm {
+ type hw
+ card 0
+ device 1
+ format S16_LE
+ channels 1
+ rate 8000
+ }
+}
+
+pcm.bluetooth {
+ type plug
+ slave.pcm {
+ type hw
+ card 0
+ device 2
+ format S16_LE
+ channels 1
+ rate 8000
+ }
+}
+
+pcm.record {
+ type plug
+ slave.pcm {
+ type hw
+ card 0
+ device 1
+ format S16_LE
+ channels 2
+ rate 44100
+ }
+}
+
+# ----------------------------------------
+# Mixer Interface
+#
+
+ctl.mc1n2 {
+ type hw
+ card 0
+}
+
+# ----------------------------------------
+# Hardware Dependant Interface
+#
+
+hwdep.mc1n2 {
+ type hw
+ card 0
+}
diff --git a/configs/audio_effects.conf b/configs/audio_effects.conf
index b8fa487..b8fa487 100644..100755
--- a/configs/audio_effects.conf
+++ b/configs/audio_effects.conf
diff --git a/configs/gps.conf b/configs/gps.conf
index 694dfba..5f60d23 100755
--- a/configs/gps.conf
+++ b/configs/gps.conf
@@ -1,7 +1,6 @@
-NTP_SERVER=de.pool.ntp.org
-XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin
-XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin
-XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin
-SUPL_HOST=supl.google.com
-SUPL_PORT=7276
-
+NTP_SERVER=north-america.pool.ntp.org
+XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin
+XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin
+XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin
+SUPL_HOST=supl.google.com
+SUPL_PORT=7276
diff --git a/configs/gps.xml b/configs/gps.xml
index f64c75d..612da9a 100755
--- a/configs/gps.xml
+++ b/configs/gps.xml
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
-<glgps xmlns="http://www.glpals.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.glpals.com/ glconfig.xsd" >
+<glgps xmlns="http://www.glpals.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.glpals.com/glconfig.xsd" >
<!--HAL Confguration -->
<hal
- acPortName="/dev/s3c2410_serial1" lBaudRate="115200" cLogEnableInitState="false" cLogEnabled="true" acLogDirectory="/sdcard/gps/broadcom/" ltoFileName="lto2.dat"
+ acPortName="/dev/ttySAC1" lBaudRate="115200" cLogEnableInitState="false" cLogEnabled="true" acLogDirectory="/sdcard/gps/broadcom/" ltoFileName="lto2.dat"
enhanced-assisted="false" cp-enhanced-assisted="false" TISEnabled="true" RILEnabled="true" LPmode="false" cp-cold-start="false" cp-guard-time-sec="1"
arp-supl-enable="true" arp-supl-cap-msb="true" arp-supl-cap-msa="true" arp-supl-cap-ecid="false" arp-supl-use-apn="false"
acSuplServer="supl.google.com" SuplPort="7276" tlsCertPath="/system/bin/gps.cer"
ReAidingIntervalSec="1200"
- LbsEnable="true" LbsLocal="false" LbsServer="BCMLS2.glpals.com" LbsPort="7275" LbsSyncLto="true" LbsSyncCells="true" LbsWlanEnable="false"
- LbsSyncLtoThresholdDays="1"
+ LbsEnable="true" LbsLocal="false" LbsServer="BCMLS2.glpals.com" LbsPort="7275" LbsSyncLto="true" LbsSyncCells="true" LbsWlanEnable="false"
+ LbsSyncLtoThresholdDays="3"
gpioNStdbyPath="/sys/class/sec/gps/GPS_PWR_EN/value"
gpioNResetPath="/sys/class/sec/gps/GPS_nRST/value"
gpioDelayMs="250"
@@ -48,7 +48,7 @@
<gll
LogPriMask="LOG_INFO"
- LogFacMask="LOG_GLLAPI | LOG_NMEA | LOG_RAWDATA | LOG_DEVKF | LOG_DEVMS | LOG_DEVRA | LOG_DEVET"
+ LogFacMask="LOG_GLLAPI | LOG_NMEA | LOG_RAWDATA | LOG_DEVKF | LOG_DEVMS"
FrqPlan="FRQ_PLAN_26MHZ_2PPM_26MHZ_300PPB"
RfType="GL_RF_47511_BRCM_EXT_LNA"
WarmStandbyTimeout1Seconds="10"
diff --git a/configs/media_profiles.xml b/configs/media_profiles.xml
index 02058a5..0388e58 100644..100755
--- a/configs/media_profiles.xml
+++ b/configs/media_profiles.xml
@@ -14,362 +14,440 @@
limitations under the License.
-->
<!DOCTYPE MediaSettings [
-<!ELEMENT MediaSettings (CamcorderProfiles,
+ <!ELEMENT MediaSettings (CamcorderProfiles,
EncoderOutputFileFormat+,
VideoEncoderCap+,
AudioEncoderCap+,
VideoDecoderCap,
AudioDecoderCap)>
-<!ELEMENT CamcorderProfiles (EncoderProfile+, ImageEncoding+, ImageDecoding, Camera)>
-<!ELEMENT EncoderProfile (Video, Audio)>
-<!ATTLIST EncoderProfile quality (high|low) #REQUIRED>
-<!ATTLIST EncoderProfile fileFormat (mp4|3gp) #REQUIRED>
-<!ATTLIST EncoderProfile duration (30|60) #REQUIRED>
-<!ATTLIST EncoderProfile cameraId (0|1) #REQUIRED>
-<!ELEMENT Video EMPTY>
-<!ATTLIST Video codec (h264|h263|m4v) #REQUIRED>
-<!ATTLIST Video bitRate CDATA #REQUIRED>
-<!ATTLIST Video width CDATA #REQUIRED>
-<!ATTLIST Video height CDATA #REQUIRED>
-<!ATTLIST Video frameRate CDATA #REQUIRED>
-<!ELEMENT Audio EMPTY>
-<!ATTLIST Audio codec (amrnb|amrwb|aac) #REQUIRED>
-<!ATTLIST Audio bitRate CDATA #REQUIRED>
-<!ATTLIST Audio sampleRate CDATA #REQUIRED>
-<!ATTLIST Audio channels (1|2) #REQUIRED>
-<!ELEMENT ImageEncoding EMPTY>
-<!ATTLIST ImageEncoding quality (90|80|70|60|50|40) #REQUIRED>
-<!ELEMENT ImageDecoding EMPTY>
-<!ATTLIST ImageDecoding memCap CDATA #REQUIRED>
-<!ELEMENT Camera EMPTY>
-<!ELEMENT EncoderOutputFileFormat EMPTY>
-<!ATTLIST EncoderOutputFileFormat name (mp4|3gp) #REQUIRED>
-<!ELEMENT VideoEncoderCap EMPTY>
-<!ATTLIST VideoEncoderCap name (h264|h263|m4v|wmv) #REQUIRED>
-<!ATTLIST VideoEncoderCap enabled (true|false) #REQUIRED>
-<!ATTLIST VideoEncoderCap minBitRate CDATA #REQUIRED>
-<!ATTLIST VideoEncoderCap maxBitRate CDATA #REQUIRED>
-<!ATTLIST VideoEncoderCap minFrameWidth CDATA #REQUIRED>
-<!ATTLIST VideoEncoderCap maxFrameWidth CDATA #REQUIRED>
-<!ATTLIST VideoEncoderCap minFrameHeight CDATA #REQUIRED>
-<!ATTLIST VideoEncoderCap maxFrameHeight CDATA #REQUIRED>
-<!ATTLIST VideoEncoderCap minFrameRate CDATA #REQUIRED>
-<!ATTLIST VideoEncoderCap maxFrameRate CDATA #REQUIRED>
-<!ELEMENT AudioEncoderCap EMPTY>
-<!ATTLIST AudioEncoderCap name (amrnb|amrwb|aac|wma) #REQUIRED>
-<!ATTLIST AudioEncoderCap enabled (true|false) #REQUIRED>
-<!ATTLIST AudioEncoderCap minBitRate CDATA #REQUIRED>
-<!ATTLIST AudioEncoderCap maxBitRate CDATA #REQUIRED>
-<!ATTLIST AudioEncoderCap minSampleRate CDATA #REQUIRED>
-<!ATTLIST AudioEncoderCap maxSampleRate CDATA #REQUIRED>
-<!ATTLIST AudioEncoderCap minChannels (1|2) #REQUIRED>
-<!ATTLIST AudioEncoderCap maxChannels (1|2) #REQUIRED>
-<!ELEMENT VideoDecoderCap EMPTY>
-<!ATTLIST VideoDecoderCap name (wmv) #REQUIRED>
-<!ATTLIST VideoDecoderCap enabled (true|false) #REQUIRED>
-<!ELEMENT AudioDecoderCap EMPTY>
-<!ATTLIST AudioDecoderCap name (wma) #REQUIRED>
-<!ATTLIST AudioDecoderCap enabled (true|false) #REQUIRED>
-<!ELEMENT VideoEditorCap EMPTY>
-<!ATTLIST VideoEditorCap maxInputFrameWidth CDATA #REQUIRED>
-<!ATTLIST VideoEditorCap maxInputFrameHeight CDATA #REQUIRED>
-<!ATTLIST VideoEditorCap maxOutputFrameWidth CDATA #REQUIRED>
-<!ATTLIST VideoEditorCap maxOutputFrameHeight CDATA #REQUIRED>
-<!ATTLIST VideoEditorCap maxPrefetchYUVFrames CDATA #REQUIRED>
-<!ELEMENT ExportVideoProfile EMPTY>
-<!ATTLIST ExportVideoProfile name (h264|h263|m4v) #REQUIRED>
-<!ATTLIST ExportVideoProfile profile CDATA #REQUIRED>
-<!ATTLIST ExportVideoProfile level CDATA #REQUIRED>
+ <!ELEMENT CamcorderProfiles (EncoderProfile+, ImageEncoding+, ImageDecoding, Camera)>
+ <!ELEMENT EncoderProfile (Video, Audio)>
+ <!ATTLIST EncoderProfile quality (timelapse1080p|timelapse720p|timelapse480p|timelapsehigh|timelapselow|480p|qcif|high|low) #REQUIRED>
+ <!ATTLIST EncoderProfile fileFormat (mp4|3gp) #REQUIRED>
+ <!ATTLIST EncoderProfile duration (30|60) #REQUIRED>
+ <!ATTLIST EncoderProfile cameraId (0|1) #REQUIRED>
+ <!ELEMENT Video EMPTY>
+ <!ATTLIST Video codec (h264|h263|m4v) #REQUIRED>
+ <!ATTLIST Video bitRate CDATA #REQUIRED>
+ <!ATTLIST Video width CDATA #REQUIRED>
+ <!ATTLIST Video height CDATA #REQUIRED>
+ <!ATTLIST Video frameRate CDATA #REQUIRED>
+ <!ELEMENT Audio EMPTY>
+ <!ATTLIST Audio codec (amrnb|amrwb|aac) #REQUIRED>
+ <!ATTLIST Audio bitRate CDATA #REQUIRED>
+ <!ATTLIST Audio sampleRate CDATA #REQUIRED>
+ <!ATTLIST Audio channels (1|2) #REQUIRED>
+ <!ELEMENT ImageEncoding EMPTY>
+ <!ATTLIST ImageEncoding quality (90|80|70|60|50|40) #REQUIRED>
+ <!ELEMENT ImageDecoding EMPTY>
+ <!ATTLIST ImageDecoding memCap CDATA #REQUIRED>
+ <!ELEMENT Camera EMPTY>
+ <!ATTLIST Camera previewFrameRate CDATA #REQUIRED>
+ <!ELEMENT EncoderOutputFileFormat EMPTY>
+ <!ATTLIST EncoderOutputFileFormat name (mp4|3gp) #REQUIRED>
+ <!ELEMENT VideoEncoderCap EMPTY>
+ <!ATTLIST VideoEncoderCap name (h264|h263|m4v|wmv) #REQUIRED>
+ <!ATTLIST VideoEncoderCap enabled (true|false) #REQUIRED>
+ <!ATTLIST VideoEncoderCap minBitRate CDATA #REQUIRED>
+ <!ATTLIST VideoEncoderCap maxBitRate CDATA #REQUIRED>
+ <!ATTLIST VideoEncoderCap minFrameWidth CDATA #REQUIRED>
+ <!ATTLIST VideoEncoderCap maxFrameWidth CDATA #REQUIRED>
+ <!ATTLIST VideoEncoderCap minFrameHeight CDATA #REQUIRED>
+ <!ATTLIST VideoEncoderCap maxFrameHeight CDATA #REQUIRED>
+ <!ATTLIST VideoEncoderCap minFrameRate CDATA #REQUIRED>
+ <!ATTLIST VideoEncoderCap maxFrameRate CDATA #REQUIRED>
+ <!ELEMENT AudioEncoderCap EMPTY>
+ <!ATTLIST AudioEncoderCap name (amrnb|amrwb|aac|wma) #REQUIRED>
+ <!ATTLIST AudioEncoderCap enabled (true|false) #REQUIRED>
+ <!ATTLIST AudioEncoderCap minBitRate CDATA #REQUIRED>
+ <!ATTLIST AudioEncoderCap maxBitRate CDATA #REQUIRED>
+ <!ATTLIST AudioEncoderCap minSampleRate CDATA #REQUIRED>
+ <!ATTLIST AudioEncoderCap maxSampleRate CDATA #REQUIRED>
+ <!ATTLIST AudioEncoderCap minChannels (1|2) #REQUIRED>
+ <!ATTLIST AudioEncoderCap maxChannels (1|2) #REQUIRED>
+ <!ELEMENT VideoDecoderCap EMPTY>
+ <!ATTLIST VideoDecoderCap name (wmv) #REQUIRED>
+ <!ATTLIST VideoDecoderCap enabled (true|false) #REQUIRED>
+ <!ELEMENT AudioDecoderCap EMPTY>
+ <!ATTLIST AudioDecoderCap name (wma) #REQUIRED>
+ <!ATTLIST AudioDecoderCap enabled (true|false) #REQUIRED>
+ <!ELEMENT VideoEditorCap EMPTY>
+ <!ATTLIST VideoEditorCap maxInputFrameWidth CDATA #REQUIRED>
+ <!ATTLIST VideoEditorCap maxInputFrameHeight CDATA #REQUIRED>
+ <!ATTLIST VideoEditorCap maxOutputFrameWidth CDATA #REQUIRED>
+ <!ATTLIST VideoEditorCap maxOutputFrameHeight CDATA #REQUIRED>
+ <!ATTLIST VideoEditorCap maxPrefetchYUVFrames CDATA #REQUIRED>
+ <!ELEMENT ExportVideoProfile EMPTY>
+ <!ATTLIST ExportVideoProfile name (h264|h263|m4v) #REQUIRED>
+ <!ATTLIST ExportVideoProfile profile CDATA #REQUIRED>
+ <!ATTLIST ExportVideoProfile level CDATA #REQUIRED>
]>
<!--
This file is used to declare the multimedia profiles and capabilities
on an android-powered device.
-->
<MediaSettings>
- <!-- Each camcorder profile defines a set of predefined configuration parameters -->
- <CamcorderProfiles cameraId="0">
-
- <EncoderProfile quality="qvga" fileFormat="3gp" duration="60">
- <Video codec="m4v"
- bitRate="128000"
- width="320"
- height="240"
- frameRate="15" />
- <Audio codec="amrnb"
- bitRate="12200"
- sampleRate="8000"
- channels="1" />
- </EncoderProfile>
-
- <EncoderProfile quality="cif" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="1200000"
- width="352"
- height="288"
- frameRate="30" />
- <Audio codec="aac"
- bitRate="96000"
- sampleRate="48000"
- channels="1" />
- </EncoderProfile>
-
- <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="5000000"
- width="720"
- height="480"
- frameRate="30" />
- <Audio codec="aac"
- bitRate="96000"
- sampleRate="48000"
- channels="1" />
- </EncoderProfile>
-
- <EncoderProfile quality="720p" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="8000000"
- width="1280"
- height="720"
- frameRate="30" />
- <Audio codec="aac"
- bitRate="96000"
- sampleRate="48000"
- channels="1" />
- </EncoderProfile>
-
- <EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="12000000"
- width="1920"
- height="1080"
- frameRate="30" />
- <Audio codec="aac"
- bitRate="96000"
- sampleRate="48000"
- channels="1" />
- </EncoderProfile>
-
- <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="192000"
- width="176"
- height="144"
- frameRate="30" />
- <!-- audio setting is ignored -->
- <Audio codec="amrnb"
- bitRate="12200"
- sampleRate="8000"
- channels="1" />
- </EncoderProfile>
-
- <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="1200000"
- width="352"
- height="288"
- frameRate="30" />
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="96000"
- sampleRate="48000"
- channels="1" />
- </EncoderProfile>
-
- <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="5000000"
- width="720"
- height="480"
- frameRate="30" />
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="96000"
- sampleRate="48000"
- channels="1" />
- </EncoderProfile>
-
- <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="8000000"
- width="1280"
- height="720"
- frameRate="30" />
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="96000"
- sampleRate="48000"
- channels="1" />
- </EncoderProfile>
-
- <EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="12000000"
- width="1920"
- height="1080"
- frameRate="30" />
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="96000"
- sampleRate="48000"
- channels="1" />
- </EncoderProfile>
-
- <ImageEncoding quality="95" />
- <ImageEncoding quality="80" />
- <ImageEncoding quality="70" />
- <ImageDecoding memCap="20000000" />
-
- </CamcorderProfiles>
-
- <CamcorderProfiles cameraId="1">
-
- <EncoderProfile quality="qvga" fileFormat="3gp" duration="60">
- <Video codec="m4v"
- bitRate="128000"
- width="320"
- height="240"
- frameRate="15" />
- <Audio codec="amrnb"
- bitRate="12200"
- sampleRate="8000"
- channels="1" />
- </EncoderProfile>
-
- <EncoderProfile quality="cif" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="1200000"
- width="352"
- height="288"
- frameRate="30" />
- <Audio codec="aac"
- bitRate="96000"
- sampleRate="48000"
- channels="1" />
- </EncoderProfile>
-
- <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="5000000"
- width="720"
- height="480"
- frameRate="30" />
- <Audio codec="aac"
- bitRate="96000"
- sampleRate="48000"
- channels="1" />
- </EncoderProfile>
-
- <EncoderProfile quality="720p" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="8000000"
- width="1280"
- height="720"
- frameRate="30" />
- <Audio codec="aac"
- bitRate="96000"
- sampleRate="48000"
- channels="1" />
- </EncoderProfile>
-
- <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="192000"
- width="176"
- height="144"
- frameRate="30" />
- <!-- audio setting is ignored -->
- <Audio codec="amrnb"
- bitRate="12200"
- sampleRate="8000"
- channels="1" />
- </EncoderProfile>
-
- <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="1200000"
- width="352"
- height="288"
- frameRate="30" />
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="96000"
- sampleRate="48000"
- channels="1" />
- </EncoderProfile>
-
- <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="5000000"
- width="720"
- height="480"
- frameRate="30" />
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="96000"
- sampleRate="48000"
- channels="1" />
- </EncoderProfile>
-
- <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="8000000"
- width="1280"
- height="720"
- frameRate="30" />
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="96000"
- sampleRate="48000"
- channels="1" />
- </EncoderProfile>
-
- <ImageEncoding quality="95" />
- <ImageEncoding quality="80" />
- <ImageEncoding quality="70" />
- <ImageDecoding memCap="20000000" />
-
- </CamcorderProfiles>
-
- <EncoderOutputFileFormat name="3gp" />
- <EncoderOutputFileFormat name="mp4" />
-
- <!--
+ <!-- Each camcorder profile defines a set of predefined configuration parameters -->
+ <!-- Back Camera -->
+ <CamcorderProfiles cameraId="0">
+
+ <EncoderProfile quality="low" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="384000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="high" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="17000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="128000"
+ sampleRate="48000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qcif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="384000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="480p" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="3078000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="96000"
+ sampleRate="16000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="720p" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="12000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="96000"
+ sampleRate="16000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="1080p" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="17000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="128000"
+ sampleRate="48000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapselow" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="384000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!--
+ The Audio part of the profile will not be used since time lapse mode
+ does not capture audio
+ -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsehigh" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="17000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <!--
+ The Audio part of the profile will not be used since time lapse mode
+ does not capture audio
+ -->
+ <Audio codec="aac"
+ bitRate="96000"
+ sampleRate="16000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapseqcif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="384000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!--
+ The Audio part of the profile will not be used since time lapse mode
+ does not capture audio
+ -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse480p" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="3078000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <!--
+ The Audio part of the profile will not be used since time lapse mode
+ does not capture audio
+ -->
+ <Audio codec="aac"
+ bitRate="96000"
+ sampleRate="16000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse720p" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="12000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <!--
+ The Audio part of the profile will not be used since time lapse mode
+ does not capture audio
+ -->
+ <Audio codec="aac"
+ bitRate="96000"
+ sampleRate="16000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse1080p" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="17000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <!--
+ The Audio part of the profile will not be used since time lapse mode
+ does not capture audio
+ -->
+ <Audio codec="aac"
+ bitRate="96000"
+ sampleRate="16000"
+ channels="1" />
+ </EncoderProfile>
+
+ <ImageEncoding quality="90" />
+ <ImageEncoding quality="80" />
+ <ImageEncoding quality="70" />
+ <ImageDecoding memCap="20000000" />
+
+ </CamcorderProfiles>
+
+ <!-- Front Camera -->
+ <CamcorderProfiles cameraId="1">
+
+ <EncoderProfile quality="low" fileFormat="3gp" duration="15">
+ <Video codec="h264"
+ bitRate="384000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="high" fileFormat="3gp" duration="15">
+ <Video codec="h264"
+ bitRate="3078000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="96000"
+ sampleRate="16000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qcif" fileFormat="3gp" duration="15">
+ <Video codec="h264"
+ bitRate="384000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="480p" fileFormat="3gp" duration="15">
+ <Video codec="h264"
+ bitRate="3078000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="96000"
+ sampleRate="16000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapselow" fileFormat="3gp" duration="15">
+ <Video codec="h264"
+ bitRate="384000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!--
+ The Audio part of the profile will not be used since time lapse mode
+ does not capture audio
+ -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsehigh" fileFormat="3gp" duration="15">
+ <Video codec="h264"
+ bitRate="3078000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <!--
+ The Audio part of the profile will not be used since time lapse mode
+ does not capture audio
+ -->
+ <Audio codec="aac"
+ bitRate="96000"
+ sampleRate="16000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapseqcif" fileFormat="3gp" duration="15">
+ <Video codec="h264"
+ bitRate="384000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!--
+ The Audio part of the profile will not be used since time lapse mode
+ does not capture audio
+ -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse480p" fileFormat="3gp" duration="15">
+ <Video codec="h264"
+ bitRate="3078000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <!--
+ The Audio part of the profile will not be used since time lapse mode
+ does not capture audio
+ -->
+ <Audio codec="aac"
+ bitRate="96000"
+ sampleRate="16000"
+ channels="1" />
+ </EncoderProfile>
+
+ <ImageEncoding quality="90" />
+ <ImageEncoding quality="80" />
+ <ImageEncoding quality="70" />
+ <ImageDecoding memCap="20000000" />
+
+ </CamcorderProfiles>
+
+ <EncoderOutputFileFormat name="3gp" />
+ <EncoderOutputFileFormat name="mp4" />
+
+ <!--
If a codec is not enabled, it is invisible to the applications
In other words, the applications won't be able to use the codec
or query the capabilities of the codec at all if it is disabled
-->
- <VideoEncoderCap name="h264" enabled="true"
- minBitRate="64000" maxBitRate="12000000"
- minFrameWidth="176" maxFrameWidth="1920"
- minFrameHeight="144" maxFrameHeight="1080"
- minFrameRate="15" maxFrameRate="30" />
-
- <VideoEncoderCap name="h263" enabled="true"
- minBitRate="64000" maxBitRate="4000000"
- minFrameWidth="176" maxFrameWidth="1920"
- minFrameHeight="144" maxFrameHeight="1080"
- minFrameRate="15" maxFrameRate="30" />
-
- <VideoEncoderCap name="m4v" enabled="true"
- minBitRate="64000" maxBitRate="4000000"
- minFrameWidth="176" maxFrameWidth="1920"
- minFrameHeight="144" maxFrameHeight="1080"
- minFrameRate="15" maxFrameRate="30" />
-
- <AudioEncoderCap name="aac" enabled="true"
- minBitRate="8000" maxBitRate="96000"
- minSampleRate="8000" maxSampleRate="48000"
- minChannels="1" maxChannels="1" />
-
- <AudioEncoderCap name="amrwb" enabled="true"
- minBitRate="6600" maxBitRate="23050"
- minSampleRate="16000" maxSampleRate="16000"
- minChannels="1" maxChannels="1" />
-
- <AudioEncoderCap name="amrnb" enabled="true"
- minBitRate="5525" maxBitRate="12200"
- minSampleRate="8000" maxSampleRate="8000"
- minChannels="1" maxChannels="1" />
+ <VideoEncoderCap name="h264" enabled="true"
+ minBitRate="64000" maxBitRate="20000000"
+ minFrameWidth="176" maxFrameWidth="1920"
+ minFrameHeight="144" maxFrameHeight="1080"
+ minFrameRate="1" maxFrameRate="30" />
+
+ <VideoEncoderCap name="h263" enabled="true"
+ minBitRate="64000" maxBitRate="1000000"
+ minFrameWidth="176" maxFrameWidth="800"
+ minFrameHeight="144" maxFrameHeight="480"
+ minFrameRate="1" maxFrameRate="30" />
+
+ <VideoEncoderCap name="m4v" enabled="true"
+ minBitRate="64000" maxBitRate="20000000"
+ minFrameWidth="176" maxFrameWidth="1920"
+ minFrameHeight="144" maxFrameHeight="1080"
+ minFrameRate="1" maxFrameRate="30" />
+
+ <AudioEncoderCap name="aac" enabled="true"
+ minBitRate="8192" maxBitRate="196000"
+ minSampleRate="8000" maxSampleRate="48000"
+ minChannels="1" maxChannels="2" />
+
+ <AudioEncoderCap name="amrwb" enabled="true"
+ minBitRate="6600" maxBitRate="23050"
+ minSampleRate="16000" maxSampleRate="16000"
+ minChannels="1" maxChannels="1" />
+
+ <AudioEncoderCap name="amrnb" enabled="true"
+ minBitRate="5525" maxBitRate="12200"
+ minSampleRate="8000" maxSampleRate="8000"
+ minChannels="1" maxChannels="1" />
<!--
FIXME:
@@ -389,30 +467,31 @@
- maxOutputFrameHeight: maximum video height of exported video clip.
- maxPrefetchYUVFrames: maximum prefetch YUV frames for encoder,
used to limit the amount of memory for prefetched YUV frames.
- For this platform, it allows maximum 30MB(3MB per 1080p frame x 10
+ For this platform, it allows maximum ~1MB(~0.1MB per QVGA frame x 10
frames) memory.
-->
- <VideoEditorCap maxInputFrameWidth="1920"
- maxInputFrameHeight="1080" maxOutputFrameWidth="1920"
- maxOutputFrameHeight="1080" maxPrefetchYUVFrames="10"/>
+
+ <VideoEditorCap maxInputFrameWidth="1280"
+ maxInputFrameHeight="720" maxOutputFrameWidth="1280"
+ maxOutputFrameHeight="720" maxPrefetchYUVFrames="5"/>
<!--
The VideoEditor Export codec profile and level values
correspond to the values in OMX_Video.h.
E.g. for h264, profile value 1 means OMX_VIDEO_AVCProfileBaseline
- and level 4096 means OMX_VIDEO_AVCLevel41.
+ and level 256 means OMX_VIDEO_AVCLevel3.
Please note that the values are in decimal.
These values are for video encoder.
-->
<!--
- Codec = h.264, Baseline profile, level 4.1
+ Codec = h.264, Baseline profile, level 3.1
-->
- <ExportVideoProfile name="h264" profile= "1" level="4096"/>
+ <ExportVideoProfile name="h264" profile= "1" level="512"/>
<!--
Codec = h.263, Baseline profile, level 0
-->
<ExportVideoProfile name="h263" profile= "1" level="1"/>
<!--
- Codec = mpeg4, Simple profile, level 5
+ Codec = mpeg4, Simple profile, level 3
-->
- <ExportVideoProfile name="m4v" profile= "1" level="128"/>
+ <ExportVideoProfile name="m4v" profile= "1" level="16"/>
</MediaSettings>
diff --git a/configs/secomxregistry b/configs/secomxregistry
index 8350c1c..8350c1c 100644..100755
--- a/configs/secomxregistry
+++ b/configs/secomxregistry
diff --git a/configs/somxreg.conf b/configs/somxreg.conf
index e4fb687..e4fb687 100644..100755
--- a/configs/somxreg.conf
+++ b/configs/somxreg.conf
diff --git a/configs/vold.fstab b/configs/vold.fstab
index 772fd7f..483e12f 100755
--- a/configs/vold.fstab
+++ b/configs/vold.fstab
@@ -1,22 +1,65 @@
## Vold 2.0 Generic fstab
## - San Mehat (san@android.com)
-##
+##
#######################
## Regular device mount
##
-## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
+## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## <sysfs_path> - List of sysfs paths to source devices
+## storage_struct - ex) series, "/mnt/sdcard/extStorages" / parallel
######################
-
# internal sdcard
-dev_mount internal /mnt/sdcard 11 /devices/platform/s3c-mshci.0/mmc_host/mmc0/mmc0
+{
+ storage_struct = cover, "/mnt/sdcard/external_sd","/mnt/sdcard/usbStorage"
+ ums_sys_path = /sys/class/android_usb/f_mass_storage/lun0/file
+ discard = enable
+}
+dev_mount sdcard /mnt/sdcard 11 /devices/platform/dw_mmc/mmc_host/mmc0/mmc0 encryptable_nonremovable
# external sdcard
-dev_mount sdcard /mnt/extsdcard auto /devices/platform/s3c-sdhci.2/mmc_host/mmc1
+{
+ ums_sys_path = /sys/class/android_usb/f_mass_storage/lun1/file
+ android_secure_containers = enable
+}
+dev_mount sdcard1 /mnt/sdcard/external_sd auto /devices/platform/s3c-sdhci.2/mmc_host/mmc1
+
+#usb host device
+{
+ media_type = usb
+}
+dev_mount sda /mnt/sdcard/usbStorage/UsbDriveA auto /devices/platform/s5p-ehci
+
+#usb host device
+{
+ media_type = usb
+}
+dev_mount sdb /mnt/sdcard/usbStorage/UsbDriveB auto /devices/platform/s5p-ehci
+
+#usb host device
+{
+ media_type = usb
+}
+dev_mount sdc /mnt/sdcard/usbStorage/UsbDriveC auto /devices/platform/s5p-ehci
+
+#usb host device
+{
+ media_type = usb
+}
+dev_mount sdd /mnt/sdcard/usbStorage/UsbDriveD auto /devices/platform/s5p-ehci
+
+#usb host device
+{
+ media_type = usb
+}
+dev_mount sde /mnt/sdcard/usbStorage/UsbDriveE auto /devices/platform/s5p-ehci
-# USB storage device
-dev_mount usbdisk /mnt/usbdisk auto /devices/platform/s3c_otghcd/usb \ No newline at end of file
+#usb host device
+{
+ media_type = usb
+}
+dev_mount sdf /mnt/sdcard/usbStorage/UsbDriveF auto /devices/platform/s5p-ehci
+#EOF
diff --git a/galaxynote.mk b/galaxynote.mk
index 69ba7ad..a261906 100755
--- a/galaxynote.mk
+++ b/galaxynote.mk
@@ -66,7 +66,7 @@ PRODUCT_COPY_FILES += \
# Bluetooth configuration files
PRODUCT_COPY_FILES += \
- device/samsung/galaxynote/configs/main.conf:system/etc/bluetooth/main.conf
+ system/bluetooth/data/main.le.conf:system/etc/bluetooth/main.conf
# Wifi
PRODUCT_COPY_FILES += \
@@ -84,11 +84,10 @@ PRODUCT_COPY_FILES += \
# Packages
PRODUCT_PACKAGES := \
-# audio.primary.smdk4210 \
-# audio_policy.smdk4210 \
- gps.smdk4210 \
- smdk4210_hdcp_keys \
- com.android.future.usb.accessory
+ camera.exynos4 \
+ TvOut \
+ TvOutHack \
+ com.android.future.usb.accessory \
# Charger
#PRODUCT_PACKAGES += \
@@ -101,8 +100,8 @@ PRODUCT_PACKAGES += \
# Sensors
PRODUCT_PACKAGES += \
- lights.smdk4210 \
- sensors.smdk4210
+ lights.exynos4 \
+ sensors.exynos4
# Ril
PRODUCT_PROPERTY_OVERRIDES += \
@@ -199,5 +198,10 @@ PRODUCT_COPY_FILES += \
$(LOCAL_KERNEL):kernel
$(call inherit-product, frameworks/base/build/phone-xhdpi-1024-dalvik-heap.mk)
+
+# Include exynos4 platform specific parts
+$(call inherit-product, hardware/sec/exynos4/exynos4.mk)
+$(call inherit-product, hardware/sec/exynos4/Android.mk)
+
$(call inherit-product-if-exists, vendor/samsung/galaxynote/galaxynote-vendor.mk)
$(call inherit-product-if-exists, hardware/broadcom/wlan/bcmdhd/firmware/bcm4330/device-bcm.mk)
diff --git a/gpswrapper/Android.mk b/gpswrapper/Android.mk
index aaeffbb..e0b4e2b 100755
--- a/gpswrapper/Android.mk
+++ b/gpswrapper/Android.mk
@@ -3,7 +3,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
-LOCAL_MODULE := gps.smdk4210
+LOCAL_MODULE := gps.$(TARGET_BOARD_PLATFORM)
LOCAL_SHARED_LIBRARIES:= \
liblog \
diff --git a/gpswrapper/gps.c b/gpswrapper/gps.c
index d921e27..699dc93 100755
--- a/gpswrapper/gps.c
+++ b/gpswrapper/gps.c
@@ -31,7 +31,7 @@
#define LOG_TAG "gps-wrapper"
#include <utils/Log.h>
-#define ORIGINAL_HAL_PATH "/system/lib/hw/vendor-gps.smdkv310.so"
+#define ORIGINAL_HAL_PATH "/system/lib/hw/vendor-gps.exynos4.so"
static const AGpsRilInterface* oldAGPSRIL = NULL;
static AGpsRilInterface newAGPSRIL;
diff --git a/init.smdk4210.rc b/init.smdk4210.rc
index 9a52813..9737e76 100755
--- a/init.smdk4210.rc
+++ b/init.smdk4210.rc
@@ -2,14 +2,18 @@ import init.smdk4210.usb.rc
on early-init
export EXTERNAL_STORAGE /mnt/sdcard
+ export SECONDARY_STORAGE /mnt/emmc
mkdir /mnt 0775 system system
mkdir /mnt/sdcard 0775 system system
- mkdir /mnt/extsdcard 0775 system system
+ mkdir /mnt/emmc 0775 system system
mkdir /mnt/usbdisk 0775 system system
-
+ mkdir /efs 0771 radio system
+ mkdir /preload 0771 system system
+ mkdir /mnt/.lfs 0755 root root
+
# for backwards compatibility
symlink /mnt/sdcard /sdcard
- symlink /mnt/external /sdcard
+ symlink /mnt/emmc /emmc
# Disable CFQ slice idle delay
write /sys/block/mmcblk0/queue/iosched/slice_idle 0
@@ -22,17 +26,36 @@ on early-init
write /proc/sys/kernel/sched_compat_yield 1
write /proc/sys/kernel/sched_child_runs_first 0
-# ko files for vibrator
- insmod /lib/modules/vibrator.ko
-
-# ko files for FM Radio
- insmod /lib/modules/Si4709_driver.ko
+ # permissions for tvout
+ chmod 0777 /dev/graphics/fb0
+ chmod 0777 /dev/graphics/fb10
+ chmod 0777 /dev/graphics/fb11
+ chown media graphics /sys/class/switch/hdmi
+ chmod 0777 /sys/class/switch/hdmi
+
+ # FIXME: permission for HDMI audio path
+ chown media audio /sys/class/hdmi_audio/hdmi_audio/hdmi_audio_set_ext
+ chmod 0777 /sys/class/hdmi_audio/hdmi_audio/hdmi_audio_set_ext
+
on post-fs-data
# to eliminate delay of "wait_for_coldboot_done", move these 2 lines here
insmod /lib/modules/j4fs.ko
+ insmod /lib/modules/j4fs.ko
+
+ # mount param.lfs
mount j4fs /dev/block/mmcblk0p4 /mnt/.lfs
+ # GPS
+ chown root system /dev/ttySAC1
+ chmod 0660 /dev/ttySAC1
+ chown root system /sys/class/sec/gps/GPS_PWR_EN/value
+ chmod 0664 /sys/class/sec/gps/GPS_PWR_EN/value
+ chown root system /sys/class/sec/gps/GPS_nRST/value
+ chmod 0664 /sys/class/sec/gps/GPS_nRST/value
+ mkdir /data/gps 771 system system
+ chown system system /data/gps
+
# we will remap this as /mnt/sdcard with the sdcard fuse tool
mkdir /data/media 0775 media_rw media_rw
chown media_rw media_rw /data/media
@@ -72,6 +95,58 @@ on post-fs-data
chown root root /system/lib/drm
chmod 0775 /system/lib/drm
+ # DivX DRM
+ mkdir /efs/.files 0775
+ mkdir /efs/.files/.dx1 0775
+ mkdir /efs/.files/.dm33 0775
+ mkdir /efs/.files/.mp301 0775
+ chown media system /efs/.files/.dx1
+ chown media system /efs/.files/.dm33
+ chown media system /efs/.files/.mp301
+ chmod 0775 /efs/.files/.dx1
+ chmod 0775 /efs/.files/.dm33
+ chmod 0775 /efs/.files/.mp301
+
+ # MTP Device permission.
+ chmod 0660 /dev/usb_mtp_gadget
+ chown system system /dev/usb_mtp_gadget
+
+ # NFC
+ setprop ro.nfc.port "I2C"
+ chmod 0600 /dev/pn544
+ chown nfc nfc /dev/pn544
+
+ # setup for alsa snd device
+ chmod 0770 /dev/snd/pcmC0D0c
+ chmod 0770 /dev/snd/pcmC0D0p
+ chmod 0770 /dev/snd/controlC0
+ chmod 0770 /dev/snd/timer
+ chmod 0770 /dev/snd/hwC0D0
+
+ # create log system
+ mkdir /data/log 0775 system log
+ chown system log /data/log
+
+ chmod 0775 /data/log
+ chmod 0775 /data/anr
+
+ chmod 0662 /dev/log/radio
+ chmod 0662 /dev/log/main
+ chmod 0662 /dev/log/event
+
+ # terminal mode
+ chmod 0660 /sys/class/android_usb/android0/terminal_version
+ chown system system /sys/class/android_usb/android0/terminal_version
+
+ # panorama directory creation
+ mkdir /data/pxtmpdir 0775
+ chown system system /data/pxtmpdir
+ chmod 0775 /data/pxtmpdir
+
+ # DVFS - cpufreq ondemand
+ write /sys/devices/system/cpu/cpufreq/ondemand/down_differential 5
+ write /sys/devices/system/cpu/cpufreq/ondemand/up_threshold 85
+
on boot
mount debugfs /sys/kernel/debug /sys/kernel/debug
@@ -80,12 +155,20 @@ on fs
mount ext4 /dev/block/mmcblk0p9 /system wait ro
mount ext4 /dev/block/mmcblk0p7 /cache nosuid nodev noatime wait
mount ext4 /dev/block/mmcblk0p10 /data nosuid nodev noatime wait crypt discard,noauto_da_alloc
-
- mkdir /efs
+ mount ext4 /dev/block/mmcblk0p12 /preload nosuid nodev noatime wait
+
mount ext4 /dev/block/mmcblk0p1 /efs nosuid nodev noatime wait
- chown radio system /efs
- chmod 0771 /efs
-
+ mkdir /efs/bluetooth
+ mkdir /efs/wifi
+ chown radio system /efs/bluetooth
+ chown radio system /efs/wifi
+ chmod 0775 /efs/bluetooth
+ chmod 0775 /efs/wifi
+
+ mkdir /data/misc/vpn/profiles 0770 system system
+ mkdir /data/misc/radio 0775 radio system
+ chmod 0770 /data/misc/wifi
+
# create log system
mkdir /data/log 0777 system system
@@ -95,42 +178,25 @@ on fs
chmod 0662 /dev/log/radio
chmod 0662 /dev/log/main
chmod 0662 /dev/log/event
-
+
# permissions for backlight
chown system system /sys/class/backlight/pwm-backlight/brightness
+ chmod 0777 /sys/class/misc/melfas_touchkey/brightness
+ chown system system /sys/class/misc/melfas_touchkey/brightness
- # permissions for NFC
- setprop ro.nfc.port "I2C"
- chmod 0600 /dev/pn544
- chown nfc nfc /dev/pn544
-
# Tweak background writeout
write /proc/sys/vm/dirty_expire_centisecs 200
write /proc/sys/vm/dirty_background_ratio 5
-
- # create data/gps for GPS demon
- mkdir /data/gps 770 gps system
- chown gps system /data/gps
- chown gps root /dev/s3c2410_serial1
- chmod 0660 /dev/s3c2410_serial1
- chown gps root /sys/class/sec/gps/GPS_PWR_EN/value
- chmod 0664 /sys/class/sec/gps/GPS_PWR_EN/value
- chown gps root /sys/class/sec/gps/GPS_nRST/value
- chmod 0664 /sys/class/sec/gps/GPS_nRST/value
# allow net_raw to have access to /dev/socket directory
chown root net_raw /dev/socket
chmod 0775 /dev/socket
-
+
# UART switch
# Request of manufacturing application!!!
chown radio system /sys/class/sec/uart_switch/UART_SEL/value
chmod 0664 /sys/class/sec/uart_switch/UART_SEL/value
- # MTP permissions
- chmod 0660 /dev/usb_mtp_gadget
- chown system system /dev/usb_mtp_gadget
-
# allow system to modify cpufreq control files
chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
@@ -142,28 +208,6 @@ on fs
# USB Device permission
chown system system /sys/devices/platform/android_usb/UsbMenuSel
chown system system /sys/devices/platform/android_usb/tethering
-
- # setup for alsa snd device
- symlink /dev/snd/pcmC0D0c /dev/pcmC0D0c
- symlink /dev/snd/pcmC0D0p /dev/pcmC0D0p
- symlink /dev/snd/controlC0 /dev/controlC0
- symlink /dev/snd/timer /dev/timer
- symlink /dev/snd/hwC0D0 /dev/hwC0D0
- chmod 0777 /dev/pcmC0D0c
- chmod 0777 /dev/pcmC0D0p
- chmod 0777 /dev/controlC0
- chmod 0777 /dev/timer
- chmod 0777 /dev/hwC0D0
- chmod 0777 /dev/snd/pcmC0D0c
- chmod 0777 /dev/snd/pcmC0D0p
- chmod 0777 /dev/snd/controlC0
- chmod 0777 /dev/snd/timer
- chmod 0777 /dev/snd/hwC0D0
-
- #panorama directory creation
- mkdir /data/pxtmpdir 0775
- chown system system /data/pxtmpdir
- chmod 0775 /data/pxtmpdir
# Permissions for dvfs lock
chown system system /sys/power/cpufreq_max_limit
@@ -252,7 +296,6 @@ on fs
chown radio system /sys/class/sec/sec_epen/epen_checksum
chown radio system /sys/class/sec/sec_epen/epen_checksum_result
-
chown radio system /sys/devices/platform/android_usb/tethering
chown radio system /sys/devices/platform/android_usb/UsbMenuSel
chown radio system /sys/devices/virtual/gpio/gpio225/value
@@ -284,6 +327,15 @@ on fs
chown radio system /sys/devices/platform/sec-battery/power_supply/battery/batt_soc
chown radio system /sys/devices/platform/sec-battery/power_supply/battery/batt_vol
+ chown system radio /sys/class/lcd/panel/lcd_power
+ chown system radio /sys/class/lcd/panel/lcd_type
+ chown system media_rw /sys/class/lcd/panel/gamma_mode
+ chown system media_rw /sys/class/lcd/panel/power_reduce
+
+ # OTG Test
+ chown system radio /sys/class/host_notify/usb_otg/booster
+ chmod 0664 /sys/class/host_notify/usb_otg/booster
+
# HSIC
chown radio system /sys/devices/platform/s5p-ehci/ehci_runtime
chown radio system /sys/devices/platform/modemctl/wakeup
@@ -294,19 +346,23 @@ on fs
#bluetooth
setprop ro.bt.bdaddr_path "/efs/bluetooth/bt_addr"
chown bluetooth bluetooth ro.bt.bdaddr_path
- chown bluetooth bluetooth /dev/s3c2410_serial0
- chmod 0660 /dev/s3c2410_serial0
+ chown bluetooth bluetooth /dev/ttySAC0
+ chmod 0600 /dev/ttySAC0
chmod 0660 /sys/class/rfkill/rfkill0/state
- chmod 0660 /sys/class/rfkill/rfkill1/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
- chown bluetooth bluetooth /sys/class/rfkill/rfkill1/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
- chown bluetooth bluetooth /sys/class/rfkill/rfkill1/type
# for datarouter
chown system system /dev/ttyGS0
chown system system /dev/dun
+ # Device Encryption by B2B Security Lab.
+ setprop ro.crypto.keyfile.userdata /efs/metadata
+
+ # Vibetonz
+ chmod 0660 /dev/tspdrv
+ chown root shell /dev/tspdrv
+
# Audio Tunning Files
chmod 0777 /system/etc/audio/stream_speaker.txt
chmod 0777 /system/etc/audio/stream_headset.txt
@@ -354,8 +410,10 @@ service wpa_supplicant /system/bin/wpa_supplicant -Dnl80211 -iwlan0 -puse_p2p_gr
disabled
oneshot
-# hciattach
-service hciattach /system/bin/brcm_patchram_plus --enable_lpm --enable_hci --baudrate 3000000 --use_baudrate_for_download --no2bytes --tosleep=50000 --patchram /system/bin/BCM4330B1_002.001.003.0485.0501.hcd /dev/s3c2410_serial0
+# for bluetooth
+service hciattach /system/bin/brcm_patchram_plus --enable_hci --enable_lpm --no2bytes --tosleep 50000 \
+ --baudrate 3000000 --use_baudrate_for_download --patchram /system/bin/bcm4330B1.hcd \
+ --scopcm=0,0,0,0,0,0,0,3,3,0 /dev/ttySAC0
class main
user bluetooth
group bluetooth net_bt_admin
@@ -369,11 +427,18 @@ service bdaddr /system/bin/bdaddr_read
disabled
oneshot
-# tvout
+# bluetooth mac address
+service bdaddr /system/bin/bdaddr_read
+ class main
+ user root
+ disabled
+ oneshot
+
+# TVout
service TvoutService_C /system/bin/bintvoutservice
- class main
- user system
- group graphics
+ class main
+ user system
+ group graphics
service gpsd /system/bin/gpsd -c /system/etc/gps.xml
class main
diff --git a/init.smdk4210.usb.rc b/init.smdk4210.usb.rc
index 9307c56..4731122 100755
--- a/init.smdk4210.usb.rc
+++ b/init.smdk4210.usb.rc
@@ -3,15 +3,17 @@ on init
write /sys/class/android_usb/android0/f_rndis/manufacturer Samsung
write /sys/class/android_usb/android0/f_rndis/vendorID 04e8
write /sys/class/android_usb/android0/f_rndis/wceis 1
-
+
on boot
- write /sys/class/android_usb/android0/iManufacturer $ro.product.manufacturer
- write /sys/class/android_usb/android0/iProduct $ro.product.model
+ write /sys/class/android_usb/android0/iManufacturer $ro.manufacturer
+ write /sys/class/android_usb/android0/iProduct $ro.model
+ write /sys/class/android_usb/android0/iSerial $ro.serialno
+ write /sys/class/android_usb/f_mass_storage/inquiry_string "Samsung"
on property:sys.usb.config=mtp
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 04e8
- write /sys/class/android_usb/android0/idProduct 685c
+ write /sys/class/android_usb/android0/idProduct 6860
write /sys/class/android_usb/android0/functions $sys.usb.config
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state $sys.usb.config
@@ -67,4 +69,21 @@ on property:sys.usb.config=rndis,dm
write /sys/class/android_usb/android0/idProduct 6862
write /sys/class/android_usb/android0/functions $sys.usb.config
write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state $sys.usb.config
+
+on property:sys.usb.config=mass_storage
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 04e8
+ write /sys/class/android_usb/android0/idProduct 685B
+ write /sys/class/android_usb/android0/functions $sys.usb.config
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state $sys.usb.config
+
+on property:sys.usb.config=mass_storage,adb
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 04e8
+ write /sys/class/android_usb/android0/idProduct 685e
+ write /sys/class/android_usb/android0/functions $sys.usb.config
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
setprop sys.usb.state $sys.usb.config \ No newline at end of file
diff --git a/kernel b/kernel
index 4663655..e347314 100755
--- a/kernel
+++ b/kernel
Binary files differ
diff --git a/liblights/lights.c b/liblights/lights.c
index 4c17faf..a7fba8b 100755
--- a/liblights/lights.c
+++ b/liblights/lights.c
@@ -99,6 +99,7 @@ set_light_backlight(struct light_device_t* dev,
pthread_mutex_lock(&g_lock);
err = write_int(PANEL_FILE, brightness);
err = write_int(BUTTON_FILE, brightness > 0 ? 1 : 2);
+
pthread_mutex_unlock(&g_lock);
return err;
diff --git a/modules/Si4709_driver.ko b/modules/Si4709_driver.ko
index d99fb76..8b425ae 100755
--- a/modules/Si4709_driver.ko
+++ b/modules/Si4709_driver.ko
Binary files differ
diff --git a/modules/bthid.ko b/modules/bthid.ko
deleted file mode 100755
index 3f6e3a2..0000000
--- a/modules/bthid.ko
+++ /dev/null
Binary files differ
diff --git a/modules/cifs.ko b/modules/cifs.ko
deleted file mode 100755
index 84f0269..0000000
--- a/modules/cifs.ko
+++ /dev/null
Binary files differ
diff --git a/modules/dhd.ko b/modules/dhd.ko
new file mode 100755
index 0000000..46e0881
--- /dev/null
+++ b/modules/dhd.ko
Binary files differ
diff --git a/modules/gspca_main.ko b/modules/gspca_main.ko
deleted file mode 100755
index 99302f4..0000000
--- a/modules/gspca_main.ko
+++ /dev/null
Binary files differ
diff --git a/modules/j4fs.ko b/modules/j4fs.ko
index eca4cc6..0a0bd67 100755
--- a/modules/j4fs.ko
+++ b/modules/j4fs.ko
Binary files differ
diff --git a/modules/scsi_wait_scan.ko b/modules/scsi_wait_scan.ko
index 8ec2020..724f4cf 100755
--- a/modules/scsi_wait_scan.ko
+++ b/modules/scsi_wait_scan.ko
Binary files differ
diff --git a/modules/vibrator.ko b/modules/vibrator.ko
deleted file mode 100755
index 1797d6c..0000000
--- a/modules/vibrator.ko
+++ /dev/null
Binary files differ
diff --git a/releasetools/galaxynote_edify_generator.py b/releasetools/galaxynote_edify_generator.py
index a2ccc30..95bdf48 100755
--- a/releasetools/galaxynote_edify_generator.py
+++ b/releasetools/galaxynote_edify_generator.py
@@ -35,3 +35,12 @@ class EdifyGenerator(edify_generator.EdifyGenerator):
('assert(package_extract_file("%(image)s", "/tmp/%(image)s"),\n'
' write_raw_image("/tmp/%(image)s", "%(partition)s"),\n'
' delete("/tmp/%(image)s"));') % args)
+
+ def Unmount(self, mount_point):
+ """Unmount the partition with the given mount_point."""
+ fstab = self.info.get("fstab", None)
+ if fstab:
+ p = fstab[mount_point]
+ self.script.append('unmount("%s");' %
+ (p.mount_point))
+ self.mounts.add(p.mount_point)
diff --git a/releasetools/galaxynote_ota_from_target_files b/releasetools/galaxynote_ota_from_target_files
index 4b6150f..06b7918 100755
--- a/releasetools/galaxynote_ota_from_target_files
+++ b/releasetools/galaxynote_ota_from_target_files
@@ -68,6 +68,7 @@ def WriteFullOTAPackage(input_zip, output_zip):
if OPTIONS.wipe_user_data:
script.FormatPartition("/data")
+ script.Unmount("/system")
script.FormatPartition("/system")
script.Mount("/system")
script.UnpackPackageDir("recovery", "/system")
@@ -75,12 +76,11 @@ def WriteFullOTAPackage(input_zip, output_zip):
(symlinks, retouch_files) = CopySystemFiles(input_zip, output_zip)
script.MakeSymlinks(symlinks)
-
if OPTIONS.aslr_mode:
- script.RetouchBinaries(retouch_files)
+ script.RetouchBinaries(retouch_files)
else:
- script.UndoRetouchBinaries(retouch_files)
-
+ script.UndoRetouchBinaries(retouch_files)
+
CopyBootFiles(input_zip, output_zip)
Item.GetMetadata(input_zip)
@@ -88,11 +88,9 @@ def WriteFullOTAPackage(input_zip, output_zip):
script.ShowProgress(0.2, 0)
-# if OPTIONS.backuptool:
-# script.ShowProgress(0.2, 10)
-# script.RunBackup("restore")
-
-# script.RunVerifyCachePartitionSize()
+ if OPTIONS.backuptool:
+ script.ShowProgress(0.2, 10)
+ script.RunBackup("restore")
script.ShowProgress(0.2, 10)
script.EMMCWriteRawImage("/dev/block/mmcblk0p5", "boot.img")
@@ -110,7 +108,7 @@ ota_from_target_files.WriteFullOTAPackage = WriteFullOTAPackage
def WriteIncrementalOTAPackage(target_zip, source_zip, output_zip):
- print "Incremental OTA Packages are not support on the galaxys2 at this time"
+ print "Incremental OTA Packages are not support on the galaxynote at this time"
sys.exit(1)
ota_from_target_files.WriteIncrementalOTAPackage = WriteIncrementalOTAPackage
diff --git a/tvout/Android.mk b/tvout/Android.mk
new file mode 100644
index 0000000..c73e1cf
--- /dev/null
+++ b/tvout/Android.mk
@@ -0,0 +1,16 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_PROGUARD_FLAG_FILES := proguard.flags
+
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+
+LOCAL_PACKAGE_NAME := TvOut
+LOCAL_CERTIFICATE := platform
+
+include $(BUILD_PACKAGE)
+
+# Use the folloing include to make our test apk.
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/tvout/AndroidManifest.xml b/tvout/AndroidManifest.xml
new file mode 100644
index 0000000..79d5745
--- /dev/null
+++ b/tvout/AndroidManifest.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.teamhacksung.tvout" android:versionCode="1"
+ android:versionName="1.0">
+
+ <application android:label="TvOut">
+
+ <service android:exported="false" android:enabled="true"
+ android:name=".TvOutService">
+ </service>
+
+ <receiver android:name=".BootCompletedReceiver">
+ <intent-filter>
+ <action android:name="android.intent.action.BOOT_COMPLETED" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ </receiver>
+
+ </application>
+
+ <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"></uses-permission>
+ <uses-permission android:name="android.permission.BROADCAST_STICKY"></uses-permission>
+ <uses-permission android:name="android.permission.FACTORY_TEST"></uses-permission>
+</manifest>
diff --git a/tvout/proguard.flags b/tvout/proguard.flags
new file mode 100644
index 0000000..3725966
--- /dev/null
+++ b/tvout/proguard.flags
@@ -0,0 +1 @@
+-dontshrink
diff --git a/tvout/src/android/hardware/Tvout.java b/tvout/src/android/hardware/Tvout.java
new file mode 100644
index 0000000..f2fc3a8
--- /dev/null
+++ b/tvout/src/android/hardware/Tvout.java
@@ -0,0 +1,102 @@
+package android.hardware;
+
+import android.util.Log;
+
+public class Tvout {
+ private static final String TAG = "Tvout_java";
+
+ static {
+ System.loadLibrary("tvout_jni");
+ }
+
+ public Tvout() {
+ Log.i(TAG, "Tvout Initializing");
+ _native_setup();
+ }
+
+ private native boolean _TvoutGetCableStatus();
+
+ private native boolean _TvoutGetStatus();
+
+ private native boolean _TvoutGetSubtitleStatus();
+
+ private native boolean _TvoutGetSuspendStatus();
+
+ private native boolean _TvoutPostSubtitle(String string, int param);
+
+ private native boolean _TvoutPostSuspend(String string);
+
+ private native boolean _TvoutSetCableStatus(boolean connected);
+
+ private native boolean _TvoutSetOutputMode(int mode);
+
+ private native boolean _TvoutSetResolution(int resolution);
+
+ private native boolean _TvoutSetStatus(boolean enabled);
+
+ private native boolean _TvoutSetSubtitleStatus(boolean enabled);
+
+ private native boolean _TvoutSetSuspendStatus(boolean enabled);
+
+ private native boolean _TvoutSetDefaultString(String string);
+
+ private final native void _native_setup();
+
+ private final native void _release();
+
+ public boolean getCableStatus() {
+ return _TvoutGetCableStatus();
+ }
+
+ public boolean getStatus() {
+ return _TvoutGetStatus();
+ }
+
+ public boolean getSubtitleStatus() {
+ return _TvoutGetSubtitleStatus();
+ }
+
+ public boolean getSuspendStatus() {
+ return _TvoutGetSuspendStatus();
+ }
+
+ public boolean postSubtitle(String string, int paramInt) {
+ return _TvoutPostSubtitle(string, paramInt);
+ }
+
+ public boolean postSuspend(String string) {
+ return _TvoutPostSuspend(string);
+ }
+
+ public boolean setCableStatus(boolean connected) {
+ return _TvoutSetCableStatus(connected);
+ }
+
+ public boolean setOutputMode(int mode) {
+ return _TvoutSetOutputMode(mode);
+ }
+
+ public boolean setResolution(int resolution) {
+ return _TvoutSetResolution(resolution);
+ }
+
+ public boolean setStatus(boolean enabled) {
+ return _TvoutSetStatus(enabled);
+ }
+
+ public boolean setSubtitleStatus(boolean enabled) {
+ return _TvoutSetSubtitleStatus(enabled);
+ }
+
+ public boolean setSuspendStatus(boolean enabled) {
+ return _TvoutSetSuspendStatus(enabled);
+ }
+
+ public boolean setDefaultString(String string) {
+ return _TvoutSetDefaultString(string);
+ }
+
+ public void release() {
+ _release();
+ }
+}
diff --git a/tvout/src/com/teamhacksung/tvout/BootCompletedReceiver.java b/tvout/src/com/teamhacksung/tvout/BootCompletedReceiver.java
new file mode 100644
index 0000000..5ed6af6
--- /dev/null
+++ b/tvout/src/com/teamhacksung/tvout/BootCompletedReceiver.java
@@ -0,0 +1,12 @@
+package com.teamhacksung.tvout;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+
+public class BootCompletedReceiver extends BroadcastReceiver {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ context.startService(new Intent(context, TvOutService.class));
+ }
+}
diff --git a/tvout/src/com/teamhacksung/tvout/TvOutService.java b/tvout/src/com/teamhacksung/tvout/TvOutService.java
new file mode 100644
index 0000000..b633b3d
--- /dev/null
+++ b/tvout/src/com/teamhacksung/tvout/TvOutService.java
@@ -0,0 +1,116 @@
+package com.teamhacksung.tvout;
+
+import android.app.Service;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.hardware.Tvout;
+import android.nfc.Tag;
+import android.os.IBinder;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+import android.util.Log;
+
+public class TvOutService extends Service {
+
+ public static final String TAG = "TvOutService_java";
+
+ private Tvout mTvOut;
+ private boolean mWasOn = false; // For enabling on screen on
+
+ private BroadcastReceiver mReceiver = new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ String action = intent.getAction();
+ if (Intent.ACTION_HDMI_AUDIO_PLUG.equals(action)) {
+ getTvoutInstance();
+ int state = intent.getIntExtra("state", 0);
+ if (state == 1 && !mTvOut.getStatus()) {
+ // Enable when cable is plugged
+ Log.i(TAG, "HDMI plugged");
+ mWasOn = false;
+ enable();
+ } else if (mTvOut.getStatus()) {
+ // Disable when cable is unplugged
+ Log.i(TAG, "HDMI unplugged");
+ mWasOn = false;
+ disable();
+ releaseTvout();
+ }
+ } else if (Intent.ACTION_SCREEN_ON.equals(action)) {
+ if (mTvOut != null && mWasOn) {
+ Log.i(TAG, "Screen On - Resume TvOut stream");
+ mWasOn = false;
+ mTvOut.setSuspendStatus(false);
+ }
+ } else if (Intent.ACTION_SCREEN_OFF.equals(action)) {
+ if (mTvOut != null && mTvOut.getStatus()) {
+ Log.i(TAG, "Screen Off - Pausing TvOut stream");
+ mWasOn = true;
+ mTvOut.setSuspendStatus(true);
+ }
+ }
+ }
+
+ };
+
+ @Override
+ public IBinder onBind(Intent intent) {
+ return null;
+ }
+
+ @Override
+ public void onCreate() {
+ IntentFilter filter = new IntentFilter(Intent.ACTION_HDMI_AUDIO_PLUG);
+ filter.addAction(Intent.ACTION_SCREEN_OFF);
+ filter.addAction(Intent.ACTION_SCREEN_ON);
+ registerReceiver(mReceiver, filter);
+ Log.i(TAG, "Registered Receiver");
+ }
+
+ @Override
+ public int onStartCommand(Intent intent, int flags, int startId) {
+ return START_STICKY;
+ }
+
+ private boolean getTvoutInstance() {
+ if (mTvOut != null) return true;
+
+ try {
+ mTvOut = new Tvout();
+ } catch (Exception e) {
+ return false;
+ }
+
+ return true;
+ }
+
+ private void releaseTvout() {
+ if (mTvOut != null) {
+ mTvOut.release();
+ mTvOut = null;
+ }
+ }
+
+ @Override
+ public void onDestroy() {
+ unregisterReceiver(mReceiver);
+ releaseTvout();
+ super.onDestroy();
+ }
+
+ private void enable() {
+ if (mTvOut == null) return;
+ mTvOut.setStatus(true);
+ mTvOut.setCableStatus(true);
+ mTvOut.setSuspendStatus(false);
+ }
+
+ private void disable() {
+ if (mTvOut == null) return;
+ mTvOut.setStatus(false);
+ mTvOut.setCableStatus(false);
+ }
+
+}
diff --git a/tvouthack/Android.mk b/tvouthack/Android.mk
new file mode 100644
index 0000000..19ad32f
--- /dev/null
+++ b/tvouthack/Android.mk
@@ -0,0 +1,27 @@
+# Copyright (C) 2012 The CyanogenMod Project
+# Copyright (C) 2012 Pawit Pornkitprasan
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SRC_FILES := main.cpp
+
+LOCAL_SHARED_LIBRARIES := libutils libbinder
+
+LOCAL_MODULE := TvOutHack
+
+include $(BUILD_EXECUTABLE)
diff --git a/tvouthack/main.cpp b/tvouthack/main.cpp
new file mode 100644
index 0000000..a59d4a9
--- /dev/null
+++ b/tvouthack/main.cpp
@@ -0,0 +1,52 @@
+#include <stdio.h>
+#include <binder/IPCThreadState.h>
+#include <binder/ProcessState.h>
+#include <binder/IServiceManager.h>
+#include <utils/Log.h>
+
+using namespace android;
+
+int main() {
+ sp<IServiceManager> sm = defaultServiceManager();
+ sp<IBinder> binder;
+
+ do {
+ binder = sm->getService(String16("TvoutService_C"));
+ if (binder != 0) break;
+ usleep(500000); // 0.5 s
+ } while(true);
+
+ int ret;
+
+ Parcel s2, r2;
+ s2.writeInterfaceToken(String16("android.hardware.ITvoutService"));
+ binder->transact(1, s2, &r2);
+ sp<IBinder> binder2 = r2.readStrongBinder();
+
+ while (true) {
+ {
+
+ Parcel send, reply;
+ int code = 4;
+ send.writeInterfaceToken(String16("android.hardware.Tvout"));
+ int ret = binder2->transact(code, send, &reply);
+ }
+ {
+
+ Parcel send, reply;
+ int code = 27;
+ send.writeInterfaceToken(String16("android.hardware.ITvout"));
+ int ret = binder2->transact(code, send, &reply);
+ }
+ {
+
+ Parcel send, reply;
+ int code = 13;
+ send.writeInterfaceToken(String16("android.hardware.ITvout"));
+ send.writeInt32(0);
+ int ret = binder2->transact(code, send, &reply);
+ }
+ usleep(15000); // Should give ~60 fps
+ }
+ return 0;
+}
diff --git a/ueventd.smdk4210.rc b/ueventd.smdk4210.rc
index 14c1481..f37b686 100755
--- a/ueventd.smdk4210.rc
+++ b/ueventd.smdk4210.rc
@@ -18,6 +18,7 @@
# for usb printer
/dev/usb/lp* 0660 system usb
+/dev/log/* 0662 root log
/dev/i2c-7 0660 system system
/dev/i2c-15 0660 system system
/dev/CEC 0660 system system
@@ -33,6 +34,7 @@
# for gps
/dev/s3c2410_serial1 0660 root system
/dev/tspdrv 0660 system system
+/dev/block/mmcblk0p8 0660 system radio
# for MTP
/dev/usb_mtp_gadget 0660 system system