diff options
-rw-r--r-- | BoardConfig.mk | 2 | ||||
-rw-r--r-- | CleanSpec.mk | 1 | ||||
-rw-r--r-- | Melfas_MMSxxx_Touchscreen.idc | 39 | ||||
-rw-r--r-- | audio/audio_hw.c | 189 | ||||
-rw-r--r-- | bcmdhd.cal | 84 | ||||
-rw-r--r-- | device.mk | 4 | ||||
-rw-r--r-- | dumpstate/Android.mk (renamed from Atmel_maXTouch_Touchscreen.idc) | 17 | ||||
-rw-r--r-- | dumpstate/NOTICE | 190 | ||||
-rw-r--r-- | dumpstate/dumpstate.c | 29 | ||||
-rwxr-xr-x | init.tuna.rc | 7 | ||||
-rw-r--r-- | kernel | bin | 3642356 -> 3649696 bytes | |||
-rw-r--r-- | overlay/packages/apps/Phone/res/values/config.xml | 23 | ||||
-rw-r--r-- | ueventd.tuna.rc | 3 |
13 files changed, 522 insertions, 66 deletions
diff --git a/BoardConfig.mk b/BoardConfig.mk index 1b3077b..46ef634 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -73,3 +73,5 @@ WIFI_DRIVER_FW_PATH_AP := "/vendor/firmware/fw_bcmdhd_apsta.bin" BOARD_HAVE_BLUETOOTH := true BOARD_HAVE_BLUETOOTH_BCM := true + +BOARD_LIB_DUMPSTATE := libdumpstate.tuna diff --git a/CleanSpec.mk b/CleanSpec.mk index df5b41e..cf089c4 100644 --- a/CleanSpec.mk +++ b/CleanSpec.mk @@ -48,3 +48,4 @@ # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST # ************************************************ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/default.prop) +$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/Phone_intermediates) diff --git a/Melfas_MMSxxx_Touchscreen.idc b/Melfas_MMSxxx_Touchscreen.idc new file mode 100644 index 0000000..8117e45 --- /dev/null +++ b/Melfas_MMSxxx_Touchscreen.idc @@ -0,0 +1,39 @@ +# Copyright (C) 2011 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. + +# +# Input Device Calibration File for the Tuna touch screen. +# + +# Basic Parameters +touch.deviceType = touchScreen +touch.orientationAware = 1 + +# Size +touch.size.calibration = diameter +touch.size.scale = 10 +touch.size.bias = 0 +touch.size.isSummed = 0 + +# Pressure +# Driver reports signal strength as pressure. +# +# A normal thumb touch typically registers about 200 signal strength +# units although we don't expect these values to be accurate. +touch.pressure.calibration = amplitude +touch.pressure.scale = 0.005 + +# Orientation +touch.orientation.calibration = none + diff --git a/audio/audio_hw.c b/audio/audio_hw.c index b0399da..0dc65ca 100644 --- a/audio/audio_hw.c +++ b/audio/audio_hw.c @@ -15,7 +15,7 @@ */ #define LOG_TAG "audio_hw_primary" -#define LOG_NDEBUG 0 +/*#define LOG_NDEBUG 0*/ #include <errno.h> #include <pthread.h> @@ -99,6 +99,13 @@ #define DEFAULT_OUT_SAMPLING_RATE 44100 +enum tty_modes { + TTY_MODE_OFF, + TTY_MODE_VCO, + TTY_MODE_HCO, + TTY_MODE_FULL +}; + struct pcm_config pcm_config_mm = { .channels = 2, .rate = 48000, @@ -240,7 +247,7 @@ struct route_setting mm_ul2_amic[] = { }; /* VX UL front-end paths */ -struct route_setting vx_ul_amic[] = { +struct route_setting vx_ul_amic_left[] = { { .ctl_name = MIXER_MUX_VX0, .strval = MIXER_AMIC0, @@ -258,6 +265,24 @@ struct route_setting vx_ul_amic[] = { }, }; +struct route_setting vx_ul_amic_right[] = { + { + .ctl_name = MIXER_MUX_VX0, + .strval = MIXER_AMIC1, + }, + { + .ctl_name = MIXER_MUX_VX1, + .strval = MIXER_AMIC0, + }, + { + .ctl_name = MIXER_VOICE_CAPTURE_MIXER_CAPTURE, + .intval = 1, + }, + { + .ctl_name = NULL, + }, +}; + struct route_setting vx_ul_bt[] = { { .ctl_name = MIXER_MUX_VX0, @@ -300,8 +325,11 @@ struct tuna_audio_device { struct pcm *pcm_modem_dl; struct pcm *pcm_modem_ul; int in_call; + int sub_mic_on; float voice_volume; struct tuna_stream_in *active_input; + bool mic_mute; + int tty_mode; /* RIL */ struct ril_handle ril; }; @@ -445,6 +473,7 @@ static void select_mode(struct tuna_audio_device *adev) static void select_output_device(struct tuna_audio_device *adev) { int headset_on; + int headphone_on; int speaker_on; int earpiece_on; int bt_on; @@ -455,12 +484,37 @@ static void select_output_device(struct tuna_audio_device *adev) if (adev->in_call) end_call(adev); - headset_on = adev->devices & - (AUDIO_DEVICE_OUT_WIRED_HEADSET | AUDIO_DEVICE_OUT_WIRED_HEADPHONE); + headset_on = adev->devices & AUDIO_DEVICE_OUT_WIRED_HEADSET; + headphone_on = adev->devices & AUDIO_DEVICE_OUT_WIRED_HEADPHONE; speaker_on = adev->devices & AUDIO_DEVICE_OUT_SPEAKER; earpiece_on = adev->devices & AUDIO_DEVICE_OUT_EARPIECE; bt_on = adev->devices & AUDIO_DEVICE_OUT_ALL_SCO; - dl1_on = headset_on | earpiece_on | bt_on; + + /* force rx path according to TTY mode when in call */ + if (adev->mode == AUDIO_MODE_IN_CALL && !bt_on) { + switch(adev->tty_mode) { + case TTY_MODE_FULL: + case TTY_MODE_VCO: + /* rx path to headphones */ + headphone_on = 1; + headset_on = 0; + speaker_on = 0; + earpiece_on = 0; + break; + case TTY_MODE_HCO: + /* rx path to device speaker */ + headphone_on = 0; + headset_on = 0; + speaker_on = 1; + earpiece_on = 0; + break; + case TTY_MODE_OFF: + default: + break; + } + } + + dl1_on = headset_on | headphone_on | earpiece_on | bt_on; /* Select front end */ mixer_ctl_set_value(adev->mixer_ctls.mm_dl2, 0, speaker_on); @@ -470,7 +524,8 @@ static void select_output_device(struct tuna_audio_device *adev) mixer_ctl_set_value(adev->mixer_ctls.vx_dl1, 0, dl1_on && (adev->mode == AUDIO_MODE_IN_CALL)); /* Select back end */ - mixer_ctl_set_value(adev->mixer_ctls.dl1_headset, 0, headset_on | earpiece_on); + mixer_ctl_set_value(adev->mixer_ctls.dl1_headset, 0, + headset_on | headphone_on | earpiece_on); mixer_ctl_set_value(adev->mixer_ctls.dl1_bt, 0, bt_on); mixer_ctl_set_value(adev->mixer_ctls.earpiece_enable, 0, earpiece_on); @@ -481,14 +536,40 @@ static void select_output_device(struct tuna_audio_device *adev) if (bt_on) set_route_by_array(adev->mixer, vx_ul_bt, bt_on); else { - set_route_by_array(adev->mixer, vx_ul_amic, - (speaker_on | headset_on | earpiece_on)); - if (headset_on) - mixer_ctl_set_enum_by_string(adev->mixer_ctls.left_capture, MIXER_HS_MIC); + /* force tx path according to TTY mode when in call */ + switch(adev->tty_mode) { + case TTY_MODE_FULL: + case TTY_MODE_HCO: + /* tx path from headset mic */ + headphone_on = 0; + headset_on = 1; + speaker_on = 0; + earpiece_on = 0; + break; + case TTY_MODE_VCO: + /* tx path from device sub mic */ + headphone_on = 0; + headset_on = 0; + speaker_on = 1; + earpiece_on = 0; + break; + case TTY_MODE_OFF: + default: + break; + } + + if (headset_on || headphone_on || earpiece_on) + set_route_by_array(adev->mixer, vx_ul_amic_left, 1); + else if (speaker_on) + set_route_by_array(adev->mixer, vx_ul_amic_right, 1); else - mixer_ctl_set_enum_by_string(adev->mixer_ctls.left_capture, - (speaker_on | earpiece_on) ? - MIXER_MAIN_MIC : "Off"); + set_route_by_array(adev->mixer, vx_ul_amic_left, 0); + + mixer_ctl_set_enum_by_string(adev->mixer_ctls.left_capture, + (earpiece_on || headphone_on) ? MIXER_MAIN_MIC : + (headset_on ? MIXER_HS_MIC : "Off")); + mixer_ctl_set_enum_by_string(adev->mixer_ctls.right_capture, + speaker_on ? MIXER_SUB_MIC : "Off"); } } if (adev->in_call) @@ -499,7 +580,6 @@ static void select_input_device(struct tuna_audio_device *adev) { int headset_on; int main_mic_on; - int sub_mic_on = 0; /* not routing to sub-mic for now */ int bt_on; int anlg_mic_on; int port; @@ -507,7 +587,7 @@ static void select_input_device(struct tuna_audio_device *adev) headset_on = adev->devices & AUDIO_DEVICE_IN_WIRED_HEADSET; main_mic_on = adev->devices & AUDIO_DEVICE_IN_BUILTIN_MIC; bt_on = adev->devices & AUDIO_DEVICE_IN_ALL_SCO; - anlg_mic_on = headset_on | main_mic_on | sub_mic_on; + anlg_mic_on = headset_on | main_mic_on; /* PORT_MM2_UL is only used when not in call and active input uses it. */ port = PORT_VX; @@ -530,17 +610,22 @@ static void select_input_device(struct tuna_audio_device *adev) /* Select front end */ set_route_by_array(adev->mixer, mm_ul2_amic, anlg_mic_on && (port != PORT_VX)); - set_route_by_array(adev->mixer, vx_ul_amic, + set_route_by_array(adev->mixer, vx_ul_amic_left, anlg_mic_on && (port == PORT_VX)); /* Select back end */ - if (headset_on) + mixer_ctl_set_enum_by_string(adev->mixer_ctls.right_capture, + (main_mic_on && adev->sub_mic_on) ? + MIXER_SUB_MIC : "Off"); + if (main_mic_on && !adev->sub_mic_on) + mixer_ctl_set_enum_by_string(adev->mixer_ctls.left_capture, + MIXER_MAIN_MIC); + else if (headset_on) mixer_ctl_set_enum_by_string(adev->mixer_ctls.left_capture, MIXER_HS_MIC); else mixer_ctl_set_enum_by_string(adev->mixer_ctls.left_capture, - main_mic_on ? MIXER_MAIN_MIC : "Off"); - /* TODO: set up sub mic for BACK_MIC when gpio for sub_mic is enabled */ + "Off"); } if (adev->in_call) @@ -910,6 +995,22 @@ static int in_set_parameters(struct audio_stream *stream, const char *kvpairs) parms = str_parms_create_str(kvpairs); + ret = str_parms_get_str(parms, AUDIO_PARAMETER_STREAM_INPUT_SOURCE, value, sizeof(value)); + if (ret >= 0) { + int sub_mic_on = 0; + + val = atoi(value); + if (val == AUDIO_SOURCE_CAMCORDER) + sub_mic_on = 1; + /* no audio source uses val == 0 */ + if (val != 0) { + pthread_mutex_lock(&adev->lock); + adev->sub_mic_on = sub_mic_on; + pthread_mutex_unlock(&adev->lock); + in_standby(stream); + } + } + ret = str_parms_get_str(parms, AUDIO_PARAMETER_STREAM_ROUTING, value, sizeof(value)); if (ret >= 0) { val = atoi(value); @@ -997,6 +1098,9 @@ static ssize_t in_read(struct audio_stream_in *stream, void* buffer, ret = pcm_read(in->pcm, buffer, bytes); } + if (ret == 0 && adev->mic_mute) + memset(buffer, 0, bytes); + exit: if (ret < 0) usleep(bytes * 1000000 / audio_stream_frame_size(&stream->common) / @@ -1091,7 +1195,39 @@ static void adev_close_output_stream(struct audio_hw_device *dev, static int adev_set_parameters(struct audio_hw_device *dev, const char *kvpairs) { - return -ENOSYS; + struct tuna_audio_device *adev = (struct tuna_audio_device *)dev; + struct str_parms *parms; + char *str; + char value[32]; + int ret; + + parms = str_parms_create_str(kvpairs); + ret = str_parms_get_str(parms, AUDIO_PARAMETER_KEY_TTY_MODE, value, sizeof(value)); + if (ret >= 0) { + int tty_mode; + + if (strcmp(value, AUDIO_PARAMETER_VALUE_TTY_OFF) == 0) + tty_mode = TTY_MODE_OFF; + else if (strcmp(value, AUDIO_PARAMETER_VALUE_TTY_VCO) == 0) + tty_mode = TTY_MODE_VCO; + else if (strcmp(value, AUDIO_PARAMETER_VALUE_TTY_HCO) == 0) + tty_mode = TTY_MODE_HCO; + else if (strcmp(value, AUDIO_PARAMETER_VALUE_TTY_FULL) == 0) + tty_mode = TTY_MODE_FULL; + else + return -EINVAL; + + pthread_mutex_lock(&adev->lock); + if (tty_mode != adev->tty_mode) { + adev->tty_mode = tty_mode; + if (adev->mode == AUDIO_MODE_IN_CALL) + select_output_device(adev); + } + pthread_mutex_unlock(&adev->lock); + } + + str_parms_destroy(parms); + return ret; } static char * adev_get_parameters(const struct audio_hw_device *dev, @@ -1138,12 +1274,20 @@ static int adev_set_mode(struct audio_hw_device *dev, int mode) static int adev_set_mic_mute(struct audio_hw_device *dev, bool state) { - return -ENOSYS; + struct tuna_audio_device *adev = (struct tuna_audio_device *)dev; + + adev->mic_mute = state; + + return 0; } static int adev_get_mic_mute(const struct audio_hw_device *dev, bool *state) { - return -ENOSYS; + struct tuna_audio_device *adev = (struct tuna_audio_device *)dev; + + *state = adev->mic_mute; + + return 0; } static size_t adev_get_input_buffer_size(const struct audio_hw_device *dev, @@ -1379,6 +1523,7 @@ static int adev_open(const hw_module_t* module, const char* name, adev->pcm_modem_dl = NULL; adev->pcm_modem_ul = NULL; adev->voice_volume = 1.0f; + adev->tty_mode = TTY_MODE_OFF; /* RIL */ ril_open(&adev->ril); @@ -26,60 +26,62 @@ sd_gpout=0 # sd_oobonly=1 muxenab=0x10 -# 2G PA para B42_110628 -pa0b0=5198 -pa0b1=64940 -pa0b2=65391 +# 2G PA param_B42R 110803 +pa0b0=0x137A +pa0b1=0xFDCF +pa0b2=0xFF77 #pa0itssit=62 rssismf2g=0xa rssismc2g=0x3 rssisav2g=0x7 -# rssi params for 5GHz +# rssi params for 5GHz B42R_110803 #rssismf5g=0x4 rssismf5g=0xa rssismc5g=0x7 rssisav5g=0x1 #PA parameters for lower band -pa1lob0=5408 -pa1lob1=64851 -pa1lob2=65337 +pa1lob0=0x144F +pa1lob1=0xFD6B +pa1lob2=0xFF3B #PA parameters for midband -pa1b0=5351 -pa1b1=64860 -pa1b2=65345 +pa1b0=0x139C +pa1b1=0xFD87 +pa1b2=0xFF4F #PA parameters for high band -pa1hib0=4924 -pa1hib1=64895 -pa1hib2=65329 +pa1hib0=0x12CA +pa1hib1=0xFD9A +pa1hib2=0xFF4E # 2G PA offset -maxp2ga0=72 +maxp2ga0=76 sromrev=3 cckpo=0 -ofdm2gpo=0x66666666 -mcs2gpo0=0xaaaa -mcs2gpo1=0xaaaa +ofdm2gpo=0x55555555 +mcs2gpo0=0x9999 +mcs2gpo1=0x9999 # 5G PA offset -maxp5ga0=60 -maxp5gla0=60 -maxp5gha0=60 -ofdm5gpo=0x33333333 -ofdm5glpo=0x33333333 -ofdm5ghpo=0x33333333 -mcs5gpo0=0x9999 -mcs5gpo1=0x9999 -mcs5glpo0=0x9999 -mcs5glpo1=0x9999 -mcs5ghpo0=0x9999 -mcs5ghpo1=0x9999 +maxp5ga0=66 +maxp5gla0=66 +maxp5gha0=66 +ofdm5gpo=0x22222222 +ofdm5glpo=0x11111111 +ofdm5ghpo=0x22222222 +mcs5gpo0=0x6666 +mcs5gpo1=0x6666 +mcs5glpo0=0x5555 +mcs5glpo1=0x5555 +mcs5ghpo0=0x6666 +mcs5ghpo1=0x6666 cckPwrOffset=4 cckdigfilttype=21 ofdmdigfilttype=2 -#wl0id=0x431b extpagain5g=2 +#wl0id=0x431b + +# For 2GHz Tx EVM/SM rfreg033=0x19 rfreg033_cck=0x1f pacalidx2g=65 @@ -87,15 +89,27 @@ dacrate2g=160 txalpfbyp2g=1 bphyscale=17 -#5GHz Carrier +# 5GHz LOFT and IQ CAL +txgaintbl5g=1 txiqlopapu5g=1 txiqlopag5g=0x10 -iqlocalidx5g=64 +iqlocalidx5g=24 -#5GHz-band Noise CAL parameter +# 5GHz Noise CAL parameter noise_cal_po_5g=5 +noise_cal_enable_5g=0 + +# 2GHz RxPER at low rates +noise_cal_ref_2g=56 +noise_cal_po_bias_2g=-4 +noise_cal_enable_2g=1 + +# Max input level on a-band +triso5g=9 +# Tx power control, especially temp. +tssitime=1 swctrlmap_2g=0x84048404, 0x82028202, 0x84048404, 0x010202, 0x1ff -swctrlmap_5g=0xC040C040, 0xB030A020, 0x8000C040, 0x010A02, 0x2F8 +swctrlmap_5g=0xC040C040, 0xB030A020, 0xA020C040, 0x010A02, 0x2F8 @@ -84,7 +84,7 @@ PRODUCT_PACKAGES += \ # Input device calibration files PRODUCT_COPY_FILES += \ - device/samsung/tuna/Atmel_maXTouch_Touchscreen.idc:system/usr/idc/Atmel_maXTouch_Touchscreen.idc + device/samsung/tuna/Melfas_MMSxxx_Touchscreen.idc:system/usr/idc/Melfas_MMSxxx_Touchscreen.idc # These are the hardware-specific features PRODUCT_COPY_FILES += \ @@ -137,7 +137,7 @@ endif $(call inherit-product, frameworks/base/build/tablet-dalvik-heap.mk) $(call inherit-product-if-exists, vendor/nxp/pn544/nxp-pn544-fw-vendor.mk) -$(call inherit-product, hardware/ti/omap4/omap4.mk) +$(call inherit-product, hardware/ti/omap4xxx/omap4.mk) $(call inherit-product-if-exists, vendor/ti/proprietary/omap4/ti-omap4-vendor.mk) $(call inherit-product-if-exists, vendor/samsung/tuna/device-vendor.mk) diff --git a/Atmel_maXTouch_Touchscreen.idc b/dumpstate/Android.mk index c3d1bea..e4168db 100644 --- a/Atmel_maXTouch_Touchscreen.idc +++ b/dumpstate/Android.mk @@ -1,4 +1,4 @@ -# Copyright (C) 2010 The Android Open Source Project +# Copyright (C) 2011 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. @@ -12,10 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -# -# Input Device Calibration File for the Tuna pre-lunchbox touch screen. -# This touch screen will not be present in the final hardware +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_C_INCLUDES := frameworks/base/cmds/dumpstate + +LOCAL_SRC_FILES := dumpstate.c + +LOCAL_MODULE := libdumpstate.tuna -# Basic Parameters -touch.deviceType = touchScreen +LOCAL_MODULE_TAGS := optional +include $(BUILD_STATIC_LIBRARY) diff --git a/dumpstate/NOTICE b/dumpstate/NOTICE new file mode 100644 index 0000000..a303bd0 --- /dev/null +++ b/dumpstate/NOTICE @@ -0,0 +1,190 @@ + + Copyright (C) 2011 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. + + 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. + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + diff --git a/dumpstate/dumpstate.c b/dumpstate/dumpstate.c new file mode 100644 index 0000000..8f8fa58 --- /dev/null +++ b/dumpstate/dumpstate.c @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2011 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include <dumpstate.h> + +void dumpstate_board() +{ + dump_file("board revision", "/sys/board_properties/revision"); + dump_file("soc family", "/sys/board_properties/soc/family"); + dump_file("soc revision", "/sys/board_properties/soc/revision"); + dump_file("soc type", "/sys/board_properties/soc/type"); + dump_file("soc die_id", "/sys/board_properties/soc/die_id"); + dump_file("soc production_id", "/sys/board_properties/soc/production_id"); + dump_file("pm_debug count", "/d/pm_debug/count"); + dump_file("pm_debug time", "/d/pm_debug/time"); +}; diff --git a/init.tuna.rc b/init.tuna.rc index a105fb9..80d9729 100755 --- a/init.tuna.rc +++ b/init.tuna.rc @@ -37,6 +37,9 @@ on fs chmod 0777 /dev/tiler chmod 0777 /dev/dmm +# change permissions for ION driver + chmod 0777 /dev/ion + # We chown/chmod /efs because mount is run as root + defaults chown radio radio /efs chmod 0775 /efs @@ -66,6 +69,10 @@ on fs chown root system /sys/class/sec/gps/GPS_nRST/value chmod 0660 /sys/class/sec/gps/GPS_nRST/value +# ril control auto-suspend + chmod 0660 /sys/bus/usb/devices/usb1/power/control + chown radio radio /sys/bus/usb/devices/usb1/power/control + service hciattach /system/bin/brcm_patchram_plus --enable_hci --no2bytes \ --tosleep 50000 --baudrate 3000000 --use_baudrate_for_download --i2s=1,1,0,1 \ --patchram /vendor/firmware/bcm4330.hcd /dev/ttyO1 Binary files differdiff --git a/overlay/packages/apps/Phone/res/values/config.xml b/overlay/packages/apps/Phone/res/values/config.xml new file mode 100644 index 0000000..29e3b62 --- /dev/null +++ b/overlay/packages/apps/Phone/res/values/config.xml @@ -0,0 +1,23 @@ +<?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. +--> + +<!-- Tuna-specific phone app resources. --> +<resources> + + <!-- Flag indicating if the tty is enabled --> + <bool name="tty_enabled">true</bool> + +</resources> diff --git a/ueventd.tuna.rc b/ueventd.tuna.rc index 0404a96..06f4d44 100644 --- a/ueventd.tuna.rc +++ b/ueventd.tuna.rc @@ -33,4 +33,5 @@ /dev/cdma_rmnet5 0660 radio radio /dev/lte_rmnet4 0660 radio radio /dev/ttyGS1 0660 radio radio -/dev/block/mmcblk0p4 0660 radio radio
\ No newline at end of file +/dev/block/mmcblk0p4 0660 radio radio +/dev/modem_br 0660 radio radio |