48 Commits

Author SHA1 Message Date
24ef3f1dec click: add goo.im support 2012-05-29 09:24:38 +01:00
Arne Coucheron
ea3b4a53bd click: Update prebuilt kernel and module
Change-Id: I1f6e2adbb03fa4891d3f52e9bd06e8d19cb3fbdc
2012-03-18 16:57:13 +01:00
Arne Coucheron
cd2ba44217 click: Disable scrolling cache
Change-Id: If70d547192d1b767b4be648ff4a42db7dfc63c5c
2012-02-18 21:12:34 +01:00
Arne Coucheron
6077c52b1d click: Enable alpha transformation
Helps eliminate glitches in the new transitions.

Change-Id: I1c97e3d73a38a4653a544f3b8246293e26709e40
2012-02-01 09:37:52 +01:00
Arne Coucheron
eff2a8044b click: Update prebuilt kernel and module
Change-Id: Ib866fbf82548c39ed4c685081cd622945dcbd383
2012-02-01 07:37:27 +01:00
Arne Coucheron
1fed334475 click: Fix rotation derpage
Change-Id: I03c3f3c4d485e18d87baf282cdea9874dd6d840a
2012-01-30 08:32:39 +01:00
Arne Coucheron
8659ff93f4 click: Add TARGET_OTA_ASSERT_DEVICE
Change-Id: I91ad3cf98fcceec5f1d03c956b01ab65b68f8099
2011-12-21 07:49:56 +01:00
Arne Coucheron
b848627dcd click: Update prebuilt kernel
Interactive governor updates.

Change-Id: I6bb48740537cfac1d98a45c512aa26d511612e84
2011-12-21 07:38:04 +01:00
Emilio López
ff9d9e3fa4 click: fix camera failure after zoom usage
libcamera was changing the image resolution without updating
mRawWidth and mRawHeight, and this caused initRaw to take pictures
with the previous resolution. If that resolution was unsuitable
because of zoom level, it would cause the camera to fail until
it was restarted.

This patch updates both variables to reflect the modified
resolution so initRaw always takes pictures with the correct
width and height.

Change-Id: I33e8445a65ac667a030b35b103f86be46381abc4
2011-11-28 09:04:38 +01:00
Arne Coucheron
3219d207b4 click: Update prebuilt kernel and module
Interactive governor updates

Change-Id: I13c67ffa28056e82cf5a5de4e97bc15c739ac960
2011-11-18 06:15:18 +01:00
Arne Coucheron
eb2454df06 click: Update prebuilt kernel and module
Change-Id: I1d4dcef2d37951ba9dee1c26ab18cd1d0386ba78
2011-11-12 08:33:49 +01:00
Arne Coucheron
700c3e8f95 click: Revert ACC minSampleRate to 8000
Change-Id: I16cdbc7e9a336d49f9e404414c83ceef9e80dd7e
2011-11-08 07:22:21 +01:00
Arne Coucheron
d69b23ad0b click: Increase video recording resolution
Also raise minSampleRate to 16000 for AAC audio, to bypass a recent
bug causing audio to only be recorded in 8000Hz.

Change-Id: I9100a751e7dafe6bbe2df789a08d2b85b3ae3c72
2011-11-05 20:10:36 +01:00
Arne Coucheron
33c01282bb click: Update prebuilt kernel
Change-Id: Ied564d2c8e3c1dd324e54ffbaceb87fd14c74380
2011-11-01 07:53:57 +01:00
Arne Coucheron
7f0d83784e click: Some small cleanups in a couple of overlay configs
Change-Id: Id48487630a491e00ae956df925bfad097ce40af9
2011-10-23 08:01:14 +02:00
Arne Coucheron
3465f1b281 click: Route muting through AudioManager and cleanup phone config
Change-Id: I80ad4bc66019335a7aeca63933a693e491d1c1be
2011-10-23 07:57:24 +02:00
Arne Coucheron
f928f2aeed Merge "click: media_profile: Save AAC stream as stereo, and increase video bitrate" into gingerbread 2011-10-22 11:34:51 +04:00
Arne Coucheron
6ce104a582 click: media_profile: Save AAC stream as stereo, and increase video bitrate
Solves an issue where certain media players only play first few
seconds of the audio, due to not properly handling single channel AAC audio.

Videos taken on the phone, that are uploaded to YouTube also suffers from this issue.

Change-Id: Ia9115a6d2cec419cc4d1d55ba876377dabcb91e3
2011-10-22 09:14:08 +02:00
Arne Coucheron
efe5668ff3 click: Allow screen to fade off when electron beam animation disabled
Due to condition change made by http://review.cyanogenmod.com/8494
screen won't fade off when electron beam animation disabled with
overlay config_animateScreenLights set to false.

This removes the overlay config to use its default value.

Change-Id: I116250412591d3eec95180e1576887104e522618
2011-10-22 02:41:24 +02:00
Arne Coucheron
4ec7936151 click: Updated kernel and janky backbuffer fix
Change-Id: I29ce6d9d228deafaf242bd53ab034a2a446256bb
2011-10-21 08:10:15 +02:00
Arne Coucheron
89069e2747 click: override dirty_ratio on UMS
Change-Id: I2386f867301abc3648763ad445dea363ee7d8116
2011-10-15 02:26:31 +02:00
Arne Coucheron
5954c1463d click: Adjust center ring offset in lockscreen
Change-Id: I4ecbaf7fe25f9bd73006cceb83ca992764af5a71
2011-10-13 07:32:48 +02:00
KalimochoAz
a00f55ce5f Enable again wlan_loader
Since is needed to load wifi stuff, this is again in build

Change-Id: I43ceb4b58928b22b62a6943021be58bb35a30532
2011-10-10 18:19:16 +02:00
Arne Coucheron
81ea69905f click: Update prebuilt kernel
+ some tweaks taken from newer HTC roms.

Change-Id: I15af462cbcf75784d054b1315621907758eca340
2011-10-08 19:53:50 +02:00
Arne Coucheron
9ae39edf64 click: Clean out some experimental stuff
Change-Id: Ie9964f365e50e9b9251b6f2e81e6684000152c51
2011-09-30 06:56:07 +02:00
Arne Coucheron
e78df88631 click: Update prebuilt kernel and module
Change-Id: I0554c331633e9b69b543229288c917dfca75c8bc
2011-09-30 06:41:20 +02:00
Arne Coucheron
f28cefac05 click: Revisit ring style margins
Move it up a bit, and adjust middle ring so it doesn't cover music controls.

Change-Id: If0aa7f9f2a326fb04cbc4cd2a36f30d52a1e6f15
2011-09-29 06:33:07 +02:00
Arne Coucheron
da7221e3c7 click: Adjust position of new ring lockscreen style
Change-Id: I6b5dc9dc2b0b98902a73879d6b4cf490172fb0f1
2011-09-26 09:47:54 +02:00
Arne Coucheron
0ad1dd73a9 click: Update prebuilt kernel
Also remove custom sysctl.conf

Change-Id: Ibd4e432aeeff2937552cfe9b853d036c47b1b421
2011-09-22 06:59:11 +02:00
Arne Coucheron
559105613a click: Remove BOARD_NO_RGBX_8888
We're not using any userspace GL libraries that require this workaround.

Change-Id: I5e167f7f8bd1b7ec3ae9fc78b56a5a54181766d2
2011-09-21 09:35:48 +02:00
Steve Kondik
285d47e08e Merge "Remove mixable dual LED code, it can be treated as a special case of the dual LED code." into gingerbread 2011-09-17 12:00:57 +04:00
Arne Coucheron
372e93ebd1 click: Update prebuilt kernel
Fixed an issue with app2sd. Had forgot to enable a kernel setting,
which made it impossible to move apps to sd card. Sorry about that.

Change-Id: Iafed4abc36ae9cd0af2a515613dcb386b164ace4
2011-09-14 02:39:39 +02:00
Arne Coucheron
78bb282387 click: Update prebuilt kernel and module
Fix suspend issue with bluetooth and wifi

Change-Id: Ib08557008ad82590c8e3c4a26b9437de8a7594f5
2011-09-13 01:55:24 +02:00
Arne Coucheron
b0efe07ebe click: Update prebuilt kernel and module
Change-Id: Ida78dc297b3f3af38a8b676defef740f9bcd61c1
2011-09-04 19:58:59 +02:00
Arne Coucheron
c796b6b5d3 Remove mixable dual LED code, it can be treated as a special case of the dual LED code.
Change-Id: I7f5e08ba10f2b798693a042962748b0d549cd67b
2011-09-02 01:30:33 +02:00
KalimochoAz
40ff764698 Added 2 new permissions
- PhoneOnOffFlag
- ttyHS0

Change-Id: I03a48535b4832083f3ca3bc49893d34d2cff0ed8
2011-08-15 09:52:11 +02:00
KalimochoAz
09fea52be9 Upgrade kernel to improve some little bug playing mp3
Change-Id: Icd9aa662cf68812e99df0746d7701851ab74c8bc
2011-08-14 08:39:02 +02:00
Arne Coucheron
b299d6ad6c click: Add upstream ifaces for tethering
Change-Id: I04d1d8294a221c03a6f0a82392a565e538b6bd44
2011-08-13 20:02:58 +02:00
Diogo Ferreira
bfe1d61f54 click: Fix build breakage for other devices
Change-Id: I29f5508455a5b177cfc3c260ca248d075ccd2baf
2011-08-13 00:01:13 +01:00
KalimochoAz
0290e2e643 Kernel upgrade to 2.6.35
Based on the new kernel started by Arne Cucheron ( ARCO ) We are moving
from very old HTC kernel 2.6.29 to new 2.6.35 kernel. All those files need
to be changed for this change

Change-Id: Ieb8b01c8f5e323480a95db4f0faf0ae3a6c1d746
2011-08-12 00:14:16 +02:00
KalimochoAz
d19a116748 Implement better zoom management using Turl technique for motorola.
Now zoom works without the need to change manualy the picture resolution.
Added more stability to the camera and more speed

Change-Id: I8ed79708391c976408ad13cfd3a4c601947d5e7b
2011-07-14 21:37:22 +02:00
KalimochoAz
a8743c5231 Changed default screen calibration point to revise some devices issues
Change-Id: I51eb14574502fd55ce59098a3cc8688b5c8840f5
2011-06-30 08:28:01 +02:00
KalimochoAz
9c8096a187 Change Encoder vidio format for high resolution
Change-Id: I05b85c0b9baf1a13f20e4478fb771d21b1d9b5bb
2011-06-26 07:53:01 +02:00
KalimochoAz
9aba24261c Add possibility to enable CRT animation on screen off
Change-Id: I74926ddef1dcb6424798e567e5fcb823747384bf
2011-06-18 22:23:45 +02:00
KalimochoAz
a1afa35a73 Enable FM Radio seek on Click ( Tattoo )
To be implemented just after implements http://review.cyanogenmod.com/#change,6102

Change-Id: I07285a018c99039e6fa3d80116c4cc4a9ff688e2
2011-06-16 09:27:08 +02:00
KalimochoAz
be772dfa0d Speed up camera on photo recording
- Speed up camera recording using Emilio technical. ( create tmpfs system )
- Modified geolocation recording in jpg file.

Change-Id: Ia42fc0ee3c6e44c5c8915f333860b9a7611513ec
2011-06-12 08:03:25 +02:00
KalimochoAz
c5568a5383 Kernel and wifi updates for click stability
Change-Id: I96bcd04052e0bdceeded8dbce85dc8b52100817e
2011-05-30 09:48:11 +02:00
KalimochoAz
aaa1df3125 New kenel USB updates plus pptp and checked for 7.1
Change-Id: I209e71ca4c69cba7545a5c82eb077b164dbc96b4
2011-04-30 14:46:58 +02:00
61 changed files with 736 additions and 795 deletions

View File

@@ -13,11 +13,14 @@
# limitations under the License.
LOCAL_PATH := $(my-dir)
subdir_makefiles := \
ifeq ($(TARGET_DEVICE),click)
subdir_makefiles := \
$(LOCAL_PATH)/libcopybit/Android.mk \
$(LOCAL_PATH)/libgralloc/Android.mk \
$(LOCAL_PATH)/liblights/Android.mk \
$(LOCAL_PATH)/libcamera/Android.mk \
$(LOCAL_PATH)/libsensors/Android.mk
include $(subdir_makefiles)
include $(subdir_makefiles)
endif

View File

@@ -21,13 +21,14 @@ TARGET_CPU_ABI := armeabi-v6j
TARGET_CPU_ABI2 := armeabi
TARGET_BOOTLOADER_BOARD_NAME := bahamas
TARGET_OTA_ASSERT_DEVICE := click,tattoo
TARGET_NO_BOOTLOADER := true
TARGET_NO_RADIOIMAGE := true
BOARD_LDPI_RECOVERY := true
BOARD_HAS_JANKY_BACKBUFFER := true
TARGET_PREBUILT_RECOVERY_KERNEL := device/htc/click/custom/recovery_kernel
TARGET_PREBUILT_KERNEL := device/htc/click/custom/kernel
# Wifi related defines
@@ -35,23 +36,19 @@ BOARD_WPA_SUPPLICANT_DRIVER := CUSTOM
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := libWifiApi
BOARD_WLAN_DEVICE := wl1251
BOARD_WLAN_TI_STA_DK_ROOT := system/wlan/ti/sta_dk_4_0_4_32
WIFI_DRIVER_MODULE_PATH := /system/lib/modules/wlan.ko
WIFI_DRIVER_MODULE_PATH := "/system/lib/modules/wlan.ko"
WIFI_DRIVER_MODULE_ARG := ""
WIFI_DRIVER_MODULE_NAME := wlan
WIFI_FIRMWARE_LOADER := wlan_loader
WIFI_DRIVER_MODULE_NAME := "wlan"
WIFI_FIRMWARE_LOADER := "wlan_loader"
TARGET_PROVIDES_INIT_RC := false
BOARD_KERNEL_CMDLINE := no_console_suspend=1 console=null
BOARD_KERNEL_BASE := 0x02E00000
BOARD_KERNEL_PAGESIZE := 2048
BOARD_USES_GENERIC_AUDIO := false
# Use HTC USB Function Switch to enable tethering via USB
# BOARD_USE_HTC_USB_FUNCTION_SWITCH := true
BOARD_USE_USB_MASS_STORAGE_SWITCH := true
BOARD_HAVE_BLUETOOTH := true
BOARD_AVOID_DRAW_TEXTURE_EXTENSION := true
@@ -74,15 +71,17 @@ BOARD_EGL_CFG := device/htc/click/custom/egl.cfg
BOARD_HAVE_FM_RADIO := true
BOARD_GLOBAL_CFLAGS += -DHAVE_FM_RADIO
BOARD_USES_QCOM_HARDWARE := true
BOARD_USES_QCOM_GPS := true
BOARD_USES_QCOM_LIBS := true
BOARD_USES_GPSSHIM := true
BOARD_GPS_LIBRARIES := libgps librpc
BOARD_USE_NEW_LIBRIL_HTC := true
TARGET_LIBAGL_USE_GRALLOC_COPYBITS := true
BOARD_NO_RGBX_8888 := true
TARGET_ELECTRONBEAM_FRAMES := 10
# WITH_DEXPREOPT := true
JS_ENGINE := v8
@@ -105,4 +104,4 @@ BOARD_USERDATAIMAGE_PARTITION_SIZE := 0x0a520000
BOARD_FLASH_BLOCK_SIZE := 131072
# Add LUNFILE configuration to the system
BOARD_UMS_LUNFILE := "/sys/devices/platform/msm_hsusb/gadget/lun0/file"
# BOARD_UMS_LUNFILE := "/sys/devices/platform/usb_mass_storage/lun0/file"

View File

@@ -1,29 +1,3 @@
# Kernel Modules TO BE COPIED
PRODUCT_COPY_FILES += \
device/htc/click/custom/modules/2.6.29.6-Kalim/modules.alias.bin:system/lib/modules/2.6.29.6-Kalim/modules.alias.bin \
device/htc/click/custom/modules/2.6.29.6-Kalim/modules.symbols.bin:system/lib/modules/2.6.29.6-Kalim/modules.symbols.bin \
device/htc/click/custom/modules/2.6.29.6-Kalim/modules.dep.bin:system/lib/modules/2.6.29.6-Kalim/modules.dep.bin \
device/htc/click/custom/modules/2.6.29.6-Kalim/kernel/fs/nls/nls_utf8.ko:system/lib/modules/2.6.29.6-Kalim/kernel/fs/nls/nls_utf8.ko \
device/htc/click/custom/modules/2.6.29.6-Kalim/kernel/fs/jbd2/jbd2.ko:system/lib/modules/2.6.29.6-Kalim/kernel/fs/jbd2/jbd2.ko \
device/htc/click/custom/modules/2.6.29.6-Kalim/kernel/fs/aufs/aufs.ko:system/lib/modules/2.6.29.6-Kalim/kernel/fs/aufs/aufs.ko \
device/htc/click/custom/modules/2.6.29.6-Kalim/kernel/fs/cifs/cifs.ko:system/lib/modules/2.6.29.6-Kalim/kernel/fs/cifs/cifs.ko \
device/htc/click/custom/modules/2.6.29.6-Kalim/kernel/fs/ext4/ext4.ko:system/lib/modules/2.6.29.6-Kalim/kernel/fs/ext4/ext4.ko \
device/htc/click/custom/modules/2.6.29.6-Kalim/kernel/drivers/hid/hid-dummy.ko:system/lib/modules/2.6.29.6-Kalim/kernel/drivers/hid/hid-dummy.ko \
device/htc/click/custom/modules/2.6.29.6-Kalim/kernel/drivers/net/wireless/tiwlan1251/wlan.ko:system/lib/modules/2.6.29.6-Kalim/kernel/drivers/net/wireless/tiwlan1251/wlan.ko \
device/htc/click/custom/modules/2.6.29.6-Kalim/kernel/drivers/staging/ramzswap/ramzswap.ko:system/lib/modules/2.6.29.6-Kalim/kernel/drivers/staging/ramzswap/ramzswap.ko \
device/htc/click/custom/modules/2.6.29.6-Kalim/kernel/net/netfilter/xt_TCPMSS.ko:system/lib/modules/2.6.29.6-Kalim/kernel/net/netfilter/xt_TCPMSS.ko \
device/htc/click/custom/modules/2.6.29.6-Kalim/modules.ccwmap:system/lib/modules/2.6.29.6-Kalim/modules.ccwmap \
device/htc/click/custom/modules/2.6.29.6-Kalim/modules.seriomap:system/lib/modules/2.6.29.6-Kalim/modules.seriomap \
device/htc/click/custom/modules/2.6.29.6-Kalim/modules.pcimap:system/lib/modules/2.6.29.6-Kalim/modules.pcimap \
device/htc/click/custom/modules/2.6.29.6-Kalim/modules.ofmap:system/lib/modules/2.6.29.6-Kalim/modules.ofmap \
device/htc/click/custom/modules/2.6.29.6-Kalim/modules.isapnpmap:system/lib/modules/2.6.29.6-Kalim/modules.isapnpmap \
device/htc/click/custom/modules/2.6.29.6-Kalim/modules.dep:system/lib/modules/2.6.29.6-Kalim/modules.dep \
device/htc/click/custom/modules/2.6.29.6-Kalim/modules.inputmap:system/lib/modules/2.6.29.6-Kalim/modules.inputmap \
device/htc/click/custom/modules/2.6.29.6-Kalim/modules.softdep:system/lib/modules/2.6.29.6-Kalim/modules.softdep \
device/htc/click/custom/modules/2.6.29.6-Kalim/modules.ieee1394map:system/lib/modules/2.6.29.6-Kalim/modules.ieee1394map \
device/htc/click/custom/modules/2.6.29.6-Kalim/modules.alias:system/lib/modules/2.6.29.6-Kalim/modules.alias \
device/htc/click/custom/modules/2.6.29.6-Kalim/modules.symbols:system/lib/modules/2.6.29.6-Kalim/modules.symbols \
device/htc/click/custom/modules/2.6.29.6-Kalim/modules.usbmap:system/lib/modules/2.6.29.6-Kalim/modules.usbmap \
device/htc/click/custom/modules/2.6.29.6-Kalim/modules.devname:system/lib/modules/2.6.29.6-Kalim/modules.devname \
device/htc/click/custom/modules/2.6.29.6-Kalim/modules.order:system/lib/modules/2.6.29.6-Kalim/modules.order \
device/htc/click/custom/modules/wlan.ko:system/lib/modules/wlan.ko

View File

@@ -22,7 +22,6 @@ PRODUCT_COPY_FILES += \
# Libs to be added to this ROM
PRODUCT_PACKAGES += \
librs_jni \
sensors.bahamas \
lights.bahamas \
copybit.bahamas \
@@ -31,31 +30,13 @@ PRODUCT_PACKAGES += \
libOmxCore \
libmm-omxcore \
libOmxVidEnc \
libcamera \
librpc \
tiwlan.ini \
dhcpcd.conf \
rzscontrol \
wlan_loader \
dexpreopt
DISABLE_DEXPREOPT := false
#WiFi stuff
PRODUCT_PACKAGES += \
wpa_supplicant.conf \
tiwlan.ini \
dhcpcd.conf \
wlan_cu \
wlan_loader \
libCustomWifi
#HotSpot
PRODUCT_PACKAGES += \
tiap_loader \
tiap_cu \
tiwlan_ap.ini \
hostap \
hostapd.conf
# Add Gallery 3D / Normal
PRODUCT_PACKAGES += Gallery
@@ -64,31 +45,27 @@ PRODUCT_COPY_FILES += \
device/htc/click/init.bahamas.rc:root/init.bahamas.rc \
device/htc/click/ueventd.bahamas.rc:root/ueventd.bahamas.rc
# from device_dream_sapphire.mk
PRODUCT_COPY_FILES += \
frameworks/base/data/etc/android.hardware.camera.autofocus.xml:system/etc/permissions/android.hardware.camera.autofocus.xml \
frameworks/base/data/etc/handheld_core_hardware.xml:system/etc/permissions/handheld_core_hardware.xml \
frameworks/base/data/etc/android.hardware.telephony.gsm.xml:system/etc/permissions/android.hardware.telephony.gsm.xml \
frameworks/base/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \
frameworks/base/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml
frameworks/base/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \
frameworks/base/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml
# keychars and keylayout files
PRODUCT_COPY_FILES += \
device/htc/click/custom/keychars/bahamas-keypad.kcm.bin:system/usr/keychars/bahamas-keypad.kcm.bin \
device/htc/click/custom/keychars/qwerty.kcm.bin:system/usr/keychars/qwerty.kcm.bin \
device/htc/click/custom/keychars/qwerty2.kcm.bin:system/usr/keychars/qwerty2.kcm.bin \
device/htc/click/custom/keylayout/AVRCP.kl:system/usr/keylayout/AVRCP.kl \
device/htc/click/custom/keylayout/bahamas-keypad.kl:system/usr/keylayout/bahamas-keypad.kl \
device/htc/click/custom/keylayout/h2w_headset.kl:system/usr/keylayout/h2w_headset.kl \
device/htc/click/custom/keylayout/qwerty.kl:system/usr/keylayout/qwerty.kl
# extra etc config files
PRODUCT_COPY_FILES += \
device/htc/click/custom/sysctl.conf:system/etc/sysctl.conf
# precompiled files for /system/bin
PRODUCT_COPY_FILES += \
device/htc/click/custom/calibrate_screen:system/bin/calibrate_screen
device/htc/click/custom/calibrate_screen:system/bin/calibrate_screen \
device/htc/click/custom/klogtail:system/xbin/klogtail
# media configuration xml file
PRODUCT_COPY_FILES += \
@@ -104,11 +81,13 @@ endif
PRODUCT_COPY_FILES += \
$(LOCAL_KERNEL):kernel
$(call inherit-product, device/common/gps/gps_eu_supl.mk)
$(call inherit-product, device/htc/common/common.mk)
$(call inherit-product, build/target/product/full_base.mk)
# Add goo.im support
$(call inherit-product, device/htc/click/goo.mk)
PRODUCT_NAME := htc_click
PRODUCT_DEVICE := click

BIN
custom/kernel Normal file → Executable file

Binary file not shown.

View File

@@ -1,6 +0,0 @@
key 164 MEDIA_PLAY_PAUSE WAKE
key 128 MEDIA_STOP WAKE
key 163 MEDIA_NEXT WAKE
key 165 MEDIA_PREVIOUS WAKE
key 168 MEDIA_REWIND WAKE
key 159 MEDIA_FAST_FORWARD WAKE

BIN
custom/klogtail Normal file

Binary file not shown.

View File

@@ -1,4 +0,0 @@
# Aliases extracted from modules themselves.
alias sdio:c07v*d* wlan
alias ip6t_TCPMSS xt_TCPMSS
alias ipt_TCPMSS xt_TCPMSS

View File

@@ -1 +0,0 @@
# ccw module match_flags cu_type cu_model dev_type dev_model

View File

@@ -1,9 +0,0 @@
kernel/fs/nls/nls_utf8.ko:
kernel/fs/ext4/ext4.ko: kernel/fs/jbd2/jbd2.ko
kernel/fs/jbd2/jbd2.ko:
kernel/fs/cifs/cifs.ko:
kernel/fs/aufs/aufs.ko:
kernel/drivers/net/wireless/tiwlan1251/wlan.ko:
kernel/drivers/hid/hid-dummy.ko:
kernel/drivers/staging/ramzswap/ramzswap.ko:
kernel/net/netfilter/xt_TCPMSS.ko:

View File

@@ -1 +0,0 @@
# Device nodes to trigger on-demand module loading.

View File

@@ -1 +0,0 @@
# ieee1394 module match_flags vendor_id model_id specifier_id version

View File

@@ -1 +0,0 @@
# module matchBits bustype vendor product version evBits keyBits relBits absBits mscBits ledBits sndBits ffBits [swBits] driver_info

View File

@@ -1 +0,0 @@
# isapnp module cardvendor carddevice driver_data vendor function ...

View File

@@ -1 +0,0 @@
# of module name type compatible

View File

@@ -1,9 +0,0 @@
kernel/fs/nls/nls_utf8.ko
kernel/fs/ext4/ext4.ko
kernel/fs/jbd2/jbd2.ko
kernel/fs/cifs/cifs.ko
kernel/fs/aufs/aufs.ko
kernel/drivers/net/wireless/tiwlan1251/wlan.ko
kernel/drivers/hid/hid-dummy.ko
kernel/drivers/staging/ramzswap/ramzswap.ko
kernel/net/netfilter/xt_TCPMSS.ko

View File

@@ -1 +0,0 @@
# pci module vendor device subvendor subdevice class class_mask driver_data

View File

@@ -1 +0,0 @@
# serio module type extra id proto

View File

@@ -1,2 +0,0 @@
# Soft dependencies extracted from modules themselves.
# Copy, with a .conf extension, to /etc/modprobe.d to use it with modprobe.

View File

@@ -1,41 +0,0 @@
# Aliases for symbols, used by symbol_request().
alias symbol:jbd2_journal_try_to_free_buffers jbd2
alias symbol:jbd2_journal_start_commit jbd2
alias symbol:jbd2_journal_load jbd2
alias symbol:jbd2_journal_flush jbd2
alias symbol:jbd2_journal_init_dev jbd2
alias symbol:jbd2_journal_update_format jbd2
alias symbol:jbd2_journal_blocks_per_page jbd2
alias symbol:jbd2_journal_restart jbd2
alias symbol:jbd2_journal_destroy jbd2
alias symbol:jbd2_journal_get_undo_access jbd2
alias symbol:jbd2_journal_init_jbd_inode jbd2
alias symbol:jbd2_journal_abort jbd2
alias symbol:jbd2_journal_unlock_updates jbd2
alias symbol:jbd2_journal_wipe jbd2
alias symbol:jbd2_journal_set_features jbd2
alias symbol:jbd2_journal_lock_updates jbd2
alias symbol:jbd2_journal_clear_features jbd2
alias symbol:jbd2_journal_get_create_access jbd2
alias symbol:jbd2_journal_init_inode jbd2
alias symbol:jbd2_journal_release_buffer jbd2
alias symbol:jbd2_journal_forget jbd2
alias symbol:jbd2_journal_start jbd2
alias symbol:jbd2_journal_force_commit_nested jbd2
alias symbol:jbd2_journal_check_used_features jbd2
alias symbol:jbd2_journal_set_triggers jbd2
alias symbol:jbd2_journal_check_available_features jbd2
alias symbol:jbd2_journal_stop jbd2
alias symbol:jbd2_journal_extend jbd2
alias symbol:jbd2_journal_ack_err jbd2
alias symbol:jbd2_journal_begin_ordered_truncate jbd2
alias symbol:jbd2_journal_file_inode jbd2
alias symbol:jbd2_journal_errno jbd2
alias symbol:jbd2_log_wait_commit jbd2
alias symbol:jbd2_journal_clear_err jbd2
alias symbol:jbd2_journal_release_jbd_inode jbd2
alias symbol:jbd2_journal_revoke jbd2
alias symbol:jbd2_journal_get_write_access jbd2
alias symbol:jbd2_journal_invalidatepage jbd2
alias symbol:jbd2_journal_dirty_metadata jbd2
alias symbol:jbd2_journal_force_commit jbd2

View File

@@ -1 +0,0 @@
# usb module match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info

Binary file not shown.

Binary file not shown.

View File

@@ -1,8 +0,0 @@
# Scheduler-Tuning
kernel.sched_latency_ns = 600000
kernel.sched_min_granularity_ns = 400000
vm.dirty_ratio = 90
vm.dirty_background_ratio = 70
vm.vfs_cache_pressure = 5
vm.oom_kill_allocating_task = 1
vm.min_free_kbytes = 4096

14
goo.mk Normal file
View File

@@ -0,0 +1,14 @@
#
# Copyright (C) 2012 the arifali
#
# GooManager specific stuff
#
PRODUCT_PROPERTY_OVERRIDES += \
ro.goo.developerid=arifali \
ro.goo.rom=cm7clicknightly \
ro.goo.version=$(shell date +%s)
# include goo manager
#PRODUCT_COPY_FILES += \
# device/htc/click/prebuilt/GooManager.apk:system/app/GooManager.apk

View File

@@ -20,14 +20,21 @@ on boot
mkdir /data/misc/dhcp 0770 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp
# framebuffer permission for copybit
chmod 0666 /dev/graphics/fb0
chown radio system /sys/module/gpio_event/parameters/phone_call_status
chmod 0664 /sys/module/gpio_event/parameters/phone_call_status
# write screen calibration
write /sys/class/input/input1/calibration_points 794,867,213,863,502,493,798,120,198,139
write /sys/class/input/input1/calibration_points 837,864,166,859,507,503,844,142,167,142
# bluetooth power up/down interface
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chmod 0660 /sys/class/rfkill/rfkill0/state
chown system system /dev/ttyHSUSB0
chown radio radio /sys/class/htc_ecompass/ecompass/PhoneOnOffFlag
# Permissions for Liblights.
chown system system /sys/class/leds/green/brightness
@@ -37,23 +44,22 @@ on boot
chown system system /sys/class/leds/button-backlight/brightness
chown system system /sys/class/leds/lcd-backlight/brightness
# Revise su permisions to ensure all users can use it
chmod 06755 /system/xbin/su
# CPU_Scaling Governor make permissions
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
# Set idle_sleep_mode permissions to radio
chown radio radio /sys/module/pm/parameters/idle_sleep_mode
# mount tmp cache system to speed up photo taking
mkdir /cache/tmp 0666 system system
mount tmpfs tmpfs /cache/tmp
# revise fb0 permission for copybit
chmod 0666 /dev/graphics/fb0
# cpufreq configurations
write /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate 40000
write /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold 85
# Set idle_sleep_mode permissions to radio
chown radio radio /sys/module/pm/parameters/idle_sleep_mode
# for disabling IPv6 over mobile network.
write /proc/sys/net/ipv6/conf/rmnet0/disable_ipv6 1
write /proc/sys/net/ipv6/conf/rmnet1/disable_ipv6 1
write /proc/sys/net/ipv6/conf/rmnet2/disable_ipv6 1
write /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate 50000
write /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold 90
# performance tweaks for flash
write /sys/block/mtdblock3/bdi/read_ahead_kb 4
@@ -64,17 +70,23 @@ on boot
write /sys/block/mmcblk0/bdi/read_ahead_kb 1024
# enable low memory killer to check file pages
write /sys/module/lowmemorykiller/parameters/minfree 3584,4096,8192,10240,11264,12288
write /sys/module/lowmemorykiller/parameters/minfile 0,0,0,5120,5632,6144
write /sys/module/lowmemorykiller/parameters/check_filepages 1
write /sys/devices/system/cpu/cpufreq/ondemand/up_threshold 90
write /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate 50000
write /proc/sys/kernel/sched_latency_ns 5000000
write /proc/sys/kernel/sched_wakeup_granularity_ns 100000
write /proc/sys/kernel/sched_min_granularity_ns 100000
# CPU_Scaling Governor make permissions
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
# Assign TCP buffer thresholds to be ceiling value of technology maximums
# Increased technology maximums should be reflected here.
write /proc/sys/net/core/rmem_max 262144
write /proc/sys/net/core/wmem_max 262144
setrlimit 8 268435456 268435456
# compass/accelerometer daemon
service akm8973 /system/bin/akm8973
service akmd /system/bin/akmd
user compass
group compass misc input
@@ -99,7 +111,11 @@ service wpa_supplicant /system/bin/wpa_supplicant \
disabled
oneshot
service dhcpcd /system/bin/dhcpcd -ABKL
service dhcpcd_tiwlan0 /system/bin/dhcpcd -ABKL
disabled
oneshot
service iprenew_tiwlan0 /system/bin/dhcpcd -n
disabled
oneshot

View File

@@ -13,7 +13,8 @@
** See the License for the specific language governing permissions and
** limitations under the License.
*/
#define REVISION_C "CM.7.0.1."
// NOTE: Version number of the lib
#define REVISION_C "CM.7.1.0.15."
// #define LOG_NDEBUG 0
#define LOG_TAG "QualcommCameraHardware"
@@ -96,6 +97,7 @@ struct preview_size_type {
static preview_size_type preview_sizes[] = {
{ 480, 320 }, // HVGA
{ 432, 320 }, // 1.35-to-1, for photos. (Rounded up from 1.3333 to 1)
{ 384, 288 }, // 4:3
{ 352, 288 }, // CIF
{ 336, 244 },
{ 320, 320 },
@@ -120,12 +122,26 @@ static int attr_lookup(const struct str_map *const arr, const char *name)
return NOT_FOUND;
}
static const char* attr_lookup(const struct dstr_map *const arr, const char *name)
{
if (name) {
const struct dstr_map *trav = arr;
while (trav->desc) {
if (!strcmp(trav->desc, name))
return trav->val;
trav++;
}
}
return '\0';
}
#define INIT_VALUES_FOR(parm) do { \
if (!parm##_values) { \
parm##_values = (char *)malloc(sizeof(parm)/ \
sizeof(parm[0])*30); \
LOGD("Kalim Param: %s",parm##_values); \
char *ptr = parm##_values; \
const str_map *trav; \
const TYPESTRMAP *trav; \
for (trav = parm; trav->desc; trav++) { \
int len = strlen(trav->desc); \
strcpy(ptr, trav->desc); \
@@ -181,6 +197,21 @@ static const str_map picturesize[] = {
};
static char *picturesize_values;
static const dstr_map reducesize[] = {
{ "2048x1536", "1600x1200" },
{ "1600x1200", "1280x960" },
{ "1280x960" , "480x320" },
{ "640x480" , "320x240" },
{ "480x320" , "640x480" },
{ "320x240" , "352x288" },
{ "352x288" , "176x144" },
{ "176x144" , NULL },
{ NULL, 0 }
};
static char *reducesize_values;
// round to the next power of two
static inline unsigned clp2(unsigned x)
{
@@ -199,14 +230,15 @@ static Mutex singleton_lock;
static bool singleton_releasing;
static Condition singleton_wait;
static void receive_camframe_callback(struct msm_frame_t *frame);
static void receive_camframe_callback(struct msm_frame *frame);
static int camerafd;
static int fd_frame;
static int32_t mMaxZoom = -1;
static int32_t prevzoom = 0;
static int ZOOM_STEP;
static bool zoomSupported = false;
struct msm_frame_t *frameA;
struct msm_frame *frameA;
bool bFramePresent;
pthread_t w_thread;
pthread_t jpegThread;
@@ -260,7 +292,7 @@ static bool native_get_maxzoom(int camfd, void *pZm)
{
LOGV("native_get_maxzoom E");
struct msm_ctrl_cmd_t ctrlCmd;
struct msm_ctrl_cmd ctrlCmd;
int32_t *pZoom = (int32_t *)pZm;
ctrlCmd.type = CAMERA_GET_PARM_MAXZOOM;
@@ -309,10 +341,14 @@ void QualcommCameraHardware::initDefaultParameters()
// This will happen only once in the lifetime of the mediaserver process.
// We do not free the _values arrays when we destroy the camera object.
#define TYPESTRMAP str_map
INIT_VALUES_FOR(antibanding);
INIT_VALUES_FOR(effect);
INIT_VALUES_FOR(whitebalance);
INIT_VALUES_FOR(picturesize);
#undef TYPESTRMAP
#define TYPESTRMAP dstr_map
INIT_VALUES_FOR(reducesize);
p.set(CameraParameters::KEY_SUPPORTED_ANTIBANDING, antibanding_values);
p.set(CameraParameters::KEY_SUPPORTED_EFFECTS, effect_values);
@@ -326,8 +362,8 @@ void QualcommCameraHardware::initDefaultParameters()
// Zoom parameters
p.set(CameraParameters::KEY_ZOOM_SUPPORTED, "true");
p.set(CameraParameters::KEY_ZOOM, "0");
p.set(CameraParameters::KEY_MAX_ZOOM, 5);
p.set(CameraParameters::KEY_ZOOM_RATIOS, "100,150,175,200,250,300");
p.set(CameraParameters::KEY_MAX_ZOOM,6);
p.set(CameraParameters::KEY_ZOOM_RATIOS, "100,150,175,200,250,275,300");
if (setParameters(p) != NO_ERROR) {
LOGE("Failed to set default parameters?!");
@@ -454,13 +490,13 @@ status_t QualcommCameraHardware::dump(int fd,
bool QualcommCameraHardware::reg_unreg_buf(int camfd,
int width,
int height,
msm_frame_t *frame,
msm_pmem_t pmem_type,
msm_frame *frame,
msm_pmem pmem_type,
unsigned char unregister,
unsigned char active)
{
uint32_t y_size;
struct msm_pmem_info_t pmemBuf;
struct msm_pmem_info pmemBuf;
uint32_t ioctl_cmd;
int ioctlRetVal;
@@ -489,7 +525,7 @@ bool QualcommCameraHardware::reg_unreg_buf(int camfd,
void QualcommCameraHardware::native_register_preview_bufs(
int camfd,
void *pDim,
struct msm_frame_t *frame,
struct msm_frame *frame,
unsigned char active)
{
cam_ctrl_dimension_t *dimension = (cam_ctrl_dimension_t *)pDim;
@@ -506,7 +542,7 @@ void QualcommCameraHardware::native_register_preview_bufs(
void QualcommCameraHardware::native_unregister_preview_bufs(
int camfd,
void *pDim,
struct msm_frame_t *frame)
struct msm_frame *frame)
{
cam_ctrl_dimension_t *dimension = (cam_ctrl_dimension_t *)pDim;
@@ -533,7 +569,7 @@ static bool native_cancel_afmode(int camfd, int af_fd)
static bool native_start_preview(int camfd)
{
struct msm_ctrl_cmd_t ctrlCmd;
struct msm_ctrl_cmd ctrlCmd;
ctrlCmd.timeout_ms = 5000;
ctrlCmd.type = CAMERA_START_PREVIEW;
@@ -553,7 +589,7 @@ static bool native_start_preview(int camfd)
static bool native_get_picture(int camfd, common_crop_t *crop)
{
LOGV("native_get_picture E");
struct msm_ctrl_cmd_t ctrlCmd;
struct msm_ctrl_cmd ctrlCmd;
ctrlCmd.timeout_ms = 5000;
ctrlCmd.length = sizeof(common_crop_t);
@@ -586,7 +622,7 @@ static bool native_get_picture(int camfd, common_crop_t *crop)
static bool native_stop_preview(int camfd)
{
struct msm_ctrl_cmd_t ctrlCmd;
struct msm_ctrl_cmd ctrlCmd;
ctrlCmd.timeout_ms = 5000;
ctrlCmd.type = CAMERA_STOP_PREVIEW;
ctrlCmd.length = 0;
@@ -603,7 +639,7 @@ static bool native_stop_preview(int camfd)
static bool native_start_snapshot(int camfd)
{
struct msm_ctrl_cmd_t ctrlCmd;
struct msm_ctrl_cmd ctrlCmd;
ctrlCmd.timeout_ms = 5000;
ctrlCmd.type = CAMERA_START_SNAPSHOT;
@@ -621,7 +657,7 @@ static bool native_start_snapshot(int camfd)
static bool native_stop_snapshot(int camfd)
{
struct msm_ctrl_cmd_t ctrlCmd;
struct msm_ctrl_cmd ctrlCmd;
ctrlCmd.timeout_ms = 5000;
ctrlCmd.type = CAMERA_STOP_SNAPSHOT;
@@ -700,7 +736,7 @@ bool QualcommCameraHardware::native_set_parm(
cam_ctrl_type type, uint16_t length, void *value)
{
int rc = true;
struct msm_ctrl_cmd_t ctrlCmd;
struct msm_ctrl_cmd ctrlCmd;
ctrlCmd.timeout_ms = 5000;
ctrlCmd.type = (uint16_t)type;
@@ -729,7 +765,7 @@ static void *cam_frame_click(void *data)
{
LOGV("Entering cam_frame_click");
frameA = (msm_frame_t *)data;
frameA = (msm_frame *)data;
struct sigaction act;
@@ -756,10 +792,7 @@ static void *cam_frame_click(void *data)
timeout.tv_usec = 0;
ret = select(fd_frame+1, &readfds, NULL, NULL, &timeout);
if (ret == -1) {
LOGE("calling select failed!");
break;
} else if (FD_ISSET(fd_frame, &readfds)) {
if (FD_ISSET(fd_frame, &readfds)) {
pthread_mutex_lock(&mutex_camframe);
// ready to get frame
ret = ioctl(fd_frame, MSM_CAM_IOCTL_GETFRAME, frameA);
@@ -772,6 +805,9 @@ static void *cam_frame_click(void *data)
} else
LOGE("MSM_CAM_IOCTL_GETFRAME error %s", strerror(errno));
pthread_mutex_unlock(&mutex_camframe);
} else if (ret == -1) {
LOGE("calling select() failed!");
break;
} else {
LOGV("frame is not ready! select returns %d", ret);
usleep(100000);
@@ -973,7 +1009,6 @@ void QualcommCameraHardware::runJpegEncodeThread(void *data)
camera_position_type *npt = &pt;
if(!encode_location) {
npt = NULL;
}
int jpeg_quality = mParameters.getInt("jpeg-quality");
@@ -1016,6 +1051,8 @@ bool QualcommCameraHardware::initPreview()
}
mSnapshotThreadWaitLock.unlock();
setZoom();
mPreviewFrameSize = mPreviewWidth * mPreviewHeight * 3/2;
mPreviewHeap = new PreviewPmemPool(mCameraControlFd,
mPreviewWidth * mPreviewHeight * 2,
@@ -1233,7 +1270,7 @@ void QualcommCameraHardware::release()
}
int rc;
struct msm_ctrl_cmd_t ctrlCmd;
struct msm_ctrl_cmd ctrlCmd;
if (mCameraRunning) {
if (mMsgEnabled & CAMERA_MSG_VIDEO_FRAME) {
@@ -1283,8 +1320,12 @@ void QualcommCameraHardware::release()
libmmcamera_target = NULL;
}
// FIXME: solve end of lib sometimes can fail
Mutex::Autolock lock(&singleton_lock);
singleton_releasing = true;
singleton.clear();
singleton_releasing = false;
singleton_wait.signal();
LOGV("release X");
}
@@ -1608,6 +1649,12 @@ status_t QualcommCameraHardware::setParameters(
else mDimension.ui_thumbnail_height = val;
}
//User changed pic size, recheck zoom
if (params.get("picture-size") != NULL && mParameters.get("picture-size") != NULL && strcmp(params.get("picture-size"), mParameters.get("picture-size")) != 0){
prevzoom = 99;
LOGV("setParameters: user/system modified pic size! rechecking zoom");
}
// setParameters
mParameters = params;
@@ -1689,7 +1736,7 @@ sp<QualcommCameraHardware> QualcommCameraHardware::getInstance()
}
// passes the Addresses to CameraService to getPreviewHeap
void QualcommCameraHardware::receivePreviewFrame(struct msm_frame_t *frame)
void QualcommCameraHardware::receivePreviewFrame(struct msm_frame *frame)
{
if ( LOG_PREVIEW )
LOGV("receivePreviewFrame E");
@@ -1700,9 +1747,7 @@ void QualcommCameraHardware::receivePreviewFrame(struct msm_frame_t *frame)
}
// Find the offset within the heap of the current buffer.
ssize_t offset =
(ssize_t)frame->buffer - (ssize_t)mPreviewHeap->mHeap->base();
offset /= mPreviewFrameSize;
ssize_t offset = 0;
mInPreviewCallback = true;
if (mMsgEnabled & CAMERA_MSG_PREVIEW_FRAME)
@@ -1883,6 +1928,18 @@ int QualcommCameraHardware::getParm(
return attr_lookup(parm_map, str);
}
const char* QualcommCameraHardware::getParm(
const char *parm_str, const struct dstr_map *const parm_map)
{
// Check if the parameter exists.
const char *str = mParameters.get(parm_str);
if (str == NULL) return '\0';
// Look up the parameter value.
return attr_lookup(parm_map, str);
}
void QualcommCameraHardware::setEffect()
{
int32_t value = getParm(CameraParameters::KEY_EFFECT, effect);
@@ -1918,22 +1975,50 @@ void QualcommCameraHardware::setAntibanding()
void QualcommCameraHardware::setZoom()
{
int32_t level = mParameters.getInt(CameraParameters::KEY_ZOOM);
int32_t level;
int32_t multiplier;
int32_t zoomsel;
bool iscamcorder = false;
// NOTE: ZOOM Routine
LOGV(" *************************** ZOOM ROUTINE STARTED ****************************************************************************");
if(native_get_maxzoom(mCameraControlFd,
(void *)&mMaxZoom) == true){
LOGD("Maximum zoom value is %d", mMaxZoom);
LOGV("Maximum zoom value is %d", mMaxZoom);
//maxZoom/5 in the ideal world, but it's stuck on 90
multiplier = getParm("picture-size", picturesize);
LOGV("Multiplier: %d",multiplier);
//Camcorder mode uses preview size
LOGD("preview-frame-rate: %s",mParameters.get("preview-frame-rate"));
if (strcmp(mParameters.get("preview-frame-rate"),"30") != 0){
multiplier = getParm("preview-size", picturesize);
iscamcorder = true;
LOGV("Multiplier: %d",multiplier);
}
LOGV("Multiplier: %d, PrevZoom: %d",multiplier,prevzoom);
zoomSupported = true;
if(mMaxZoom > 0){
//if max zoom is available find the zoom ratios
int16_t * zoomRatios = new int16_t[mMaxZoom+1];
if(zoomRatios == NULL){
LOGE("Failed to get zoomratios...");
delete zoomRatios;
} else {
LOGV("zoom ratios set");
//To get more 'natural' zoom we reduce picture resolution
//if the sensor can't cope with it
zoomsel = mParameters.getInt(CameraParameters::KEY_ZOOM);
if(!iscamcorder && prevzoom > zoomsel){
mParameters.set("picture-size", "2048x1536");
LOGV("User panning, increasing picture quality to max");
}
prevzoom = zoomsel;
while(!iscamcorder && zoomsel * 5 > 5 * multiplier && getParm("picture-size", reducesize) != NULL) {
mParameters.set("picture-size", getParm("picture-size", reducesize));
multiplier = getParm("picture-size", picturesize);
LOGV("Reducing picture quality; new multiplier: %d", multiplier);
}
level = zoomsel * (iscamcorder ? (multiplier*5) / 6 : 5);
//Update the parameters so initRaw doesn't use the wrong size later
mParameters.getPictureSize(&mRawWidth, &mRawHeight);
LOGV("Level: %d, Multiplier: %d ZoomSel: %d",level,multiplier,zoomsel);
}
} else {
zoomSupported = false;
@@ -1942,24 +2027,29 @@ void QualcommCameraHardware::setZoom()
mMaxZoom = 0;
}
if (level > mMaxZoom) {
if (level >= mMaxZoom) {
level = mMaxZoom;
LOGV("Level=Maxzoom: %d",level);
}
LOGV("Set Zoom level: %d current: %d maximum: %d", level, mCurZoom, mMaxZoom);
if (level == mCurZoom) {
LOGV("Level=Curzoom: %d",level);
LOGV(" *************************** ZOOM ROUTINE ENDED ******************************************************************************");
return;
}
if (level != -1) {
level*=ZOOM_STEP;
LOGV("Final Zoom Level: %d", level);
if (level >= 0 && level <= mMaxZoom) {
native_set_parm(CAMERA_SET_PARM_ZOOM, sizeof(level), (void *)&level);
usleep(35000);
mCurZoom = level;
}
}
LOGV(" *************************** ZOOM ROUTINE ENDED ******************************************************************************");
}
QualcommCameraHardware::MemPool::MemPool(int buffer_size, int num_buffers,
@@ -2023,13 +2113,13 @@ static bool register_buf(int camfd,
int pmempreviewfd,
uint32_t offset,
uint8_t *buf,
msm_pmem_t pmem_type,
msm_pmem pmem_type,
bool active,
bool register_buffer = true);
QualcommCameraHardware::PmemPool::PmemPool(const char *pmem_pool,
int camera_control_fd,
msm_pmem_t pmem_type,
msm_pmem pmem_type,
int buffer_size,
int num_buffers,
int frame_size,
@@ -2155,11 +2245,11 @@ static bool register_buf(int camfd,
int pmempreviewfd,
uint32_t offset,
uint8_t *buf,
msm_pmem_t pmem_type,
msm_pmem pmem_type,
bool active,
bool register_buffer)
{
struct msm_pmem_info_t pmemBuf;
struct msm_pmem_info pmemBuf;
pmemBuf.type = pmem_type;
pmemBuf.fd = pmempreviewfd;
@@ -2272,7 +2362,7 @@ status_t QualcommCameraHardware::MemPool::dump(int fd, const Vector<String16>& a
return NO_ERROR;
}
static void receive_camframe_callback(struct msm_frame_t *frame)
static void receive_camframe_callback(struct msm_frame *frame)
{
if ( LOG_PREVIEW )
LOGV("receive_camframe_callback E");

View File

@@ -33,7 +33,7 @@ extern "C" {
#define CAM_CTRL_SUCCESS 1
#define REVISION_H "2"
#define REVISION_H "4"
#define CAMERA_SET_PARM_DIMENSION 1
#define CAMERA_SET_PARM_ZOOM 2
@@ -144,6 +144,11 @@ struct str_map {
int val;
};
struct dstr_map {
const char *const desc;
const char *const val;
};
// ********************************************************************************************************
typedef unsigned int exif_tag_id_t;
@@ -232,19 +237,19 @@ public:
bool reg_unreg_buf(int camfd,
int width,
int height,
msm_frame_t *frame,
msm_pmem_t pmem_type,
msm_frame *frame,
msm_pmem pmem_type,
unsigned char unregister,
unsigned char active);
void native_register_preview_bufs(int camfd,
void *pDim,
struct msm_frame_t *frame,
struct msm_frame *frame,
unsigned char active);
void native_unregister_preview_bufs(int camfd,
void *pDim,
struct msm_frame_t *frame);
struct msm_frame *frame);
void receivePreviewFrame(struct msm_frame_t *frame);
void receivePreviewFrame(struct msm_frame *frame);
void receiveJpegPicture(void);
void receiveJpegPictureFragment(uint8_t *buf, uint32_t size);
void notifyShutter();
@@ -261,6 +266,7 @@ private:
bool native_set_parm(cam_ctrl_type type, uint16_t length, void *value);
bool native_set_dimension(cam_ctrl_dimension_t *value);
int getParm(const char *parm_str, const str_map *parm_map);
const char* getParm(const char *parm_str, const dstr_map *parm_map);
void setGpsParameters();
const char *KEY_GPS_LATITUDE;
@@ -325,13 +331,13 @@ private:
struct PmemPool : public MemPool {
PmemPool(const char *pmem_pool,
int control_camera_fd,
msm_pmem_t pmem_type,
msm_pmem pmem_type,
int buffer_size, int num_buffers,
int frame_size, int frame_offset,
const char *name);
virtual ~PmemPool();
int mFd;
msm_pmem_t mPmemType;
msm_pmem mPmemType;
int mCameraControlFd;
uint32_t mAlignedSize;
struct pmem_region mSize;
@@ -429,7 +435,7 @@ private:
common_crop_t mCrop;
struct msm_frame_t frames[kPreviewBufferCount];
struct msm_frame frames[kPreviewBufferCount];
bool mInPreviewCallback;
bool mCameraRecording;
int32_t mCurZoom;

View File

@@ -2,7 +2,7 @@
#include "jhead.h"
#define LOG_TAG "ExifWriterCamera"
//#define LOG_NDEBUG 0
// #define LOG_NDEBUG 0
#include <utils/Log.h>
@@ -17,6 +17,10 @@
#define TAG_ORIENTATION 0x0112
#define TAG_MAKE 0x010F
#define TAG_MODEL 0x0110
#define TAG_IMAGE_WIDTH 0x0100
#define TAG_IMAGE_LENGTH 0x0101
#define TAG_EXIF_VERSION 0x9000
#define EXIF_TOTAL_DATA 2
float *float2degminsec( float deg )
@@ -127,7 +131,7 @@ static void dump_to_file(const char *fname,
}
void writeExif( void *origData, void *destData , int origSize , uint32_t *resultSize, int orientation,camera_position_type *pt ) {
const char *filename = "/data/temp.jpg";
const char *filename = "/cache/tmp/temp.jpg";
dump_to_file( filename, (uint8_t *)origData, origSize );
LOGV("WRITE EXIF Filename %s", filename);
@@ -149,7 +153,7 @@ void writeExif( void *origData, void *destData , int origSize , uint32_t *result
}
ExifElement_t *t = (ExifElement_t *)malloc( sizeof(ExifElement_t)*(3+gpsTag) );
ExifElement_t *t = (ExifElement_t *)malloc( sizeof(ExifElement_t)*(EXIF_TOTAL_DATA+gpsTag) );
ExifElement_t *it = t;
// Store file date/time.
@@ -159,31 +163,21 @@ void writeExif( void *origData, void *destData , int origSize , uint32_t *result
unsigned short v;
LOGV("EXIF Orientation %d º", orientation);
if( orientation == 90 ) {
(*it).Value = "6";
(*it).Value = "6\0";
} else if( orientation == 180 ) {
(*it).Value = "3";
(*it).Value = "3\0";
} else {
(*it).Value = "1";
(*it).Value = "1\0";
}
(*it).GpsTag = FALSE;
it++;
(*it).Tag = TAG_MAKE;
(*it).Format = FMT_STRING;
(*it).Value = "HTC";
(*it).DataLength = 8;
(*it).GpsTag = FALSE;
it++;
(*it).Tag = TAG_MODEL;
(*it).Format = FMT_STRING;
(*it).Value = "Tattoo with CyanogenMOD";
(*it).DataLength = 18;
(*it).Value = "Tattoo with CyanogenMOD\0";
(*it).DataLength = 24;
(*it).GpsTag = FALSE;
if( pt != NULL ) {
LOGV("pt->latitude == %f", pt->latitude );
LOGV("pt->longitude == %f", pt->longitude );
@@ -193,70 +187,61 @@ void writeExif( void *origData, void *destData , int origSize , uint32_t *result
(*it).Tag = 0x01;
(*it).Format = FMT_STRING;
if( pt->latitude > 0 ) {
(*it).Value = "N";
(*it).Value = "N\0";
} else {
(*it).Value = "S";
(*it).Value = "S\0";
}
(*it).DataLength = 2;
(*it).GpsTag = TRUE;
it++;
char *mylat = coord2degminsec( pt->latitude );
LOGV("writeExif: La latitud queda en: %s", mylat);
(*it).Value = coord2degminsec( pt->latitude );
LOGV("writeExif: La latitud queda en: %s", (*it).Value);
(*it).Tag = 0x02;
(*it).Format = FMT_URATIONAL;
(*it).Value = mylat;
(*it).DataLength = 3;
(*it).GpsTag = TRUE;
free( mylat );
it++;
(*it).Tag = 0x03;
(*it).Format = FMT_STRING;
if( (*pt).longitude > 0 ) {
(*it).Value = "E";
(*it).Value = "E\0";
} else {
(*it).Value = "W";
(*it).Value = "W\0";
}
(*it).DataLength = 2;
(*it).GpsTag = TRUE;
it++;
char *mylong = coord2degminsec( (*pt).longitude );
LOGV("writeExif: La longitud queda en: %s", mylong);
(*it).Value = coord2degminsec( pt->longitude );
LOGV("writeExif: La longitud queda en: %s", (*it).Value);
(*it).Tag = 0x04;
(*it).Format = FMT_URATIONAL;
(*it).Value = mylong;
(*it).DataLength = 3;
(*it).GpsTag = TRUE;
free( mylong );
it++;
(*it).Tag = 0x05;
(*it).Format = FMT_USHORT;
if( (*pt).altitude > 0 ) {
(*it).Value = "0";
(*it).Value = "0\0";
} else {
(*it).Value = "1";
(*it).Value = "1\0";
}
(*it).DataLength = 1;
(*it).GpsTag = TRUE;
it++;
char *myalt = float2rationnal( fabs( (*pt).altitude ) );
LOGV("writeExif: La altitud queda en: %s", myalt);
(*it).Value = float2rationnal( fabs( pt->altitude ) );
LOGV("writeExif: La altitud queda en: %s", (*it).Value);
(*it).Tag = 0x06;
(*it).Format = FMT_SRATIONAL;
(*it).Value = myalt;
(*it).DataLength = 1;
(*it).GpsTag = TRUE;
free( myalt );
}
{
@@ -275,7 +260,7 @@ void writeExif( void *origData, void *destData , int origSize , uint32_t *result
int res = ReadJpegFile(filename, (ReadMode_t)ReadMode );
LOGV("READ EXIF Filename %s", filename);
create_EXIF( t, 3, gpsTag);
create_EXIF( t, EXIF_TOTAL_DATA, gpsTag);
WriteJpegFile(filename);
chmod( filename, S_IRWXU );
@@ -290,5 +275,7 @@ void writeExif( void *origData, void *destData , int origSize , uint32_t *result
int read = fread( destData, 1, (*resultSize), src );
free( t );
unlink( filename );
}

View File

@@ -24,70 +24,70 @@
#define MSM_CAM_IOCTL_MAGIC 'm'
#define MSM_CAM_IOCTL_GET_SENSOR_INFO \
_IOR(MSM_CAM_IOCTL_MAGIC, 1, struct msm_camsensor_info_t *)
_IOR(MSM_CAM_IOCTL_MAGIC, 1, struct msm_camsensor_info *)
#define MSM_CAM_IOCTL_REGISTER_PMEM \
_IOW(MSM_CAM_IOCTL_MAGIC, 2, struct msm_pmem_info_t *)
_IOW(MSM_CAM_IOCTL_MAGIC, 2, struct msm_pmem_info *)
#define MSM_CAM_IOCTL_UNREGISTER_PMEM \
_IOW(MSM_CAM_IOCTL_MAGIC, 3, unsigned)
#define MSM_CAM_IOCTL_CTRL_COMMAND \
_IOW(MSM_CAM_IOCTL_MAGIC, 4, struct msm_ctrl_cmd_t *)
_IOW(MSM_CAM_IOCTL_MAGIC, 4, struct msm_ctrl_cmd *)
#define MSM_CAM_IOCTL_CONFIG_VFE \
_IOW(MSM_CAM_IOCTL_MAGIC, 5, struct msm_camera_vfe_cfg_cmd_t *)
_IOW(MSM_CAM_IOCTL_MAGIC, 5, struct msm_camera_vfe_cfg_cmd *)
#define MSM_CAM_IOCTL_GET_STATS \
_IOR(MSM_CAM_IOCTL_MAGIC, 6, struct msm_camera_stats_event_ctrl_t *)
_IOR(MSM_CAM_IOCTL_MAGIC, 6, struct msm_camera_stats_event_ctrl *)
#define MSM_CAM_IOCTL_GETFRAME \
_IOR(MSM_CAM_IOCTL_MAGIC, 7, struct msm_camera_get_frame_t *)
_IOR(MSM_CAM_IOCTL_MAGIC, 7, struct msm_camera_get_frame *)
#define MSM_CAM_IOCTL_ENABLE_VFE \
_IOW(MSM_CAM_IOCTL_MAGIC, 8, struct camera_enable_cmd_t *)
_IOW(MSM_CAM_IOCTL_MAGIC, 8, struct camera_enable_cmd *)
#define MSM_CAM_IOCTL_CTRL_CMD_DONE \
_IOW(MSM_CAM_IOCTL_MAGIC, 9, struct camera_cmd_t *)
_IOW(MSM_CAM_IOCTL_MAGIC, 9, struct camera_cmd *)
#define MSM_CAM_IOCTL_CONFIG_CMD \
_IOW(MSM_CAM_IOCTL_MAGIC, 10, struct camera_cmd_t *)
_IOW(MSM_CAM_IOCTL_MAGIC, 10, struct camera_cmd *)
#define MSM_CAM_IOCTL_DISABLE_VFE \
_IOW(MSM_CAM_IOCTL_MAGIC, 11, struct camera_enable_cmd_t *)
_IOW(MSM_CAM_IOCTL_MAGIC, 11, struct camera_enable_cmd *)
#define MSM_CAM_IOCTL_PAD_REG_RESET2 \
_IOW(MSM_CAM_IOCTL_MAGIC, 12, struct camera_enable_cmd_t *)
_IOW(MSM_CAM_IOCTL_MAGIC, 12, struct camera_enable_cmd *)
#define MSM_CAM_IOCTL_VFE_APPS_RESET \
_IOW(MSM_CAM_IOCTL_MAGIC, 13, struct camera_enable_cmd_t *)
_IOW(MSM_CAM_IOCTL_MAGIC, 13, struct camera_enable_cmd *)
#define MSM_CAM_IOCTL_RELEASE_FRAMEE_BUFFER \
_IOW(MSM_CAM_IOCTL_MAGIC, 14, struct camera_enable_cmd_t *)
_IOW(MSM_CAM_IOCTL_MAGIC, 14, struct camera_enable_cmd *)
#define MSM_CAM_IOCTL_RELEASE_STATS_BUFFER \
_IOW(MSM_CAM_IOCTL_MAGIC, 15, struct msm_stats_buf_t *)
_IOW(MSM_CAM_IOCTL_MAGIC, 15, struct msm_stats_buf *)
#define MSM_CAM_IOCTL_AXI_CONFIG \
_IOW(MSM_CAM_IOCTL_MAGIC, 16, struct msm_camera_vfe_cfg_cmd_t *)
_IOW(MSM_CAM_IOCTL_MAGIC, 16, struct msm_camera_vfe_cfg_cmd *)
#define MSM_CAM_IOCTL_GET_PICTURE \
_IOW(MSM_CAM_IOCTL_MAGIC, 17, struct msm_camera_ctrl_cmd_t *)
_IOW(MSM_CAM_IOCTL_MAGIC, 17, struct msm_camera_ctrl_cmd *)
#define MSM_CAM_IOCTL_SET_CROP \
_IOW(MSM_CAM_IOCTL_MAGIC, 18, struct crop_info_t *)
_IOW(MSM_CAM_IOCTL_MAGIC, 18, struct crop_info *)
#define MSM_CAM_IOCTL_PICT_PP \
_IOW(MSM_CAM_IOCTL_MAGIC, 19, uint8_t *)
#define MSM_CAM_IOCTL_PICT_PP_DONE \
_IOW(MSM_CAM_IOCTL_MAGIC, 20, struct msm_snapshot_pp_status_t *)
_IOW(MSM_CAM_IOCTL_MAGIC, 20, struct msm_snapshot_pp_status *)
#define MSM_CAM_IOCTL_SENSOR_IO_CFG \
_IOW(MSM_CAM_IOCTL_MAGIC, 21, struct sensor_cfg_data_t *)
_IOW(MSM_CAM_IOCTL_MAGIC, 21, struct sensor_cfg_data *)
#define MSM_CAM_IOCTL_FLASH_LED_CFG \
_IOW(MSM_CAM_IOCTL_MAGIC, 22, enum msm_camera_led_state_t *)
_IOW(MSM_CAM_IOCTL_MAGIC, 22, enum msm_camera_led_state *)
#define MAX_SENSOR_NUM 3
#define MAX_SENSOR_NAME 32
@@ -95,7 +95,7 @@
/*****************************************************
* enum
*****************************************************/
enum msm_camera_update_t {
enum msm_camera_update {
MSM_CAM_CTRL_CMD_DONE,
MSM_CAM_SENSOR_VFE_CMD,
};
@@ -112,7 +112,7 @@ enum msm_camera_update_t {
* 1. control command: control command(from control thread),
* control status (from config thread);
*/
struct msm_ctrl_cmd_t {
struct msm_ctrl_cmd {
int timeout_ms;
uint16_t type;
uint16_t length;
@@ -120,14 +120,14 @@ struct msm_ctrl_cmd_t {
uint16_t status;
};
struct msm_vfe_evt_msg_t {
struct msm_vfe_evt_msg {
unsigned short type; /* 1 == event (RPC), 0 == message (adsp) */
unsigned short msg_id;
unsigned int len; /* size in, number of bytes out */
unsigned char *data;
};
enum msm_camera_resp_t {
enum msm_camera_resp {
MSM_CAM_RESP_CTRL,
MSM_CAM_RESP_STAT_EVT_MSG,
MSM_CAM_RESP_V4L2,
@@ -140,15 +140,15 @@ struct msm_stats_event_ctrl {
/* 0 - ctrl_cmd from control thread,
* 1 - stats/event kernel,
* 2 - V4L control or read request */
enum msm_camera_resp_t resptype;
enum msm_camera_resp resptype;
int timeout_ms;
struct msm_ctrl_cmd_t ctrl_cmd;
struct msm_ctrl_cmd ctrl_cmd;
/* struct vfe_event_t stats_event; */
struct msm_vfe_evt_msg_t stats_event;
struct msm_vfe_evt_msg stats_event;
};
/* 2. config command: config command(from config thread); */
struct msm_camera_cfg_cmd_t {
struct msm_camera_cfg_cmd {
/* what to config:
* 1 - sensor config, 2 - vfe config */
uint16_t cfg_type;
@@ -160,7 +160,7 @@ struct msm_camera_cfg_cmd_t {
void *value;
};
enum cfg_cmd_type_t {
enum cfg_cmd_type {
CMD_GENERAL,
CMD_AXI_CFG_OUT1,
CMD_AXI_CFG_SNAP_O1_AND_O2,
@@ -183,18 +183,18 @@ enum cfg_cmd_type_t {
};
/* vfe config command: config command(from config thread)*/
struct msm_vfe_cfg_cmd_t {
enum cfg_cmd_type_t cmd_type;
struct msm_vfe_cfg_cmd {
enum cfg_cmd_type cmd_type;
uint16_t length;
void *value;
};
struct camera_enable_cmd_t {
struct camera_enable_cmd {
char *name;
uint16_t length;
};
enum msm_pmem_t {
enum msm_pmem {
MSM_PMEM_OUTPUT1,
MSM_PMEM_OUTPUT2,
MSM_PMEM_OUTPUT1_OUTPUT2,
@@ -207,7 +207,7 @@ enum msm_pmem_t {
MSM_PMEM_MAX
};
enum msm_camera_out_frame_t {
enum msm_camera_out_frame {
FRAME_PREVIEW_OUTPUT1,
FRAME_PREVIEW_OUTPUT2,
FRAME_SNAPSHOT,
@@ -216,8 +216,8 @@ enum msm_camera_out_frame_t {
FRAME_MAX
};
struct msm_pmem_info_t {
enum msm_pmem_t type;
struct msm_pmem_info {
enum msm_pmem type;
int fd;
void *vaddr;
uint32_t y_off;
@@ -225,7 +225,7 @@ struct msm_pmem_info_t {
uint8_t active;
};
struct outputCfg_t {
struct outputCfg {
uint32_t height;
uint32_t width;
@@ -233,7 +233,7 @@ struct outputCfg_t {
uint32_t window_height_lastline;
};
enum vfeoutput_mode_t {
enum vfeoutput_mode {
OUTPUT_1,
OUTPUT_2,
OUTPUT_1_AND_2,
@@ -249,7 +249,7 @@ enum msm_frame_path {
MSM_FRAME_ENC,
};
struct msm_frame_t {
struct msm_frame {
enum msm_frame_path path;
unsigned long buffer;
uint32_t y_off;
@@ -266,13 +266,13 @@ enum stat_type {
STAT_MAX,
};
struct msm_stats_buf_t {
struct msm_stats_buf {
enum stat_type type;
unsigned long buffer;
int fd;
};
enum msm_v4l2_ctrl_t {
enum msm_v4l2_ctrl {
MSM_V4L2_VID_CAP_TYPE,
MSM_V4L2_STREAM_ON,
MSM_V4L2_STREAM_OFF,
@@ -285,23 +285,23 @@ enum msm_v4l2_ctrl_t {
MSM_V4L2_MAX
};
struct crop_info_t {
struct crop_info {
void *info;
int len;
};
struct msm_postproc_t {
struct msm_postproc {
int ftnum;
struct msm_frame_t fthumnail;
struct msm_frame fthumnail;
int fmnum;
struct msm_frame_t fmain;
struct msm_frame fmain;
};
struct msm_snapshot_pp_status_t {
struct msm_snapshot_pp_status {
void *status;
};
enum sensor_cfg_t {
enum sensor_cfg {
CFG_SET_MODE,
CFG_SET_EFFECT,
CFG_START,
@@ -335,24 +335,24 @@ enum sensor_cfg_t {
CFG_MAX
};
enum sensor_move_focus_t {
enum sensor_move_focus {
MOVE_NEAR,
MOVE_FAR
};
enum sensor_mode_t {
enum sensor_mode {
SENSOR_PREVIEW_MODE,
SENSOR_SNAPSHOT_MODE,
SENSOR_RAW_SNAPSHOT_MODE
};
enum sensor_resolution_t {
enum sensor_resolution {
SENSOR_QTR_SIZE,
SENSOR_FULL_SIZE,
SENSOR_INVALID_SIZE,
};
enum camera_effect_t {
enum camera_effect {
CAMERA_EFFECT_MIN_MINUS_1,
CAMERA_EFFECT_OFF = 1, /* This list must match aeecamera.h */
CAMERA_EFFECT_MONO,
@@ -381,7 +381,7 @@ struct exp_gain_cfg {
struct focus_cfg {
int32_t steps;
enum sensor_move_focus_t dir;
enum sensor_move_focus dir;
};
struct fps_cfg {
@@ -390,16 +390,16 @@ struct fps_cfg {
uint32_t pict_fps_div;
};
enum msm_camera_led_state_t {
enum msm_camera_led_state {
MSM_LED_OFF,
MSM_LED_LOW,
MSM_LED_HIGH
};
struct sensor_cfg_data_t {
enum sensor_cfg_t cfgtype;
enum sensor_mode_t mode;
enum sensor_resolution_t rs;
struct sensor_cfg_data {
enum sensor_cfg cfgtype;
enum sensor_mode mode;
enum sensor_resolution rs;
union {
int8_t effect;
@@ -417,7 +417,7 @@ struct sensor_cfg_data_t {
} cfg;
};
enum sensor_get_info_t {
enum sensor_get_info {
GET_NAME,
GET_PREVIEW_LINE_PER_FRAME,
GET_PREVIEW_PIXELS_PER_LINE,
@@ -427,7 +427,7 @@ enum sensor_get_info_t {
GET_SNAPSHOT_MAX_EP_LINE_CNT,
};
struct msm_camsensor_info_t {
struct msm_camsensor_info {
char name[MAX_SENSOR_NAME];
int8_t flash_enabled;
};

View File

@@ -23,7 +23,7 @@ LOCAL_PRELINK_MODULE := false
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
LOCAL_SHARED_LIBRARIES := liblog
LOCAL_SRC_FILES := copybit.cpp
LOCAL_MODULE := copybit.bahamas
LOCAL_MODULE := copybit.$(TARGET_BOOTLOADER_BOARD_NAME)
LOCAL_C_INCLUDES += hardware/msm7k/libgralloc
LOCAL_CFLAGS += -DCOPYBIT_MSM7K=1
include $(BUILD_SHARED_LIBRARY)

View File

@@ -41,7 +41,7 @@
/******************************************************************************/
#if defined(COPYBIT_MSM7K)
#define MAX_SCALE_FACTOR (3)
#define MAX_SCALE_FACTOR (4)
#define MAX_DIMENSION (4096)
#elif defined(COPYBIT_QSD8K)
#define MAX_SCALE_FACTOR (8)
@@ -131,27 +131,18 @@ static int get_format(int format) {
}
/** convert from copybit image to mdp image structure */
static void set_image(struct mdp_img *img, const struct copybit_image_t *rhs)
static void set_image(struct mdp_img *img, const struct copybit_image_t *rhs)
{
private_handle_t* hnd = (private_handle_t*)rhs->handle;
if(hnd == NULL){
LOGE("copybit: Invalid handle");
return;
}
img->width = rhs->w;
img->height = rhs->h;
img->format = get_format(rhs->format);
img->offset = hnd->offset;
#if defined(COPYBIT_MSM7K)
if (hnd->flags & private_handle_t::PRIV_FLAGS_USES_GPU) {
img->offset += hnd->map_offset;
img->memory_id = hnd->gpu_fd;
if (img->format == MDP_RGBA_8888) {
// msm7201A GPU only supports BGRA_8888 destinations
img->format = MDP_BGRA_8888;
}
} else {
img->memory_id = hnd->fd;
}
#else
img->memory_id = hnd->fd;
#endif
}
/** setup rectangles */
static void set_rects(struct copybit_context_t *dev,
@@ -194,14 +185,17 @@ static void set_rects(struct copybit_context_t *dev,
}
/** setup mdp request */
static void set_infos(struct copybit_context_t *dev, struct mdp_blit_req *req) {
static void set_infos(struct copybit_context_t *dev, struct mdp_blit_req *req, int flags) {
req->alpha = dev->mAlpha;
req->transp_mask = MDP_TRANSP_NOP;
req->flags = dev->mFlags | MDP_BLEND_FG_PREMULT;
req->flags = dev->mFlags | flags;
#if defined(COPYBIT_QSD8K)
req->flags |= MDP_BLEND_FG_PREMULT;
#endif
}
/** copy the bits */
static int msm_copybit(struct copybit_context_t *dev, void const *list)
static int msm_copybit(struct copybit_context_t *dev, void const *list)
{
int err = ioctl(dev->mFD, MSMFB_BLIT,
(struct mdp_blit_req_list const*)list);
@@ -245,7 +239,7 @@ static int msm_copybit(struct copybit_context_t *dev, void const *list)
static int set_parameter_copybit(
struct copybit_device_t *dev,
int name,
int value)
int value)
{
struct copybit_context_t* ctx = (struct copybit_context_t*)dev;
int status = 0;
@@ -308,7 +302,7 @@ static int set_parameter_copybit(
}
/** Get a static info value */
static int get(struct copybit_device_t *dev, int name)
static int get(struct copybit_device_t *dev, int name)
{
struct copybit_context_t* ctx = (struct copybit_context_t*)dev;
int value;
@@ -342,7 +336,7 @@ static int stretch_copybit(
struct copybit_image_t const *src,
struct copybit_rect_t const *dst_rect,
struct copybit_rect_t const *src_rect,
struct copybit_region_t const *region)
struct copybit_region_t const *region)
{
struct copybit_context_t* ctx = (struct copybit_context_t*)dev;
int status = 0;
@@ -383,7 +377,9 @@ static int stretch_copybit(
while ((status == 0) && region->next(region, &clip)) {
intersect(&clip, &bounds, &clip);
mdp_blit_req* req = &list.req[list.count];
set_infos(ctx, req);
int flags = 0;
set_infos(ctx, req, flags);
set_image(&req->dst, dst);
set_image(&req->src, src);
set_rects(ctx, req, dst_rect, src_rect, &clip);
@@ -413,7 +409,7 @@ static int blit_copybit(
struct copybit_device_t *dev,
struct copybit_image_t const *dst,
struct copybit_image_t const *src,
struct copybit_region_t const *region)
struct copybit_region_t const *region)
{
struct copybit_rect_t dr = { 0, 0, dst->w, dst->h };
struct copybit_rect_t sr = { 0, 0, src->w, src->h };
@@ -423,7 +419,7 @@ static int blit_copybit(
/*****************************************************************************/
/** Close the copybit device */
static int close_copybit(struct hw_device_t *dev)
static int close_copybit(struct hw_device_t *dev)
{
struct copybit_context_t* ctx = (struct copybit_context_t*)dev;
if (ctx) {

View File

@@ -29,6 +29,6 @@ LOCAL_SRC_FILES := \
framebuffer.cpp \
mapper.cpp
LOCAL_MODULE := gralloc.bahamas
LOCAL_MODULE := gralloc.$(TARGET_BOOTLOADER_BOARD_NAME)
LOCAL_CFLAGS:= -DLOG_TAG=\"gralloc\"
include $(BUILD_SHARED_LIBRARY)

View File

@@ -34,7 +34,7 @@
#include <cutils/atomic.h>
#include <linux/fb.h>
#include "linux/msm_mdp.h"
#include <linux/msm_mdp.h>
#include "gralloc_priv.h"
#include "gr.h"
@@ -290,7 +290,7 @@ int mapFrameBufferLocked(struct private_module_t* module)
int err;
size_t fbSize = roundUpToPageSize(finfo.line_length * info.yres_virtual);
module->framebuffer = new private_handle_t(dup(fd), fbSize,
module->framebuffer = new private_handle_t(fd, fbSize,
private_handle_t::PRIV_FLAGS_USES_PMEM);
module->numBuffers = info.yres_virtual / info.yres;
@@ -372,6 +372,9 @@ int fb_device_open(hw_module_t const* module, const char* name,
*device = &dev->device.common;
}
// Close the gralloc module
gralloc_close(gralloc_device);
}
return status;
}

View File

@@ -18,7 +18,7 @@ ifneq ($(TARGET_SIMULATOR),true)
include $(CLEAR_VARS)
LOCAL_MODULE := lights.bahamas
LOCAL_MODULE := lights.$(TARGET_BOOTLOADER_BOARD_NAME)
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008 The Android Open Source Project
* Copyright (C) 2010 Diogo Ferreira <diogo@underdev.org>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,8 +14,6 @@
* limitations under the License.
*/
// #define LOG_NDEBUG 0
#define LOG_TAG "lights"
#include <cutils/log.h>
@@ -32,257 +30,286 @@
#include <hardware/lights.h>
/******************************************************************************/
static pthread_once_t g_init = PTHREAD_ONCE_INIT;
static pthread_mutex_t g_lock = PTHREAD_MUTEX_INITIALIZER;
static struct light_state_t g_notification = {0,0,0,0,0};
static struct light_state_t g_battery = {0,0,0,0,0};
static struct light_state_t g_notification;
static struct light_state_t g_battery;
static int g_backlight = 255;
char const*const GREEN_LED_FILE
= "/sys/class/leds/green/brightness";
char const*const AMBER_LED_FILE = "/sys/class/leds/amber/brightness";
char const*const GREEN_LED_FILE = "/sys/class/leds/green/brightness";
char const*const AMBER_LED_FILE
= "/sys/class/leds/amber/brightness";
char const*const BUTTON_FILE = "/sys/class/leds/button-backlight/brightness";
char const*const LCD_FILE
= "/sys/class/leds/lcd-backlight/brightness";
char const*const AMBER_BLINK_FILE = "/sys/class/leds/amber/blink";
char const*const GREEN_BLINK_FILE = "/sys/class/leds/green/blink";
char const*const AMBER_BLINK_FILE
= "/sys/class/leds/amber/blink";
char const*const GREEN_BLINK_FILE
= "/sys/class/leds/green/blink";
char const*const BUTTON_FILE
= "/sys/class/leds/button-backlight/brightness";
char const*const LCD_BACKLIGHT_FILE = "/sys/class/leds/lcd-backlight/brightness";
enum {
LED_BLANK,
LED_AMBER,
LED_GREEN,
LED_BOTH,
};
/**
* device methods
* Aux method, write int to file
*/
static int write_int (const char* path, int value) {
int fd;
static int already_warned = 0;
static int
write_int(char const* path, int value)
{
int fd;
static int already_warned = 0;
fd = open(path, O_RDWR);
if (fd < 0) {
if (already_warned == 0) {
LOGE("write_int failed to open %s\n", path);
already_warned = 1;
}
return -errno;
}
fd = open(path, O_RDWR);
if (fd >= 0) {
char buffer[20];
int bytes = sprintf(buffer, "%d\n", value);
int amt = write(fd, buffer, bytes);
close(fd);
return amt == -1 ? -errno : 0;
} else {
if (already_warned == 0) {
LOGE("write_int failed to open %s\n", path);
already_warned = 1;
}
return -errno;
}
char buffer[20];
int bytes = snprintf(buffer, sizeof(buffer), "%d\n",value);
int written = write (fd, buffer, bytes);
close (fd);
return written == -1 ? -errno : 0;
}
static int
is_lit(struct light_state_t const* state)
{
return state->color & 0x00ffffff;
void init_globals (void) {
pthread_mutex_init (&g_lock, NULL);
}
static int
rgb_to_brightness(struct light_state_t const* state)
static int is_lit (struct light_state_t const* state) {
return state->color & 0x00ffffff;
}
static unsigned int rgb_to_led(struct light_state_t *state) {
unsigned int colorRGB = state->color & 0xFFFFFF;
unsigned int colorLED = LED_BLANK;
if (colorRGB & 0xFF)
colorLED |= LED_GREEN;
else {
if ((colorRGB >> 8) & 0xFF)
colorLED |= LED_GREEN;
if ((colorRGB >> 16) & 0xFF)
colorLED |= LED_AMBER;
}
return colorLED;
}
static void set_speaker_light_locked (struct light_device_t *dev,
struct light_state_t *state) {
unsigned int colorRGB = state->color & 0xFFFFFF;
unsigned int colorLED = rgb_to_led(state);
switch (state->flashMode) {
case LIGHT_FLASH_HARDWARE:
case LIGHT_FLASH_TIMED:
switch (colorLED) {
case LED_BOTH:
write_int (AMBER_BLINK_FILE, 1);
write_int (GREEN_BLINK_FILE, 1);
break;
case LED_AMBER:
if (state == &g_battery)
write_int (AMBER_BLINK_FILE, 4);
else
write_int (AMBER_BLINK_FILE, 1);
write_int (GREEN_LED_FILE, 0);
break;
case LED_GREEN:
write_int (GREEN_BLINK_FILE, 1);
write_int (AMBER_LED_FILE, 0);
break;
case LED_BLANK:
write_int (AMBER_BLINK_FILE, 0);
write_int (GREEN_BLINK_FILE, 0);
break;
default:
LOGE("set_led_state: unknown color, colorRGB=0x%08X colorLED=%d\n",
colorRGB, colorLED);
break;
}
break;
case LIGHT_FLASH_NONE:
switch (colorLED) {
case LED_BOTH:
write_int (AMBER_LED_FILE, 1);
write_int (GREEN_LED_FILE, 1);
break;
case LED_AMBER:
write_int (AMBER_LED_FILE, 1);
write_int (GREEN_LED_FILE, 0);
break;
case LED_GREEN:
write_int (AMBER_LED_FILE, 0);
write_int (GREEN_LED_FILE, 1);
break;
case LED_BLANK:
write_int (AMBER_LED_FILE, 0);
write_int (GREEN_LED_FILE, 0);
break;
default:
LOGE("set_led_state: unknown color, colorRGB=0x%08X colorLED=%d\n",
colorRGB, colorLED);
break;
}
break;
default:
LOGE("set_led_state: unknown mode, colorRGB=0x%08X flashMode=%d\n",
colorRGB, state->flashMode);
}
}
static void set_speaker_light_locked_dual(struct light_device_t *dev,
struct light_state_t *bstate, struct light_state_t *nstate) {
unsigned int bcolorRGB = bstate->color & 0xFFFFFF;
unsigned int bcolorLED = rgb_to_led(bstate);
switch (bcolorLED) {
case LED_BOTH:
case LED_AMBER:
write_int (AMBER_BLINK_FILE, 4);
write_int (GREEN_LED_FILE, 1);
break;
case LED_GREEN:
write_int (AMBER_BLINK_FILE, 1);
write_int (GREEN_LED_FILE, 1);
break;
case LED_BLANK:
default:
LOGE("set_led_state_dual: unexpected color, bcolorRGB=0x%08X bcolorLED=%d\n",
bcolorRGB, bcolorLED);
break;
}
}
static void handle_speaker_battery_locked (struct light_device_t *dev) {
if (is_lit (&g_battery) && is_lit (&g_notification)) {
set_speaker_light_locked_dual(dev, &g_battery, &g_notification);
} else if (is_lit (&g_battery)) {
set_speaker_light_locked (dev, &g_battery);
} else {
set_speaker_light_locked (dev, &g_notification);
}
}
static int set_light_buttons (struct light_device_t* dev,
struct light_state_t const* state) {
int err = 0;
int on = is_lit (state);
pthread_mutex_lock (&g_lock);
err = write_int (BUTTON_FILE, on?255:0);
pthread_mutex_unlock (&g_lock);
return 0;
}
static int rgb_to_brightness(struct light_state_t const* state)
{
int color = state->color & 0x00ffffff;
return ((77*((color>>16)&0x00ff))
+ (150*((color>>8)&0x00ff)) + (29*(color&0x00ff))) >> 8;
}
static int
set_light_backlight(struct light_device_t* dev,
struct light_state_t const* state)
{
int err = 0;
int brightness = rgb_to_brightness(state);
pthread_mutex_lock(&g_lock);
err = write_int(LCD_FILE, brightness);
pthread_mutex_unlock(&g_lock);
return err;
static int set_light_backlight(struct light_device_t* dev,
struct light_state_t const* state) {
int err = 0;
int brightness = rgb_to_brightness(state);
LOGV("%s brightness=%d color=0x%08x",
__func__,brightness, state->color);
pthread_mutex_lock(&g_lock);
g_backlight = brightness;
err = write_int(LCD_BACKLIGHT_FILE, brightness);
pthread_mutex_unlock(&g_lock);
return err;
}
static int
set_light_buttons(struct light_device_t* dev,
struct light_state_t const* state)
{
int err = 0;
int on = is_lit(state);
pthread_mutex_lock(&g_lock);
err = write_int(BUTTON_FILE, on?255:0);
pthread_mutex_unlock(&g_lock);
return err;
static int set_light_battery (struct light_device_t* dev,
struct light_state_t const* state) {
pthread_mutex_lock (&g_lock);
g_battery = *state;
handle_speaker_battery_locked(dev);
pthread_mutex_unlock (&g_lock);
return 0;
}
static int
set_speaker_light_locked(struct light_device_t* dev,
struct light_state_t const* state)
{
int len;
int alpha, red, green, blue;
int blink, freq, pwm;
int onMS, offMS;
unsigned int colorRGB;
static int set_light_attention (struct light_device_t* dev,
struct light_state_t const* state) {
/* tattoo has no attention */
switch (state->flashMode) {
case LIGHT_FLASH_TIMED:
blink = 1;
onMS = state->flashOnMS;
offMS = state->flashOffMS;
break;
case LIGHT_FLASH_HARDWARE:
blink = 1;
onMS = state->flashOnMS;
offMS = state->flashOffMS;
break;
case LIGHT_FLASH_NONE:
blink = 0;
onMS = 0;
offMS = 0;
break;
default:
blink = 1;
onMS = 0;
offMS = 0;
break;
}
colorRGB = state->color;
LOGD("set_speaker_light_locked colorRGB=%08X, onMS=%d, offMS=%d\n",
colorRGB, onMS, offMS);
red = (colorRGB >> 16) & 0xFF;
green = (colorRGB >> 8) & 0xFF;
blue = colorRGB & 0xFF;
if (red) {
write_int(GREEN_LED_FILE, 0);
write_int(AMBER_LED_FILE, 1);
if (blink) {
//blink must come after brightness change
write_int(AMBER_BLINK_FILE, 1);
}
} else if (green || blue) {
write_int(AMBER_LED_FILE, 0);
write_int(GREEN_LED_FILE, 1);
if (blink) {
write_int(GREEN_BLINK_FILE, 1);
}
} else {
write_int(GREEN_LED_FILE, 0);
write_int(AMBER_LED_FILE, 0);
}
return 0;
return 0;
}
static void
handle_speaker_light_locked(struct light_device_t* dev)
{
if (is_lit(&g_battery)) {
set_speaker_light_locked(dev, &g_battery);
} else {
set_speaker_light_locked(dev, &g_notification);
}
static int set_light_notifications (struct light_device_t* dev,
struct light_state_t const* state) {
pthread_mutex_lock (&g_lock);
g_notification = *state;
handle_speaker_battery_locked (dev);
pthread_mutex_unlock (&g_lock);
return 0;
}
static int
set_light_battery(struct light_device_t* dev,
struct light_state_t const* state)
{
pthread_mutex_lock(&g_lock);
g_battery = *state;
handle_speaker_light_locked(dev);
pthread_mutex_unlock(&g_lock);
return 0;
static int close_lights (struct light_device_t *dev) {
if (dev)
free (dev);
return 0;
}
static int
set_light_notifications(struct light_device_t* dev,
struct light_state_t const* state)
{
pthread_mutex_lock(&g_lock);
g_notification = *state;
handle_speaker_light_locked(dev);
pthread_mutex_unlock(&g_lock);
return 0;
static int open_lights (const struct hw_module_t* module, char const* name,
struct hw_device_t** device) {
int (*set_light)(struct light_device_t* dev,
struct light_state_t const* state);
if (0 == strcmp(LIGHT_ID_BACKLIGHT, name)) {
set_light = set_light_backlight;
}
else if (0 == strcmp(LIGHT_ID_BUTTONS, name)) {
set_light = set_light_buttons;
}
else if (0 == strcmp(LIGHT_ID_BATTERY, name)) {
set_light = set_light_battery;
}
else if (0 == strcmp(LIGHT_ID_ATTENTION, name)) {
set_light = set_light_attention;
}
else if (0 == strcmp(LIGHT_ID_NOTIFICATIONS, name)) {
set_light = set_light_notifications;
}
else {
return -EINVAL;
}
pthread_once (&g_init, init_globals);
struct light_device_t *dev = malloc (sizeof (struct light_device_t));
memset (dev,0,sizeof(*dev));
dev->common.tag = HARDWARE_DEVICE_TAG;
dev->common.version = 0;
dev->common.module = (struct hw_module_t*)module;
dev->common.close = (int (*)(struct hw_device_t*))close_lights;
dev->set_light = set_light;
*device = (struct hw_device_t*) dev;
return 0;
}
/** Close the lights device */
static int
close_lights(struct light_device_t *dev)
{
if (dev) {
free(dev);
}
return 0;
}
/******************************************************************************/
/**
* module methods
*/
/** Open a new instance of a lights device using name */
static int open_lights(const struct hw_module_t* module, char const* name,
struct hw_device_t** device)
{
int (*set_light)(struct light_device_t* dev,
struct light_state_t const* state);
if (0 == strcmp(LIGHT_ID_BACKLIGHT, name)) {
set_light = set_light_backlight;
}
else if (0 == strcmp(LIGHT_ID_BUTTONS, name)) {
set_light = set_light_buttons;
}
else if (0 == strcmp(LIGHT_ID_BATTERY, name)) {
set_light = set_light_battery;
}
else if (0 == strcmp(LIGHT_ID_NOTIFICATIONS, name)) {
set_light = set_light_notifications;
}
else {
return -EINVAL;
}
struct light_device_t *dev = calloc(1, sizeof(struct light_device_t));
dev->common.tag = HARDWARE_DEVICE_TAG;
dev->common.version = 0;
dev->common.module = (struct hw_module_t*)module;
dev->common.close = (int (*)(struct hw_device_t*))close_lights;
dev->set_light = set_light;
*device = (struct hw_device_t*)dev;
return 0;
}
static struct hw_module_methods_t lights_module_methods = {
.open = open_lights,
.open = open_lights,
};
/*
* The lights Module
*/
const struct hw_module_t HAL_MODULE_INFO_SYM = {
.tag = HARDWARE_MODULE_TAG,
.version_major = 1,
.version_minor = 0,
.id = LIGHTS_HARDWARE_MODULE_ID,
.name = "Tattoo lights module",
.author = "CyanogenMod",
.methods = &lights_module_methods,
.tag = HARDWARE_MODULE_TAG,
.version_major = 2,
.version_minor = 0,
.id = LIGHTS_HARDWARE_MODULE_ID,
.name = "Tattoo lights module",
.author = "Diogo Ferreira <diogo@underdev.org>",
.methods = &lights_module_methods,
};

View File

@@ -21,7 +21,7 @@ ifneq ($(TARGET_SIMULATOR),true)
# hw/<SENSORS_HARDWARE_MODULE_ID>.<ro.product.board>.so
include $(CLEAR_VARS)
LOCAL_MODULE := sensors.bahamas
LOCAL_MODULE := sensors.$(TARGET_BOOTLOADER_BOARD_NAME)
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw

View File

@@ -79,25 +79,25 @@
<!-- Each camcorder profile defines a set of predefined configuration parameters -->
<CamcorderProfiles cameraId="0">
<EncoderProfile quality="high" fileFormat="mp4" duration="60">
<EncoderProfile quality="high" fileFormat="3gp" duration="60">
<Video codec="h263"
bitRate="360000"
width="352"
bitRate="720000"
width="384"
height="288"
frameRate="24" />
<Audio codec="aac"
bitRate="64000"
sampleRate="16000"
channels="1" />
channels="2" />
</EncoderProfile>
<EncoderProfile quality="low" fileFormat="3gp" duration="30">
<Video codec="h263"
bitRate="192000"
width="176"
height="144"
frameRate="30" />
width="240"
height="160"
frameRate="20" />
<Audio codec="amrnb"
bitRate="12200"
@@ -115,7 +115,6 @@
</CamcorderProfiles>
<EncoderOutputFileFormat name="3gp" />
<EncoderOutputFileFormat name="mp4" />
<!--
If a codec is not enabled, it is invisible to the applications
@@ -124,26 +123,26 @@
-->
<VideoEncoderCap name="h264" enabled="true"
minBitRate="64000" maxBitRate="420000"
minFrameWidth="176" maxFrameWidth="352"
minFrameWidth="176" maxFrameWidth="384"
minFrameHeight="144" maxFrameHeight="288"
minFrameRate="1" maxFrameRate="30" />
<VideoEncoderCap name="h263" enabled="true"
minBitRate="64000" maxBitRate="420000"
minFrameWidth="176" maxFrameWidth="352"
minBitRate="64000" maxBitRate="720000"
minFrameWidth="176" maxFrameWidth="384"
minFrameHeight="144" maxFrameHeight="288"
minFrameRate="1" maxFrameRate="30" />
<VideoEncoderCap name="m4v" enabled="true"
minBitRate="64000" maxBitRate="420000"
minFrameWidth="176" maxFrameWidth="352"
minFrameWidth="176" maxFrameWidth="384"
minFrameHeight="144" maxFrameHeight="288"
minFrameRate="1" maxFrameRate="30" />
<AudioEncoderCap name="aac" enabled="true"
minBitRate="8192" maxBitRate="96000"
minSampleRate="8000" maxSampleRate="16000"
minChannels="1" maxChannels="1" />
minChannels="1" maxChannels="2" />
<AudioEncoderCap name="amrwb" enabled="true"
minBitRate="6600" maxBitRate="23050"

View File

@@ -29,10 +29,7 @@
<!-- Flag indicating whether the surface flinger is inefficient
at performing a blur. Used by parts of the UI to turn off
the blur effect where it isn't worth the performance hit. -->
<bool name="config_sf_slowBlur">false</bool>
<!-- XXXXX NOTE THE FOLLOWING RESOURCES USE THE WRONG NAMING CONVENTION.
Please don't copy them, copy anything else. -->
<bool name="config_sf_slowBlur">true</bool>
<!-- This string array should be overridden by the device to present a list of network
attributes. This is used by the connectivity manager to decide which networks can coexist
@@ -68,10 +65,8 @@
<item>"tiwlan\\d"</item>
</string-array>
<!-- If this is true, the screen will fade off. -->
<bool name="config_animateScreenLights">true</bool>
<!-- XXXXXX END OF RESOURCES USING WRONG NAMING CONVENTION -->
<!-- Enable the screen-off animation -->
<bool name="config_enableScreenOffAnimation">false</bool>
<!-- Indicate whether the SD card is accessible without removing the battery. -->
<bool name="config_batterySdCardAccessibility">true</bool>
@@ -85,14 +80,15 @@
<!-- Component name of the service providing geocoder API support. -->
<string name="config_geocodeProvider">com.google.android.location.GeocodeProvider</string>
<!-- Handle notifications differently if device only uses an amber/green
LED. This also needs a liblights module that enables them accordingly. -->
<bool name="config_amber_green_light">false</bool>
<!-- Configure Top Rotary Possition-->
<integer name="config_rotaryMarginBottomDIP">37</integer>
<!-- Configure rotary bottom margin -->
<integer name="config_rotaryMarginBottomDIP">0</integer>
<!-- Configure lense unlock time label offset -->
<integer name="config_lenseTimeLabelOffsetDIP">30</integer>
<integer name="config_lenseTimeLabelOffsetDIP">40</integer>
<!-- Configure ring lockscreen bottom margin -->
<integer name="config_ringBaselineBottomDIP">110</integer>
<!-- Configure ring lockscreen center ring offset -->
<integer name="config_ringCenterOffsetDIP">18</integer>
</resources>

View File

@@ -1,79 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 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.
-->
<resources>
<string name="rom_mod_string">KalimAz</string>
<bool name="force_hidden_settings">true</bool>
<bool name="config_desktopRotation">true</bool>
<integer name="config_desktopSpeed">600</integer>
<integer name="config_desktopBounce">30</integer>
<integer name="config_pageHorizontalMargin">10</integer>
<integer name="config_drawerColumnsPortrait">4</integer>
<integer name="config_drawerRowsPortrait">3</integer>
<integer name="config_drawerColumnsLandscape">4</integer>
<integer name="config_drawerRowsLandscape">3</integer>
<string name="config_homeBinding">1</string>
<string name="config_swipedown_actions">0</string>
<string name="config_swipeup_actions">0</string>
<bool name="config_drawerAnimated">true</bool>
<!-- config_desktopScreens min value is 1, so it will add 1 to whatever value you set here -->
<integer name="config_desktopScreens">4</integer>
<integer name="config_defaultScreen">2</integer>
<bool name="config_hideStatusbar">false</bool>
<bool name="config_previewsNew">true</bool>
<bool name="config_uiDots">true</bool>
<bool name="config_uiDockbar">true</bool>
<bool name="config_uiCloseDockbar">false</bool>
<bool name="config_uiCloseFolder">false</bool>
<bool name="config_uiABBg">false</bool>
<!-- config_zoomSpeed min is 300, so it will add 300 to whatever value you set here -->
<integer name="config_zoomSpeed">100</integer>
<!-- config_uiScaleAB is a float value between 0.1 and 1.0. Set here the default .X-->
<integer name="config_uiScaleAB">7</integer>
<bool name="config_uiHideLabels">false</bool>
<bool name="config_wallpaperHack">true</bool>
<integer name="config_highlights_color">0xa0000000</integer>
<integer name="config_highlights_color_focus">0xa0000000</integer>
<bool name="config_new_selectors">true</bool>
<integer name="config_drawer_color">0x80000000</integer>
<!-- config_desktopColumns/Rows min value is 3, so it will add 3 to whatever value you set here -->
<integer name="config_desktopColumns">1</integer>
<integer name="config_desktopRows">1</integer>
<bool name="config_autosizeIcons">false</bool>
<bool name="config_drawerLabels">true</bool>
<bool name="config_fadeDrawerLabels">true</bool>
<bool name="config_desktop_indicator">true</bool>
<bool name="config_desktop_indicator_autohide">true</bool>
<!-- 1=top dots, 2=top slider, 3=bottom slider -->
<string name="config_desktop_indicator_type">1</string>
<bool name="config_system_persistent">true</bool>
<!-- 1=sensor, 2=portrait, 3=landscape -->
<string name="config_orientation_default">1</string>
<!-- 1=low quality,2=auto, 3=disabled -->
<string name="config_screenCache">2</string>
<bool name="config_nagScreen">false</bool>
<bool name="config_drawer_navigate_catalogs">true</bool>
<bool name="config_notif_receiver">true</bool>
<!-- config_notif_size min is 10, so it will add 10 to whatever value you set here -->
<integer name="config_notif_size">4</integer>
<string name="config_main_dock_style">1</string>
<string name="config_drawer_style">0</string>
<bool name="config_ab_tint">false</bool>
<integer name="config_ab_tint_color">0xffffffff</integer>
<bool name="config_wallpaper_scroll">true</bool>
<string name="config_deletezone_style">1</string>
<bool name="config_close_apps_dockbar">true</bool>
</resources>

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
* 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.
-->
<resources>
<string-array name="entries_dual_led_colors" translatable="false">
<item>@string/trackball_color_entry_use_app</item>
<item>@string/trackball_color_entry_green</item>
<item>@string/trackball_color_entry_red</item>
<item>@string/trackball_color_entry_amber</item>
</string-array>
<string-array name="values_dual_led_colors" translatable="false">
<item>default</item>
<item>green</item>
<item>red</item>
<item>yellow</item>
</string-array>
</resources>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Whether or not to display the trackball settings -->
<bool name="has_trackball">true</bool>
<!-- Whether or not to display the camera button settings -->
<bool name="has_camera_button">false</bool>
<!-- Notification LED can show any color -->
<bool name="has_rgb_notification_led">false</bool>
<!-- Notification LED can show green and amber only -->
<bool name="has_dual_notification_led">true</bool>
<!-- LED Flashlight -->
<bool name="has_led_flash">false</bool>
<!-- Whether or not to display search button settings -->
<bool name="has_search_button">true</bool>
</resources>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Whether or not Bluetooth must be enabled for FM radio -->
<bool name="require_bt">true</bool>
<!-- Whether or not output to speaker is supported -->
<bool name="speaker_supported">true</bool>
<!-- Whether or not seek is supported -->
<bool name="seek_supported">true</bool>
</resources>

View File

@@ -23,10 +23,10 @@
<mms_config version="4">
<!-- Maximum message size in bytes for a MMS message -->
<int name="maxMessageSize">0307200</int>
<int name="maxMessageSize">307200</int>
<!-- Maximum height for an attached image -->
<int name="maxImageHeight">0768</int>
<int name="maxImageHeight">768</int>
<!-- Maximum width for an attached image -->
<int name="maxImageWidth">1024</int>

View File

@@ -14,112 +14,23 @@
limitations under the License.
-->
<!-- Phone app resources that may need to be customized
for different hardware or product builds. -->
<!-- Tattoo-specific phone app resources. -->
<resources>
<!-- Flag indicating whether the Phone app should ignore
EVENT_SIM_NETWORK_LOCKED events from the Sim. If true, this will
prevent the IccNetworkDepersonalizationPanel from being shown,
and effectively disable the "Sim network lock" feature. -->
<bool name="ignore_sim_network_locked_events">false</bool>
<!-- Flag indicating whether the Phone app should provide
a "Dismiss" button on the SIM network unlock screen.
The default value is true.
If set to false, there will be *no way* to dismiss the SIM
network unlock screen if you don't enter the correct unlock code.
(One important consequence: there will be no way to make an
Emergency Call if your SIM is network-locked and you don't know
the PIN.) -->
<bool name="sim_network_unlock_allow_dismiss">true</bool>
<!-- If true, enable the onscreen touch UI for incoming calls.
This feature is necessary for devices with no hard SEND/END keys,
and optional on all other devices. -->
<!-- Enable the onscreen touch UI for all states of the in-call UI. -->
<bool name="allow_incoming_call_touch_ui">true</bool>
<bool name="allow_in_call_touch_ui">true</bool>
<!-- If true, enable the onscreen touch UI for regular "ongoing call"
states of the in-call UI.
In general, the touch UI is used for regular calls only on
devices with a proximity sensor. (On other devices, we can't
have touchable UI onscreen during a call because of the risk of
false cheek touches.)
TODO: maybe this can be determined algorithmically based on
specific properties of the device, perhaps by detecting the
presence of a proximity sensor and/or hard SEND/END keys. (If
so, we wouldn't need this flag at all.) -->
<bool name="allow_in_call_touch_ui">false</bool>
<!-- OTA configuration values, used when provisioning CDMA devices.
Following defaults values of zero means OTA UI is completely disabled.
These OTA UI can be enabled by setting config value to one in the product
specific overlay file -->
<!-- Determine whether we want to display the OTA activation screen, which
gives the user option to activate or cancel -->
<integer name="OtaShowActivationScreen">1</integer>
<!-- Determine whether we should show the "listen for instructions" screen after
successfully placing the OTA call -->
<integer name="OtaShowListeningScreen">0</integer>
<!-- The number of times we should show the activation screen/allow the provisioning
to fail before just showing an unsuccessful dialog -->
<integer name="OtaShowActivateFailTimes">0</integer>
<!-- Determine whether or not we should play the success/failure tone -->
<integer name="OtaPlaySuccessFailureTone">0</integer>
<!-- Flag indicating if the phone is a world phone -->
<bool name="world_phone">false</bool>
<!-- If true, enable vibration (haptic feedback) for key presses
in the EmergencyDialer activity. The pattern is set on a
per-platform basis using config_virtualKeyVibePattern. To be
consistent with the regular Dialer, this value should agree
with the corresponding values from config.xml under
apps/Contacts. -->
<bool name="config_enable_dialer_key_vibration">true</bool>
<!-- Flag indicating if the voicemail notification option is enabled -->
<bool name="voicemail_notification_enabled">true</bool>
<!-- Flag indicating if the tty is enabled -->
<bool name="tty_enabled">false</bool>
<!-- Flag indicating if hac is enabled -->
<bool name="hac_enabled">false</bool>
<!-- Flag indicating if dtmf tone type is enabled -->
<bool name="dtmf_type_enabled">false</bool>
<!-- Flag indicating if auto retry is enabled -->
<bool name="auto_retry_enabled">false</bool>
<!-- Determine whether we want to play local DTMF tones in a call, or
just let the radio/BP handle playing of the tones. -->
<bool name="allow_local_dtmf_tones">true</bool>
<!-- While an incoming call is ringing, this flag specifies whether
the BACK key should reject the current call (just like the
ENDCALL button does.)
This was originally the default behavior for all platforms, but
it's a bad idea on devices where the BACK key is a capacitive
button (since it's too easy to press the key accidentally as you
pull the phone out of your pocket.) So devices that *don't* want
this behavior should set this flag to false via the resource
overlay. -->
<!-- This is a device without capacitive buttons, so enable the feature
where BACK rejects the current incoming call. -->
<bool name="allow_back_key_to_reject_incoming_call">true</bool>
<!-- If true, show an onscreen "Dial" button in the dialer.
In practice this is used on all platforms even the ones with hard SEND/END
keys, but for maximum flexibility it's controlled by a flag here
(which can be overridden on a per-product basis.) -->
<!-- Enable the onscreen "Dial" button in the emergency dialer. -->
<bool name="config_show_onscreen_dial_button">true</bool>
<!-- Determine whether calls to mute the microphone in PhoneUtils
are routed through the android.media.AudioManager class (true) or through
the com.android.internal.telephony.Phone interface (false). -->
<bool name="send_mic_mute_to_AudioManager">false</bool>
<!-- Determines if device implements a noise suppression device for in call audio-->
<bool name="has_in_call_noise_suppression">false</bool>
<!-- This device uses libaudio which implements
AudioHardware::setMicMute(bool state) and AudioHardware::getMicMute(bool* state)
so microphone muting calls should be routed through the AudioManager API. -->
<bool name="send_mic_mute_to_AudioManager">true</bool>
</resources>

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2010, 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.
*/
-->
<com.android.inputmethod.latin.LatinKeyboardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
android:id="@+id/LatinkeyboardBaseView"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/keyboard_bottom_padding"
android:paddingTop="0in"
android:background="@drawable/keyboard_dark_background"
android:textStyle="bold"
latin:keyBackground="@drawable/btn_keyboard_key_gingerbread"
latin:keyTextStyle="@integer/text_style_bold"
/>

View File

@@ -7,4 +7,4 @@
/recovery mtd recovery
/sdcard vfat /dev/block/mmcblk0p1 /dev/block/mmcblk0
/system yaffs2 system
/sd-ext auto LABEL=sd-ext
/sd-ext ext3 /dev/block/mmcblk0p2

View File

@@ -60,8 +60,10 @@ ro.config.alarm_alert=Alarm_Classic.ogg
dalvik.vm.execution-mode=int:jit
# Persist default parameters
persist.sys.use_dithering=0
persist.sys.purgeable_assets=1
persist.sys.use_dithering=1
persist.sys.purgeable_assets=0
persist.sys.rotationanimation=false
persist.sys.scrollingcache=2
# VM heap size
dalvik.vm.heapsize=24m
@@ -69,11 +71,14 @@ dalvik.vm.heapsize=24m
# Enable compcache
ro.compcache.default=18
# Lock dirty_ratio to 20 when USB is mounted for improved transfer speed
ro.vold.umsdirtyratio=20
# Makes HOME ADW / OTHERS to be always in memoory
pref_lock_home=1
# Default Tether Dissabled
ro.tether.denied=true
# Default Tether Enabled
ro.tether.denied=false
# Enable Google-specific location features,
# like NetworkLocationProvider and LocationCollector.

View File

@@ -1 +1,6 @@
mtd@misc 0460 radio diag
mtd@misc 0460 radio diag
/dev/system_bus_freq 0660 system system
/dev/cpu_dma_latency 0660 system system
/dev/radio_feedback 0660 radio radio
/dev/smd9 0600 system system
/dev/ttyHS0 0660 bluetooth bluetooth