├── OLD ├── copybit.h ├── frameworks_base-preprocessing.patch ├── frameworks_base-radio.patch ├── libaudio.patch ├── libaudiohw_legacy.patch ├── spl_inl.h └── synaptics-rmi-touchscreen.idc ├── README ├── build-core_user_tags.patch ├── build-v6j.patch ├── camera.zip └── dalvik-armv6j.patch /OLD/copybit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef ANDROID_COPYBIT_INTERFACE_H 18 | #define ANDROID_COPYBIT_INTERFACE_H 19 | 20 | #include 21 | 22 | #include 23 | #include 24 | #include 25 | 26 | __BEGIN_DECLS 27 | 28 | /** 29 | * The id of this module 30 | */ 31 | #define COPYBIT_HARDWARE_MODULE_ID "copybit" 32 | 33 | /** 34 | * Name of the graphics device to open 35 | */ 36 | #define COPYBIT_HARDWARE_COPYBIT0 "copybit0" 37 | 38 | /* supported pixel-formats. these must be compatible with 39 | * graphics/PixelFormat.java, ui/PixelFormat.h, pixelflinger/format.h 40 | */ 41 | enum { 42 | COPYBIT_FORMAT_RGBA_8888 = HAL_PIXEL_FORMAT_RGBA_8888, 43 | COPYBIT_FORMAT_RGBX_8888 = HAL_PIXEL_FORMAT_RGBX_8888, 44 | COPYBIT_FORMAT_RGB_888 = HAL_PIXEL_FORMAT_RGB_888, 45 | COPYBIT_FORMAT_RGB_565 = HAL_PIXEL_FORMAT_RGB_565, 46 | COPYBIT_FORMAT_BGRA_8888 = HAL_PIXEL_FORMAT_BGRA_8888, 47 | COPYBIT_FORMAT_RGBA_5551 = HAL_PIXEL_FORMAT_RGBA_5551, 48 | COPYBIT_FORMAT_RGBA_4444 = HAL_PIXEL_FORMAT_RGBA_4444, 49 | COPYBIT_FORMAT_YCbCr_422_SP = 0x10, 50 | COPYBIT_FORMAT_YCrCb_420_SP = 0x11, 51 | }; 52 | 53 | /* name for copybit_set_parameter */ 54 | enum { 55 | /* rotation of the source image in degrees (0 to 359) */ 56 | COPYBIT_ROTATION_DEG = 1, 57 | /* plane alpha value */ 58 | COPYBIT_PLANE_ALPHA = 2, 59 | /* enable or disable dithering */ 60 | COPYBIT_DITHER = 3, 61 | /* transformation applied (this is a superset of COPYBIT_ROTATION_DEG) */ 62 | COPYBIT_TRANSFORM = 4, 63 | /* blurs the copied bitmap. The amount of blurring cannot be changed 64 | * at this time. */ 65 | COPYBIT_BLUR = 5 66 | }; 67 | 68 | /* values for copybit_set_parameter(COPYBIT_TRANSFORM) */ 69 | enum { 70 | /* flip source image horizontally */ 71 | COPYBIT_TRANSFORM_FLIP_H = HAL_TRANSFORM_FLIP_H, 72 | /* flip source image vertically */ 73 | COPYBIT_TRANSFORM_FLIP_V = HAL_TRANSFORM_FLIP_V, 74 | /* rotate source image 90 degres */ 75 | COPYBIT_TRANSFORM_ROT_90 = HAL_TRANSFORM_ROT_90, 76 | /* rotate source image 180 degres */ 77 | COPYBIT_TRANSFORM_ROT_180 = HAL_TRANSFORM_ROT_180, 78 | /* rotate source image 270 degres */ 79 | COPYBIT_TRANSFORM_ROT_270 = HAL_TRANSFORM_ROT_270, 80 | }; 81 | 82 | /* enable/disable value copybit_set_parameter */ 83 | enum { 84 | COPYBIT_DISABLE = 0, 85 | COPYBIT_ENABLE = 1 86 | }; 87 | 88 | /* use get_static_info() to query static informations about the hardware */ 89 | enum { 90 | /* Maximum amount of minification supported by the hardware*/ 91 | COPYBIT_MINIFICATION_LIMIT = 1, 92 | /* Maximum amount of magnification supported by the hardware */ 93 | COPYBIT_MAGNIFICATION_LIMIT = 2, 94 | /* Number of fractional bits support by the scaling engine */ 95 | COPYBIT_SCALING_FRAC_BITS = 3, 96 | /* Supported rotation step in degres. */ 97 | COPYBIT_ROTATION_STEP_DEG = 4, 98 | }; 99 | 100 | /* Image structure */ 101 | struct copybit_image_t { 102 | /* width */ 103 | uint32_t w; 104 | /* height */ 105 | uint32_t h; 106 | /* format COPYBIT_FORMAT_xxx */ 107 | int32_t format; 108 | /* base of buffer with image */ 109 | void *base; 110 | /* handle to the image */ 111 | native_handle_t* handle; 112 | }; 113 | 114 | /* Rectangle */ 115 | struct copybit_rect_t { 116 | /* left */ 117 | int l; 118 | /* top */ 119 | int t; 120 | /* right */ 121 | int r; 122 | /* bottom */ 123 | int b; 124 | }; 125 | 126 | /* Region */ 127 | struct copybit_region_t { 128 | int (*next)(struct copybit_region_t const *region, struct copybit_rect_t *rect); 129 | }; 130 | 131 | /** 132 | * Every hardware module must have a data structure named HAL_MODULE_INFO_SYM 133 | * and the fields of this data structure must begin with hw_module_t 134 | * followed by module specific information. 135 | */ 136 | struct copybit_module_t { 137 | struct hw_module_t common; 138 | }; 139 | 140 | /** 141 | * Every device data structure must begin with hw_device_t 142 | * followed by module specific public methods and attributes. 143 | */ 144 | struct copybit_device_t { 145 | struct hw_device_t common; 146 | 147 | /** 148 | * Set a copybit parameter. 149 | * 150 | * @param dev from open 151 | * @param name one for the COPYBIT_NAME_xxx 152 | * @param value one of the COPYBIT_VALUE_xxx 153 | * 154 | * @return 0 if successful 155 | */ 156 | int (*set_parameter)(struct copybit_device_t *dev, int name, int value); 157 | 158 | /** 159 | * Get a static copybit information. 160 | * 161 | * @param dev from open 162 | * @param name one of the COPYBIT_STATIC_xxx 163 | * 164 | * @return value or -EINVAL if error 165 | */ 166 | int (*get)(struct copybit_device_t *dev, int name); 167 | 168 | /** 169 | * Execute the bit blit copy operation 170 | * 171 | * @param dev from open 172 | * @param dst is the destination image 173 | * @param src is the source image 174 | * @param region the clip region 175 | * 176 | * @return 0 if successful 177 | */ 178 | int (*blit)(struct copybit_device_t *dev, 179 | struct copybit_image_t const *dst, 180 | struct copybit_image_t const *src, 181 | struct copybit_region_t const *region); 182 | 183 | /** 184 | * Execute the stretch bit blit copy operation 185 | * 186 | * @param dev from open 187 | * @param dst is the destination image 188 | * @param src is the source image 189 | * @param dst_rect is the destination rectangle 190 | * @param src_rect is the source rectangle 191 | * @param region the clip region 192 | * 193 | * @return 0 if successful 194 | */ 195 | int (*stretch)(struct copybit_device_t *dev, 196 | struct copybit_image_t const *dst, 197 | struct copybit_image_t const *src, 198 | struct copybit_rect_t const *dst_rect, 199 | struct copybit_rect_t const *src_rect, 200 | struct copybit_region_t const *region); 201 | }; 202 | 203 | 204 | /** convenience API for opening and closing a device */ 205 | 206 | static inline int copybit_open(const struct hw_module_t* module, 207 | struct copybit_device_t** device) { 208 | return module->methods->open(module, 209 | COPYBIT_HARDWARE_COPYBIT0, (struct hw_device_t**)device); 210 | } 211 | 212 | static inline int copybit_close(struct copybit_device_t* device) { 213 | return device->common.close(&device->common); 214 | } 215 | 216 | 217 | __END_DECLS 218 | 219 | #endif // ANDROID_COPYBIT_INTERFACE_H 220 | -------------------------------------------------------------------------------- /OLD/frameworks_base-preprocessing.patch: -------------------------------------------------------------------------------- 1 | commit d47e011666084da68b23aecce57054100426fef3 2 | Author: wjb 3 | Date: Fri Nov 18 23:09:33 2011 -0500 4 | 5 | Temporary hack to avoid building libpreprocessing (needs webrtc) - rename Android.mk 6 | 7 | Change-Id: I5c193036d88dcb18b73a72d464f5e3f52a147c5b 8 | 9 | diff --git a/media/libeffects/preprocessing/Android.mk b/media/libeffects/preprocessing/Android.mk 10 | deleted file mode 100755 11 | index 77d40b6..0000000 12 | --- a/media/libeffects/preprocessing/Android.mk 13 | +++ /dev/null 14 | @@ -1,32 +0,0 @@ 15 | -LOCAL_PATH:= $(call my-dir) 16 | - 17 | -# audio preprocessing wrapper 18 | -include $(CLEAR_VARS) 19 | - 20 | -LOCAL_MODULE:= libaudiopreprocessing 21 | -LOCAL_MODULE_TAGS := optional 22 | -LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/soundfx 23 | - 24 | -LOCAL_SRC_FILES:= \ 25 | - PreProcessing.cpp 26 | - 27 | -LOCAL_C_INCLUDES += \ 28 | - external/webrtc/src \ 29 | - external/webrtc/src/modules/interface \ 30 | - external/webrtc/src/modules/audio_processing/main/interface \ 31 | - system/media/audio_effects/include 32 | - 33 | -LOCAL_C_INCLUDES += $(call include-path-for, speex) 34 | - 35 | -LOCAL_SHARED_LIBRARIES := \ 36 | - libwebrtc_audio_preprocessing \ 37 | - libspeexresampler \ 38 | - libutils 39 | - 40 | -ifeq ($(TARGET_SIMULATOR),true) 41 | -LOCAL_LDLIBS += -ldl 42 | -else 43 | -LOCAL_SHARED_LIBRARIES += libdl 44 | -endif 45 | - 46 | -include $(BUILD_SHARED_LIBRARY) 47 | diff --git a/media/libeffects/preprocessing/Android.mk.bak b/media/libeffects/preprocessing/Android.mk.bak 48 | new file mode 100755 49 | index 0000000..77d40b6 50 | --- /dev/null 51 | +++ b/media/libeffects/preprocessing/Android.mk.bak 52 | @@ -0,0 +1,32 @@ 53 | +LOCAL_PATH:= $(call my-dir) 54 | + 55 | +# audio preprocessing wrapper 56 | +include $(CLEAR_VARS) 57 | + 58 | +LOCAL_MODULE:= libaudiopreprocessing 59 | +LOCAL_MODULE_TAGS := optional 60 | +LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/soundfx 61 | + 62 | +LOCAL_SRC_FILES:= \ 63 | + PreProcessing.cpp 64 | + 65 | +LOCAL_C_INCLUDES += \ 66 | + external/webrtc/src \ 67 | + external/webrtc/src/modules/interface \ 68 | + external/webrtc/src/modules/audio_processing/main/interface \ 69 | + system/media/audio_effects/include 70 | + 71 | +LOCAL_C_INCLUDES += $(call include-path-for, speex) 72 | + 73 | +LOCAL_SHARED_LIBRARIES := \ 74 | + libwebrtc_audio_preprocessing \ 75 | + libspeexresampler \ 76 | + libutils 77 | + 78 | +ifeq ($(TARGET_SIMULATOR),true) 79 | +LOCAL_LDLIBS += -ldl 80 | +else 81 | +LOCAL_SHARED_LIBRARIES += libdl 82 | +endif 83 | + 84 | +include $(BUILD_SHARED_LIBRARY) 85 | -------------------------------------------------------------------------------- /OLD/frameworks_base-radio.patch: -------------------------------------------------------------------------------- 1 | diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java 2 | index 8c42f31..b833d25 100644 3 | --- a/services/java/com/android/server/ConnectivityService.java 4 | +++ b/services/java/com/android/server/ConnectivityService.java 5 | @@ -716,8 +716,9 @@ public class ConnectivityService extends IConnectivityManager.Stub { 6 | 7 | @Override 8 | public boolean isNetworkSupported(int networkType) { 9 | - enforceAccessPermission(); 10 | - return (isNetworkTypeValid(networkType) && (mNetTrackers[networkType] != null)); 11 | + return true; 12 | +// enforceAccessPermission(); 13 | +// return (isNetworkTypeValid(networkType) && (mNetTrackers[networkType] != null)); 14 | } 15 | 16 | /** 17 | -------------------------------------------------------------------------------- /OLD/libaudio.patch: -------------------------------------------------------------------------------- 1 | diff -u hardware/msm7k/libaudio/Android.mk hardware/msm7k/libaudio/Android.mk 2 | --- hardware/msm7k/libaudio/Android.mk 2011-11-18 22:11:47.799689928 -0500 3 | +++ hardware/msm7k/libaudio/Android.mk 2011-11-18 13:27:41.000000000 -0500 4 | @@ -1,52 +1,58 @@ 5 | - 6 | +ifeq ($(TARGET_BOOTLOADER_BOARD_NAME),heroc) 7 | ifneq ($(BUILD_TINY_ANDROID),true) 8 | 9 | LOCAL_PATH := $(call my-dir) 10 | 11 | include $(CLEAR_VARS) 12 | 13 | -LOCAL_SRC_FILES:= \ 14 | - AudioPolicyManager.cpp 15 | +LOCAL_MODULE := libaudio 16 | 17 | LOCAL_SHARED_LIBRARIES := \ 18 | libcutils \ 19 | libutils \ 20 | - libmedia 21 | + libmedia \ 22 | + libhardware_legacy \ 23 | + libcutils \ 24 | + libsysutils 25 | 26 | -LOCAL_STATIC_LIBRARIES := libaudiopolicybase 27 | +ifeq ($TARGET_OS)-$(TARGET_SIMULATOR),linux-true) 28 | +LOCAL_LDLIBS += -ldl 29 | +endif 30 | 31 | -LOCAL_MODULE:= libaudiopolicy 32 | -LOCAL_MODULE_TAGS:= optional 33 | +ifneq ($(TARGET_SIMULATOR),true) 34 | +LOCAL_SHARED_LIBRARIES += libdl 35 | +endif 36 | + 37 | +LOCAL_SRC_FILES += AudioHardware.cpp 38 | + 39 | +LOCAL_CFLAGS += -fno-short-enums 40 | + 41 | +LOCAL_STATIC_LIBRARIES += A2dpAudioInterface 42 | ifeq ($(BOARD_HAVE_BLUETOOTH),true) 43 | - LOCAL_CFLAGS += -DWITH_A2DP 44 | + LOCAL_SHARED_LIBRARIES += audio.a2dp.default libbinder 45 | endif 46 | 47 | include $(BUILD_SHARED_LIBRARY) 48 | 49 | - 50 | include $(CLEAR_VARS) 51 | 52 | -LOCAL_MODULE := libaudio 53 | -LOCAL_MODULE_TAGS := optional 54 | +LOCAL_SRC_FILES:= \ 55 | + AudioPolicyManager.cpp 56 | 57 | LOCAL_SHARED_LIBRARIES := \ 58 | libcutils \ 59 | libutils \ 60 | - libmedia \ 61 | - libhardware_legacy 62 | - 63 | -LOCAL_SHARED_LIBRARIES += libdl 64 | + libmedia 65 | 66 | -LOCAL_SRC_FILES += AudioHardware.cpp 67 | +LOCAL_STATIC_LIBRARIES := libaudiopolicy_legacy 68 | 69 | -LOCAL_CFLAGS += -fno-short-enums 70 | +LOCAL_MODULE:= libaudiopolicy 71 | 72 | -LOCAL_STATIC_LIBRARIES += libaudiointerface 73 | ifeq ($(BOARD_HAVE_BLUETOOTH),true) 74 | - LOCAL_SHARED_LIBRARIES += liba2dp 75 | + LOCAL_CFLAGS += -DWITH_A2DP 76 | endif 77 | 78 | include $(BUILD_SHARED_LIBRARY) 79 | 80 | endif # not BUILD_TINY_ANDROID 81 | - 82 | +endif # TARGET_BOOTLOADER_BOARD_NAME 83 | diff -u hardware/msm7k/libaudio/AudioHardware.cpp hardware/msm7k/libaudio/AudioHardware.cpp 84 | --- hardware/msm7k/libaudio/AudioHardware.cpp 2011-11-18 22:11:47.799689928 -0500 85 | +++ hardware/msm7k/libaudio/AudioHardware.cpp 2011-11-18 11:12:08.000000000 -0500 86 | @@ -36,7 +36,8 @@ 87 | 88 | #define LOG_SND_RPC 0 // Set to 1 to log sound RPC's 89 | 90 | -namespace android { 91 | +//namespace android { 92 | +namespace android_audio_legacy{ 93 | static int audpre_index, tx_iir_index; 94 | static void * acoustic; 95 | const uint32_t AudioHardware::inputSamplingRates[] = { 96 | @@ -158,7 +159,8 @@ 97 | uint32_t devices, int *format, uint32_t *channels, uint32_t *sampleRate, status_t *status) 98 | { 99 | { // scope for the lock 100 | - Mutex::Autolock lock(mLock); 101 | + //Mutex::Autolock lock(mLock); 102 | + android::Mutex::Autolock lock(mLock); 103 | 104 | // only one output stream allowed 105 | if (mOutput) { 106 | @@ -184,7 +186,8 @@ 107 | } 108 | 109 | void AudioHardware::closeOutputStream(AudioStreamOut* out) { 110 | - Mutex::Autolock lock(mLock); 111 | + //Mutex::Autolock lock(mLock); 112 | + android::Mutex::Autolock lock(mLock); 113 | if (mOutput == 0 || mOutput != out) { 114 | LOGW("Attempt to close invalid output stream"); 115 | } 116 | @@ -223,7 +226,8 @@ 117 | } 118 | 119 | void AudioHardware::closeInputStream(AudioStreamIn* in) { 120 | - Mutex::Autolock lock(mLock); 121 | + //Mutex::Autolock lock(mLock); 122 | + android::Mutex::Autolock lock(mLock); 123 | 124 | ssize_t index = mInputs.indexOf((AudioStreamInMSM72xx *)in); 125 | if (index < 0) { 126 | @@ -258,7 +262,8 @@ 127 | 128 | status_t AudioHardware::setMicMute(bool state) 129 | { 130 | - Mutex::Autolock lock(mLock); 131 | + //Mutex::Autolock lock(mLock); 132 | + android::Mutex::Autolock lock(mLock); 133 | return setMicMute_nosync(state); 134 | } 135 | 136 | @@ -410,14 +415,16 @@ 137 | LOGD("setVoiceVolume(%f)\n", v); 138 | LOGI("Setting in-call volume to %d (available range is 0 to 5)\n", vol); 139 | 140 | - Mutex::Autolock lock(mLock); 141 | + //Mutex::Autolock lock(mLock); 142 | + android::Mutex::Autolock lock(mLock); 143 | set_volume_rpc(SND_DEVICE_CURRENT, SND_METHOD_VOICE, vol); 144 | return NO_ERROR; 145 | } 146 | 147 | status_t AudioHardware::setMasterVolume(float v) 148 | { 149 | - Mutex::Autolock lock(mLock); 150 | + //Mutex::Autolock lock(mLock); 151 | + android::Mutex::Autolock lock(mLock); 152 | int vol = ceil(v * 5.0); 153 | LOGI("Set master volume to %d.\n", vol); 154 | /* 155 | @@ -494,7 +501,8 @@ 156 | if (!acoustic) 157 | return 0; 158 | 159 | - Mutex::Autolock lock(mLock); 160 | + //Mutex::Autolock lock(mLock); 161 | + android::Mutex::Autolock lock(mLock); 162 | uint32_t outputDevices = mOutput->devices(); 163 | status_t ret = NO_ERROR; 164 | int (*msm72xx_enable_audpp)(int); 165 | @@ -589,7 +597,8 @@ 166 | 167 | status_t AudioHardware::checkMicMute() 168 | { 169 | - Mutex::Autolock lock(mLock); 170 | + //Mutex::Autolock lock(mLock); 171 | + android::Mutex::Autolock lock(mLock); 172 | if (mMode != AudioSystem::MODE_IN_CALL) { 173 | setMicMute_nosync(true); 174 | } 175 | @@ -1013,7 +1022,7 @@ 176 | uint8_t* p = static_cast(buffer); 177 | 178 | if (mState < AUDIO_INPUT_OPENED) { 179 | - Mutex::Autolock lock(mHardware->mLock); 180 | + android::Mutex::Autolock lock(mHardware->mLock); 181 | if (set(mHardware, mDevices, &mFormat, &mChannels, &mSampleRate, mAcoustics) != NO_ERROR) { 182 | return -1; 183 | } 184 | diff -u hardware/msm7k/libaudio/AudioHardware.h hardware/msm7k/libaudio/AudioHardware.h 185 | --- hardware/msm7k/libaudio/AudioHardware.h 2011-11-18 22:11:47.799689928 -0500 186 | +++ hardware/msm7k/libaudio/AudioHardware.h 2011-11-18 11:03:37.000000000 -0500 187 | @@ -29,7 +29,8 @@ 188 | #include 189 | } 190 | 191 | -namespace android { 192 | +//namespace android { 193 | +namespace android_audio_legacy { 194 | 195 | // ---------------------------------------------------------------------------- 196 | // Kernel driver interface 197 | @@ -180,6 +181,8 @@ 198 | virtual String8 getParameters(const String8& keys); 199 | uint32_t devices() { return mDevices; } 200 | virtual status_t getRenderPosition(uint32_t *dspFrames); 201 | + virtual status_t addAudioEffect(effect_handle_t effect){return INVALID_OPERATION;} 202 | + virtual status_t removeAudioEffect(effect_handle_t effect){return INVALID_OPERATION;} 203 | 204 | private: 205 | AudioHardware* mHardware; 206 | @@ -219,6 +222,8 @@ 207 | virtual unsigned int getInputFramesLost() const { return 0; } 208 | uint32_t devices() { return mDevices; } 209 | int state() const { return mState; } 210 | + virtual status_t addAudioEffect(effect_handle_t effect){return INVALID_OPERATION;} 211 | + virtual status_t removeAudioEffect(effect_handle_t effect){return INVALID_OPERATION;} 212 | 213 | private: 214 | AudioHardware* mHardware; 215 | @@ -239,15 +244,16 @@ 216 | bool mBluetoothNrec; 217 | uint32_t mBluetoothId; 218 | AudioStreamOutMSM72xx* mOutput; 219 | - SortedVector mInputs; 220 | + //SortedVector mInputs; 221 | + android::SortedVector mInputs; 222 | 223 | msm_snd_endpoint *mSndEndpoints; 224 | int mNumSndEndpoints; 225 | int mCurSndDevice; 226 | 227 | friend class AudioStreamInMSM72xx; 228 | - Mutex mLock; 229 | - 230 | + //Mutex mLock; 231 | + android::Mutex mLock; 232 | int SND_DEVICE_CURRENT; 233 | int SND_DEVICE_HANDSET; 234 | int SND_DEVICE_SPEAKER; 235 | diff -u hardware/msm7k/libaudio/AudioPolicyManager.cpp hardware/msm7k/libaudio/AudioPolicyManager.cpp 236 | --- hardware/msm7k/libaudio/AudioPolicyManager.cpp 2011-11-18 22:11:47.799689928 -0500 237 | +++ hardware/msm7k/libaudio/AudioPolicyManager.cpp 2011-11-18 11:04:49.000000000 -0500 238 | @@ -20,7 +20,8 @@ 239 | #include "AudioPolicyManager.h" 240 | #include 241 | 242 | -namespace android { 243 | +//namespace android { 244 | +namespace android_audio_legacy { 245 | 246 | 247 | 248 | diff -u hardware/msm7k/libaudio/AudioPolicyManager.h hardware/msm7k/libaudio/AudioPolicyManager.h 249 | --- hardware/msm7k/libaudio/AudioPolicyManager.h 2011-11-18 22:11:47.799689928 -0500 250 | +++ hardware/msm7k/libaudio/AudioPolicyManager.h 2011-11-18 11:05:20.000000000 -0500 251 | @@ -23,7 +23,9 @@ 252 | #include 253 | 254 | 255 | -namespace android { 256 | +//namespace android { 257 | + 258 | +namespace android_audio_legacy { 259 | 260 | class AudioPolicyManager: public AudioPolicyManagerBase 261 | { 262 | -------------------------------------------------------------------------------- /OLD/libaudiohw_legacy.patch: -------------------------------------------------------------------------------- 1 | diff --git a/audio/Android.mk b/audio/Android.mk 2 | index ef41374..1cdd3a9 100644 3 | --- a/audio/Android.mk 4 | +++ b/audio/Android.mk 5 | @@ -77,17 +77,21 @@ include $(BUILD_SHARED_LIBRARY) 6 | #ifeq ($(strip $(BOARD_USES_GENERIC_AUDIO)),true) 7 | # LOCAL_CFLAGS += -D GENERIC_AUDIO 8 | #endif 9 | +include $(CLEAR_VARS) 10 | +ifeq ($(BOARD_HAVE_BLUETOOTH),true) 11 | + LOCAL_SRC_FILES += A2dpAudioInterface.cpp 12 | + LOCAL_SHARED_LIBRARIES += audio.a2dp.default 13 | + LOCAL_C_INCLUDES += $(call include-path-for, bluez) 14 | + 15 | + LOCAL_CFLAGS += \ 16 | + -DWITH_BLUETOOTH \ 17 | + -DWITH_A2DP 18 | + 19 | +LOCAL_MODULE := A2dpAudioInterface 20 | +LOCAL_MODULE_TAGS := optional 21 | +include $(BUILD_STATIC_LIBRARY) 22 | +endif 23 | 24 | -#ifeq ($(BOARD_HAVE_BLUETOOTH),true) 25 | -# LOCAL_SRC_FILES += A2dpAudioInterface.cpp 26 | -# LOCAL_SHARED_LIBRARIES += liba2dp 27 | -# LOCAL_C_INCLUDES += $(call include-path-for, bluez) 28 | -# 29 | -# LOCAL_CFLAGS += \ 30 | -# -DWITH_BLUETOOTH \ 31 | -# -DWITH_A2DP 32 | -#endif 33 | -# 34 | #include $(BUILD_SHARED_LIBRARY) 35 | 36 | # AudioHardwareGeneric.cpp \ 37 | -------------------------------------------------------------------------------- /OLD/spl_inl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | // This header file includes the inline functions in 13 | // the fix point signal processing library. 14 | 15 | #ifndef WEBRTC_SPL_SPL_INL_H_ 16 | #define WEBRTC_SPL_SPL_INL_H_ 17 | 18 | #ifdef WEBRTC_SPL_INLINE_CALLS 19 | 20 | #ifdef WEBRTC_ANDROID 21 | 22 | __asm ( 23 | // On Android gcc compiler, the clz instruction is not supported with a 24 | // target smaller than armv7, despite it being legal for armv5+. 25 | " .arch armv7-a\n" 26 | //" clz %0, %1 \n" 27 | //"=r" (leading_zeroes) 28 | //"r" (data) 29 | ); 30 | 31 | WEBRTC_INLINE WebRtc_Word32 WEBRTC_SPL_MUL(WebRtc_Word32 a, WebRtc_Word32 b) 32 | { 33 | WebRtc_Word32 tmp; 34 | __asm__("smmul %0, %1, %2":"=r"(tmp):"r"(a), "r"(b)); //changed mul to smmul. 35 | return tmp; 36 | } 37 | 38 | WEBRTC_INLINE WebRtc_Word32 WEBRTC_SPL_MUL_16_32_RSFT16(WebRtc_Word16 a, 39 | WebRtc_Word32 b) 40 | { 41 | WebRtc_Word32 tmp; 42 | __asm__("smulwb %0, %1, %2":"=r"(tmp):"r"(b), "r"(a)); 43 | return tmp; 44 | } 45 | 46 | WEBRTC_INLINE WebRtc_Word32 WEBRTC_SPL_MUL_32_32_RSFT32(WebRtc_Word16 a, 47 | WebRtc_Word16 b, 48 | WebRtc_Word32 c) 49 | { 50 | WebRtc_Word32 tmp; 51 | __asm__("pkhbt %0, %1, %2, lsl #16" : "=r"(tmp) : "r"(b), "r"(a)); 52 | __asm__("smmul %0, %1, %2":"=r"(tmp):"r"(tmp), "r"(c)); 53 | return tmp; 54 | } 55 | 56 | WEBRTC_INLINE WebRtc_Word32 WEBRTC_SPL_MUL_32_32_RSFT32BI( 57 | WebRtc_Word32 a, 58 | WebRtc_Word32 b) 59 | { 60 | WebRtc_Word32 tmp; 61 | __asm__("smmul %0, %1, %2":"=r"(tmp):"r"(a), "r"(b)); 62 | return tmp; 63 | } 64 | 65 | WEBRTC_INLINE WebRtc_Word32 WEBRTC_SPL_MUL_16_16(WebRtc_Word16 a, 66 | WebRtc_Word16 b) 67 | { 68 | WebRtc_Word32 tmp; 69 | __asm__("smulbb %0, %1, %2":"=r"(tmp):"r"(a), "r"(b)); 70 | return tmp; 71 | } 72 | 73 | WEBRTC_INLINE WebRtc_Word16 WebRtcSpl_AddSatW16(WebRtc_Word16 a, 74 | WebRtc_Word16 b) 75 | { 76 | WebRtc_Word32 s_sum; 77 | 78 | __asm__("qadd %0, %1, %2":"=r"(s_sum):"r"(a), "r"(b)); 79 | 80 | return (WebRtc_Word16) s_sum; 81 | } 82 | 83 | WEBRTC_INLINE WebRtc_Word32 WebRtcSpl_AddSatW32(WebRtc_Word32 l_var1, 84 | WebRtc_Word32 l_var2) 85 | { 86 | WebRtc_Word32 l_sum; 87 | 88 | __asm__("qadd %0, %1, %2":"=r"(l_sum):"r"(l_var1), "r"(l_var2)); 89 | 90 | return l_sum; 91 | } 92 | 93 | WEBRTC_INLINE WebRtc_Word16 WebRtcSpl_SubSatW16(WebRtc_Word16 var1, 94 | WebRtc_Word16 var2) 95 | { 96 | WebRtc_Word32 s_sub; 97 | 98 | __asm__("qsub %0, %1, %2":"=r"(s_sub):"r"(var1), "r"(var2)); 99 | 100 | return (WebRtc_Word16)s_sub; 101 | } 102 | 103 | WEBRTC_INLINE WebRtc_Word32 WebRtcSpl_SubSatW32(WebRtc_Word32 l_var1, 104 | WebRtc_Word32 l_var2) 105 | { 106 | WebRtc_Word32 l_sub; 107 | 108 | __asm__("qsub %0, %1, %2":"=r"(l_sub):"r"(l_var1), "r"(l_var2)); 109 | 110 | return l_sub; 111 | } 112 | 113 | WEBRTC_INLINE WebRtc_Word16 WebRtcSpl_GetSizeInBits(WebRtc_UWord32 n) 114 | { 115 | WebRtc_Word32 tmp; 116 | 117 | __asm__("clz %0, %1":"=r"(tmp):"r"(n)); 118 | 119 | return (WebRtc_Word16)(32 - tmp); 120 | } 121 | 122 | WEBRTC_INLINE int WebRtcSpl_NormW32(WebRtc_Word32 a) 123 | { 124 | WebRtc_Word32 tmp; 125 | 126 | if (a <= 0) a ^= 0xFFFFFFFF; 127 | 128 | __asm__("clz %0, %1":"=r"(tmp):"r"(a)); 129 | 130 | return tmp - 1; 131 | } 132 | 133 | WEBRTC_INLINE int WebRtcSpl_NormW16(WebRtc_Word16 a) 134 | { 135 | int zeros; 136 | 137 | if (a <= 0) a ^= 0xFFFF; 138 | 139 | if (!(0xFF80 & a)) zeros = 8; else zeros = 0; 140 | if (!(0xF800 & (a << zeros))) zeros += 4; 141 | if (!(0xE000 & (a << zeros))) zeros += 2; 142 | if (!(0xC000 & (a << zeros))) zeros += 1; 143 | 144 | return zeros; 145 | } 146 | 147 | WEBRTC_INLINE int WebRtcSpl_NormU32(WebRtc_UWord32 a) 148 | { 149 | int tmp; 150 | 151 | if (a == 0) return 0; 152 | 153 | __asm__("clz %0, %1":"=r"(tmp):"r"(a)); 154 | 155 | return tmp; 156 | } 157 | 158 | #else 159 | 160 | WEBRTC_INLINE WebRtc_Word16 WebRtcSpl_AddSatW16(WebRtc_Word16 a, 161 | WebRtc_Word16 b) 162 | { 163 | WebRtc_Word32 s_sum = (WebRtc_Word32) a + (WebRtc_Word32) b; 164 | 165 | if (s_sum > WEBRTC_SPL_WORD16_MAX) 166 | s_sum = WEBRTC_SPL_WORD16_MAX; 167 | else if (s_sum < WEBRTC_SPL_WORD16_MIN) 168 | s_sum = WEBRTC_SPL_WORD16_MIN; 169 | 170 | return (WebRtc_Word16)s_sum; 171 | } 172 | 173 | WEBRTC_INLINE WebRtc_Word32 WebRtcSpl_AddSatW32(WebRtc_Word32 l_var1, 174 | WebRtc_Word32 l_var2) 175 | { 176 | WebRtc_Word32 l_sum; 177 | 178 | // perform long addition 179 | l_sum = l_var1 + l_var2; 180 | 181 | // check for under or overflow 182 | if (WEBRTC_SPL_IS_NEG (l_var1)) 183 | { 184 | if (WEBRTC_SPL_IS_NEG (l_var2) && !WEBRTC_SPL_IS_NEG (l_sum)) 185 | { 186 | l_sum = (WebRtc_Word32)0x80000000; 187 | } 188 | } 189 | else 190 | { 191 | if (!WEBRTC_SPL_IS_NEG (l_var2) && WEBRTC_SPL_IS_NEG (l_sum)) 192 | { 193 | l_sum = (WebRtc_Word32)0x7FFFFFFF; 194 | } 195 | } 196 | 197 | return l_sum; 198 | } 199 | 200 | WEBRTC_INLINE WebRtc_Word16 WebRtcSpl_SubSatW16( WebRtc_Word16 var1, 201 | WebRtc_Word16 var2) 202 | { 203 | WebRtc_Word32 l_diff; 204 | WebRtc_Word16 s_diff; 205 | 206 | // perform subtraction 207 | l_diff = (WebRtc_Word32)var1 - (WebRtc_Word32)var2; 208 | 209 | // default setting 210 | s_diff = (WebRtc_Word16) l_diff; 211 | 212 | // check for overflow 213 | if (l_diff > (WebRtc_Word32)32767) 214 | s_diff = (WebRtc_Word16)32767; 215 | 216 | // check for underflow 217 | if (l_diff < (WebRtc_Word32)-32768) 218 | s_diff = (WebRtc_Word16)-32768; 219 | 220 | return s_diff; 221 | } 222 | 223 | WEBRTC_INLINE WebRtc_Word32 WebRtcSpl_SubSatW32(WebRtc_Word32 l_var1, 224 | WebRtc_Word32 l_var2) 225 | { 226 | WebRtc_Word32 l_diff; 227 | 228 | // perform subtraction 229 | l_diff = l_var1 - l_var2; 230 | 231 | // check for underflow 232 | if ((l_var1 < 0) && (l_var2 > 0) && (l_diff > 0)) 233 | l_diff = (WebRtc_Word32)0x80000000; 234 | // check for overflow 235 | if ((l_var1 > 0) && (l_var2 < 0) && (l_diff < 0)) 236 | l_diff = (WebRtc_Word32)0x7FFFFFFF; 237 | 238 | return l_diff; 239 | } 240 | 241 | WEBRTC_INLINE WebRtc_Word16 WebRtcSpl_GetSizeInBits(WebRtc_UWord32 n) 242 | { 243 | 244 | int bits; 245 | 246 | if ((0xFFFF0000 & n)) bits = 16; else bits = 0; 247 | if ((0x0000FF00 & (n >> bits))) bits += 8; 248 | if ((0x000000F0 & (n >> bits))) bits += 4; 249 | if ((0x0000000C & (n >> bits))) bits += 2; 250 | if ((0x00000002 & (n >> bits))) bits += 1; 251 | if ((0x00000001 & (n >> bits))) bits += 1; 252 | 253 | return bits; 254 | } 255 | 256 | WEBRTC_INLINE int WebRtcSpl_NormW32(WebRtc_Word32 a) 257 | { 258 | int zeros; 259 | 260 | if (a <= 0) a ^= 0xFFFFFFFF; 261 | 262 | if (!(0xFFFF8000 & a)) zeros = 16; else zeros = 0; 263 | if (!(0xFF800000 & (a << zeros))) zeros += 8; 264 | if (!(0xF8000000 & (a << zeros))) zeros += 4; 265 | if (!(0xE0000000 & (a << zeros))) zeros += 2; 266 | if (!(0xC0000000 & (a << zeros))) zeros += 1; 267 | 268 | return zeros; 269 | } 270 | 271 | WEBRTC_INLINE int WebRtcSpl_NormW16(WebRtc_Word16 a) 272 | { 273 | int zeros; 274 | 275 | if (a <= 0) a ^= 0xFFFF; 276 | 277 | if (!(0xFF80 & a)) zeros = 8; else zeros = 0; 278 | if (!(0xF800 & (a << zeros))) zeros += 4; 279 | if (!(0xE000 & (a << zeros))) zeros += 2; 280 | if (!(0xC000 & (a << zeros))) zeros += 1; 281 | 282 | return zeros; 283 | } 284 | 285 | WEBRTC_INLINE int WebRtcSpl_NormU32(WebRtc_UWord32 a) 286 | { 287 | int zeros; 288 | 289 | if (a == 0) return 0; 290 | 291 | if (!(0xFFFF0000 & a)) zeros = 16; else zeros = 0; 292 | if (!(0xFF000000 & (a << zeros))) zeros += 8; 293 | if (!(0xF0000000 & (a << zeros))) zeros += 4; 294 | if (!(0xC0000000 & (a << zeros))) zeros += 2; 295 | if (!(0x80000000 & (a << zeros))) zeros += 1; 296 | 297 | return zeros; 298 | } 299 | 300 | #endif // WEBRTC_ANDROID 301 | #endif // WEBRTC_SPL_INLINE_CALLS 302 | #endif // WEBRTC_SPL_SPL_INL_H_ 303 | -------------------------------------------------------------------------------- /OLD/synaptics-rmi-touchscreen.idc: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2010 The Android Open Source Project 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # 16 | # Input Device Calibration File for the Passion touch screen. 17 | # 18 | # These calibration values are derived from empirical measurements 19 | # and may not be appropriate for use with other touch screens. 20 | # Refer to the input device calibration documentation for more details. 21 | # 22 | 23 | touch.deviceType = touchScreen 24 | touch.orientationAware = 1 25 | 26 | # Touch Size 27 | touch.touchSize.calibration = pressure 28 | 29 | # Tool Size 30 | # Driver reports tool size as a linear width measurement summed over 31 | # all contact points. 32 | # 33 | # Raw width field measures approx. 1 unit per millimeter 34 | # of tool size on the surface where a raw width of 1 corresponds 35 | # to about 17mm of physical size. Given that the display resolution 36 | # is 10px per mm we obtain a scale factor of 10 pixels / unit and 37 | # a bias of 160 pixels. In addition, the raw width represents a 38 | # sum of all contact area so we note this fact in the calibration. 39 | touch.toolSize.calibration = linear 40 | touch.toolSize.linearScale = 10 41 | touch.toolSize.linearBias = 160 42 | touch.toolSize.isSummed = 1 43 | 44 | # Pressure 45 | # Driver reports signal strength as pressure. 46 | # 47 | # A normal thumb touch while touching the back of the device 48 | # typically registers about 100 signal strength units although 49 | # this value is highly variable and is sensitive to contact area, 50 | # manner of contact and environmental conditions. We set the 51 | # scale so that a normal touch with good signal strength will be 52 | # reported as having a pressure somewhere in the vicinity of 1.0, 53 | # a featherlight touch will be below 1.0 and a heavy or large touch 54 | # will be above 1.0. We don't expect these values to be accurate. 55 | touch.pressure.calibration = amplitude 56 | touch.pressure.source = default 57 | touch.pressure.scale = 0.01 58 | 59 | # Size 60 | touch.size.calibration = normalized 61 | 62 | # Orientation 63 | touch.orientation.calibration = none 64 | 65 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | This repository contains files and patches needed to build ICS for 2 | various devices. 3 | 4 | Naming convention is 'project-modification.patch' 5 | 6 | ACTIVE 7 | build-core_user_tags.patch 8 | Patch to "grandfather" components in build/core/user_tags.mk instead 9 | of having to change LOCAL_MODULE_TAGS in Android.mk 10 | 11 | cd build; patch -p1 < ../ICS_Fixes/build-core_user_tags.patch 12 | 13 | build-armv6j.patch 14 | Patch to add armv6j/armv6j-vfp build makefiles for corresponding TARGET_ARCH_VARIANT. 15 | This is based on patches submitted by arco to gerrit, but not yet merged. 16 | 17 | cd build; patch -p1 < ../ICS_Fixes/build-armv6j.patch 18 | 19 | dalvik-armv6j 20 | Patch to add armv6j/armv6j-vfp to dalvik for corresponding TARGET_ARCH_VARIANT. 21 | This is based on patches submitted by arco to gerrit, but not yet merged. 22 | 23 | cd dalvik; patch -p1 < ../ICS_Fixes/dalvik-armv6j.patch 24 | 25 | camera fixes are the folder camera. You need to copy all of the files to their 26 | proper places, as laid out in the folders. 27 | 28 | 29 | 30 | OLD - No longer needed on TeamICS Builds 31 | frameworks_base-preprocessing.patch 32 | Patch to rename frameworks/base/media/libeffects/preprocessing/Android.mk 33 | to avoid building libpreprocessing which depends on webrtc (ARMv5/6 issue) 34 | 35 | libaudio.patch 36 | A patch set which rework the libauio files to support libhardware_legacy which 37 | is where the heroc libs fall now 38 | 39 | libaudiohw_legacy.patch 40 | Finishes implementing A2dpAudioInterface by adding it to the build. 41 | 42 | spl_inl.h 43 | Implements fixes to bypass gcc errors on compiling asm code for 3 | Date: Tue Nov 22 00:00:15 2011 +0100 4 | 5 | Add ARMv6J and ARMv6-VFP processor combo option 6 | 7 | Cherry-picked from gingerbread branch. 8 | 9 | diff --git a/core/combo/arch/arm/armv6-vfp.mk b/core/combo/arch/arm/armv6-vfp.mk 10 | new file mode 100644 11 | index 0000000..a00a2d1 12 | --- /dev/null 13 | +++ b/core/combo/arch/arm/armv6-vfp.mk 14 | @@ -0,0 +1,30 @@ 15 | +# Configuration for Linux on ARM. 16 | +# Generating binaries for the ARMv6-VFP architecture and higher 17 | +# 18 | +ARCH_ARM_HAVE_THUMB_SUPPORT := true 19 | +ARCH_ARM_HAVE_FAST_INTERWORKING := true 20 | +ARCH_ARM_HAVE_64BIT_DATA := true 21 | +ARCH_ARM_HAVE_HALFWORD_MULTIPLY := true 22 | +ARCH_ARM_HAVE_CLZ := true 23 | +ARCH_ARM_HAVE_FFS := true 24 | +ARCH_ARM_HAVE_VFP := true 25 | + 26 | +ifeq ($(strip $(TARGET_ARCH_VARIANT_FPU)),) 27 | +TARGET_ARCH_VARIANT_FPU := vfp 28 | +endif 29 | +ifeq ($(strip $(TARGET_ARCH_VARIANT_CPU)),) 30 | +TARGET_ARCH_VARIANT_CPU := arm1136jf-s 31 | +endif 32 | + 33 | +# Note: Hard coding the 'tune' value here is probably not ideal, 34 | +# and a better solution should be found in the future. 35 | +# 36 | +arch_variant_cflags := \ 37 | + -mcpu=$(TARGET_ARCH_VARIANT_CPU) \ 38 | + -mfloat-abi=softfp \ 39 | + -mfpu=$(TARGET_ARCH_VARIANT_FPU) \ 40 | + -D__ARM_ARCH_5__ \ 41 | + -D__ARM_ARCH_5T__ \ 42 | + -D__ARM_ARCH_5E__ \ 43 | + -D__ARM_ARCH_5TE__ 44 | + 45 | diff --git a/core/combo/arch/arm/armv6j.mk b/core/combo/arch/arm/armv6j.mk 46 | new file mode 100644 47 | index 0000000..beca884 48 | --- /dev/null 49 | +++ b/core/combo/arch/arm/armv6j.mk 50 | @@ -0,0 +1,22 @@ 51 | +# Configuration for Linux on ARM. 52 | +# Generating binaries for the ARMv6J architecture and higher 53 | +# 54 | +ARCH_ARM_HAVE_THUMB_SUPPORT := true 55 | +ARCH_ARM_HAVE_FAST_INTERWORKING := true 56 | +ARCH_ARM_HAVE_64BIT_DATA := true 57 | +ARCH_ARM_HAVE_HALFWORD_MULTIPLY := true 58 | +ARCH_ARM_HAVE_CLZ := true 59 | +ARCH_ARM_HAVE_FFS := true 60 | + 61 | +# Note: Hard coding the 'tune' value here is probably not ideal, 62 | +# and a better solution should be found in the future. 63 | +# 64 | +arch_variant_cflags := \ 65 | + -march=armv6j \ 66 | + -mtune=arm1136jf-s \ 67 | + -pipe \ 68 | + -fomit-frame-pointer \ 69 | + -D__ARM_ARCH_5__ \ 70 | + -D__ARM_ARCH_5T__ \ 71 | + -D__ARM_ARCH_5E__ \ 72 | + -D__ARM_ARCH_5TE__ 73 | -------------------------------------------------------------------------------- /camera.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TeamICS/ICS_Fixes/06492bb50337e35d9c9964421d43678812f36a81/camera.zip --------------------------------------------------------------------------------