Compare commits
19 commits
4708d51a81
...
92e8c73bb8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
92e8c73bb8 | ||
|
|
aa37733459 | ||
|
|
ad38de0fca | ||
|
|
61f7528fbe | ||
|
|
54ebe18f05 | ||
|
|
6c501cd4c0 | ||
|
|
f07856993d | ||
|
|
e98e50ce49 | ||
|
|
1e5532f898 | ||
|
|
516ea60850 | ||
|
|
09c145c900 | ||
|
|
dd409c8fe2 | ||
|
|
0d3a0bbd2a | ||
|
|
552a60d338 | ||
|
|
15f2f80d2f | ||
|
|
5fe2586b3c | ||
|
|
97f5b6efd7 | ||
|
|
26b9a5d0f2 | ||
|
|
9590e9c1e8 |
14 changed files with 109 additions and 42 deletions
|
|
@ -93,6 +93,7 @@ BOARD_KERNEL_CMDLINE += swiotlb=0
|
|||
BOARD_KERNEL_CMDLINE += pcie_ports=compat
|
||||
BOARD_KERNEL_CMDLINE += iptable_raw.raw_before_defrag=1
|
||||
BOARD_KERNEL_CMDLINE += ip6table_raw.raw_before_defrag=1
|
||||
BOARD_KERNEL_CMDLINE += kpti=off
|
||||
|
||||
# Lineage Health
|
||||
TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_BYPASS := false
|
||||
|
|
@ -195,5 +196,9 @@ WIFI_HIDL_FEATURE_DUAL_INTERFACE := true
|
|||
WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true
|
||||
WPA_SUPPLICANT_VERSION := VER_0_8_X
|
||||
|
||||
CONFIG_ACS := true
|
||||
CONFIG_IEEE80211AC := true
|
||||
CONFIG_IEEE80211AX := true
|
||||
|
||||
# Inherit proprietary blobs
|
||||
include vendor/xiaomi/sm8350-common/BoardConfigVendor.mk
|
||||
|
|
|
|||
|
|
@ -90,7 +90,6 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
<item>Telephony Tx</item>
|
||||
<item>Built-In Mic</item>
|
||||
<item>Built-In Back Mic</item>
|
||||
<item>FM Tuner</item>
|
||||
<item>Telephony Rx</item>
|
||||
</attachedDevices>
|
||||
<defaultOutputDevice>Speaker</defaultOutputDevice>
|
||||
|
|
@ -190,7 +189,7 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
<mixPort name="voip_rx" role="source"
|
||||
flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_VOIP_RX">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,16000,32000,48000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
samplingRates="8000,16000,32000,48000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
|
||||
</mixPort>
|
||||
<mixPort name="incall_music_uplink" role="source"
|
||||
flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC">
|
||||
|
|
@ -210,11 +209,6 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
|
||||
</mixPort>
|
||||
<mixPort name="quad mic" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000"
|
||||
channelMasks="AUDIO_CHANNEL_INDEX_MASK_4"/>
|
||||
</mixPort>
|
||||
<mixPort name="voip_tx" role="sink"
|
||||
flags="AUDIO_INPUT_FLAG_VOIP_TX">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
|
|
@ -324,11 +318,6 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="FM Tuner" type="AUDIO_DEVICE_IN_FM_TUNER" role="source">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="Wired Headset Mic" type="AUDIO_DEVICE_IN_WIRED_HEADSET" role="source">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
|
||||
|
|
@ -381,13 +370,11 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
<route type="mix" sink="voice_rx"
|
||||
sources="Telephony Rx"/>
|
||||
<route type="mix" sink="primary input"
|
||||
sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,BT SCO Headset Mic,FM Tuner,Telephony Rx"/>
|
||||
sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,BT SCO Headset Mic,Telephony Rx"/>
|
||||
<route type="mix" sink="usb_surround_sound"
|
||||
sources="USB Device In,USB Headset In"/>
|
||||
<route type="mix" sink="fast input"
|
||||
sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,Wired Headset Mic"/>
|
||||
<route type="mix" sink="quad mic"
|
||||
sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,Wired Headset Mic"/>
|
||||
<route type="mix" sink="voip_tx"
|
||||
sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In,Wired Headset Mic"/>
|
||||
<route type="mix" sink="record_24"
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
# Log level
|
||||
# EL_LOG_OFF = 0, EL_ERROR = 1, EL_WARNING = 2, EL_INFO = 3, EL_DEBUG = 4, EL_VERBOSE = 5, EL_LOG_ALL = 100
|
||||
LOWI_LOG_LEVEL = 3
|
||||
LOWI_LOG_LEVEL = 2
|
||||
LOWI_USE_LOWI_LP = 0
|
||||
LOWI_HE_RTT_SUPPORT = 1
|
||||
LOWI_USE_NLMSG_FOR_CAPS = 1
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2016-2023 crDroid Android 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>
|
||||
<!-- If not zero, limits the internal screen recorder's framerate to the set value. -->
|
||||
<integer name="config_screenRecorderMaxFramerate">120</integer>
|
||||
</resources>
|
||||
|
|
@ -203,9 +203,6 @@
|
|||
<item>"/system/bin/surfaceflinger"</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Should the pinner service pin the Home application? -->
|
||||
<bool name="config_pinnerHomeApp">true</bool>
|
||||
|
||||
<!-- Enable doze mode
|
||||
ComponentName of a dream to show whenever the system would otherwise have gone to sleep. -->
|
||||
<string translatable="false" name="config_dozeComponent">com.android.systemui/com.android.systemui.doze.DozeService</string>
|
||||
|
|
|
|||
|
|
@ -55,6 +55,9 @@
|
|||
<item>0</item>
|
||||
</integer-array>
|
||||
|
||||
<!-- Whether usage of the proximity sensor during doze is supported -->
|
||||
<bool name="doze_proximity_sensor_supported">false</bool>
|
||||
|
||||
<!-- Preferred max refresh rate at keyguard, if supported by the display. -->
|
||||
<integer name="config_keyguardMaxRefreshRate">60</integer>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -13,11 +13,11 @@ import android.hardware.SensorEventListener;
|
|||
import android.hardware.SensorManager;
|
||||
import android.os.IBinder;
|
||||
import android.os.PowerManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import android.provider.Settings;
|
||||
|
||||
import androidx.preference.PreferenceManager;
|
||||
|
||||
import org.lineageos.settings.utils.FileUtils;
|
||||
import org.lineageos.settings.display.*;
|
||||
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
|
@ -31,11 +31,13 @@ public class AutoHBMService extends Service {
|
|||
private ExecutorService mExecutorService;
|
||||
|
||||
private SensorManager mSensorManager;
|
||||
Sensor mLightSensor;
|
||||
private Sensor mLightSensor;
|
||||
|
||||
private SharedPreferences mSharedPrefs;
|
||||
private boolean dcDimmingEnabled;
|
||||
|
||||
private int mStoredBrightness = -1;
|
||||
|
||||
public void activateLightSensorRead() {
|
||||
submit(() -> {
|
||||
mSensorManager = (SensorManager) getApplicationContext().getSystemService(Context.SENSOR_SERVICE);
|
||||
|
|
@ -54,11 +56,23 @@ public class AutoHBMService extends Service {
|
|||
|
||||
private void enableHBM(boolean enable) {
|
||||
if (enable) {
|
||||
// Store current brightness before enabling HBM
|
||||
if (mStoredBrightness == -1) {
|
||||
mStoredBrightness = Settings.System.getInt(getContentResolver(),
|
||||
Settings.System.SCREEN_BRIGHTNESS, 255);
|
||||
}
|
||||
FileUtils.writeLine(HBM, "1");
|
||||
FileUtils.writeLine(BACKLIGHT, "2047");
|
||||
Settings.System.putInt(getContentResolver(), Settings.System.SCREEN_BRIGHTNESS, 255);
|
||||
} else {
|
||||
FileUtils.writeLine(HBM, "0");
|
||||
// Restore brightness when disabling HBM
|
||||
if (mStoredBrightness != -1) {
|
||||
FileUtils.writeLine(BACKLIGHT, String.valueOf(mStoredBrightness));
|
||||
Settings.System.putInt(getContentResolver(),
|
||||
Settings.System.SCREEN_BRIGHTNESS, mStoredBrightness);
|
||||
mStoredBrightness = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -67,7 +81,6 @@ public class AutoHBMService extends Service {
|
|||
}
|
||||
|
||||
private SensorEventListener mSensorEventListener = new SensorEventListener() {
|
||||
|
||||
@Override
|
||||
public void onSensorChanged(SensorEvent event) {
|
||||
float lux = event.values[0];
|
||||
|
|
@ -88,7 +101,7 @@ public class AutoHBMService extends Service {
|
|||
mExecutorService.submit(() -> {
|
||||
try {
|
||||
Thread.sleep(timeToDisableHBM * 1000);
|
||||
} catch (InterruptedException e) {
|
||||
} catch (InterruptedException ignored) {
|
||||
}
|
||||
if (lux < luxThreshold) {
|
||||
mAutoHBMActive = false;
|
||||
|
|
@ -108,9 +121,9 @@ public class AutoHBMService extends Service {
|
|||
private BroadcastReceiver mScreenStateReceiver = new BroadcastReceiver() {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
if (intent.getAction().equals(Intent.ACTION_SCREEN_ON)) {
|
||||
if (Intent.ACTION_SCREEN_ON.equals(intent.getAction())) {
|
||||
activateLightSensorRead();
|
||||
} else if (intent.getAction().equals(Intent.ACTION_SCREEN_OFF)) {
|
||||
} else if (Intent.ACTION_SCREEN_OFF.equals(intent.getAction())) {
|
||||
deactivateLightSensorRead();
|
||||
}
|
||||
}
|
||||
|
|
@ -129,7 +142,7 @@ public class AutoHBMService extends Service {
|
|||
}
|
||||
}
|
||||
|
||||
private Future < ? > submit(Runnable runnable) {
|
||||
private Future<?> submit(Runnable runnable) {
|
||||
return mExecutorService.submit(runnable);
|
||||
}
|
||||
|
||||
|
|
@ -142,11 +155,8 @@ public class AutoHBMService extends Service {
|
|||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
unregisterReceiver(mScreenStateReceiver);
|
||||
PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
|
||||
if (pm.isInteractive()) {
|
||||
deactivateLightSensorRead();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBinder onBind(Intent intent) {
|
||||
|
|
|
|||
|
|
@ -16,14 +16,12 @@
|
|||
*
|
||||
*/
|
||||
package org.lineageos.settings.hbm;
|
||||
|
||||
import android.provider.Settings;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.Preference.OnPreferenceChangeListener;
|
||||
import androidx.preference.PreferenceManager;
|
||||
|
||||
import org.lineageos.settings.utils.FileUtils;
|
||||
import org.lineageos.settings.display.*;
|
||||
|
||||
|
|
@ -57,10 +55,22 @@ public class HBMModeSwitch implements OnPreferenceChangeListener {
|
|||
if (dcDimmingEnabled) {
|
||||
return false;
|
||||
}
|
||||
FileUtils.writeLine(getHBM(), enabled ? "1" : "0");
|
||||
|
||||
SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(mContext);
|
||||
if (enabled) {
|
||||
// Save current brightness level
|
||||
int currentBrightness = Settings.System.getInt(mContext.getContentResolver(), Settings.System.SCREEN_BRIGHTNESS, 128);
|
||||
sharedPrefs.edit().putInt("last_brightness", currentBrightness).apply();
|
||||
|
||||
FileUtils.writeLine(getHBM(), "1");
|
||||
FileUtils.writeLine(getBACKLIGHT(), "2047");
|
||||
Settings.System.putInt(mContext.getContentResolver(), Settings.System.SCREEN_BRIGHTNESS, 255);
|
||||
} else {
|
||||
FileUtils.writeLine(getHBM(), "0");
|
||||
|
||||
// Restore last brightness level
|
||||
int lastBrightness = sharedPrefs.getInt("last_brightness", 128);
|
||||
Settings.System.putInt(mContext.getContentResolver(), Settings.System.SCREEN_BRIGHTNESS, lastBrightness);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
*/
|
||||
|
||||
package org.lineageos.settings.hbm;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
|
@ -28,12 +27,10 @@ import android.service.quicksettings.Tile;
|
|||
import android.service.quicksettings.TileService;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import android.provider.Settings;
|
||||
|
||||
import org.lineageos.settings.utils.FileUtils;
|
||||
import org.lineageos.settings.display.*;
|
||||
|
||||
public class HBMModeTileService extends TileService {
|
||||
|
||||
private static final String HBM = "/sys/devices/platform/soc/soc:qcom,dsi-display-primary/hbm_enabled";
|
||||
private static final String HBM_KEY = "hbm";
|
||||
private static final String BACKLIGHT = "/sys/class/backlight/panel0-backlight/brightness";
|
||||
|
|
@ -80,6 +77,7 @@ public class HBMModeTileService extends TileService {
|
|||
public void onStopListening() {
|
||||
super.onStopListening();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick() {
|
||||
super.onClick();
|
||||
|
|
@ -88,12 +86,24 @@ public class HBMModeTileService extends TileService {
|
|||
if (dcDimmingEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
final boolean enabled = !(sharedPrefs.getBoolean(HBM_KEY, false));
|
||||
FileUtils.writeLine(HBM, enabled ? "1" : "0");
|
||||
if (enabled) {
|
||||
// Save current brightness level
|
||||
int currentBrightness = Settings.System.getInt(getContentResolver(), Settings.System.SCREEN_BRIGHTNESS, 128);
|
||||
sharedPrefs.edit().putInt("last_brightness", currentBrightness).apply();
|
||||
|
||||
FileUtils.writeLine(HBM, "1");
|
||||
FileUtils.writeLine(BACKLIGHT, "2047");
|
||||
Settings.System.putInt(getContentResolver(), Settings.System.SCREEN_BRIGHTNESS, 255);
|
||||
} else {
|
||||
FileUtils.writeLine(HBM, "0");
|
||||
|
||||
// Restore last brightness level
|
||||
int lastBrightness = sharedPrefs.getInt("last_brightness", 128);
|
||||
Settings.System.putInt(getContentResolver(), Settings.System.SCREEN_BRIGHTNESS, lastBrightness);
|
||||
}
|
||||
|
||||
sharedPrefs.edit().putBoolean(HBM_KEY, enabled).commit();
|
||||
updateUI(enabled);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -191,7 +191,8 @@ echo 10 10 10 10 10 10 10 95 > /proc/sys/kernel/sched_coloc_busy_hyst_cpu_busy_p
|
|||
echo 325 > /proc/sys/kernel/walt_low_latency_task_threshold
|
||||
|
||||
# cpuset parameters
|
||||
echo 0-3 > /dev/cpuset/background/cpus
|
||||
echo 0-1 > /dev/cpuset/background/cpus
|
||||
echo 0-3 > /dev/cpuset/restricted/cpus
|
||||
echo 0-3 > /dev/cpuset/system-background/cpus
|
||||
|
||||
# configure governor settings for silver cluster
|
||||
|
|
|
|||
|
|
@ -192,6 +192,9 @@ on post-fs-data
|
|||
chmod 2770 /data/vendor/perfd
|
||||
rm /data/vendor/perfd/default_values
|
||||
|
||||
# Change lm related dirs
|
||||
mkdir /data/vendor/lm 0700 root root
|
||||
|
||||
mkdir /data/vendor/secure_element 0777 system system
|
||||
|
||||
# Mark the copy complete flag to not completed
|
||||
|
|
|
|||
|
|
@ -137,6 +137,23 @@ on boot
|
|||
chown system /sys/devices/system/cpu/hyp_core_ctl/enable
|
||||
chown system /sys/devices/system/cpu/hyp_core_ctl/hcc_min_freq
|
||||
|
||||
chown system system /dev/cpuset/cgroup.procs
|
||||
chown system system /dev/cpuset/foreground/cgroup.procs
|
||||
chown system system /dev/cpuset/background/cgroup.procs
|
||||
chown system system /dev/cpuset/system-background/cgroup.procs
|
||||
chown system system /dev/cpuset/top-app/cgroup.procs
|
||||
|
||||
chmod 0666 /dev/cpuset/foreground/cgroup.procs
|
||||
chmod 0666 /dev/cpuset/background/cgroup.procs
|
||||
chmod 0666 /dev/cpuset/system-background/cgroup.procs
|
||||
chmod 0666 /dev/cpuset/top-app/cgroup.procs
|
||||
chmod 0666 /dev/cpuset/cgroup.procs
|
||||
|
||||
chown system system /dev/stune/background/cgroup.procs
|
||||
chown system system /dev/stune/top-app/cgroup.procs
|
||||
chmod 0666 /dev/stune/background/cgroup.procs
|
||||
chmod 0666 /dev/stune/top-app/cgroup.procs
|
||||
|
||||
write /sys/block/sda/queue/wbt_lat_usec 75000
|
||||
|
||||
# Set fingerprint related permissions
|
||||
|
|
|
|||
|
|
@ -4,6 +4,9 @@ vendor.bluetooth.soc=hastings
|
|||
# CNE
|
||||
persist.vendor.cne.feature=1
|
||||
|
||||
# Disable Skia tracing by default
|
||||
debug.hwui.skia_atrace_enabled=false
|
||||
|
||||
# Graphics
|
||||
debug.sf.disable_backpressure=1
|
||||
debug.sf.enable_hwc_vds=1
|
||||
|
|
|
|||
|
|
@ -221,6 +221,7 @@ vendor.gralloc.disable_ubwc=0
|
|||
debug.stagefright.c2inputsurface=-1
|
||||
media.stagefright.thumbnail.prefer_hw_codecs=true
|
||||
ro.config.vc_call_vol_steps=11
|
||||
persist.mm.enable.prefetch=true
|
||||
|
||||
# NFC
|
||||
ro.vendor.nfc.repair=1
|
||||
|
|
@ -228,7 +229,7 @@ ro.vendor.se.type=eSE,HCE,UICC
|
|||
|
||||
# Perf
|
||||
ro.vendor.extension_library=libqti-perfd-client.so
|
||||
ro.vendor.perf.scroll_opt=0
|
||||
ro.vendor.perf.scroll_opt=true
|
||||
|
||||
# Radio
|
||||
keyguard.no_require_sim=true
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue