From ad8a0cb5cb25b0454e490f6f703478bd48d159eb Mon Sep 17 00:00:00 2001 From: XpLoDWilD Date: Wed, 25 Jul 2012 18:25:15 +0200 Subject: Jellybean it --- Android.mk | 10 +- AndroidProducts.mk | 4 +- BoardConfig.mk | 135 +--- CleanSpec.mk | 3 +- DeviceSettings/Android.mk | 2 +- DeviceSettings/res/values-de/strings.xml | 2 +- DeviceSettings/res/values-es/strings.xml | 2 +- DeviceSettings/res/values-fi/strings.xml | 2 +- DeviceSettings/res/values-fr/strings.xml | 2 +- DeviceSettings/res/values-hu/strings.xml | 2 +- DeviceSettings/res/values-nl/strings.xml | 2 +- DeviceSettings/res/values-pt-rBR/arrays.xml | 118 ++-- DeviceSettings/res/values-pt-rBR/strings.xml | 16 +- DeviceSettings/res/values/strings.xml | 2 +- .../settings/device/HapticFragmentActivity.java | 2 +- .../settings/device/RadioFragmentActivity.java | 2 +- .../settings/device/SensorsFragmentActivity.java | 2 +- .../src/com/cyanogenmod/settings/device/Utils.java | 6 +- TVOutDummy/Android.mk | 40 ++ TVOutDummy/Barrier.h | 55 ++ TVOutDummy/ISecTVOut.cpp | 111 ++++ TVOutDummy/ISecTVOut.h | 74 +++ TVOutDummy/MessageQueue.cpp | 197 ++++++ TVOutDummy/MessageQueue.h | 126 ++++ TVOutDummy/SecTVOutService.cpp | 168 +++++ TVOutDummy/SecTVOutService.h | 94 +++ TVOutDummy/main.cpp | 11 + bdaddr_read/Android.mk | 27 - bdaddr_read/bdaddr_read.c | 54 -- board-info.txt | 5 +- camera/Android.mk | 15 - camera/CameraWrapper.cpp | 598 ------------------ cm.dependencies | 8 +- cm.mk | 57 +- configs/asound.conf | 61 -- configs/bcmdhd.cal | 118 ---- configs/egl.cfg | 1 - configs/gps.conf | 6 - configs/media_profiles.xml | 497 --------------- configs/vold.fstab | 22 - configs/wpa_supplicant.conf | 9 - extract-files.sh | 288 --------- full_n7000.mk | 17 +- gpswrapper/Android.mk | 21 - gpswrapper/MODULE_LICENSE_APACHE2 | 1 - gpswrapper/gps.c | 203 ------ init.smdk4210.rc | 382 ------------ init.smdk4210.usb.rc | 89 --- lpm.rc | 64 -- n7000.mk | 233 ++----- .../res/res/drawable-nodpi/default_wallpaper.jpg | Bin 117493 -> 0 bytes .../frameworks/base/core/res/res/values/arrays.xml | 37 -- .../frameworks/base/core/res/res/values/config.xml | 233 ------- .../base/core/res/res/xml/power_profile.xml | 69 --- .../base/core/res/res/xml/storage_list.xml | 52 -- .../SettingsProvider/res/values/defaults.xml | 22 - .../base/packages/SystemUI/res/values/config.xml | 26 - overlay/include/hardware/gps.h | 686 --------------------- overlay/packages/apps/Camera/res/values/config.xml | 29 - overlay/packages/apps/Phone/res/values/config.xml | 28 - .../apps/Settings/res/values-af/arrays.xml | 31 - .../apps/Settings/res/values-am/arrays.xml | 31 - .../apps/Settings/res/values-ar/arrays.xml | 31 - .../apps/Settings/res/values-bg/arrays.xml | 31 - .../apps/Settings/res/values-ca/arrays.xml | 31 - .../apps/Settings/res/values-cs/arrays.xml | 31 - .../apps/Settings/res/values-da/arrays.xml | 31 - .../apps/Settings/res/values-de/arrays.xml | 31 - .../apps/Settings/res/values-el/arrays.xml | 31 - .../apps/Settings/res/values-en-rGB/arrays.xml | 31 - .../apps/Settings/res/values-es-rUS/arrays.xml | 31 - .../apps/Settings/res/values-es/arrays.xml | 31 - .../apps/Settings/res/values-fa/arrays.xml | 31 - .../apps/Settings/res/values-fi/arrays.xml | 31 - .../apps/Settings/res/values-fr/arrays.xml | 31 - .../apps/Settings/res/values-hi/arrays.xml | 31 - .../apps/Settings/res/values-hr/arrays.xml | 31 - .../apps/Settings/res/values-hu/arrays.xml | 31 - .../apps/Settings/res/values-in/arrays.xml | 31 - .../apps/Settings/res/values-it/arrays.xml | 31 - .../apps/Settings/res/values-iw/arrays.xml | 31 - .../apps/Settings/res/values-ja/arrays.xml | 31 - .../apps/Settings/res/values-ko/arrays.xml | 31 - .../apps/Settings/res/values-lt/arrays.xml | 31 - .../apps/Settings/res/values-lv/arrays.xml | 31 - .../apps/Settings/res/values-ms/arrays.xml | 31 - .../apps/Settings/res/values-nb/arrays.xml | 31 - .../apps/Settings/res/values-nl/arrays.xml | 31 - .../apps/Settings/res/values-pl/arrays.xml | 31 - .../apps/Settings/res/values-pt-rPT/arrays.xml | 31 - .../apps/Settings/res/values-pt/arrays.xml | 31 - .../apps/Settings/res/values-ro/arrays.xml | 31 - .../apps/Settings/res/values-ru/arrays.xml | 31 - .../apps/Settings/res/values-sk/arrays.xml | 31 - .../apps/Settings/res/values-sl/arrays.xml | 31 - .../apps/Settings/res/values-sr/arrays.xml | 31 - .../apps/Settings/res/values-sv/arrays.xml | 31 - .../apps/Settings/res/values-sw/arrays.xml | 31 - .../apps/Settings/res/values-th/arrays.xml | 31 - .../apps/Settings/res/values-tl/arrays.xml | 31 - .../apps/Settings/res/values-tr/arrays.xml | 31 - .../apps/Settings/res/values-uk/arrays.xml | 31 - .../apps/Settings/res/values-vi/arrays.xml | 31 - .../apps/Settings/res/values-zh-rCN/arrays.xml | 31 - .../apps/Settings/res/values-zh-rTW/arrays.xml | 31 - .../apps/Settings/res/values-zu/arrays.xml | 31 - .../packages/apps/Settings/res/values/arrays.xml | 46 -- .../packages/apps/Settings/res/values/config.xml | 24 - overlay/packages/apps/Torch/res/values/config.xml | 26 - proprietary-common-files.txt | 71 +++ proprietary-files.sh | 259 ++++++++ recovery.rc | 72 --- recovery/graphics.c | 376 ----------- recovery/recovery_keys.c | 63 -- releasetools/n7000_common.py | 31 - releasetools/n7000_edify_generator.py | 46 -- releasetools/n7000_img_from_target_files | 185 ------ releasetools/n7000_ota_from_target_files | 124 ---- setup-makefiles.sh | 78 --- shbootimg.mk | 34 - system.prop | 1 - tvout/Android.mk | 16 - tvout/AndroidManifest.xml | 24 - tvout/proguard.flags | 1 - tvout/src/android/hardware/Tvout.java | 102 --- .../teamhacksung/tvout/BootCompletedReceiver.java | 12 - tvout/src/com/teamhacksung/tvout/TvOutService.java | 116 ---- tvouthack/Android.mk | 27 - tvouthack/main.cpp | 52 -- ueventd.smdk4210.rc | 32 - usr/idc/sec_e-pen.idc | 2 - usr/keylayout/Generic.kl | 11 +- usr/keylayout/Vendor_04e8_Product_7021.kl | 393 ------------ usr/keylayout/melfas-touchkey.kl | 4 +- usr/keylayout/sec_touchkey.kl | 1 - usr/keylayout/sii9234_rcp.kl | 28 - 136 files changed, 1392 insertions(+), 7439 deletions(-) mode change 100755 => 100644 Android.mk mode change 100755 => 100644 AndroidProducts.mk mode change 100755 => 100644 BoardConfig.mk mode change 100755 => 100644 CleanSpec.mk create mode 100644 TVOutDummy/Android.mk create mode 100644 TVOutDummy/Barrier.h create mode 100644 TVOutDummy/ISecTVOut.cpp create mode 100644 TVOutDummy/ISecTVOut.h create mode 100644 TVOutDummy/MessageQueue.cpp create mode 100644 TVOutDummy/MessageQueue.h create mode 100644 TVOutDummy/SecTVOutService.cpp create mode 100644 TVOutDummy/SecTVOutService.h create mode 100644 TVOutDummy/main.cpp delete mode 100755 bdaddr_read/Android.mk delete mode 100755 bdaddr_read/bdaddr_read.c mode change 100755 => 100644 board-info.txt delete mode 100644 camera/Android.mk delete mode 100644 camera/CameraWrapper.cpp mode change 100755 => 100644 cm.mk delete mode 100644 configs/asound.conf delete mode 100755 configs/bcmdhd.cal delete mode 100755 configs/egl.cfg delete mode 100644 configs/gps.conf delete mode 100644 configs/media_profiles.xml delete mode 100644 configs/vold.fstab delete mode 100644 configs/wpa_supplicant.conf delete mode 100755 extract-files.sh mode change 100755 => 100644 full_n7000.mk delete mode 100755 gpswrapper/Android.mk delete mode 100755 gpswrapper/MODULE_LICENSE_APACHE2 delete mode 100755 gpswrapper/gps.c delete mode 100644 init.smdk4210.rc delete mode 100644 init.smdk4210.usb.rc delete mode 100644 lpm.rc mode change 100755 => 100644 n7000.mk delete mode 100755 overlay/frameworks/base/core/res/res/drawable-nodpi/default_wallpaper.jpg delete mode 100755 overlay/frameworks/base/core/res/res/values/arrays.xml delete mode 100755 overlay/frameworks/base/core/res/res/values/config.xml delete mode 100644 overlay/frameworks/base/core/res/res/xml/power_profile.xml delete mode 100644 overlay/frameworks/base/core/res/res/xml/storage_list.xml delete mode 100755 overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml delete mode 100755 overlay/frameworks/base/packages/SystemUI/res/values/config.xml delete mode 100644 overlay/include/hardware/gps.h delete mode 100644 overlay/packages/apps/Camera/res/values/config.xml delete mode 100755 overlay/packages/apps/Phone/res/values/config.xml delete mode 100755 overlay/packages/apps/Settings/res/values-af/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-am/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-ar/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-bg/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-ca/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-cs/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-da/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-de/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-el/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-en-rGB/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-es-rUS/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-es/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-fa/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-fi/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-fr/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-hi/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-hr/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-hu/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-in/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-it/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-iw/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-ja/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-ko/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-lt/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-lv/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-ms/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-nb/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-nl/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-pl/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-pt-rPT/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-pt/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-ro/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-ru/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-sk/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-sl/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-sr/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-sv/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-sw/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-th/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-tl/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-tr/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-uk/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-vi/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-zh-rCN/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-zh-rTW/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values-zu/arrays.xml delete mode 100755 overlay/packages/apps/Settings/res/values/arrays.xml delete mode 100644 overlay/packages/apps/Settings/res/values/config.xml delete mode 100644 overlay/packages/apps/Torch/res/values/config.xml create mode 100644 proprietary-common-files.txt create mode 100755 proprietary-files.sh delete mode 100644 recovery.rc delete mode 100755 recovery/graphics.c delete mode 100755 recovery/recovery_keys.c delete mode 100755 releasetools/n7000_common.py delete mode 100755 releasetools/n7000_edify_generator.py delete mode 100755 releasetools/n7000_img_from_target_files delete mode 100755 releasetools/n7000_ota_from_target_files delete mode 100755 setup-makefiles.sh delete mode 100755 shbootimg.mk delete mode 100644 tvout/Android.mk delete mode 100644 tvout/AndroidManifest.xml delete mode 100644 tvout/proguard.flags delete mode 100644 tvout/src/android/hardware/Tvout.java delete mode 100644 tvout/src/com/teamhacksung/tvout/BootCompletedReceiver.java delete mode 100644 tvout/src/com/teamhacksung/tvout/TvOutService.java delete mode 100644 tvouthack/Android.mk delete mode 100644 tvouthack/main.cpp delete mode 100644 ueventd.smdk4210.rc delete mode 100644 usr/idc/sec_e-pen.idc delete mode 100644 usr/keylayout/Vendor_04e8_Product_7021.kl delete mode 100644 usr/keylayout/sii9234_rcp.kl diff --git a/Android.mk b/Android.mk old mode 100755 new mode 100644 index 5a189f7..ffc5974 --- a/Android.mk +++ b/Android.mk @@ -1,4 +1,5 @@ -# Copyright (C) 2010 The Android Open Source Project +# +# Copyright (C) 2012 The CyanogenMod Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,6 +12,13 @@ # 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. +# + +# WARNING: Everything listed here will be built on ALL platforms, +# including x86, the emulator, and the SDK. Modules must be uniquely +# named (liblights.tuna), and must build everywhere, or limit themselves +# to only building on ARM if they include assembly. Individual makefiles +# are responsible for having their own logic, for fine-grained control. LOCAL_PATH := $(call my-dir) diff --git a/AndroidProducts.mk b/AndroidProducts.mk old mode 100755 new mode 100644 index edf1d73..fbc118f --- a/AndroidProducts.mk +++ b/AndroidProducts.mk @@ -1,5 +1,5 @@ # -# Copyright (C) 2008 The Android Open-Source Project +# Copyright (C) 2012 The CyanogenMod Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,4 +15,4 @@ # PRODUCT_MAKEFILES := \ - $(LOCAL_DIR)/full_n7000.mk + $(LOCAL_DIR)/full_n7000.mk diff --git a/BoardConfig.mk b/BoardConfig.mk old mode 100755 new mode 100644 index 047cd99..1699ab2 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -1,5 +1,5 @@ # -# Copyright (C) 2011 The Android Open-Source Project +# Copyright (C) 2012 The CyanogenMod Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,144 +16,19 @@ # This variable is set first, so it can be overridden # by BoardConfigVendor.mk -USE_CAMERA_STUB := false -BOARD_USES_GENERIC_AUDIO := false -BOARD_USES_LIBSECRIL_STUB := true -TARGET_BOOTANIMATION_PRELOAD := true +-include device/samsung/galaxys2-common/BoardCommonConfig.mk -# CPU -TARGET_CPU_ABI := armeabi-v7a -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_BOARD_PLATFORM := exynos4 -TARGET_SOC := exynos4210 -TARGET_BOOTLOADER_BOARD_NAME := smdk4210 TARGET_BOARD_INFO_FILE := device/samsung/n7000/board-info.txt -EXYNOS4210_ENHANCEMENTS := true -ifdef EXYNOS4210_ENHANCEMENTS -COMMON_GLOBAL_CFLAGS += -DEXYNOS4210_ENHANCEMENTS -COMMON_GLOBAL_CFLAGS += -DSURFACEFLINGER_FORCE_SCREEN_RELEASE -endif - -TARGET_NO_BOOTLOADER := true -TARGET_NO_RADIOIMAGE := true - -TARGET_PROVIDES_INIT := true -TARGET_PROVIDES_INIT_TARGET_RC := true -TARGET_RECOVERY_INITRC := device/samsung/n7000/recovery.rc - -BOARD_NAND_PAGE_SIZE := 4096 -BOARD_NAND_SPARE_SIZE := 128 -BOARD_KERNEL_PAGESIZE := 4096 -BOARD_KERNEL_BASE := 0x40000000 -BOARD_KERNEL_CMDLINE := console=ttySAC2,115200 consoleblank=0 - # Inline kernel building TARGET_KERNEL_SOURCE := kernel/samsung/smdk4210 TARGET_KERNEL_CONFIG := cyanogenmod_n7000_defconfig -# Filesystem -TARGET_USERIMAGES_USE_EXT4 := true -BOARD_BOOTIMAGE_PARTITION_SIZE := 8388608 -BOARD_SYSTEMIMAGE_PARTITION_SIZE := 893386752 -BOARD_USERDATAIMAGE_PARTITION_SIZE := 2147483648 -BOARD_FLASH_BLOCK_SIZE := 4096 - -# Releasetools -TARGET_RELEASETOOL_OTA_FROM_TARGET_SCRIPT := ./device/samsung/n7000/releasetools/n7000_ota_from_target_files -TARGET_RELEASETOOL_IMG_FROM_TARGET_SCRIPT := ./device/samsung/n7000/releasetools/n7000_img_from_target_files - -# Graphics (Mali 400) -BOARD_EGL_CFG := device/samsung/n7000/configs/egl.cfg -USE_OPENGL_RENDERER := true -BOARD_USES_HWCOMPOSER := true -BOARD_USE_SECTVOUT := true -BOARD_USES_FIMGAPI := true - -# OMX -BOARD_HAVE_CODEC_SUPPORT := SAMSUNG_CODEC_SUPPORT -COMMON_GLOBAL_CFLAGS += -DSAMSUNG_CODEC_SUPPORT -BOARD_NONBLOCK_MODE_PROCESS := true -BOARD_USE_STOREMETADATA := true -BOARD_USE_METADATABUFFERTYPE := true -BOARD_USES_MFC_FPS := true - -# Audio -BOARD_USE_YAMAHAPLAYER := true -BOARD_USE_SAMSUNG_SEPARATEDSTREAM := true -BOARD_HAS_SAMSUNG_VOLUME_BUG := true - -# RIL -BOARD_MOBILEDATA_INTERFACE_NAME := "pdp0" - -# FM Radio -#BOARD_HAVE_FM_RADIO := true -#BOARD_GLOBAL_CFLAGS += -DHAVE_FM_RADIO -#BOARD_FM_DEVICE := si4709 - -# Camera -COMMON_GLOBAL_CFLAGS += -DSAMSUNG_CAMERA_HARDWARE - -# WiFi (BCM4330) -BOARD_WLAN_DEVICE := bcmdhd -BOARD_WLAN_DEVICE_REV := bcm4330_b1 -WPA_SUPPLICANT_VERSION := VER_0_8_X -BOARD_WPA_SUPPLICANT_DRIVER := NL80211 -BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_bcmdhd -BOARD_HOSTAPD_DRIVER := NL80211 -BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_bcmdhd -WIFI_DRIVER_MODULE_PATH := "/system/lib/modules/dhd.ko" -WIFI_DRIVER_FW_PATH_PARAM := "/sys/module/dhd/parameters/firmware_path" -WIFI_DRIVER_FW_PATH_STA := "/system/etc/wifi/bcm4330_sta.bin" -WIFI_DRIVER_FW_PATH_AP := "/system/etc/wifi/bcm4330_apsta.bin" -WIFI_DRIVER_FW_PATH_P2P := "/system/etc/wifi/bcm4330_p2p.bin" -WIFI_DRIVER_MODULE_NAME := "dhd" -WIFI_DRIVER_MODULE_ARG := "firmware_path=/system/etc/wifi/bcm4330_sta.bin nvram_path=/system/etc/wifi/nvram_net.txt" -WIFI_BAND := 802_11_ABG - -# Bluetooth -BOARD_HAVE_BLUETOOTH := true -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/s3c-usbgadget/gadget/lun%d/file" - -# Recovery -BOARD_CUSTOM_RECOVERY_KEYMAPPING := ../../device/samsung/n7000/recovery/recovery_keys.c -BOARD_CUSTOM_GRAPHICS := ../../../device/samsung/n7000/recovery/graphics.c -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 -BOARD_USE_CUSTOM_RECOVERY_FONT := \"roboto_15x24.h\" - -TARGET_SPECIFIC_HEADER_PATH := device/samsung/n7000/overlay/include - -# Charging mode -BOARD_CHARGING_MODE_BOOTING_LPM := /sys/class/power_supply/battery/batt_lp_charging -BOARD_BATTERY_DEVICE_NAME := "battery" -BOARD_CHARGER_RES := device/samsung/galaxys2/res/charger - -# assert, galaxynote needs to be removed later +TARGET_SPECIFIC_HEADER_PATH += device/samsung/n7000/overlay/include +EXYNOS4210_ENHANCEMENTS := true +# assert TARGET_OTA_ASSERT_DEVICE := galaxynote,n7000,GT-N7000 -# Nearly all shipped N7000 devices have defective eMMC chips (VYL00M fwrev 0x19) -# Prevent usage of ERASE commands in recovery on these boards. -# This is redundant for our recovery since the kernel has MMC_CAP_ERASE -# disabled for mshci.c, however it makes nightly ZIPs safer to flash -# from kernels that still have MMC_CAP_ERASE enabled. -BOARD_SUPPRESS_EMMC_WIPE := true - # Use the non-open-source parts, if they're present -include vendor/samsung/n7000/BoardConfigVendor.mk - -BOARD_CUSTOM_BOOTIMG_MK := device/samsung/n7000/shbootimg.mk diff --git a/CleanSpec.mk b/CleanSpec.mk old mode 100755 new mode 100644 index 71551ee..18fb296 --- a/CleanSpec.mk +++ b/CleanSpec.mk @@ -1,4 +1,4 @@ -# Copyright (C) 2007 The Android Open Source Project +# Copyright (C) 2012 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -43,7 +43,6 @@ #$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates) #$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f) #$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*) -#$(call add-clean-step, find $(PRODUCT_OUT) -name "*.apk" | xargs rm) # ************************************************ # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST diff --git a/DeviceSettings/Android.mk b/DeviceSettings/Android.mk index faaddf0..7225f50 100644 --- a/DeviceSettings/Android.mk +++ b/DeviceSettings/Android.mk @@ -7,7 +7,7 @@ LOCAL_STATIC_JAVA_LIBRARIES := android-support-v13 LOCAL_SRC_FILES := $(call all-java-files-under, src) -LOCAL_PACKAGE_NAME := GalaxyNoteSettings +LOCAL_PACKAGE_NAME := GalaxyS2Settings LOCAL_CERTIFICATE := platform include $(BUILD_PACKAGE) diff --git a/DeviceSettings/res/values-de/strings.xml b/DeviceSettings/res/values-de/strings.xml index 4d0589e..1528f8e 100644 --- a/DeviceSettings/res/values-de/strings.xml +++ b/DeviceSettings/res/values-de/strings.xml @@ -1,6 +1,6 @@ - Galaxy Note Einstellungen + Galaxy S II Einstellungen Farben Bildschirm diff --git a/DeviceSettings/res/values-es/strings.xml b/DeviceSettings/res/values-es/strings.xml index feb29e9..44d2a69 100644 --- a/DeviceSettings/res/values-es/strings.xml +++ b/DeviceSettings/res/values-es/strings.xml @@ -1,6 +1,6 @@ - Ajustes de Galaxy Note + Ajustes de Galaxy S II Radio HSPA diff --git a/DeviceSettings/res/values-fi/strings.xml b/DeviceSettings/res/values-fi/strings.xml index 081f0ef..88e234a 100644 --- a/DeviceSettings/res/values-fi/strings.xml +++ b/DeviceSettings/res/values-fi/strings.xml @@ -1,6 +1,6 @@ - Galaxy Note-asetukset + Galaxy S II-asetukset Värit Näyttö diff --git a/DeviceSettings/res/values-fr/strings.xml b/DeviceSettings/res/values-fr/strings.xml index ab81716..25dd5ad 100644 --- a/DeviceSettings/res/values-fr/strings.xml +++ b/DeviceSettings/res/values-fr/strings.xml @@ -1,6 +1,6 @@ - Paramètres Galaxy Note + Paramètres Galaxy S II Ecran Couleurs diff --git a/DeviceSettings/res/values-hu/strings.xml b/DeviceSettings/res/values-hu/strings.xml index 6a24926..d6a5f8c 100644 --- a/DeviceSettings/res/values-hu/strings.xml +++ b/DeviceSettings/res/values-hu/strings.xml @@ -1,6 +1,6 @@ - Galaxy Note Beállítások + Galaxy S II Beállítások Színek Kijelző diff --git a/DeviceSettings/res/values-nl/strings.xml b/DeviceSettings/res/values-nl/strings.xml index 587b923..bd7e50b 100644 --- a/DeviceSettings/res/values-nl/strings.xml +++ b/DeviceSettings/res/values-nl/strings.xml @@ -1,6 +1,6 @@ - Galaxy Note-instellingen + Galaxy S II-instellingen Kleuren Scherm diff --git a/DeviceSettings/res/values-pt-rBR/arrays.xml b/DeviceSettings/res/values-pt-rBR/arrays.xml index f51ffde..e98a6c6 100755 --- a/DeviceSettings/res/values-pt-rBR/arrays.xml +++ b/DeviceSettings/res/values-pt-rBR/arrays.xml @@ -1,67 +1,51 @@ - - - - Câmera (Padrão) - Vídeo - Vídeo Quente - Vídeo Frio - IU - Navegação - Galeria - VT - - - - Padrão - Dinâmico - Natural - Filme - - - - Normal - Invertido - - - - Desligado (Padrão) - Ligado - - - - 2.2 (Padrão) - 1.9 - - - - 10 - 20 - 30 - 50 (Padrão) - 70 - 100 - - - - Somente UMTS - Somente HSDPA - HSDPA + HSUPA - - - - 0% - 25% - 50% (Padrão) - 75% - 100% - - - Nunca - 1 segundo - 2 segundos - 3 segundos (padrão) - 4 segundos - 5 segundos - 6 segundos - - \ No newline at end of file + + + + Câmera (Padrão) + Vídeo + Vídeo Quente + Vídeo Frio + IU + Navegação + Galeria + VT + + + + Padrão + Dinâmico + Natural + Filme + + + + Normal + Invertido + + + + Desligado (Padrão) + Ligado + + + + 2.2 (Padrão) + 1.9 + + + + 10 + 20 + 30 + 50 (Padrão) + 70 + 100 + + + + Somente UMTS + Somente HSDPA + HSDPA + HSUPA + + + diff --git a/DeviceSettings/res/values-pt-rBR/strings.xml b/DeviceSettings/res/values-pt-rBR/strings.xml index ba94306..fad81b2 100755 --- a/DeviceSettings/res/values-pt-rBR/strings.xml +++ b/DeviceSettings/res/values-pt-rBR/strings.xml @@ -1,6 +1,6 @@ - Config. Galaxy Note + Config. Galaxy S II Cores Tela Cenário @@ -8,30 +8,28 @@ Modo Define o Modo mDNIe Modo Negativo - Ativa/Desativa cores invertidas + Ativar/Desativar cores invertidas Modo Ao Ar Livre - Ativa/Desativa modo ao ar livre + Ativar/Desativar modo ao ar livre Gama da Tela - Define valor da gama da tela + Definir valor da gama da tela Tela sensível ao toque Sensitividade do toque Define a sensitividade do toque na tela Sensores Giroscópio Usar dados de calibração - Usa os valores de calibração do giroscópio. Calibre depois de selecionar isto! + Usar os valores de calibração do giroscópio. Fazer uma calibragem depois de selecionar isto! Calibrar Coloque seu telefone em uma superfície plana, e pressione isto para calibrar Tecla sensível ao toque Ativar luz de fundo das teclas - Acende as teclas sensíveis ao toque quando a tela estiver ligada + Acender as teclas sensíveis ao toque quando a tela estiver ligada Rádio HSPA - Ativa HSDPA/HSUPA + Ativar HSDPA/HSUPA Resposta Tátil Vibração Intensidade da Vibração Define a intensidade da vibração - Tempo limite da luz de fundo - Quanto tempo a luz de fundo irá ficar acesa depois do botão ser pressionado \ No newline at end of file diff --git a/DeviceSettings/res/values/strings.xml b/DeviceSettings/res/values/strings.xml index be525f1..d3f0891 100644 --- a/DeviceSettings/res/values/strings.xml +++ b/DeviceSettings/res/values/strings.xml @@ -1,6 +1,6 @@ - Galaxy Note Settings + Galaxy S II Settings Colors Screen diff --git a/DeviceSettings/src/com/cyanogenmod/settings/device/HapticFragmentActivity.java b/DeviceSettings/src/com/cyanogenmod/settings/device/HapticFragmentActivity.java index d67c234..cd307cf 100644 --- a/DeviceSettings/src/com/cyanogenmod/settings/device/HapticFragmentActivity.java +++ b/DeviceSettings/src/com/cyanogenmod/settings/device/HapticFragmentActivity.java @@ -33,7 +33,7 @@ import com.cyanogenmod.settings.device.R; public class HapticFragmentActivity extends PreferenceFragment { private static final String PREF_ENABLED = "1"; - private static final String TAG = "GalaxyNoteParts_General"; + private static final String TAG = "GalaxyS2Parts_General"; @Override public void onCreate(Bundle savedInstanceState) { diff --git a/DeviceSettings/src/com/cyanogenmod/settings/device/RadioFragmentActivity.java b/DeviceSettings/src/com/cyanogenmod/settings/device/RadioFragmentActivity.java index d909a57..4d830b8 100644 --- a/DeviceSettings/src/com/cyanogenmod/settings/device/RadioFragmentActivity.java +++ b/DeviceSettings/src/com/cyanogenmod/settings/device/RadioFragmentActivity.java @@ -33,7 +33,7 @@ import com.cyanogenmod.settings.device.R; public class RadioFragmentActivity extends PreferenceFragment { private static final String PREF_ENABLED = "1"; - private static final String TAG = "GalaxyNoteParts_General"; + private static final String TAG = "GalaxyS2Parts_General"; @Override public void onCreate(Bundle savedInstanceState) { diff --git a/DeviceSettings/src/com/cyanogenmod/settings/device/SensorsFragmentActivity.java b/DeviceSettings/src/com/cyanogenmod/settings/device/SensorsFragmentActivity.java index bbe5f08..eaed40e 100644 --- a/DeviceSettings/src/com/cyanogenmod/settings/device/SensorsFragmentActivity.java +++ b/DeviceSettings/src/com/cyanogenmod/settings/device/SensorsFragmentActivity.java @@ -33,7 +33,7 @@ import com.cyanogenmod.settings.device.R; public class SensorsFragmentActivity extends PreferenceFragment { private static final String PREF_ENABLED = "1"; - private static final String TAG = "GalaxyNoteParts_General"; + private static final String TAG = "GalaxyS2Parts_General"; private static final String FILE_USE_GYRO_CALIB = "/sys/class/sec/gsensorcal/calibration"; private static final String FILE_TOUCHKEY_DISABLE = "/sys/class/sec/sec_touchkey/force_disable"; diff --git a/DeviceSettings/src/com/cyanogenmod/settings/device/Utils.java b/DeviceSettings/src/com/cyanogenmod/settings/device/Utils.java index 237ea0f..d0755ef 100644 --- a/DeviceSettings/src/com/cyanogenmod/settings/device/Utils.java +++ b/DeviceSettings/src/com/cyanogenmod/settings/device/Utils.java @@ -29,9 +29,9 @@ import android.content.Context; public class Utils { - private static final String TAG = "GalaxyNoteSettings_Utils"; - private static final String TAG_READ = "GalaxyNoteSettings_Utils_Read"; - private static final String TAG_WRITE = "GalaxyNoteSettings_Utils_Write"; + private static final String TAG = "GalaxyS2Settings_Utils"; + private static final String TAG_READ = "GalaxyS2Settings_Utils_Read"; + private static final String TAG_WRITE = "GalaxyS2Settings_Utils_Write"; /** * Write a string value to the specified file. diff --git a/TVOutDummy/Android.mk b/TVOutDummy/Android.mk new file mode 100644 index 0000000..1e74174 --- /dev/null +++ b/TVOutDummy/Android.mk @@ -0,0 +1,40 @@ +# Copyright (C) 2008 The Android Open Source Project +# +# 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) + +# +# libTVOut +# + +include $(CLEAR_VARS) +LOCAL_MODULE_TAGS := optional +LOCAL_PRELINK_MODULE := false + +LOCAL_SRC_FILES := \ + SecTVOutService.cpp \ + MessageQueue.cpp \ + main.cpp +# ISecTVOut.cpp \ + +LOCAL_C_INCLUDES := \ + +LOCAL_SHARED_LIBRARIES := \ + libbinder \ + libutils \ + libcutils + +LOCAL_MODULE := TVOutDummy +include $(BUILD_EXECUTABLE) + diff --git a/TVOutDummy/Barrier.h b/TVOutDummy/Barrier.h new file mode 100644 index 0000000..6f8507e --- /dev/null +++ b/TVOutDummy/Barrier.h @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2007 The Android Open Source Project + * + * 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. + */ + +#ifndef ANDROID_BARRIER_H +#define ANDROID_BARRIER_H + +#include +#include +#include + +namespace android { + +class Barrier +{ +public: + inline Barrier() : state(CLOSED) { } + inline ~Barrier() { } + void open() { + Mutex::Autolock _l(lock); + state = OPENED; + cv.broadcast(); + } + void close() { + Mutex::Autolock _l(lock); + state = CLOSED; + } + void wait() const { + Mutex::Autolock _l(lock); + while (state == CLOSED) { + cv.wait(lock); + } + } +private: + enum { OPENED, CLOSED }; + mutable Mutex lock; + mutable Condition cv; + volatile int state; +}; + +}; // namespace android + +#endif // ANDROID_BARRIER_H diff --git a/TVOutDummy/ISecTVOut.cpp b/TVOutDummy/ISecTVOut.cpp new file mode 100644 index 0000000..a013bf1 --- /dev/null +++ b/TVOutDummy/ISecTVOut.cpp @@ -0,0 +1,111 @@ +/* +** +** Copyright 2008, The Android Open Source Project +** Copyright 2010, Samsung Electronics Co. LTD +** +** 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. +*/ + +/* +** +** @author Taikyung, Yu(taikyung.yu@samsung.com) +** @date 2011-07-06 +*/ + +#include +#include +#include +#include +#include "ISecTVOut.h" + +namespace android { + + enum { + SET_HDMI_STATUS = IBinder::FIRST_CALL_TRANSACTION, + SET_HDMI_MODE, + SET_HDMI_RESOLUTION, + SET_HDMI_HDCP, + SET_HDMI_ROTATE, + SET_HDMI_HWCLAYER, + BLIT_2_HDMI + }; + + void BpSecTVOut::setHdmiCableStatus(uint32_t status) + { + Parcel data, reply; + data.writeInt32(status); + remote()->transact(SET_HDMI_STATUS, data, &reply); + } + + void BpSecTVOut::setHdmiMode(uint32_t mode) + { + Parcel data, reply; + data.writeInt32(mode); + remote()->transact(SET_HDMI_MODE, data, &reply); + } + + void BpSecTVOut::setHdmiResolution(uint32_t resolution) + { + Parcel data, reply; + data.writeInt32(resolution); + remote()->transact(SET_HDMI_RESOLUTION, data, &reply); + } + + void BpSecTVOut::setHdmiHdcp(uint32_t resolution) + { + Parcel data, reply; + data.writeInt32(resolution); + remote()->transact(SET_HDMI_HDCP, data, &reply); + } + + void BpSecTVOut::setHdmiRotate(uint32_t rotVal, uint32_t hwcLayer) + { + Parcel data, reply; + data.writeInt32(rotVal); + data.writeInt32(hwcLayer); + remote()->transact(SET_HDMI_ROTATE, data, &reply); + } + + void BpSecTVOut::setHdmiHwcLayer(uint32_t hwcLayer) + { + Parcel data, reply; + data.writeInt32(hwcLayer); + remote()->transact(SET_HDMI_HWCLAYER, data, &reply); + } + + void BpSecTVOut::blit2Hdmi(uint32_t w, uint32_t h, + uint32_t colorFormat, + uint32_t physYAddr, + uint32_t physCbAddr, + uint32_t physCrAddr, + uint32_t dstX, + uint32_t dstY, + uint32_t hdmiLayer, + uint32_t num_of_hwc_layer) + { + Parcel data, reply; + data.writeInt32(w); + data.writeInt32(h); + data.writeInt32(colorFormat); + data.writeInt32(physYAddr); + data.writeInt32(physCbAddr); + data.writeInt32(physCrAddr); + data.writeInt32(dstX); + data.writeInt32(dstY); + data.writeInt32(hdmiLayer); + data.writeInt32(num_of_hwc_layer); + remote()->transact(BLIT_2_HDMI, data, &reply); + } + + IMPLEMENT_META_INTERFACE(SecTVOut, "android.os.ISecTVOut"); +}; diff --git a/TVOutDummy/ISecTVOut.h b/TVOutDummy/ISecTVOut.h new file mode 100644 index 0000000..5506b57 --- /dev/null +++ b/TVOutDummy/ISecTVOut.h @@ -0,0 +1,74 @@ +/* +** +** Copyright 2008, The Android Open Source Project +** Copyright 2010, Samsung Electronics Co. LTD +** +** 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. +*/ + +/* +** +** @author Taikyung, Yu(taikyung.yu@samsung.com) +** @date 2011-07-06 +*/ + +#ifndef ISECTVOUT_H +#define ISECTVOUT_H +#include +#include +#include + +namespace android { + class ISecTVOut: public IInterface + { + public: + DECLARE_META_INTERFACE(SecTVOut); + virtual void setHdmiCableStatus(uint32_t status) = 0; + virtual void setHdmiMode(uint32_t mode) = 0; + virtual void setHdmiResolution(uint32_t resolution) = 0; + virtual void setHdmiHdcp(uint32_t enHdcp) = 0; + virtual void setHdmiRotate(uint32_t rotVal, uint32_t hwcLayer) = 0; + virtual void setHdmiHwcLayer(uint32_t hwcLayer) = 0; + virtual void blit2Hdmi(uint32_t w, uint32_t h, + uint32_t colorFormat, + uint32_t physYAddr, + uint32_t physCbAddr, + uint32_t physCrAddr, + uint32_t dstX, + uint32_t dstY, + uint32_t hdmiLayer, + uint32_t num_of_hwc_layer) = 0; + }; + //-------------------------------------------------------------- + class BpSecTVOut: public BpInterface + { + public: + BpSecTVOut(const sp& impl): BpInterface(impl){} + virtual void setHdmiCableStatus(uint32_t status); + virtual void setHdmiMode(uint32_t mode); + virtual void setHdmiResolution(uint32_t resolution); + virtual void setHdmiHdcp(uint32_t enHdcp); + virtual void setHdmiRotate(uint32_t rotVal, uint32_t hwcLayer); + virtual void setHdmiHwcLayer(uint32_t hwcLayer); + virtual void blit2Hdmi(uint32_t w, uint32_t h, + uint32_t colorFormat, + uint32_t physYAddr, + uint32_t physCbAddr, + uint32_t physCrAddr, + uint32_t dstX, + uint32_t dstY, + uint32_t hdmiLayer, + uint32_t num_of_hwc_layer); + }; +}; +#endif diff --git a/TVOutDummy/MessageQueue.cpp b/TVOutDummy/MessageQueue.cpp new file mode 100644 index 0000000..9441019 --- /dev/null +++ b/TVOutDummy/MessageQueue.cpp @@ -0,0 +1,197 @@ +/* + * Copyright (C) 2009 The Android Open Source Project + * + * 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. + */ + +#include +#include +#include + +#include +#include +#include +#include + +#include "MessageQueue.h" + +namespace android { + +// --------------------------------------------------------------------------- + +void MessageList::insert(const sp& node) +{ + LIST::iterator cur(mList.begin()); + LIST::iterator end(mList.end()); + while (cur != end) { + if (*node < **cur) { + mList.insert(cur, node); + return; + } + ++cur; + } + mList.insert(++end, node); +} + +void MessageList::remove(MessageList::LIST::iterator pos) +{ + mList.erase(pos); +} + +// --------------------------------------------------------------------------- + +MessageQueue::MessageQueue() + : mInvalidate(false) +{ + mInvalidateMessage = new MessageBase(INVALIDATE); +} + +MessageQueue::~MessageQueue() +{ +} + +sp MessageQueue::waitMessage(nsecs_t timeout) +{ + sp result; + + bool again; + do { + const nsecs_t timeoutTime = systemTime() + timeout; + while (true) { + Mutex::Autolock _l(mLock); + nsecs_t now = systemTime(); + nsecs_t nextEventTime = -1; + + LIST::iterator cur(mMessages.begin()); + if (cur != mMessages.end()) { + result = *cur; + } + + if (result != 0) { + if (result->when <= now) { + // there is a message to deliver + mMessages.remove(cur); + break; + } + nextEventTime = result->when; + result = 0; + } + + // see if we have an invalidate message + if (mInvalidate) { + mInvalidate = false; + mInvalidateMessage->when = now; + result = mInvalidateMessage; + break; + } + + if (timeout >= 0) { + if (timeoutTime < now) { + // we timed-out, return a NULL message + result = 0; + break; + } + if (nextEventTime > 0) { + if (nextEventTime > timeoutTime) { + nextEventTime = timeoutTime; + } + } else { + nextEventTime = timeoutTime; + } + } + + if (nextEventTime >= 0) { + //ALOGD("nextEventTime = %lld ms", nextEventTime); + if (nextEventTime > 0) { + // we're about to wait, flush the binder command buffer + IPCThreadState::self()->flushCommands(); + const nsecs_t reltime = nextEventTime - systemTime(); + if (reltime > 0) { + mCondition.waitRelative(mLock, reltime); + } + } + } else { + //ALOGD("going to wait"); + // we're about to wait, flush the binder command buffer + IPCThreadState::self()->flushCommands(); + mCondition.wait(mLock); + } + } + // here we're not holding the lock anymore + + if (result == 0) + break; + + again = result->handler(); + if (again) { + // the message has been processed. release our reference to it + // without holding the lock. + result->notify(); + result = 0; + } + + } while (again); + + return result; +} + +status_t MessageQueue::postMessage( + const sp& message, nsecs_t relTime, uint32_t flags) +{ + return queueMessage(message, relTime, flags); +} + +status_t MessageQueue::invalidate() { + Mutex::Autolock _l(mLock); + mInvalidate = true; + mCondition.signal(); + return NO_ERROR; +} + +status_t MessageQueue::queueMessage( + const sp& message, nsecs_t relTime, uint32_t flags) +{ + Mutex::Autolock _l(mLock); + message->when = systemTime() + relTime; + mMessages.insert(message); + + //ALOGD("MessageQueue::queueMessage time = %lld ms", message->when); + //dumpLocked(message); + + mCondition.signal(); + return NO_ERROR; +} + +void MessageQueue::dump(const sp& message) +{ + Mutex::Autolock _l(mLock); + dumpLocked(message); +} + +void MessageQueue::dumpLocked(const sp& message) +{ + LIST::const_iterator cur(mMessages.begin()); + LIST::const_iterator end(mMessages.end()); + int c = 0; + while (cur != end) { + const char tick = (*cur == message) ? '>' : ' '; + ALOGD("%c %d: msg{.what=%08x, when=%lld}", + tick, c, (*cur)->what, (*cur)->when); + ++cur; + c++; + } +} + +// --------------------------------------------------------------------------- + +}; // namespace android diff --git a/TVOutDummy/MessageQueue.h b/TVOutDummy/MessageQueue.h new file mode 100644 index 0000000..890f809 --- /dev/null +++ b/TVOutDummy/MessageQueue.h @@ -0,0 +1,126 @@ +/* + * Copyright (C) 2009 The Android Open Source Project + * + * 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. + */ + +#ifndef ANDROID_MESSAGE_QUEUE_H +#define ANDROID_MESSAGE_QUEUE_H + +#include +#include +#include + +#include +#include +#include + +#include "Barrier.h" + +namespace android { + +// --------------------------------------------------------------------------- + +class MessageBase; + +class MessageList +{ + List< sp > mList; + typedef List< sp > LIST; +public: + inline LIST::iterator begin() { return mList.begin(); } + inline LIST::const_iterator begin() const { return mList.begin(); } + inline LIST::iterator end() { return mList.end(); } + inline LIST::const_iterator end() const { return mList.end(); } + inline bool isEmpty() const { return mList.empty(); } + void insert(const sp& node); + void remove(LIST::iterator pos); +}; + +// ============================================================================ + +class MessageBase : + public LightRefBase +{ +public: + nsecs_t when; + uint32_t what; + int32_t arg0; + + MessageBase() : when(0), what(0), arg0(0) { } + MessageBase(uint32_t what, int32_t arg0=0) + : when(0), what(what), arg0(arg0) { } + + // return true if message has a handler + virtual bool handler() { return false; } + + // waits for the handler to be processed + void wait() const { barrier.wait(); } + + // releases all waiters. this is done automatically if + // handler returns true + void notify() const { barrier.open(); } + +protected: + virtual ~MessageBase() { } + +private: + mutable Barrier barrier; + friend class LightRefBase; +}; + +inline bool operator < (const MessageBase& lhs, const MessageBase& rhs) { + return lhs.when < rhs.when; +} + +// --------------------------------------------------------------------------- + +class MessageQueue +{ + typedef List< sp > LIST; +public: + + MessageQueue(); + ~MessageQueue(); + + // pre-defined messages + enum { + INVALIDATE = '_upd' + }; + + sp waitMessage(nsecs_t timeout = -1); + + status_t postMessage(const sp& message, + nsecs_t reltime=0, uint32_t flags = 0); + + status_t invalidate(); + + void dump(const sp& message); + +private: + status_t queueMessage(const sp& message, + nsecs_t reltime, uint32_t flags); + void dumpLocked(const sp& message); + + Mutex mLock; + Condition mCondition; + MessageList mMessages; + bool mInvalidate; + sp mInvalidateMessage; +}; + +// --------------------------------------------------------------------------- + +}; // namespace android + +#endif /* ANDROID_MESSAGE_QUEUE_H */ diff --git a/TVOutDummy/SecTVOutService.cpp b/TVOutDummy/SecTVOutService.cpp new file mode 100644 index 0000000..490f888 --- /dev/null +++ b/TVOutDummy/SecTVOutService.cpp @@ -0,0 +1,168 @@ +/* +** +** Copyright 2008, The Android Open Source Project +** Copyright 2010, Samsung Electronics Co. LTD +** +** 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. +*/ + +/* +** +** @author Taikyung, Yu(taikyung.yu@samsung.com) +** @date 2011-07-06 +*/ + +#define ALOG_TAG "SecTVOutService" + +#include +#include +#include +#include +#include +#include "SecTVOutService.h" +#include + +namespace android { +#define DEFAULT_LCD_WIDTH 800 +#define DEFAULT_LCD_HEIGHT 480 + +#define DIRECT_VIDEO_RENDERING (1) +#define DIRECT_UI_RENDERING (0) + + enum { + SET_HDMI_STATUS = IBinder::FIRST_CALL_TRANSACTION, + SET_HDMI_MODE, + SET_HDMI_RESOLUTION, + SET_HDMI_HDCP, + SET_HDMI_ROTATE, + SET_HDMI_HWCLAYER, + BLIT_2_HDMI + }; + + int SecTVOutService::instantiate() + { + ALOGD("SKURWYSYN, SecTVOutService instantiate!"); + int r = defaultServiceManager()->addService(String16( "SecTVOutService"), new SecTVOutService ()); + ALOGD("SecTVOutService r=%d", r); + + return r; + } + + SecTVOutService::SecTVOutService () { + ALOGV("SecTVOutService created"); + mHdmiCableInserted = false; + } + + void SecTVOutService::setLCDsize(void) { + } + + SecTVOutService::~SecTVOutService () { + ALOGV ("SecTVOutService destroyed"); + } + + status_t SecTVOutService::onTransact(uint32_t code, const Parcel & data, Parcel * reply, uint32_t flags) + { + switch (code) { + case SET_HDMI_STATUS: { + int status = data.readInt32(); + setHdmiStatus(status); + } break; + + case SET_HDMI_MODE: { + int mode = data.readInt32(); + setHdmiMode(mode); + } break; + + case SET_HDMI_RESOLUTION: { + int resolution = data.readInt32(); + setHdmiResolution(resolution); + } break; + + case SET_HDMI_HDCP: { + int enHdcp = data.readInt32(); + setHdmiHdcp(enHdcp); + } break; + + case SET_HDMI_ROTATE: { + int rotVal = data.readInt32(); + int hwcLayer = data.readInt32(); + setHdmiRotate(rotVal, hwcLayer); + } break; + + case SET_HDMI_HWCLAYER: { + int hwcLayer = data.readInt32(); + setHdmiHwcLayer((uint32_t)hwcLayer); + } break; + + case BLIT_2_HDMI: { + uint32_t w = data.readInt32(); + uint32_t h = data.readInt32(); + uint32_t colorFormat = data.readInt32(); + uint32_t physYAddr = data.readInt32(); + uint32_t physCbAddr = data.readInt32(); + uint32_t physCrAddr = data.readInt32(); + uint32_t dstX = data.readInt32(); + uint32_t dstY = data.readInt32(); + uint32_t hdmiLayer = data.readInt32(); + uint32_t num_of_hwc_layer = data.readInt32(); + + blit2Hdmi(w, h, colorFormat, physYAddr, physCbAddr, physCrAddr, dstX, dstY, hdmiLayer, num_of_hwc_layer); + } break; + + default : + ALOGE ( "onTransact::default"); + return BBinder::onTransact (code, data, reply, flags); + } + + return NO_ERROR; + } + + void SecTVOutService::setHdmiStatus(uint32_t status) + { + + } + + void SecTVOutService::setHdmiMode(uint32_t mode) + { + } + + void SecTVOutService::setHdmiResolution(uint32_t resolution) + { + } + + void SecTVOutService::setHdmiHdcp(uint32_t hdcp_en) + { + } + + void SecTVOutService::setHdmiRotate(uint32_t rotVal, uint32_t hwcLayer) + { + } + + void SecTVOutService::setHdmiHwcLayer(uint32_t hwcLayer) + { + } + + void SecTVOutService::blit2Hdmi(uint32_t w, uint32_t h, uint32_t colorFormat, + uint32_t pPhyYAddr, uint32_t pPhyCbAddr, uint32_t pPhyCrAddr, + uint32_t dstX, uint32_t dstY, + uint32_t hdmiMode, + uint32_t num_of_hwc_layer) + { + } + + bool SecTVOutService::hdmiCableInserted(void) + { + return mHdmiCableInserted; + } + +} diff --git a/TVOutDummy/SecTVOutService.h b/TVOutDummy/SecTVOutService.h new file mode 100644 index 0000000..11e10d5 --- /dev/null +++ b/TVOutDummy/SecTVOutService.h @@ -0,0 +1,94 @@ +/* +** +** Copyright 2008, The Android Open Source Project +** Copyright 2010, Samsung Electronics Co. LTD +** +** 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. +*/ + +/* +** +** @author Taikyung, Yu(taikyung.yu@samsung.com) +** @date 2011-07-06 +*/ + +#ifndef SECTVOUTSERVICE_H +#define SECTVOUTSERVICE_H + +#include +#include +#include +#include + +#include "ISecTVOut.h" +#include "MessageQueue.h" + +namespace android { +//#define CHECK_VIDEO_TIME +//#define CHECK_UI_TIME + + class SecTVOutService : public BBinder + { + public : + enum { + HDMI_MODE_NONE = 0, + HDMI_MODE_UI, + HDMI_MODE_VIDEO, + }; + + mutable Mutex mLock; + + class HDMIFlushThread : public Thread { + SecTVOutService *mTVOutService; + public: + HDMIFlushThread(SecTVOutService *service): + Thread(false), + mTVOutService(service) { } + virtual void onFirstRef() { + run("HDMIFlushThread", PRIORITY_URGENT_DISPLAY); + } + virtual bool threadLoop() { + return false; + } + }; + + mutable MessageQueue mHdmiEventQueue; + bool mExitHdmiFlushThread; + + SecTVOutService(); + static int instantiate (); + virtual status_t onTransact(uint32_t, const Parcel &, Parcel *, uint32_t); + virtual ~SecTVOutService (); + + virtual void setHdmiStatus(uint32_t status); + virtual void setHdmiMode(uint32_t mode); + virtual void setHdmiResolution(uint32_t resolution); + virtual void setHdmiHdcp(uint32_t enHdcp); + virtual void setHdmiRotate(uint32_t rotVal, uint32_t hwcLayer); + virtual void setHdmiHwcLayer(uint32_t hwcLayer); + virtual void blit2Hdmi(uint32_t w, uint32_t h, + uint32_t colorFormat, + uint32_t pPhyYAddr, uint32_t pPhyCbAddr, uint32_t pPhyCrAddr, + uint32_t dstX, uint32_t dstY, + uint32_t hdmiMode, uint32_t num_of_hwc_layer); + bool hdmiCableInserted(void); + void setLCDsize(void); + + private: + bool mHdmiCableInserted; + int mUILayerMode; + uint32_t mLCD_width, mLCD_height; + uint32_t mHwcLayer; + }; +}; +#endif diff --git a/TVOutDummy/main.cpp b/TVOutDummy/main.cpp new file mode 100644 index 0000000..d0a7497 --- /dev/null +++ b/TVOutDummy/main.cpp @@ -0,0 +1,11 @@ +#include "SecTVOutService.h" +#include + +int main() { + android::SecTVOutService::instantiate(); + + // let it run for some time (1 sec) + usleep(1000000); + + return 0; +} diff --git a/bdaddr_read/Android.mk b/bdaddr_read/Android.mk deleted file mode 100755 index 6769659..0000000 --- a/bdaddr_read/Android.mk +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright (C) 2010 Ricardo Cerqueira -# Copyright (C) 2011 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 := bdaddr_read.c - -LOCAL_SHARED_LIBRARIES := libcutils - -LOCAL_MODULE := bdaddr_read - -include $(BUILD_EXECUTABLE) diff --git a/bdaddr_read/bdaddr_read.c b/bdaddr_read/bdaddr_read.c deleted file mode 100755 index 5286e5f..0000000 --- a/bdaddr_read/bdaddr_read.c +++ /dev/null @@ -1,54 +0,0 @@ -#include -#include -#include -#include - -#define LOG_TAG "bdaddr" -#define SAMSUNG_BDADDR_PATH "/efs/imei/bt.txt" -#define BDADDR_PATH "/data/bdaddr" - -/* Read bluetooth MAC from SAMSUNG_BDADDR_PATH (different format), - * write it to BDADDR_PATH, and set ro.bt.bdaddr_path to BDADDR_PATH - * - * Adapted from bdaddr_read.c of thunderg - */ - -int main() { - char tmpbdaddr[23]; // bt_macaddr:xxxxxxxxxxxx - char bdaddr[18]; - int count; - int fd; - - fd = open(SAMSUNG_BDADDR_PATH, O_RDONLY); - if(fd < 0) { - fprintf(stderr, "open(%s) failed\n", SAMSUNG_BDADDR_PATH); - LOGE("Can't open %s\n", SAMSUNG_BDADDR_PATH); - return -1; - } - - count = read(fd, tmpbdaddr, sizeof(tmpbdaddr)); - if (count < 0) { - fprintf(stderr, "read(%s) failed\n", SAMSUNG_BDADDR_PATH); - LOGE("Can't read %s\n", SAMSUNG_BDADDR_PATH); - return -1; - } - else if (count != sizeof(tmpbdaddr)) { - fprintf(stderr, "read(%s) unexpected size %d\n", SAMSUNG_BDADDR_PATH, count); - LOGE("Error reading %s (unexpected size %d)\n", SAMSUNG_BDADDR_PATH, count); - return -1; - } - - count = sprintf(bdaddr, "%2.2s:%2.2s:%2.2s:%2.2s:%2.2s:%2.2s\0", - tmpbdaddr+11,tmpbdaddr+13,tmpbdaddr+15,tmpbdaddr+17,tmpbdaddr+19,tmpbdaddr+21); - - fd = open(BDADDR_PATH, O_WRONLY|O_CREAT|O_TRUNC, 00600|00060|00006); - if (fd < 0) { - fprintf(stderr, "open(%s) failed\n", BDADDR_PATH); - LOGE("Can't open %s\n", BDADDR_PATH); - return -2; - } - write(fd, bdaddr, 18); - close(fd); - property_set("ro.bt.bdaddr_path", BDADDR_PATH); - return 0; -} \ No newline at end of file diff --git a/board-info.txt b/board-info.txt old mode 100755 new mode 100644 index 1225363..51f5961 --- a/board-info.txt +++ b/board-info.txt @@ -1,2 +1,3 @@ -require board=c1 -require version-bootloader=N7000XXKK5 +require board=smdk4210 +require version-bootloader=I9100XXLPH + diff --git a/camera/Android.mk b/camera/Android.mk deleted file mode 100644 index 46cce24..0000000 --- a/camera/Android.mk +++ /dev/null @@ -1,15 +0,0 @@ -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := \ - CameraWrapper.cpp - -LOCAL_SHARED_LIBRARIES := \ - libhardware liblog libcamera_client libutils - -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 deleted file mode 100644 index 9154216..0000000 --- a/camera/CameraWrapper.cpp +++ /dev/null @@ -1,598 +0,0 @@ -/* - * Copyright (C) 2012, The CyanogenMod Project - * - * 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_PARAMETERS -*/ -#define LOG_TAG "CameraWrapper" -#include - -#include -#include -#include -#include -#include -#include - -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: "Teamhacksung ", - 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; - int id; - 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__); \ -}) - -#define CAMERA_ID(device) (((wrapper_camera_device_t *)(device))->id) - -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; -} - -const static char * video_preview_sizes[] = { - "1920x1080,1280x720,640x480", - "640x480,352x288,320x240,176x144" -}; - -const static char * iso_values[] = {"auto,ISO50,ISO100,ISO200,ISO400,ISO800","auto"}; - -static char * camera_fixup_getparams(int id, const char * settings) -{ - android::CameraParameters params; - params.unflatten(android::String8(settings)); - - params.remove(android::CameraParameters::KEY_SUPPORTED_VIDEO_SIZES); - - if(params.get("cam_mode")) - { - params.set(android::CameraParameters::KEY_SUPPORTED_PREVIEW_SIZES, video_preview_sizes[id]); - const char* videoSize = params.get(android::CameraParameters::KEY_VIDEO_SIZE); - params.set(android::CameraParameters::KEY_PREVIEW_SIZE, videoSize); - } - - params.set(android::CameraParameters::KEY_SUPPORTED_ISO_MODES, iso_values[id]); - - android::String8 strParams = params.flatten(); - char *ret = strdup(strParams.string()); - - LOGD("%s: get parameters fixed up", __FUNCTION__); - return ret; -} - -char * camera_fixup_setparams(int id, const char * settings) -{ - android::CameraParameters params; - params.unflatten(android::String8(settings)); - - if(params.get("cam_mode")) - { - const char* previewSize = params.get(android::CameraParameters::KEY_PREVIEW_SIZE); - params.set(android::CameraParameters::KEY_PREFERRED_PREVIEW_SIZE_FOR_VIDEO, previewSize); - params.set(android::CameraParameters::KEY_SUPPORTED_VIDEO_SIZES, video_preview_sizes[id]); - } - - if(params.get("iso")) { - const char* isoMode = params.get(android::CameraParameters::KEY_ISO_MODE); - if(strcmp(isoMode, "ISO50") == 0) - params.set(android::CameraParameters::KEY_ISO_MODE, "50"); - else if(strcmp(isoMode, "ISO100") == 0) - params.set(android::CameraParameters::KEY_ISO_MODE, "100"); - else if(strcmp(isoMode, "ISO200") == 0) - params.set(android::CameraParameters::KEY_ISO_MODE, "200"); - else if(strcmp(isoMode, "ISO400") == 0) - params.set(android::CameraParameters::KEY_ISO_MODE, "400"); - else if(strcmp(isoMode, "ISO800") == 0) - params.set(android::CameraParameters::KEY_ISO_MODE, "800"); - } - - android::String8 strParams = params.flatten(); - char *ret = strdup(strParams.string()); - - LOGD("%s: set parameters fixed up", __FUNCTION__); - return ret; -} - -/******************************************************************* - * 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; - - char *tmp = NULL; - tmp = camera_fixup_setparams(CAMERA_ID(device), params); - -#ifdef LOG_PARAMETERS - __android_log_write(ANDROID_LOG_VERBOSE, LOG_TAG, tmp); -#endif - - int ret = VENDOR_CALL(device, set_parameters, tmp); - return ret; -} - -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; - - char* params = VENDOR_CALL(device, get_parameters); - -#ifdef LOG_PARAMETERS - __android_log_write(ANDROID_LOG_VERBOSE, LOG_TAG, params); -#endif - - char * tmp = camera_fixup_getparams(CAMERA_ID(device), params); - VENDOR_CALL(device, put_parameters, params); - params = tmp; - -#ifdef LOG_PARAMETERS - __android_log_write(ANDROID_LOG_VERBOSE, LOG_TAG, params); -#endif - - return params; -} - -static void camera_put_parameters(struct camera_device *device, char *params) -{ - LOGV("%s", __FUNCTION__); - LOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); - - if(params) - free(params); -} - -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)); - camera_device->id = cameraid; - - 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.dependencies b/cm.dependencies index 5acfbeb..bf2e154 100644 --- a/cm.dependencies +++ b/cm.dependencies @@ -1,14 +1,14 @@ [ { + "repository": "android_device_samsung_galaxys2-common", + "target_path": "device/samsung/galaxys2-common" + }, + { "repository": "android_kernel_samsung_smdk4210", "target_path": "kernel/samsung/smdk4210" }, { "repository": "android_packages_apps_SamsungServiceMode", "target_path": "packages/apps/SamsungServiceMode" - }, - { - "repository": "android_device_samsung_galaxys2", - "target_path": "device/samsung/galaxys2" } ] diff --git a/cm.mk b/cm.mk old mode 100755 new mode 100644 index e04deea..7b34910 --- a/cm.mk +++ b/cm.mk @@ -1,21 +1,36 @@ -## Specify phone tech before including full_phone -$(call inherit-product, vendor/cm/config/gsm.mk) - -# Release name -PRODUCT_RELEASE_NAME := N7000 - -# Inherit some common CM stuff. -$(call inherit-product, vendor/cm/config/common_full_phone.mk) - -# Inherit device configuration -$(call inherit-product, device/samsung/n7000/full_n7000.mk) - -## Device identifier. This must come after all inclusions -PRODUCT_DEVICE := n7000 -PRODUCT_NAME := cm_n7000 -PRODUCT_BRAND := Samsung -PRODUCT_MODEL := GT-N7000 - -#Set build fingerprint / ID / Prduct Name ect. -PRODUCT_BUILD_PROP_OVERRIDES += PRODUCT_NAME=GT-N7000 TARGET_DEVICE=GT-N7000 BUILD_FINGERPRINT=samsung/GT-N7000/GT-N7000:4.0.3/IML74K/ZCLP6:user/release-keys PRIVATE_BUILD_DESC="GT-N7000-user 4.0.3 IML74K ZCLP6 release-keys" - +# +# Copyright (C) 2012 The CyanogenMod Project +# +# 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. +# + +# Specify phone tech before including full_phone +$(call inherit-product, vendor/cm/config/gsm.mk) + +# Release name +PRODUCT_RELEASE_NAME := GT-N7000 + +# Inherit some common CM stuff. +$(call inherit-product, vendor/cm/config/common_full_phone.mk) + +# Inherit device configuration +$(call inherit-product, device/samsung/n7000/full_n7000.mk) + +# Device identifier. This must come after all inclusions +PRODUCT_DEVICE := n7000 +PRODUCT_NAME := cm_n7000 +PRODUCT_BRAND := Samsung +PRODUCT_MODEL := GT-N7000 + +# Set build fingerprint / ID / Prduct Name ect. +PRODUCT_BUILD_PROP_OVERRIDES += PRODUCT_NAME=GT-N7000 TARGET_DEVICE=GT-N7000 BUILD_FINGERPRINT=samsung/GT-I9100/GT-I9100:4.0.3/IML74K/XXLPQ:user/release-keys PRIVATE_BUILD_DESC="GT-I9100-user 4.0.3 IML74K XXLPQ release-keys" diff --git a/configs/asound.conf b/configs/asound.conf deleted file mode 100644 index 6144596..0000000 --- a/configs/asound.conf +++ /dev/null @@ -1,61 +0,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 - } -} - -# ---------------------------------------- -# Mixer Interface -# - -ctl.mc1n2 { - type hw - card 0 -} - -# ---------------------------------------- -# Hardware Dependant Interface -# - -hwdep.mc1n2 { - type hw - card 0 -} diff --git a/configs/bcmdhd.cal b/configs/bcmdhd.cal deleted file mode 100755 index 105088f..0000000 --- a/configs/bcmdhd.cal +++ /dev/null @@ -1,118 +0,0 @@ -manfid=0x2d0 -prodid=0x0532 -vendid=0x14e4 -devid=0x4360 -boardtype=0x0532 -boardrev=0x20 -boardflags=0x10080201 - -nocrc=1 -xtalfreq=37400 -xtalmode=0x20,0x4,0 -boardnum=22 -macaddr=00:90:4c:c5:12:38 -ag0=252 -ag1=252 -aa2g=1 -aa5g=1 -ccode=ALL - -#for BT-coexistence -btc_params80=0 -btc_params6=10 -btc_params8=10000 - -sd_gpout=0 -# sd_oobonly=1 -muxenab=0x10 - -# 2G PA param_B42R 110927 -pa0b0=0x12E4 -pa0b1=0xFE09 -pa0b2=0xFF9A -#pa0itssit=62 -rssismf2g=0xa -rssismc2g=0x3 -rssisav2g=0x7 - -# rssi params for 5GHz B42R_110803 -#rssismf5g=0x4 -rssismf5g=0xa -rssismc5g=0x7 -rssisav5g=0x1 -#PA parameters for lower band -pa1lob0=0x144F -pa1lob1=0xFD6B -pa1lob2=0xFF3B -#PA parameters for midband -pa1b0=0x139C -pa1b1=0xFD87 -pa1b2=0xFF4F -#PA parameters for high band -pa1hib0=0x12CA -pa1hib1=0xFD9A -pa1hib2=0xFF4E - -# 2G PA offset -maxp2ga0=64 -sromrev=3 -cckpo=0 -ofdm2gpo=0x66666666 -mcs2gpo0=0xaaaa -mcs2gpo1=0xaaaa - -# 5G PA offset -maxp5ga0=66 -maxp5gla0=66 -maxp5gha0=66 -ofdm5gpo=0x22222222 -ofdm5glpo=0x11111111 -ofdm5ghpo=0x22222222 -mcs5gpo0=0x6666 -mcs5gpo1=0x6666 -mcs5glpo0=0x5555 -mcs5glpo1=0x5555 -mcs5ghpo0=0x6666 -mcs5ghpo1=0x6666 - -cckPwrOffset=4 -cckdigfilttype=22 -ofdmdigfilttype=2 -extpagain5g=2 -#wl0id=0x431b - -# For 2GHz Tx EVM/SM -rfreg033=0x19 -rfreg033_cck=0x1d -pacalidx2g=65 -dacrate2g=160 -txalpfbyp2g=1 -bphyscale=17 - -# 5GHz LOFT and IQ CAL -txgaintbl5g=1 -txiqlopapu5g=1 -txiqlopag5g=0x10 -iqlocalidx5g=24 - -# 5GHz Noise CAL parameter -noise_cal_po_5g=5 -noise_cal_enable_5g=0 - -# 2GHz RxPER at low rates -noise_cal_ref_2g=56 -noise_cal_po_bias_2g=-4 -noise_cal_enable_2g=1 - -# Max input level on a-band -triso5g=9 - -# Tx power control, especially temp. -tssitime=1 - -#fc+1.7GHz Spur Elimination -loidacmode5g=1 - -swctrlmap_2g=0x84048404, 0x82028202, 0x84048404, 0x010202, 0x1ff -swctrlmap_5g=0xC040C040, 0xB030A020, 0xA020C040, 0x010A02, 0x2F8 - diff --git a/configs/egl.cfg b/configs/egl.cfg deleted file mode 100755 index 4515dfd..0000000 --- a/configs/egl.cfg +++ /dev/null @@ -1 +0,0 @@ -0 1 mali diff --git a/configs/gps.conf b/configs/gps.conf deleted file mode 100644 index 5f60d23..0000000 --- a/configs/gps.conf +++ /dev/null @@ -1,6 +0,0 @@ -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/media_profiles.xml b/configs/media_profiles.xml deleted file mode 100644 index d627199..0000000 --- a/configs/media_profiles.xml +++ /dev/null @@ -1,497 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/configs/vold.fstab b/configs/vold.fstab deleted file mode 100644 index 13658ce..0000000 --- a/configs/vold.fstab +++ /dev/null @@ -1,22 +0,0 @@ -## Vold 2.0 Generic fstab -## - San Mehat (san@android.com) -## - -####################### -## Regular device mount -## -## Format: dev_mount