Coder Social home page Coder Social logo

android_device_xiaomi_mocha's Introduction

Device configuration for XiaoMi MiPad Tablet

Spec Sheet

Feature Specification
CPU Quad Core 2.2GHz
Chipset NVIDIA® Tegra K1 T124
GPU NVIDIA® GK20A (Kepler)
Memory 2GB RAM
Shipped Android Version 4.4.2
Storage 16/32/64GB
MicroSD Up to 128GB
Battery 5197 mAh
Dimentions 221 x 126 x 9.2 mm
Display 1536 x 2048 pixels
Release Date July 29, 2014

Device Picture

Nvidia SHIELD Tablet

Copyright

#
# Copyright (C) 2015 The CyanogenMod 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.
#

android_device_xiaomi_mocha's People

Contributors

arttttt avatar bju2000 avatar c457 avatar highwaystar avatar joshuabg avatar kristofpetho avatar nihhaar avatar webgeek1234 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

android_device_xiaomi_mocha's Issues

Missing symbols for audio.primary.tegra.so

Here is patches to fix missing symbols for audio.primary.tegra.so

Help to implement them as device tree libs fro LD_PRELOAD are welcome.

project frameworks/av/

diff --git a/media/libnbaio/MonoPipe.cpp b/media/libnbaio/MonoPipe.cpp
index 0b65861..338b7cf 100644
--- a/media/libnbaio/MonoPipe.cpp
+++ b/media/libnbaio/MonoPipe.cpp
@@ -98,6 +98,24 @@ MonoPipe::MonoPipe(size_t reqFrames, const NBAIO_Format& format, bool writeCanBl
     mSamplesToLocalTime.a_to_b_denom = static_cast<uint32_t>(D);
 }
 
+extern "C" void _ZN7android8MonoPipeC1EjRKNS_12NBAIO_FormatEb(size_t reqFrames, const NBAIO_Format& format, bool writeCanBlock);
+extern "C" void _ZN7android8MonoPipeC1Ejjb(size_t reqFrames, unsigned format_old, bool writeCanBlock)
+{
+    NBAIO_Format ret;
+    unsigned sampleRate=0;
+    unsigned channelCount=0;
+    audio_format_t format_new = AUDIO_FORMAT_PCM_16_BIT;
+    switch(format_old) {
+       case 1: sampleRate = 44100; channelCount = 2; break; 
+       case 2: sampleRate = 48000; channelCount = 2; break;
+       case 3: sampleRate = 44100; channelCount = 1; break;
+       case 4: sampleRate = 48000; channelCount = 1; break;
+       default: format_new = AUDIO_FORMAT_INVALID;
+    }
+    ret = Format_from_SR_C(sampleRate, channelCount, format_new);
+    _ZN7android8MonoPipeC1EjRKNS_12NBAIO_FormatEb(reqFrames, ret, writeCanBlock);
+}
+
 MonoPipe::~MonoPipe()
 {
     free(mBuffer);
diff --git a/media/libnbaio/NBAIO.cpp b/media/libnbaio/NBAIO.cpp
index d641e74..6bf2b36 100644
--- a/media/libnbaio/NBAIO.cpp
+++ b/media/libnbaio/NBAIO.cpp
@@ -60,6 +60,16 @@ NBAIO_Format Format_from_SR_C(unsigned sampleRate, unsigned channelCount,
     return ret;
 }
 
+unsigned Format_from_SR_C(unsigned sampleRate, unsigned channelCount)
+{
+    if (sampleRate == 44100 && channelCount == 2) return 1;
+    if (sampleRate == 48000 && channelCount == 2) return 2;
+    if (sampleRate == 44100 && channelCount == 1) return 3;
+    if (sampleRate == 48000 && channelCount == 1) return 4;
+    return 0;
+}
+
+
 // This is a default implementation; it is expected that subclasses will optimize this.
 ssize_t NBAIO_Sink::writeVia(writeVia_t via, size_t total, void *user, size_t block)
 {

project external/icu/

diff --git a/icu4c/source/common/ucnv.c b/icu4c/source/common/ucnv.c
index 5cf4d15..55b4faa 100644
--- a/icu4c/source/common/ucnv.c
+++ b/icu4c/source/common/ucnv.c
@@ -2914,6 +2914,145 @@ ucnv_isFixedWidth(UConverter *cnv, UErrorCode *status){
             return FALSE;
     }
 }
+
+U_CAPI void    U_EXPORT2 ucnv_setToUCallBack_48 (UConverter * converter,
+                            UConverterToUCallback newAction,
+                            const void* newContext,
+                            UConverterToUCallback *oldAction,
+                            const void** oldContext,
+                            UErrorCode * err) {
+  ucnv_setToUCallBack(converter, newAction, newContext,
+        oldAction, oldContext, err);
+}
+
+U_CAPI void  U_EXPORT2 ucnv_close_48 (UConverter * converter) {
+  ucnv_close (converter);
+}
+
+U_CAPI void  U_EXPORT2
+ucnv_setFromUCallBack_48 (UConverter * converter,
+                            UConverterFromUCallback newAction,
+                            const void* newContext,
+                            UConverterFromUCallback *oldAction,
+                            const void** oldContext,
+                            UErrorCode * err) {
+
+  ucnv_setFromUCallBack(converter, newAction, newContext, oldAction,
+        oldContext, err);
+}
+
+U_CAPI void U_EXPORT2
+ucnv_convertEx_48 (UConverter *targetCnv, UConverter *sourceCnv,
+               char **target, const char *targetLimit,
+               const char **source, const char *sourceLimit,
+               UChar *pivotStart, UChar **pivotSource,
+               UChar **pivotTarget, const UChar *pivotLimit,
+               UBool reset, UBool flush,
+               UErrorCode *pErrorCode) {
+  ucnv_convertEx(targetCnv, sourceCnv, target, targetLimit, source,
+        sourceLimit, pivotStart, pivotSource,
+        pivotTarget, pivotLimit, reset, flush,
+        pErrorCode);
+}
+
+U_CAPI UConverter* U_EXPORT2
+ucnv_open_48 (const char *name,
+                       UErrorCode * err) {
+  return ucnv_open(name, err);
+}
+
+U_STABLE void U_EXPORT2 UCNV_FROM_U_CALLBACK_STOP_48 (
+                  const void *context,
+                  UConverterFromUnicodeArgs *fromUArgs,
+                  const UChar* codeUnits,
+                  int32_t length,
+                  UChar32 codePoint,
+                  UConverterCallbackReason reason,
+                  UErrorCode * err) {
+  return UCNV_FROM_U_CALLBACK_STOP(context, fromUArgs, codeUnits,
+      length, codePoint, reason, err);
+}
+
+U_STABLE void U_EXPORT2 UCNV_TO_U_CALLBACK_STOP_48 (
+                  const void *context,
+                  UConverterToUnicodeArgs *toUArgs,
+                  const char* codeUnits,
+                  int32_t length,
+                  UConverterCallbackReason reason,
+                  UErrorCode * err) {
+  return UCNV_TO_U_CALLBACK_STOP(context, toUArgs, codeUnits, length,
+      reason, err);
+}
+
+U_CAPI void    U_EXPORT2 ucnv_setToUCallBack_51 (UConverter * converter,
+                            UConverterToUCallback newAction,
+                            const void* newContext,
+                            UConverterToUCallback *oldAction,
+                            const void** oldContext,
+                            UErrorCode * err) {
+  ucnv_setToUCallBack(converter, newAction, newContext,
+        oldAction, oldContext, err);
+}
+
+U_CAPI void  U_EXPORT2 ucnv_close_51 (UConverter * converter) {
+  ucnv_close (converter);
+}
+
+U_CAPI void  U_EXPORT2
+ucnv_setFromUCallBack_51 (UConverter * converter,
+                            UConverterFromUCallback newAction,
+                            const void* newContext,
+                            UConverterFromUCallback *oldAction,
+                            const void** oldContext,
+                            UErrorCode * err) {
+
+  ucnv_setFromUCallBack(converter, newAction, newContext, oldAction,
+        oldContext, err);
+}
+
+U_CAPI void U_EXPORT2
+ucnv_convertEx_51 (UConverter *targetCnv, UConverter *sourceCnv,
+               char **target, const char *targetLimit,
+               const char **source, const char *sourceLimit,
+               UChar *pivotStart, UChar **pivotSource,
+               UChar **pivotTarget, const UChar *pivotLimit,
+               UBool reset, UBool flush,
+               UErrorCode *pErrorCode) {
+  ucnv_convertEx(targetCnv, sourceCnv, target, targetLimit, source,
+        sourceLimit, pivotStart, pivotSource,
+        pivotTarget, pivotLimit, reset, flush,
+        pErrorCode);
+}
+
+U_CAPI UConverter* U_EXPORT2
+ucnv_open_51 (const char *name,
+                       UErrorCode * err) {
+  return ucnv_open(name, err);
+}
+
+U_STABLE void U_EXPORT2 UCNV_FROM_U_CALLBACK_STOP_51 (
+                  const void *context,
+                  UConverterFromUnicodeArgs *fromUArgs,
+                  const UChar* codeUnits,
+                  int32_t length,
+                  UChar32 codePoint,
+                  UConverterCallbackReason reason,
+                  UErrorCode * err) {
+  return UCNV_FROM_U_CALLBACK_STOP(context, fromUArgs, codeUnits,
+      length, codePoint, reason, err);
+}
+
+U_STABLE void U_EXPORT2 UCNV_TO_U_CALLBACK_STOP_51 (
+                  const void *context,
+                  UConverterToUnicodeArgs *toUArgs,
+                  const char* codeUnits,
+                  int32_t length,
+                  UConverterCallbackReason reason,
+                  UErrorCode * err) {
+  return UCNV_TO_U_CALLBACK_STOP(context, toUArgs, codeUnits, length,
+      reason, err);
+}
+
 #endif
 
 /*

Battery drops quickly even when it's not used

ROM: lineage-14.1-20170911-UNOFFICIAL-mocha
GApps: open_gapps-arm-7.1-mini-20200325
Root: No

For example, I turn on the device at 9:00 with 100% of battery and disonncect the power cord, then just put it there without doing anything. It dropped to 52% at 12:00.

The health of battery is 72% according to AccuBattery. The device never shut down suddenly. When I touch the back of the device at 12:00, it's a little warm at the upper-right side.

If I didn't turn on the device at 9:00 but at 12:00, it's 100%, 0 dropped.

It didn't drop so quick when using stock rom.

Light sensor became less sensitive comparing to the original version

ROM: lineage-14.1-20170911-UNOFFICIAL-mocha
GApps: open_gapps-arm-7.1-mini-20200325
Root: No

The time I wait for the backlight go dark after I turn off the light of room is longer then before.

Besides, the lowest level of backlight is lighter than the original version, even when auto light is off.

Random applications FCs

Random application force clauses on app swithihng or on orientation change caused by
EGLBoolean egl_display_t::initialize from opengl/libs/EGL/egl_display.cpp
called without calling EGLDisplay egl_display_t::getDisplay(EGLNativeDisplayType display) which loads vendor libs. Not sure what causing this, but it can be fixed by force calling getDisplay inside initialize()

Here is path for project frameworks/native

diff --git a/opengl/libs/EGL/egl_display.cpp b/opengl/libs/EGL/egl_display.cpp
index ec59235..ecfbf24 100644
--- a/opengl/libs/EGL/egl_display.cpp
+++ b/opengl/libs/EGL/egl_display.cpp
@@ -158,6 +158,9 @@ EGLBoolean egl_display_t::initialize(EGLint *major, EGLint *minor) {
         cnx->major = -1;
         cnx->minor = -1;
         if (cnx->dso) {
+           
+            disp.dpy = cnx->egl.eglGetDisplay(EGL_DEFAULT_DISPLAY);
+           
             EGLDisplay idpy = disp.dpy;
             if (cnx->egl.eglInitialize(idpy, &cnx->major, &cnx->minor)) {
                 //ALOGD("initialized dpy=%p, ver=%d.%d, cnx=%p",

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.