Skip to content
Permalink
Browse files

Merge remote branch 'origin/jellybean' into cm-10.1

Conflicts:
	BoardConfig.mk
	recovery/etc/init.rc
	system.prop
  • Loading branch information...
Dazzozo committed Jan 23, 2013
2 parents 09c5bb5 + 90b9e6a commit 86d7e6e01e62d6260118d68d2953bcf56a940147
@@ -14,16 +14,17 @@ TARGET_CPU_ABI := armeabi-v7a
TARGET_CPU_ABI2 := armeabi
TARGET_CPU_SMP := true

TARGET_ARCH := arm
TARGET_ARCH_VARIANT := armv7-a-neon

ARCH_ARM_HAVE_TLS_REGISTER := true

BOARD_USES_QCOM_HARDWARE := true
COMMON_GLOBAL_CFLAGS += -DQCOM_HARDWARE

TARGET_GLOBAL_CFLAGS += -mfpu=neon -mfloat-abi=softfp
TARGET_GLOBAL_CPPFLAGS += -mfpu=neon -mfloat-abi=softfp

WITH_JIT := true

# Optimisations used by Qualcomm
TARGET_CORTEX_CACHE_LINE_32 := true
TARGET_USE_SPARROW_BIONIC_OPTIMIZATION := true
@@ -57,27 +58,24 @@ BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := u8815
BOARD_RIL_CLASS := ../../../device/huawei/u8815/ril/

# Graphics
COMMON_GLOBAL_CFLAGS += -DQCOM_ICS_COMPAT
COMMON_GLOBAL_CFLAGS += -DANCIENT_GL
BOARD_EGL_CFG := device/huawei/u8815/configs/egl.cfg
USE_OPENGL_RENDERER := true
BOARD_ADRENO_DECIDE_TEXTURE_TARGET := true
BOARD_AVOID_DRAW_TEXTURE_EXTENSION := true
BOARD_USE_SKIA_LCDTEXT := true
TARGET_GRALLOC_USES_ASHMEM := true
TARGET_NO_HW_OVERLAY := true
BOARD_USE_LEGACY_TOUCHSCREEN := true
BOARD_ADRENO_DECIDE_TEXTURE_TARGET := true
TARGET_QCOM_DISPLAY_VARIANT := caf

# Video
COMMON_GLOBAL_CFLAGS += -DQCOM_NO_SECURE_PLAYBACK
COMMON_GLOBAL_CFLAGS += -DQCOM_ICS_DECODERS -DQCOM_NO_SECURE_PLAYBACK

# Web Rendering
WITH_JIT := true
ENABLE_JSC_JIT := true
ENABLE_WEBGL := true
TARGET_FORCE_CPU_UPLOAD := true
HTTP := chrome
JS_ENGINE := v8
TARGET_FORCE_CPU_UPLOAD := true

# USB
TARGET_USE_CUSTOM_LUN_FILE_PATH := /sys/class/android_usb/android0/f_mass_storage/lun%d/file
@@ -119,7 +117,7 @@ TARGET_CUSTOM_WIFI := ../../device/huawei/u8815/libhardware_legacy/wifi/wifi.c
# Kernel
TARGET_KERNEL_SOURCE := kernel/huawei/u8815
TARGET_KERNEL_CONFIG := cyanogenmod_u8815_defconfig
BOARD_KERNEL_CMDLINE := androidboot.hardware=huawei no_console_suspend=true
BOARD_KERNEL_CMDLINE := androidboot.hardware=huawei
BOARD_KERNEL_BASE := 0x00200000
BOARD_PAGE_SIZE := 2048

@@ -19,16 +19,13 @@ LOCAL_PATH:= $(call my-dir)
# hw/<COPYPIX_HARDWARE_MODULE_ID>.<ro.board.platform>.so
include $(CLEAR_VARS)

$(shell mkdir -p $(OUT)/obj/SHARED_LIBRARIES/libhwrpc_intermediates)
$(shell touch $(OUT)/obj/SHARED_LIBRARIES/libhwrpc_intermediates/export_includes)

LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := lights.c

LOCAL_PRELINK_MODULE := false
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw

LOCAL_SHARED_LIBRARIES := libhwrpc liblog
LOCAL_SHARED_LIBRARIES := libhardware_legacy liblog

LOCAL_MODULE := lights.u8815

@@ -31,11 +31,9 @@
#include <sys/types.h>

#include <hardware/lights.h>
#include <hardware_legacy/power.h>

/******************************************************************************/

/* In libhwrpc.so */
extern void huawei_oem_rapi_streaming_function(int n, int p1, int p2, int p3, int *v1, int *v2, int *v3);

static pthread_once_t g_init = PTHREAD_ONCE_INIT;
static pthread_mutex_t g_lock = PTHREAD_MUTEX_INITIALIZER;
@@ -45,6 +43,8 @@ static int g_backlight = 255;
static int g_buttons = 0;
static int g_attention = 0;

static pthread_t t_led_blink = 0;

char const*const RED_LED_FILE
= "/sys/class/leds/red/brightness";

@@ -57,18 +57,13 @@ char const*const BLUE_LED_FILE
char const*const LCD_FILE
= "/sys/class/leds/lcd-backlight/brightness";

char const*const RED_FREQ_FILE
= "/sys/class/leds/red/device/grpfreq";

char const*const RED_PWM_FILE
= "/sys/class/leds/red/device/grppwm";

char const*const RED_BLINK_FILE
= "/sys/class/leds/red/device/blink";

char const*const BUTTON_FILE
= "/sys/class/leds/button-backlight/brightness";

int red, green, blue = 0;
int blink, freq, pwm = 0;
int totalMS, onMS, offMS = 0;

/**
* device methods
*/
@@ -142,18 +137,38 @@ set_light_buttons(struct light_device_t* dev,
return err;
}

void
*led_blink()
{
while(blink) {
// pwm = 0 => always off
if(pwm != 0) {
write_int(RED_LED_FILE, red);
write_int(GREEN_LED_FILE, green);
write_int(BLUE_LED_FILE, blue);
usleep(onMS * 1000);
}

// pwm = 255 => always on
if(pwm != 255) {
write_int(RED_LED_FILE, 0);
write_int(GREEN_LED_FILE, 0);
write_int(BLUE_LED_FILE, 0);
usleep(offMS * 1000);
}
}
release_wake_lock("blink");
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;
int alpha;
unsigned int colorRGB;

int v[3];

switch (state->flashMode) {
case LIGHT_FLASH_TIMED:
onMS = state->flashOnMS;
@@ -177,18 +192,14 @@ set_speaker_light_locked(struct light_device_t* dev,
green = (colorRGB >> 8) & 0xFF;
blue = colorRGB & 0xFF;

write_int(RED_LED_FILE, red);
write_int(GREEN_LED_FILE, green);
write_int(BLUE_LED_FILE, blue);

if (onMS > 0 && offMS > 0) {
int totalMS = onMS + offMS;
totalMS = onMS + offMS;

// the LED appears to blink about once per second if freq is 20
// 1000ms / 20 = 50
freq = totalMS / 50;
// pwm specifies the ratio of ON versus OFF
// pwm = 0 -> always off
// pwm = 0 => always off
// pwm = 255 => always on
pwm = (onMS * 255) / totalMS;

@@ -197,27 +208,20 @@ set_speaker_light_locked(struct light_device_t* dev,
pwm = 16;

blink = 1;

v[0] = colorRGB;
v[1] = onMS/2;
v[2] = offMS;
huawei_oem_rapi_streaming_function(0x26, 0, 0, 0xc, v, 0, 0);
} else {
blink = 0;
freq = 0;
pwm = 0;

v[0] = colorRGB;
v[1] = 0;
v[2] = 0;
huawei_oem_rapi_streaming_function(0x26, 0, 0, 0xc, v, 0, 0);
}

if (blink) {
write_int(RED_FREQ_FILE, freq);
write_int(RED_PWM_FILE, pwm);
if(blink) {
acquire_wake_lock(PARTIAL_WAKE_LOCK, "blink");
pthread_create(&t_led_blink, NULL, led_blink, NULL);
} else {
write_int(RED_LED_FILE, red);
write_int(GREEN_LED_FILE, green);
write_int(BLUE_LED_FILE, blue);
}
write_int(RED_BLINK_FILE, blink);

return 0;
}
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/* //device/apps/common/assets/res/any/colors.xml
**
** Copyright 2006, 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">

<!-- Defines the shutdown options shown in the reboot dialog. -->
<array name="shutdown_reboot_options" translatable="false">
<item>@string/reboot_reboot</item>
<item>@string/reboot_recovery</item>
</array>

<!-- Do not translate. Defines the shutdown actions passed to the kernel.
The first item should be empty for regular reboot. -->
<string-array name="shutdown_reboot_actions" translatable="false">
<item></item>
<item>recovery</item>
</string-array>

</resources>
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
**
** Copyright 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.
*/
-->

<device name="Android">
<item name="none">0</item>
<item name="screen.on">30</item>
<item name="bluetooth.active">103</item>
<item name="bluetooth.on">0.8</item>
<item name="bluetooth.at">35690</item>
<item name="screen.full">114</item>
<item name="wifi.on">23</item>
<item name="wifi.active">200</item>
<item name="wifi.scan">200</item>
<item name="dsp.audio">70</item>
<item name="dsp.video">100</item>
<item name="radio.active">230</item>
<item name="gps.on">120</item>
<array name="radio.on">
<value>90</value>
<value>3</value>
</array>
<array name="cpu.speeds">
<value>122880</value>
<value>245760</value>
<value>320000</value>
<value>480000</value>
<value>600000</value>
<value>800000</value>
<value>1008000</value>
<value>1056000</value>
<value>1113600</value>
<value>1152000</value>
<value>1190400</value>
<value>1228800</value>
<value>1267200</value>
</array>
<item name="cpu.idle">1.0</item>
<item name="cpu.awake">20</item>
<array name="cpu.active">
<value>51</value>
<value>58</value>
<value>63</value>
<value>70</value>
<value>80</value>
<value>105</value>
<value>120</value>
<value>125</value>
<value>129</value>
<value>132</value>
<value>135</value>
<value>138</value>
<value>142</value>
</array>
<item name="battery.capacity">1500</item>
</device>
@@ -3,28 +3,25 @@
#

# Audio
dev.pm.dyn_sample_period=700000
dev.pm.dyn_samplingrate=1
headset.hook.delay=500

# Bluetooth
ro.bluetooth.remote.autoconnect=true
ro.bluetooth.request.master=true
ro.qualcomm.bluetooth.dun=true
ro.qualcomm.bluetooth.ftp=true

# CWM
ro.cwm.enable_key_repeat=true

# Dalvik
dalvik.vm.dexopt-data-only=1
dalvik.vm.execution-mode=int:jit
dalvik.vm.heapgrowthlimit=36m
dalvik.vm.heapsize=128m
dalvik.vm.heapgrowthlimit=32m
dalvik.vm.heapsize=76m
dalvik.vm.heapstartsize=5m

# Display
debug.composition.type=mdp
debug.hwc.dynThreshold=1.91
debug.sf.hw=1
debug.sf.swaprect=1
gfx.highend_override=yes
hwui.render_dirty_regions=true
persist.sys.use_dithering=2
ro.max.fling_velocity=4000
ro.opengles.version=131072
ro.sf.lcd_density=240
@@ -36,8 +33,8 @@ ro.confg.hw_appversion=U8815VCM10_1_KERNEL

# Qualcomm
com.qc.hardware=true
debug.composition.7x27A.type=mdp
hwui.render_dirty_regions.7x27A=true
dev.pm.dyn_sample_period=700000
dev.pm.dyn_samplingrate=1
ro.hw_plat=7x27A
ro.vendor.extension_library=/system/lib/libqc-opt.so

0 comments on commit 86d7e6e

Please sign in to comment.
You can’t perform that action at this time.