34 Commits

Author SHA1 Message Date
KalimochoAz
342654497e Enable again wlan_loader
Since is needed to load wifi stuff, this is again in build

Change-Id: I31c5f561c4254b7de17f664326642ccca23a441a
2011-10-10 17:53:34 +01: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
KalimochoAz
6ca40bfe1d Changed media_profiles
Defined memCap and previewframerate

Change-Id: I489c01af69507ca7267fd7aa45a15675e8150f8a
2011-04-24 22:17:01 +02:00
KalimochoAz
9d1083d252 Changes on sysctl thak make system more clean
For click, that is a tiny device we have tested this values and seam to
be clean.

Change-Id: I39436f5c54daf70e5d5f08b25dd3f69a36b098f4
2011-04-24 16:34:10 +02:00
KalimochoAz
285343533c Changed log for libcamera that is always badly complaining
Change-Id: I0a4b690aa6e4a334e3a52dbaf39e1d9bfc7f9869
2011-04-24 10:34:21 +02:00
KalimochoAz
f21ceb5764 System permissions and ondemand CPU config changed
Change-Id: Icd08120912eab4921b48abdae71ef23a20d5ed73
2011-04-24 10:26:30 +02:00
KalimochoAz
ca50a873e0 Clean libcamera non used code and changed recovery kernel
Change-Id: Icb0714578bca4c04d3b72e71a72b48d0eb048fe1
2011-04-23 21:08:01 +02:00
KalimochoAz
2611c32afb Few prop improvements for speed
Improve navigation speed, and defines the device as no focus device

Change-Id: Ic856ec0faf795976fcb639eb6de24e4b2435be5e
2011-04-16 09:55:21 +02:00
KalimochoAz
ff59b19ab2 Revert "Multiple click modifications"
This reverts commit 120f464872.

	modified:   KernelModules.mk
	modified:   click.mk
	modified:   custom/kernel
	new file:   custom/modules/2.6.29.6-Kalim/kernel/drivers/staging/ramzswap/ramzswap.ko
	deleted:    custom/modules/2.6.29.6-Kalim/kernel/drivers/staging/zram/zram.ko
	modified:   custom/modules/2.6.29.6-Kalim/modules.dep
	modified:   custom/modules/2.6.29.6-Kalim/modules.dep.bin
	modified:   custom/modules/2.6.29.6-Kalim/modules.order
	modified:   custom/modules/wlan.ko
	modified:   system.prop
2011-04-16 09:46:26 +02:00
KalimochoAz
120f464872 Multiple click modifications
Kernel modification:
    Added pptp VPN permissions
    Modified to have zram
System:
    Speed-up nevigation over internet

Change-Id: I063c9651f8f05a90524510d3852832322873094e
2011-04-15 21:53:12 +02:00
59 changed files with 702 additions and 772 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

@@ -27,7 +27,6 @@ TARGET_NO_RADIOIMAGE := true
BOARD_LDPI_RECOVERY := true
TARGET_PREBUILT_RECOVERY_KERNEL := device/htc/click/custom/recovery_kernel
TARGET_PREBUILT_KERNEL := device/htc/click/custom/kernel
# Wifi related defines
@@ -35,23 +34,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_CMDLINE := no_console_suspend=1
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 +69,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 +102,4 @@ BOARD_USERDATAIMAGE_PARTITION_SIZE := 0x0a520000
BOARD_FLASH_BLOCK_SIZE := 131072
# Add LUNFILE configuration to the system
BOARD_UMS_LUNFILE := "/sys/devices/platform/usb_mass_storage/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,7 +81,6 @@ 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)

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,4 +0,0 @@
# Scheduler-Tuning
kernel.sched_latency_ns = 60000000
kernel.sched_min_granularity_ns = 2000000
kernel.sched_wakeup_granularity_ns = 5000000

View File

@@ -20,14 +20,18 @@ on boot
mkdir /data/misc/dhcp 0770 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp
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,15 +41,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
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
@@ -56,14 +67,25 @@ 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
# CPU_Scaling Governor make permissions
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
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
write /proc/sys/vm/dirty_background_bytes 1024000
write /proc/sys/vm/dirty_bytes 10240000
# 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
@@ -88,7 +110,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,8 +13,8 @@
** See the License for the specific language governing permissions and
** limitations under the License.
*/
// NOTE VERSION_C
#define REVISION_C "RC4.7009.1."
// NOTE: Version number of the lib
#define REVISION_C "CM.7.1.0.15."
// #define LOG_NDEBUG 0
#define LOG_TAG "QualcommCameraHardware"
@@ -73,55 +73,15 @@ extern "C" {
#define THUMBNAIL_BUFFER_SIZE (THUMBNAIL_WIDTH * THUMBNAIL_HEIGHT * 3/2)
#define DEFAULT_PREVIEW_SETTING 5
// basedon other devices framerate values 15
#define DEFAULT_FRAMERATE 15
#define PREVIEW_SIZE_COUNT (sizeof(preview_sizes)/sizeof(preview_size_type))
#define NOT_FOUND -1
#define LOG_PREVIEW false
#if DLOPEN_LIBMMCAMERA
#include <dlfcn.h>
void* (*LINK_cam_conf)(void *data);
void* (*LINK_cam_frame)(void *data);
bool (*LINK_jpeg_encoder_init)();
void (*LINK_jpeg_encoder_join)();
unsigned char (*LINK_jpeg_encoder_encode)(const char* file_name, const cam_ctrl_dimension_t *dimen,
const unsigned char* thumbnailbuf, int thumbnailfd,
const unsigned char* snapshotbuf, int snapshotfd,
common_crop_t *cropInfo);
int (*LINK_camframe_terminate)();
void (*LINK_cam_set_frame_callback)();
bool (*LINK_cam_release_frame)();
int8_t (*LINK_jpeg_encoder_setMainImageQuality)(uint32_t quality);
int8_t (*LINK_jpeg_encoder_setThumbnailQuality)(uint32_t quality);
int8_t (*LINK_jpeg_encoder_setRotation)(uint32_t rotation);
int8_t (*LINK_jpeg_encoder_setLocation)(const camera_position_type *location);
//
// callbacks
void (**LINK_mmcamera_camframe_callback)(struct msm_frame_t *frame);
void (**LINK_mmcamera_jpegfragment_callback)(uint8_t *buff_ptr,
uint32_t buff_size);
void (**LINK_mmcamera_jpeg_callback)(jpeg_event_t status);
#else
#define LINK_cam_conf cam_conf
#define LINK_cam_frame cam_frame
#define LINK_jpeg_encoder_init jpeg_encoder_init
#define LINK_jpeg_encoder_join jpeg_encoder_join
#define LINK_jpeg_encoder_encode jpeg_encoder_encode
#define LINK_camframe_terminate camframe_terminate
#define LINK_cam_set_frame_callback cam_set_frame_callback
#define LINK_cam_release_frame cam_release_frame
#define LINK_jpeg_encoder_setMainImageQuality jpeg_encoder_setMainImageQuality
#define LINK_jpeg_encoder_setThumbnailQuality jpeg_encoder_setThumbnailQuality
#define LINK_jpeg_encoder_setRotation jpeg_encoder_setRotation
#define LINK_jpeg_encoder_setLocation jpeg_encoder_setLocation
extern void (*mmcamera_camframe_callback)(struct msm_frame_t *frame);
extern void (*mmcamera_jpegfragment_callback)(uint8_t *buff_ptr,
uint32_t buff_size);
extern void (*mmcamera_jpeg_callback)(jpeg_event_t status);
#endif
} // extern "C"
@@ -161,12 +121,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); \
@@ -222,6 +196,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)
{
@@ -240,14 +229,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;
@@ -301,7 +291,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;
@@ -350,10 +340,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);
@@ -367,8 +361,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?!");
@@ -412,14 +406,13 @@ bool QualcommCameraHardware::msgTypeEnabled(int32_t msgType)
}
#define ROUND_TO_PAGE(x) (((x)+0xfff)&~0xfff)
void QualcommCameraHardware::startCamera()
{
LOGV("startCamera E");
#if DLOPEN_LIBMMCAMERA
libmmcamera_target = ::dlopen("libmm-qcamera-tgt.so", RTLD_NOW);
LOGV("loading libmm-qcamera-tgt at %p", libmmcamera_target);
if (!libmmcamera_target) {
@@ -427,43 +420,9 @@ void QualcommCameraHardware::startCamera()
return;
}
#if 0 // useless now
*(void **)&LINK_cam_frame =
::dlsym(libmmcamera, "cam_frame");
*(void **)&LINK_camframe_terminate =
::dlsym(libmmcamera, "camframe_terminate");
*(void **)&LINK_jpeg_encoder_encode =
::dlsym(libmmcamera, "jpeg_encoder_encode");
*(void **)&LINK_jpeg_encoder_join =
::dlsym(libmmcamera, "jpeg_encoder_join");
*(void **)&LINK_mmcamera_camframe_callback =
::dlsym(libmmcamera, "mmframe_cb");
*LINK_mmcamera_camframe_callback = receive_camframe_callback;
*(void **)&LINK_jpeg_encoder_init =
::dlsym(libmmcamera, "jpeg_encoder_init");
*(void **)&LINK_mmcamera_jpeg_callback =
::dlsym(libmmcamera, "mm_jpeg_callback");
*LINK_mmcamera_jpeg_callback = receive_jpeg_callback;
*(void **)&LINK_mmcamera_jpegfragment_callback =
::dlsym(libmmcamera, "mm_jpegfragment_callback");
*LINK_mmcamera_jpegfragment_callback = receive_jpeg_fragment_callback;
*(void **)&LINK_cam_set_frame_callback =
::dlsym(libmmcamera, "cam_set_frame_callback");
*(void**)&LINK_jpeg_encoder_setMainImageQuality =
::dlsym(libmmcamera, "jpeg_encoder_setMainImageQuality");
*(void **)&LINK_cam_release_frame =
::dlsym(libmmcamera, "cam_release_frame");
#endif
*(void **)&LINK_cam_conf =
::dlsym(libmmcamera_target, "cam_conf");
#else
mmcamera_camframe_callback = receive_camframe_callback;
mmcamera_jpegfragment_callback = receive_jpeg_fragment_callback;
mmcamera_jpeg_callback = receive_jpeg_callback;
#endif // DLOPEN_LIBMMCAMERA
/* The control thread is in libcamera itself. */
LOGV("pthread_join on control thread");
if (pthread_join(w_thread, NULL) != 0) {
@@ -530,13 +489,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;
@@ -565,7 +524,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;
@@ -582,7 +541,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;
@@ -609,7 +568,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;
@@ -629,7 +588,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);
@@ -662,7 +621,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;
@@ -679,7 +638,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;
@@ -697,7 +656,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;
@@ -776,7 +735,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;
@@ -799,28 +758,13 @@ static void handler(int sig, siginfo_t *siginfo, void *context)
pthread_exit(NULL);
}
// Set transfer preview meanwhile new preview is captured
static void *prev_frame_click(void *user)
{
while (true) {
usleep(1);
if(bFramePresent) {
if(LOG_PREVIEW)
LOGV("PREVIEW ARRIVED !!!!!!");
receive_camframe_callback(frameA);
bFramePresent=false;
}
}
return NULL;
}
// customized camframe_callback function based on reassembled libmmcamera.so
// Routine coded by fn.fyodor and corrected by KalimochoAz
static void *cam_frame_click(void *data)
{
LOGV("Entering cam_frame_click");
frameA = (msm_frame_t *)data;
frameA = (msm_frame *)data;
struct sigaction act;
@@ -835,7 +779,7 @@ static void *cam_frame_click(void *data)
act.sa_sigaction = &handler;
act.sa_flags = SA_SIGINFO;
if (sigaction(SIGUSR1, &act, NULL) != 0) {
LOGE("sigaction in cam_frame failed");
LOGE("sigaction in cam_frame_click failed");
pthread_exit(NULL);
}
@@ -847,10 +791,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);
@@ -860,10 +801,12 @@ static void *cam_frame_click(void *data)
LOGE("MSM_CAM_IOCTL_RELEASE_FRAME_BUFFER error %s", strerror(errno));
else
receive_camframe_callback(frameA);
//bFramePresent=true;
} 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);
@@ -874,7 +817,6 @@ static void *cam_frame_click(void *data)
}
// ************************************************************************************************************************************
//static cam_frame_start_parms frame_parms;
static int recordingState = 0;
static rat_t latitude[3];
@@ -1066,7 +1008,6 @@ void QualcommCameraHardware::runJpegEncodeThread(void *data)
camera_position_type *npt = &pt;
if(!encode_location) {
npt = NULL;
}
int jpeg_quality = mParameters.getInt("jpeg-quality");
@@ -1109,6 +1050,8 @@ bool QualcommCameraHardware::initPreview()
}
mSnapshotThreadWaitLock.unlock();
setZoom();
mPreviewFrameSize = mPreviewWidth * mPreviewHeight * 3/2;
mPreviewHeap = new PreviewPmemPool(mCameraControlFd,
mPreviewWidth * mPreviewHeight * 2,
@@ -1190,8 +1133,6 @@ void QualcommCameraHardware::deinitPreview(void)
// the frame-thread's callback. This we have to make the frame thread
// detached, and use a separate mechanism to wait for it to complete.
// camframe_terminate() never been used
if (mFrameThreadRunning) {
// Send a exit signal to stop the frame thread
if (!pthread_kill(mFrameThread, SIGUSR1)) {
@@ -1322,17 +1263,13 @@ void QualcommCameraHardware::release()
LOGV("release E");
Mutex::Autolock l(&mLock);
#if DLOPEN_LIBMMCAMERA
if (libmmcamera_target == NULL) {
LOGE("ERROR: multiple release!");
return;
}
#else
#warning "Cannot detect multiple release when not dlopen()ing libmmcamera!"
#endif
int rc;
struct msm_ctrl_cmd_t ctrlCmd;
struct msm_ctrl_cmd ctrlCmd;
if (mCameraRunning) {
if (mMsgEnabled & CAMERA_MSG_VIDEO_FRAME) {
@@ -1376,16 +1313,18 @@ void QualcommCameraHardware::release()
close(fd_frame);
fd_frame = -1;
#if DLOPEN_LIBMMCAMERA
if (libmmcamera_target) {
::dlclose(libmmcamera_target);
LOGV("dlclose(libmmcamera_target)");
libmmcamera_target = NULL;
}
#endif
// 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");
}
@@ -1709,6 +1648,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;
@@ -1790,7 +1735,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");
@@ -1801,9 +1746,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)
@@ -1984,6 +1927,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);
@@ -2019,22 +1974,48 @@ 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 {
LOGE("zoom ratios failed to acquire memory");
//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);
LOGV("Level: %d, Multiplier: %d ZoomSel: %d",level,multiplier,zoomsel);
}
} else {
zoomSupported = false;
@@ -2043,24 +2024,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,
@@ -2124,13 +2110,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,
@@ -2256,11 +2242,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;
@@ -2373,7 +2359,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,12 +79,12 @@
<!-- 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"
height="288"
frameRate="24" />
frameRate="20" />
<Audio codec="aac"
bitRate="64000"
@@ -109,10 +109,12 @@
<ImageEncoding quality="90" />
<ImageEncoding quality="80" />
<ImageEncoding quality="70" />
<ImageDecoding memCap="20000000" />
<Camera previewFrameRate="0" />
</CamcorderProfiles>
<EncoderOutputFileFormat name="3gp" />
<EncoderOutputFileFormat name="mp4" />
<!--
If a codec is not enabled, it is invisible to the applications

View File

@@ -24,15 +24,12 @@
alpha compositing functionality in hardware. If set, the window
manager will disable alpha trasformation in animations where not
strictly needed. -->
<bool name="config_sf_limitedAlpha">false</bool>
<bool name="config_sf_limitedAlpha">true</bool>
<!-- 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,12 @@
<item>"tiwlan\\d"</item>
</string-array>
<!-- If this is true, the screen will fade off. -->
<bool name="config_animateScreenLights">true</bool>
<!-- If this is true, the screen will fade off.
Setting it to false enables the electron beam -->
<bool name="config_animateScreenLights">false</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>
@@ -89,10 +88,15 @@
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">14</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

@@ -48,7 +48,7 @@
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>
<bool name="allow_in_call_touch_ui">true</bool>
<!-- OTA configuration values, used when provisioning CDMA devices.
Following defaults values of zero means OTA UI is completely disabled.

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

@@ -16,7 +16,7 @@ ro.ril.enable.a52=0
ro.ril.enable.a53=1
ro.ril.enable.dtm = 1
ro.ril.gprsclass = 12
ro.ril.hsdpa.category=8
ro.ril.hsdpa.category=10
ro.ril.hsupa.category=5
ro.ril.hsxpa=2
ro.ril.def.agps.mode = 2
@@ -40,6 +40,9 @@ view.touch_slop=15
view.minimum_fling_velocity=25
view.scroll_friction=0.008
# No Autofocus device
ro.workaround.noautofocus=1
# Default network type
# 0 => WCDMA Preferred.
ro.telephony.default_network=0
@@ -57,8 +60,8 @@ 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
# VM heap size
dalvik.vm.heapsize=24m
@@ -69,8 +72,8 @@ ro.compcache.default=18
# 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