Compare commits

62 Commits
vic ... bka

Author SHA1 Message Date
galadriel1402
322d479725 sweet: libinit: Drop NfcHandler from libinit
Change-Id: I2a3f67ae2b07e1594d7ac6d38d630b1833441094
Signed-off-by: galadriel1402 <galadriel1402@gmail.com>
Signed-off-by: therealmharc <therealmharc@gmail.com>
2026-01-09 02:30:44 +08:00
spkal01
bec5c3db94 sweet: libinit: Add support of .mod_device hides
Change-Id: I615bb3017f1f7757251ceed7312122b94fdb0641
Signed-off-by: therealmharc <therealmharc@gmail.com>
2026-01-09 02:30:44 +08:00
galadriel1402
03020b1274 sweet: libinit: Set ro.product.name and ro.product.vendor.name
Change-Id: Ie5830e40e9721a9c98b9c55f8e88bbfab6a1cdbc
Signed-off-by: therealmharc <therealmharc@gmail.com>
2026-01-09 02:30:44 +08:00
Sebastiano Barezzi
f1a3425044 sweet: Initial variant handler libinit
Change-Id: If7aceb3fd962eeeeb9fa6f13167b41dd875a0aa7
Co-authored-by: galadriel1402 <galadriel1402@gmail.com>
Signed-off-by: therealmharc <therealmharc@gmail.com>
2026-01-09 02:30:44 +08:00
Alcatraz323
c86d19e751 sweet: Build DSPVolumeSynchronizer
Change-Id: I46f37b21fc9f0dd7cfb7f1d72ebd07ae5375bb2f
Signed-off-by: therealmharc <therealmharc@gmail.com>
2026-01-09 02:30:44 +08:00
basamaryan
f0aadfa60b sweet: Inherit device/oneplus/dolby
Change-Id: I26fae5c3f0ab62445e628257943d7b6a48a2a478
Signed-off-by: therealmharc <therealmharc@gmail.com>
2026-01-09 02:30:44 +08:00
therealmharc
ba508fb9b1 Revert "sweet: Add Dolby Atmos support [1/2]"
This reverts commit 94a2d2d549.

Signed-off-by: therealmharc <therealmharc@gmail.com>
2026-01-09 02:30:44 +08:00
Arian
f4b9b7ec70 sweet: Patch com.vidhance.node.eis.so to allocate GraphicBuffer with new size
Commit [1] ("Introduce a dependency monitor for fences") has added new
members to the GraphicBuffer struct, increasing the size from 0x100 to
0xd30. camera.xiaomi.so creates GraphicBuffer in its constructors using
"new GraphicBuffer(..)" which encodes the size to allocate at compile
time. Then, on destruction of the object, the implicit destructor will
try to destruct the new members, but, since this memory was not
allocated for the object, this leads to memory access of unallocated
storage.

F DEBUG   : backtrace:
F DEBUG   :       #00 pc 000000000003ba00  /vendor/lib64/libui.so (__aarch64_ldadd8_acq_rel+16) (BuildId: b577faa139eb3404c7d3a674b147634c)
F DEBUG   :       #01 pc 0000000000051364  /vendor/lib64/libui.so (android::GraphicBuffer::~GraphicBuffer()+248) (BuildId: b577faa139eb3404c7d3a674b147634c)
F DEBUG   :       #02 pc 0000000000051698  /vendor/lib64/libui.so (android::GraphicBuffer::~GraphicBuffer()+20) (BuildId: b577faa139eb3404c7d3a674b147634c)
F DEBUG   :       #03 pc 0000000000011064  /vendor/lib64/libutils.so (android::RefBase::decStrong(void const*) const+164) (BuildId: 99d1ab745e7b73420d8d2b397483ef54)
F DEBUG   :       #04 pc 00000000000cd538  /vendor/lib64/hw/camera.xiaomi.so (mihal::GraBuffer::~GraBuffer()+236) (BuildId: a4c59705588bd26d407f0ab181902baf)

[1]: df868baf2a

Change-Id: I239c31b6ea5a7813abc3e9cfbefb6d2bdcc1a9e0
Signed-off-by: therealmharc <therealmharc@gmail.com>
2026-01-09 02:30:44 +08:00
zenzer0s
62c94dd951 sweet: Update surface flinger timers and disable content detection for refresh rate
- this prevents screen flicker causing due to rapid change in adaptive refresh rate

Signed-off-by: therealmharc <therealmharc@gmail.com>
2026-01-09 02:30:44 +08:00
therealmharc
07c435fcef Revert "sweet: properties: Disable content detection for refresh rate"
This reverts commit c04728fe8d7b9f5c82e9c8ec37aff94e970aab1c.

Signed-off-by: therealmharc <therealmharc@gmail.com>
2026-01-09 02:30:44 +08:00
rmp22
7ee3bb7a27 sweet: add target_ims_override flag
Signed-off-by: therealmharc <therealmharc@gmail.com>
2026-01-09 02:30:44 +08:00
Sebastiano Barezzi
fc00311470 sweet: Drop 64-bit soundtrigger blobs
Change-Id: I85590f7ae7629e2088df951b55651b0fa9c1f90c
Signed-off-by: therealmharc <therealmharc@gmail.com>
2026-01-09 02:30:44 +08:00
Sebastiano Barezzi
aa778f553e sweet: Remove unused libswvdec blob
libswvdec.so is no longer needed with the Codec2 media stack + this is a
OMX library which we already drop long ago.

Change-Id: I01a801148e4db65ff8e4357668c08abac8c9c7b2
Signed-off-by: therealmharc <therealmharc@gmail.com>
2026-01-09 02:30:44 +08:00
therealmharc
f2f4b2efeb Revert "sweet: Import perf boost configs from vendor"
This reverts commit c2fd183d7ca1c1e6e201c1e3e07a67758269b896.

Signed-off-by: therealmharc <therealmharc@gmail.com>
2026-01-09 02:30:44 +08:00
therealmharc
97ad4295ad sweet: setup dependencies
Signed-off-by: therealmharc <therealmharc@gmail.com>
2026-01-09 02:30:38 +08:00
therealmharc
31347a73ae sweet: Setup DeviceAsWebcam [1/2]
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-12-14 22:49:08 +08:00
therealmharc
3f09ced1c3 sweet: Add Torch Strength support [1/2]
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-12-14 22:49:08 +08:00
therealmharc
57bd82fae0 sweet: Add ViPER4AndroidFX support [1/2]
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-12-14 22:49:08 +08:00
romiyusnandar
734f657643 sweet: Add Bypass Charging support [1/2]
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-12-14 22:49:08 +08:00
therealmharc
54110ba528 sweet: initialize Evolution-X 11.x
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-12-14 22:49:08 +08:00
Yahya Wessam
2b590106d8 sweet: switch to Spiteful kernel [1/2]
- defconfig: https://github.com/tbyool/android_kernel_xiaomi_sm6150/blob/16.0/arch/arm64/configs/sweet_defconfig

Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-12-14 22:49:08 +08:00
eidawon
4cc2bb90a5 sweet: Add KProfiles support [1/2]
Signed-off-by: eidawon <projecteidawon@gmail.com>
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-12-14 22:49:08 +08:00
therealmharc
94a2d2d549 sweet: Add Dolby Atmos support [1/2]
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-12-14 22:49:08 +08:00
kamleshhv
53235bff5d sweet: Add min and peak refresh rate option
- drop smooth display

Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-12-14 22:49:08 +08:00
Adithya R
dcc5969fcf sweet: Drop soundtrigger HIDL impl
* breaks google voice match with pixelpropsutils as
   we don't have hotword enrollment support

Change-Id: I213626f9729e5ff47ce7e6c990d605ed669b97e3
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-12-14 22:49:08 +08:00
AdarshGrewal
3f7b24dcc4 sweet: properties: Disable content detection for refresh rate
* Having this enabled makes vili fast switch randomly on loops from 120-60Hz, being so fast that our display doesn't have enough time to react, making garbage content to be shown, like a CRT on static...
So, for avoiding the "CRT bug", we disabled it for good:

Test: After disabling that, see if 120Hz seems stable and no glitches on display appeared
Results: 120Hz locked refresh rate when smooth display enabled, no CRT bug at all
To-do: Adjust idle timing, display in inactive likes to switch back and forth, not so fastly, but noticeable

Change-Id: I24641e8e3b6e9b80328cdf1c0fa65d9a16085acd
Signed-off-by: AdarshGrewal <adarshgrewal@gmail.com>
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-12-14 22:49:08 +08:00
anky894
a0aa628a70 sweet: Import perf boost configs from vendor
Change-Id: I53a2f94833924a04fd34101919e781b4c8dead0b
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-12-14 22:49:08 +08:00
Kyle Lin
6f5c8ec0b9 sweet: powerhint: add FIXED_PERFORMANCE
Bug: 153084443
Test: build and boot
Change-Id: Ib8a6244b85404841424ac7e8d6ff77523376778d
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-12-14 22:49:08 +08:00
galadriel1402
c593366c84 sweet: powerhint: Disable high-cap boost when screen is off
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-12-14 22:49:08 +08:00
Andrzej Perczak
fdeab87c41 sweet: powerhint: Disable prefer_idle when screen goes off
Stune prefer_idle minimizes wakeup latency and helps spreading all tasks
evenly across cores, however, it may increase energy consumption. To
minimize effect on battery disable it when screen goes off, this will
optimize task placement for energy.

Signed-off-by: Andrzej Perczak <linux@andrzejperczak.com>
Change-Id: I57c9820a8a3d8bff8efe6815bb9c053d1c3ff7d5
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-12-14 22:49:08 +08:00
xNombre
876a6995c0 sweet: powerhint: Don't boost top-app when screen is off
When screen is off top-app cpuset is needlessly boosted
and can increase power usage. Add a power hint to zero
boost value when display is turned-off.

Reference: 772801bf8a/power/aidl/android/hardware/power/Mode.aidl (134)

Signed-off-by: xNombre <kartapolska@gmail.com>
Change-Id: I68f2fde8bdd2738e5da2b2af6fa9fb7a06604e3f
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-12-14 22:49:08 +08:00
galadriel1402
9c289210e7 sweet: Checkout with kiev powerhints
* Reference: https://github.com/LineageOS/android_device_motorola_kiev/blob/lineage-23.0/configs/power/powerhint.json

Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-12-14 22:49:08 +08:00
Pranav Vashi
c2e6f2c3fa sweet: overlay: Mark display cutout as not translatable
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-11-05 15:57:33 +00:00
Pranav Vashi
b9ae99763f sweet: Define AAPT config
Change-Id: I53efa96939b0fa0cbba065ed79d964cac9c1ad07
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-11-05 15:57:33 +00:00
Pranav Vashi
13f0771051 sweet: overlay: Reduce statusbar end paddings
Change-Id: I40b191d5490e6b9a00043be9a5a144e89e16c2c8
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-11-05 15:57:33 +00:00
raghavt20
d4604d0118 sweet: Set target display density to 410
Change-Id: I11cd2699e105148a8fd381ca8bc91840a53db66b
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-11-05 15:57:33 +00:00
Arian
e15d64f9ce sweet: Bring back face detection libs
Change-Id: I50af944e9398eef352f72f4729999f8d0c556837
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-11-05 15:57:33 +00:00
Pranav Vashi
92420c6671 sweet: Update libarcsoft_super_night_raw compatible with camera package
Change-Id: I489f181c609a2cdf45fd766bc1e0b0f5eec1cfc5
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-11-05 15:57:33 +00:00
Arian
8e246fa93d sweet: Add MIUICamera support [1/2]
Change-Id: Ibb8e46c05c4e22e931337e08489677e14ebd72f0
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-11-05 15:57:07 +00:00
trpsl
429276cfc3 sweet: audio: add ACDB IDs for voice recording
Change-Id: I911491d186c85416ce6236ef5a253edc4badcc0b
Signed-off-by: trpsl <trpsl@pixelexperience.org>
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-11-05 14:54:29 +00:00
Sourajit Karmakar
c2022b22aa sweet: power: Boost GPU when EXPENSIVE_RENDERING hints are parsed
* The powerhint configuration is really weird here. As it turns out,
  in commit [1], Google was probably testing the sm7150-aa and sm7150-ab
  for sunfish and for them, they couldn't find any common frequenices.
  Hence, they decided to use the pwr_levels of respective SoCs for boosting
  the GPU which in this case was very conviniently set to 0 which basically
  does no boosting. (Although that shouldn't actually be the case.) (Source:
  watch -n 0.5 the node in question)

* To get the frequencies available to userspace we cat the node:

  sweetin:/ # cat /sys/class/kgsl/kgsl-3d0/devfreq/available_frequencies
  180000000 267000000 355000000 430000000 565000000 650000000 800000000

* Snapdragon 732G at minimum frequencies can't handle blur very well. This
  should help a lot.

[1]: d564c5b2c3

Change-Id: I015c609b63d1eabe30e9774e23ea1796e6000fc4
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-11-04 15:02:18 +00:00
Alexander Winkowski
ab84d06a1e sweet: powerhint: Remove EnergyAware node
* Google removed this node in redbull.

Change-Id: Iaba137fdb02dddfad7815b7cb3a0701962a06832
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-11-04 15:02:18 +00:00
Subhajeet Muhuri
515b2f56a9 sweet: powerhint: Let CPUBW idle to 2288
Change-Id: I92b499fb492115317e40d904f781bc59481a0103
Signed-off-by: Subhajeet Muhuri <subhajeet.muhuri@aosip.dev>
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-11-04 15:02:18 +00:00
Alexander Winkowski
2944336369 sweet: powerhint: Don't restrict CPU idle levels
The difference in wakeup latencies isn't so significant, let CPU cores enter
deeper idle states to save some power.

Change-Id: I9b24adc356bf35bbdc0bda6e0eee982b4daf1350
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-11-04 15:02:18 +00:00
Subhajeet Muhuri
0a644f80f7 sweet: powerhint: Remove unused nodes & hints
Change-Id: I976c877d0260ebce66a7a815f83c6513563dd34d
Signed-off-by: Subhajeet Muhuri <subhajeet.muhuri@aosip.dev>
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-11-04 15:02:18 +00:00
Subhajeet Muhuri
6400ddd42c sweet: power: Remove audio hints
Change-Id: Ifb0e93f6856d9b3301c19a3f5321c933714f9b64
Signed-off-by: Subhajeet Muhuri <subhajeet.muhuri@aosip.dev>
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-11-04 15:02:18 +00:00
Arian
70872e0ab5 Revert "sweet: power: Decrease launch boost to 3sec"
This reverts commit a0cc5fb715.

Change-Id: Ie6bf98c518a898fbde09a9aef7857da41ffeff04
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-11-04 15:02:18 +00:00
Bin
08b0e35987 sweet: Patch audio to load libaudioroute-v34.so
Change-Id: Idad20512982b8753820fffa6d956df137e462638
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-11-04 14:58:09 +00:00
basamaryan
5e67a4196c sweet: Run sort-blobs-list.py --dir-first
Change-Id: I41df550b7c7486623a25c8440a6a1428c2bf82f3
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-11-04 14:58:09 +00:00
shoya0x00
ee195f20f4 sweet: manifest: Commonize target-level
Change-Id: I14129505f78def5e0a305479c5436e8654462359
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-11-04 14:58:09 +00:00
Hridaya Prajapati
6f7cc1fbb9 sweet: switch to common AIDL IR service
Change-Id: I36c05aaa312969e479896c6e63a26a68cf897afa
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-11-04 14:58:09 +00:00
Yumi Yukimura
44fb5a2df1 sweet: manifest: Bump target-level to 6
Change-Id: I8d419d248f29b7d316a87d55e19ae7ff141e19a5
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-11-04 14:58:09 +00:00
Michael Bestas
16098b0773 sweet: Disable OMX service
Change-Id: I5381e098af64271f9d71c484262e1710e8fcacea
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-11-04 14:58:09 +00:00
Michael Bestas
fb21864a2d sweet: Remove unused Android.mk
Change-Id: I98105c127066f7de7012a1895d19c96356105921
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-11-04 14:58:09 +00:00
basamaryan
be6ce4538a sweet: display: Convert to blueprint
Change-Id: Ia7f1b0dc373feb2cd2a7db433c162626e5bce29d
Signed-off-by: therealmharc <therealmharc@gmail.com>
2025-11-04 14:58:09 +00:00
basamaryan
a03ace867d sweet: Move to Xiaomi fingerprint AIDL
Change-Id: I68dba7184034fd37454c7d32a065f041cb611625
2024-12-25 19:40:07 -05:00
LuK1337
e58327b53c sweet: Enable elfchecks for camera libs
Reference: I23190f0b83c9e28aa2624a7575544b0eaf5c83c8
Change-Id: I18b0b07bf3a435dd449106653e3ca458b4f07b69
2024-12-25 19:40:07 -05:00
basamaryan
7d7d9f44b1 sweet: Enable elfchecks for libgrallocutils
Change-Id: I3719a100caa3535d3f2c27f4d2a0b9f75674d1d7
2024-12-25 19:40:07 -05:00
basamaryan
6ee1b45e9c sweet: Switch to py extract utils
Change-Id: If53e93faec4f455542c9eb46ece28d355e5910e4
2024-12-25 19:40:07 -05:00
LuK1337
8ffc9e22cd sweet: Adjust override prop key names
Change-Id: I436bbf425023dbe54cf3e2c35f50a5575511bc38
2024-12-25 19:40:07 -05:00
basamaryan
1c166492b4 sweet: Run bpfix
Change-Id: Ife7b541d10e427999657195f266d40b303c09532
2024-12-25 19:39:09 -05:00
Ken Huang
d7334688bb sweet: Set 120Hz frame rate multiple threshold
Bug: 215043570
Test: play 24fps video and check refresh rate
Change-Id: Ie638f9dcf11e25bdd903d6cde2d0eeb794668e52
2024-12-17 11:17:40 -05:00
33 changed files with 882 additions and 551 deletions

View File

@@ -1,4 +1,7 @@
soong_namespace {
imports: [
"hardware/qcom-caf/sm8150",
],
}
install_symlink {

View File

@@ -1,13 +0,0 @@
#
# Copyright (C) 2021 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
LOCAL_PATH := $(call my-dir)
ifeq ($(TARGET_DEVICE),sweet)
include $(call all-makefiles-under,$(LOCAL_PATH))
endif

View File

@@ -7,6 +7,12 @@
# Inherit from sm6150-common
include device/xiaomi/sm6150-common/BoardConfigCommon.mk
# Inherit from Dolby
-include device/oneplus/dolby/BoardConfig.mk
# MiuiCamera
-include device/xiaomi/miuicamera-sweet/BoardConfig.mk
DEVICE_PATH := device/xiaomi/sweet
# Assert
@@ -15,11 +21,34 @@ TARGET_OTA_ASSERT_DEVICE := sweet,sweetin
# Audio
TARGET_PROVIDES_AUDIO_EXTNS := true
# Broken Rules
ifneq ($(TARGET_BUILD_VARIANT), user)
BUILD_BROKEN_CLANG_PROPERTY := true
BUILD_BROKEN_CLANG_ASFLAGS := true
BUILD_BROKEN_CLANG_CFLAGS := true
BUILD_BROKEN_DEPFILE := true
BUILD_BROKEN_DUP_RULES := true
BUILD_BROKEN_DUP_SYSPROP := true
BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true
BUILD_BROKEN_ENFORCE_SYSPROP_OWNER := true
BUILD_BROKEN_INPUT_DIR_MODULES := true
BUILD_BROKEN_MISSING_REQUIRED_MODULES := true
BUILD_BROKEN_OUTSIDE_INCLUDE_DIRS := true
BUILD_BROKEN_PREBUILT_ELF_FILES := true
# BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW := true
BUILD_BROKEN_USES_NETWORK := true
BUILD_BROKEN_VENDOR_PROPERTY_NAMESPACE := true
BUILD_BROKEN_VINTF_PRODUCT_COPY_FILES := true
BUILD_BROKEN_INCORRECT_PARTITION_IMAGES := true
# BUILD_BROKEN_GENRULE_SANDBOXING := true
BUILD_BROKEN_DONT_CHECK_SYSTEMSDK := true
endif
# HIDL
DEVICE_MANIFEST_FILE += $(DEVICE_PATH)/configs/hidl/manifest.xml
# Kernel
TARGET_KERNEL_CONFIG += vendor/sweet.config
TARGET_KERNEL_CONFIG += sweet_defconfig
# Partitions
BOARD_BOOTIMAGE_PARTITION_SIZE := 134217728
@@ -35,10 +64,11 @@ TARGET_ODM_PROP += $(DEVICE_PATH)/properties/odm.prop
TARGET_VENDOR_PROP += $(DEVICE_PATH)/properties/vendor.prop
# Screen density
TARGET_SCREEN_DENSITY := 440
TARGET_SCREEN_DENSITY := 410
# Vendor security patch level
VENDOR_SECURITY_PATCH := 2023-11-01
# Security patch level
BOOT_SECURITY_PATCH := $(PLATFORM_SECURITY_PATCH)
VENDOR_SECURITY_PATCH := $(PLATFORM_SECURITY_PATCH)
# Inherit from proprietary files
include vendor/xiaomi/sweet/BoardConfigVendor.mk

View File

@@ -95,6 +95,8 @@
<device name="SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES_EXTERNAL_1" acdb_id="10"/>
<device name="SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES_EXTERNAL_2" acdb_id="10"/>
<device name="SND_DEVICE_OUT_SPEAKER_AND_USB_HEADSET" acdb_id="45"/>
<device name="SND_DEVICE_IN_VOICE_REC_MIC_AEC" acdb_id="111"/>
<device name="SND_DEVICE_IN_VOICE_REC_MIC_NS" acdb_id="111"/>
<device name="SND_DEVICE_IN_UNPROCESSED_USB_HEADSET_MIC" acdb_id="133"/>
<device name="SND_DEVICE_IN_UNPROCESSED_MIC" acdb_id="143"/>
<device name="SND_DEVICE_IN_UNPROCESSED_STEREO_MIC" acdb_id="144"/>

View File

@@ -1,230 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--- Copyright (c) 2014-2018, The Linux Foundation. All rights reserved. -->
<!--- -->
<!--- Redistribution and use in source and binary forms, with or without -->
<!--- modification, are permitted provided that the following conditions are -->
<!--- met: -->
<!--- * Redistributions of source code must retain the above copyright -->
<!--- notice, this list of conditions and the following disclaimer. -->
<!--- * Redistributions in binary form must reproduce the above -->
<!--- copyright notice, this list of conditions and the following -->
<!--- disclaimer in the documentation and/or other materials provided -->
<!--- with the distribution. -->
<!--- * Neither the name of The Linux Foundation nor the names of its -->
<!--- contributors may be used to endorse or promote products derived -->
<!--- from this software without specific prior written permission. -->
<!--- -->
<!--- THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -->
<!--- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -->
<!--- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -->
<!--- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -->
<!--- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -->
<!--- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -->
<!--- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -->
<!--- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -->
<!--- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -->
<!--- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -->
<!--- IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -->
<mixer>
<!-- These are the initial mixer settings -->
<ctl name="LSM1 Mixer TX_CDC_DMA_TX_3" value="0" />
<ctl name="LSM2 Mixer TX_CDC_DMA_TX_3" value="0" />
<ctl name="LSM3 Mixer TX_CDC_DMA_TX_3" value="0" />
<ctl name="LSM4 Mixer TX_CDC_DMA_TX_3" value="0" />
<ctl name="LSM5 Mixer TX_CDC_DMA_TX_3" value="0" />
<ctl name="LSM6 Mixer TX_CDC_DMA_TX_3" value="0" />
<ctl name="LSM7 Mixer TX_CDC_DMA_TX_3" value="0" />
<ctl name="LSM8 Mixer TX_CDC_DMA_TX_3" value="0" />
<ctl name="LSM1 Port" value="None" />
<ctl name="LSM2 Port" value="None" />
<ctl name="LSM3 Port" value="None" />
<ctl name="LSM4 Port" value="None" />
<ctl name="LSM5 Port" value="None" />
<ctl name="LSM6 Port" value="None" />
<ctl name="LSM7 Port" value="None" />
<ctl name="LSM8 Port" value="None" />
<ctl name="TX_CDC_DMA_TX_3 LSM Function" value="None" />
<ctl name="TX_CDC_DMA_TX_3 Channels" value="One" />
<ctl name="TX_AIF1_CAP Mixer DEC0" value="0" />
<ctl name="TX_AIF1_CAP Mixer DEC1" value="0" />
<ctl name="TX_AIF1_CAP Mixer DEC2" value="0" />
<ctl name="TX_AIF1_CAP Mixer DEC3" value="0" />
<ctl name="TX DEC0 MUX" value="MSM_DMIC" />
<ctl name="TX DMIC MUX0" value="ZERO" />
<ctl name="TX DEC1 MUX" value="MSM_DMIC" />
<ctl name="TX DMIC MUX1" value="ZERO" />
<ctl name="TX DEC2 MUX" value="MSM_DMIC" />
<ctl name="TX DMIC MUX2" value="ZERO" />
<ctl name="TX DEC3 MUX" value="MSM_DMIC" />
<ctl name="TX DMIC MUX3" value="ZERO" />
<ctl name="AUDIO_REF_EC_UL1 MUX" value="None"/>
<ctl name="EC Reference Channels" value="One"/>
<ctl name="EC Reference Bit Format" value="0"/>
<ctl name="EC Reference SampleRate" value="0"/>
<ctl name="TX_DEC0 Volume" value="84" />
<ctl name="TX_DEC1 Volume" value="84" />
<ctl name="TX_DEC2 Volume" value="84" />
<ctl name="TX_DEC3 Volume" value="84" />
<path name="listen-voice-wakeup-1">
<ctl name="TX_CDC_DMA_TX_3 LSM Function" value="SWAUDIO" />
<ctl name="LSM1 Port" value="TX_CDC_DMA_TX_3" />
<ctl name="LSM1 Mixer TX_CDC_DMA_TX_3" value="1" />
</path>
<path name="listen-voice-wakeup-2">
<ctl name="TX_CDC_DMA_TX_3 LSM Function" value="SWAUDIO" />
<ctl name="LSM2 Port" value="TX_CDC_DMA_TX_3" />
<ctl name="LSM2 Mixer TX_CDC_DMA_TX_3" value="1" />
</path>
<path name="listen-voice-wakeup-3">
<ctl name="TX_CDC_DMA_TX_3 LSM Function" value="SWAUDIO" />
<ctl name="LSM3 Port" value="TX_CDC_DMA_TX_3" />
<ctl name="LSM3 Mixer TX_CDC_DMA_TX_3" value="1" />
</path>
<path name="listen-voice-wakeup-4">
<ctl name="TX_CDC_DMA_TX_3 LSM Function" value="SWAUDIO" />
<ctl name="LSM4 Port" value="TX_CDC_DMA_TX_3" />
<ctl name="LSM4 Mixer TX_CDC_DMA_TX_3" value="1" />
</path>
<path name="listen-voice-wakeup-5">
<ctl name="TX_CDC_DMA_TX_3 LSM Function" value="SWAUDIO" />
<ctl name="LSM5 Port" value="TX_CDC_DMA_TX_3" />
<ctl name="LSM5 Mixer TX_CDC_DMA_TX_3" value="1" />
</path>
<path name="listen-voice-wakeup-6">
<ctl name="TX_CDC_DMA_TX_3 LSM Function" value="SWAUDIO" />
<ctl name="LSM6 Port" value="TX_CDC_DMA_TX_3" />
<ctl name="LSM6 Mixer TX_CDC_DMA_TX_3" value="1" />
</path>
<path name="listen-voice-wakeup-7">
<ctl name="TX_CDC_DMA_TX_3 LSM Function" value="SWAUDIO" />
<ctl name="LSM7 Port" value="TX_CDC_DMA_TX_3" />
<ctl name="LSM7 Mixer TX_CDC_DMA_TX_3" value="1" />
</path>
<path name="listen-voice-wakeup-8">
<ctl name="TX_CDC_DMA_TX_3 LSM Function" value="SWAUDIO" />
<ctl name="LSM8 Port" value="TX_CDC_DMA_TX_3" />
<ctl name="LSM8 Mixer TX_CDC_DMA_TX_3" value="1" />
</path>
<path name="listen-voice-wakeup-1 preproc">
<ctl name="TX_CDC_DMA_TX_3 LSM Function" value="SWAUDIO" />
<ctl name="LSM1 Port" value="ADM_LSM_TX" />
<ctl name="LSM1 Mixer TX_CDC_DMA_TX_3" value="1" />
</path>
<path name="listen-voice-wakeup-2 preproc">
<ctl name="TX_CDC_DMA_TX_3 LSM Function" value="SWAUDIO" />
<ctl name="LSM2 Port" value="ADM_LSM_TX" />
<ctl name="LSM2 Mixer TX_CDC_DMA_TX_3" value="1" />
</path>
<path name="listen-voice-wakeup-3 preproc">
<ctl name="TX_CDC_DMA_TX_3 LSM Function" value="SWAUDIO" />
<ctl name="LSM3 Port" value="ADM_LSM_TX" />
<ctl name="LSM3 Mixer TX_CDC_DMA_TX_3" value="1" />
</path>
<path name="listen-voice-wakeup-4 preproc">
<ctl name="TX_CDC_DMA_TX_3 LSM Function" value="SWAUDIO" />
<ctl name="LSM4 Port" value="ADM_LSM_TX" />
<ctl name="LSM4 Mixer TX_CDC_DMA_TX_3" value="1" />
</path>
<path name="listen-voice-wakeup-5 preproc">
<ctl name="TX_CDC_DMA_TX_3 LSM Function" value="SWAUDIO" />
<ctl name="LSM5 Port" value="ADM_LSM_TX" />
<ctl name="LSM5 Mixer TX_CDC_DMA_TX_3" value="1" />
</path>
<path name="listen-voice-wakeup-6 preproc">
<ctl name="TX_CDC_DMA_TX_3 LSM Function" value="SWAUDIO" />
<ctl name="LSM6 Port" value="ADM_LSM_TX" />
<ctl name="LSM6 Mixer TX_CDC_DMA_TX_3" value="1" />
</path>
<path name="listen-voice-wakeup-7 preproc">
<ctl name="TX_CDC_DMA_TX_3 LSM Function" value="SWAUDIO" />
<ctl name="LSM7 Port" value="ADM_LSM_TX" />
<ctl name="LSM7 Mixer TX_CDC_DMA_TX_3" value="1" />
</path>
<path name="listen-voice-wakeup-8 preproc">
<ctl name="TX_CDC_DMA_TX_3 LSM Function" value="SWAUDIO" />
<ctl name="LSM8 Port" value="ADM_LSM_TX" />
<ctl name="LSM8 Mixer TX_CDC_DMA_TX_3" value="1" />
</path>
<path name="listen-ape-handset-mic">
<ctl name="TX_CDC_DMA_TX_3 Channels" value="One" />
<ctl name="TX_AIF1_CAP Mixer DEC0" value="1" />
<ctl name="TX_DEC0 Volume" value="102" />
<ctl name="TX DMIC MUX0" value="DMIC2" />
</path>
<path name="listen-ape-handset-mic-preproc">
<path name="listen-ape-handset-mic"/>
</path>
<path name="listen-ape-handset-dmic">
<ctl name="TX_CDC_DMA_TX_3 Channels" value="Two" />
<ctl name="TX_AIF1_CAP Mixer DEC0" value="1" />
<ctl name="TX_DEC0 Volume" value="102" />
<ctl name="TX_DEC1 Volume" value="102" />
<ctl name="TX DMIC MUX0" value="DMIC2" />
<ctl name="TX_AIF1_CAP Mixer DEC1" value="1" />
<ctl name="TX DMIC MUX1" value="DMIC3" />
</path>
<path name="listen-ape-handset-tmic">
<ctl name="TX_CDC_DMA_TX_3 Channels" value="Three" />
<ctl name="TX_AIF1_CAP Mixer DEC0" value="1" />
<ctl name="TX_DEC0 Volume" value="102" />
<ctl name="TX_DEC1 Volume" value="102" />
<ctl name="TX_DEC2 Volume" value="102" />
<ctl name="TX DMIC MUX0" value="DMIC2" />
<ctl name="TX_AIF1_CAP Mixer DEC1" value="1" />
<ctl name="TX DMIC MUX1" value="DMIC0" />
<ctl name="TX_AIF1_CAP Mixer DEC2" value="1" />
<ctl name="TX DMIC MUX2" value="DMIC3" />
</path>
<path name="listen-ape-handset-qmic">
<ctl name="TX_CDC_DMA_TX_3 Channels" value="Four" />
<ctl name="TX_AIF1_CAP Mixer DEC0" value="1" />
<ctl name="TX_DEC0 Volume" value="102" />
<ctl name="TX_DEC1 Volume" value="102" />
<ctl name="TX_DEC2 Volume" value="102" />
<ctl name="TX_DEC3 Volume" value="102" />
<ctl name="TX DMIC MUX0" value="DMIC2" />
<ctl name="TX_AIF1_CAP Mixer DEC1" value="1" />
<ctl name="TX DMIC MUX1" value="DMIC0" />
<ctl name="TX_AIF1_CAP Mixer DEC2" value="1" />
<ctl name="TX DMIC MUX2" value="DMIC3" />
<ctl name="TX_AIF1_CAP Mixer DEC3" value="1" />
<ctl name="TX DMIC MUX3" value="DMIC1" />
</path>
<path name="echo-reference">
<ctl name="AUDIO_REF_EC_UL1 MUX" value="WSA_CDC_DMA_RX_0"/>
<ctl name="EC Reference Channels" value="Two"/>
<ctl name="EC Reference Bit Format" value="S16_LE"/>
<ctl name="EC Reference SampleRate" value="48000"/>
</path>
<path name="echo-reference a2dp">
<ctl name="AUDIO_REF_EC_UL1 MUX" value="SLIM_7_RX"/>
<ctl name="EC Reference Channels" value="Two"/>
<ctl name="EC Reference Bit Format" value="S16_LE"/>
<ctl name="EC Reference SampleRate" value="48000"/>
</path>
</mixer>

View File

@@ -1,4 +1,4 @@
<manifest version="2.0" type="device" target-level="5" >
<manifest version="2.0" type="device">
<hal format="hidl">
<name>android.hardware.sensors</name>
<transport>hwbinder</transport>

View File

@@ -20,12 +20,29 @@
],
"ResetOnInit": true
},
{
"Name": "CPULittleClusterUpRateLimit",
"Path": "/sys/devices/system/cpu/cpu0/cpufreq/schedutil/up_rate_limit_us",
"Values": [
"500",
"2000"
],
"ResetOnInit": true
},
{
"Name": "CPULittleClusterDownRateLimit",
"Path": "/sys/devices/system/cpu/cpu0/cpufreq/schedutil/down_rate_limit_us",
"Values": [
"20000",
"2000"
],
"ResetOnInit": true
},
{
"Name": "CPUBigClusterMaxFreq",
"Path": "/sys/devices/system/cpu/cpu6/cpufreq/scaling_max_freq",
"Values": [
"9999999",
"1939200",
"1555200"
],
"DefaultIndex": 0,
@@ -36,40 +53,47 @@
"Path": "/sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq",
"Values": [
"9999999",
"1555200",
"1248000",
"652800"
],
"ResetOnInit": true
},
{
"Name": "GPUMaxFreq",
"Path": "/sys/class/kgsl/kgsl-3d0/max_pwrlevel",
"Name": "CPUBigClusterUpRateLimit",
"Path": "/sys/devices/system/cpu/cpu6/cpufreq/schedutil/up_rate_limit_us",
"Values": [
"0",
"3"
"500",
"2000"
],
"ResetOnInit": true
},
{
"Name": "CPUBigClusterDownRateLimit",
"Path": "/sys/devices/system/cpu/cpu6/cpufreq/schedutil/down_rate_limit_us",
"Values": [
"10000",
"2000"
],
"ResetOnInit": true
},
{
"Name": "GPUMaxFreq",
"Path": "/sys/class/kgsl/kgsl-3d0/devfreq/max_freq",
"Values": [
"800000000",
"650000000"
],
"DefaultIndex": 0,
"ResetOnInit": true
},
{
"Name": "GPUMinFreq",
"Path": "/sys/class/kgsl/kgsl-3d0/min_pwrlevel",
"Path": "/sys/class/kgsl/kgsl-3d0/devfreq/min_freq",
"Values": [
"0",
"3",
"7"
],
"ResetOnInit": true
},
{
"Name": "GPUBusMinFreq",
"Path": "/sys/class/devfreq/soc:qcom,gpubw/min_freq",
"Values": [
"6881",
"5931",
"3879",
"0"
"800000000",
"650000000",
"565000000",
"430000000",
"267000000"
],
"ResetOnInit": true
},
@@ -100,13 +124,35 @@
],
"ResetOnInit": true
},
{
"Name": "FgSchedtunePreferIdle",
"Path": "/dev/stune/foreground/schedtune.prefer_idle",
"Values": [
"1",
"0"
],
"DefaultIndex": 0,
"ResetOnInit": true
},
{
"Name": "BgSchedtunePreferIdle",
"Path": "/dev/stune/background/schedtune.prefer_idle",
"Values": [
"1",
"0"
],
"DefaultIndex": 0,
"ResetOnInit": true
},
{
"Name": "TASchedtuneBoost",
"Path": "/dev/stune/top-app/schedtune.boost",
"Values": [
"40",
"10"
"10",
"0"
],
"DefaultIndex": 1,
"ResetOnInit": true
},
{
@@ -118,6 +164,16 @@
],
"ResetOnInit": true
},
{
"Name": "TASchedtunePreferIdle",
"Path": "/dev/stune/top-app/schedtune.prefer_idle",
"Values": [
"1",
"0"
],
"DefaultIndex": 0,
"ResetOnInit": true
},
{
"Name": "CPUBWHystTriggerCount",
"Path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/bw_hwmon/hyst_trigger_count",
@@ -145,32 +201,13 @@
],
"ResetOnInit": true
},
{
"Name": "CPUBWSampleMs",
"Path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/bw_hwmon/sample_ms",
"Values": [
"10",
"4"
],
"ResetOnInit": true
},
{
"Name": "CPUBWIOPercent",
"Path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/bw_hwmon/io_percent",
"Values": [
"80",
"34"
],
"ResetOnInit": true
},
{
"Name": "CPUBWMinFreq",
"Path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/min_freq",
"Values": [
"14236",
"9155",
"7110",
"4577"
"2288"
],
"ResetOnInit": true
},
@@ -184,33 +221,6 @@
],
"ResetOnInit": true
},
{
"Name": "LLCCBWSampleMs",
"Path": "/sys/class/devfreq/soc:qcom,cpu-llcc-ddr-bw/bw_hwmon/sample_ms",
"Values": [
"10",
"4"
],
"ResetOnInit": true
},
{
"Name": "LLCCBWHistMemory",
"Path": "/sys/class/devfreq/soc:qcom,cpu-llcc-ddr-bw/bw_hwmon/hist_memory",
"Values": [
"0",
"20"
],
"ResetOnInit": true
},
{
"Name": "LLCCBWHystLength",
"Path": "/sys/class/devfreq/soc:qcom,cpu-llcc-ddr-bw/bw_hwmon/hyst_length",
"Values": [
"0",
"10"
],
"ResetOnInit": true
},
{
"Name": "L3LittleClusterMinFreq",
"Path": "/sys/class/devfreq/soc:qcom,cpu0-cpu-l3-lat/min_freq",
@@ -220,15 +230,6 @@
],
"ResetOnInit": true
},
{
"Name": "LLCCBWHystTriggerCount",
"Path": "/sys/class/devfreq/soc:qcom,cpu-llcc-ddr-bw/bw_hwmon/hyst_trigger_count",
"Values": [
"0",
"3"
],
"ResetOnInit": true
},
{
"Name": "L3BigClusterMinFreq",
"Path": "/sys/class/devfreq/soc:qcom,cpu6-cpu-l3-lat/min_freq",
@@ -238,31 +239,13 @@
],
"ResetOnInit": true
},
{
"Name": "PMQoSCpuDmaLatency",
"Path": "/dev/cpu_dma_latency",
"Values": [
"44",
"100"
],
"HoldFd": true
},
{
"Name": "EnergyAware",
"Path": "/proc/sys/kernel/sched_energy_aware",
"Values": [
"0",
"1"
],
"ResetOnInit": true
},
{
"Name": "DoubleTapToWakeEnable",
"Path": "/sys/devices/virtual/touch/touch_dev/double_tap",
"Values": [
"1",
"0"
],
]
},
{
"Name": "PowerHALMainState",
@@ -273,15 +256,6 @@
],
"Type": "Property"
},
{
"Name": "PowerHALAudioState",
"Path": "vendor.powerhal.audio",
"Values": [
"AUDIO_STREAMING_LOW_LATENCY",
""
],
"Type": "Property"
},
{
"Name": "PowerHALRenderingState",
"Path": "vendor.powerhal.rendering",
@@ -315,7 +289,67 @@
"PowerHint": "SUSTAINED_PERFORMANCE",
"Node": "GPUMaxFreq",
"Duration": 0,
"Value": "3"
"Value": "800000000"
},
{
"PowerHint": "FIXED_PERFORMANCE",
"Node": "CPUBigClusterMaxFreq",
"Duration": 0,
"Value": "9999999"
},
{
"PowerHint": "FIXED_PERFORMANCE",
"Node": "CPUBigClusterMinFreq",
"Duration": 0,
"Value": "9999999"
},
{
"PowerHint": "FIXED_PERFORMANCE",
"Node": "CPULittleClusterMaxFreq",
"Duration": 0,
"Value": "9999999"
},
{
"PowerHint": "FIXED_PERFORMANCE",
"Node": "CPULittleClusterMinFreq",
"Duration": 0,
"Value": "9999999"
},
{
"PowerHint": "FIXED_PERFORMANCE",
"Node": "GPUMaxFreq",
"Duration": 0,
"Value": "800000000"
},
{
"PowerHint": "FIXED_PERFORMANCE",
"Node": "GPUMinFreq",
"Duration": 0,
"Value": "800000000"
},
{
"PowerHint": "INTERACTIVE",
"Node": "CPULittleClusterUpRateLimit",
"Duration": 0,
"Value": "500"
},
{
"PowerHint": "INTERACTIVE",
"Node": "CPULittleClusterDownRateLimit",
"Duration": 0,
"Value": "20000"
},
{
"PowerHint": "INTERACTIVE",
"Node": "CPUBigClusterUpRateLimit",
"Duration": 0,
"Value": "500"
},
{
"PowerHint": "INTERACTIVE",
"Node": "CPUBigClusterDownRateLimit",
"Duration": 0,
"Value": "10000"
},
{
"PowerHint": "INTERACTION",
@@ -365,114 +399,84 @@
"Duration": 0,
"Value": "2597"
},
{
"PowerHint": "LAUNCH",
"Node": "EnergyAware",
"Duration": 3000,
"Value": "0"
},
{
"PowerHint": "LAUNCH",
"Node": "CPUBigClusterMaxFreq",
"Duration": 3000,
"Duration": 5000,
"Value": "9999999"
},
{
"PowerHint": "LAUNCH",
"Node": "CPUBigClusterMinFreq",
"Duration": 3000,
"Duration": 5000,
"Value": "9999999"
},
{
"PowerHint": "LAUNCH",
"Node": "CPULittleClusterMinFreq",
"Duration": 3000,
"Duration": 5000,
"Value": "9999999"
},
{
"PowerHint": "LAUNCH",
"Node": "PMQoSCpuDmaLatency",
"Duration": 3000,
"Value": "44"
},
{
"PowerHint": "LAUNCH",
"Node": "CPUBWHystTriggerCount",
"Duration": 3000,
"Duration": 5000,
"Value": "0"
},
{
"PowerHint": "LAUNCH",
"Node": "CPUBWHystLength",
"Duration": 3000,
"Duration": 5000,
"Value": "0"
},
{
"PowerHint": "LAUNCH",
"Node": "CPUBWHistMemory",
"Duration": 3000,
"Duration": 5000,
"Value": "0"
},
{
"PowerHint": "LAUNCH",
"Node": "CPUBWMinFreq",
"Duration": 3000,
"Duration": 5000,
"Value": "14236"
},
{
"PowerHint": "LAUNCH",
"Node": "GPUForceClkOn",
"Duration": 3000,
"Duration": 5000,
"Value": "1"
},
{
"PowerHint": "LAUNCH",
"Node": "GPUForceRailOn",
"Duration": 3000,
"Duration": 5000,
"Value": "1"
},
{
"PowerHint": "LAUNCH",
"Node": "GPUIdleTimer",
"Duration": 3000,
"Duration": 5000,
"Value": "10000"
},
{
"PowerHint": "LAUNCH",
"Node": "LLCCBWMinFreq",
"Duration": 3000,
"Duration": 5000,
"Value": "6881"
},
{
"PowerHint": "LAUNCH",
"Node": "L3LittleClusterMinFreq",
"Duration": 3000,
"Duration": 5000,
"Value": "1459200000"
},
{
"PowerHint": "LAUNCH",
"Node": "L3BigClusterMinFreq",
"Duration": 3000,
"Duration": 5000,
"Value": "1459200000"
},
{
"PowerHint": "AUDIO_LAUNCH",
"Node": "PMQoSCpuDmaLatency",
"Duration": 2000,
"Value": "44"
},
{
"PowerHint": "AUDIO_STREAMING_LOW_LATENCY",
"Node": "PowerHALAudioState",
"Duration": 0,
"Value": "AUDIO_STREAMING_LOW_LATENCY"
},
{
"PowerHint": "AUDIO_STREAMING_LOW_LATENCY",
"Node": "PMQoSCpuDmaLatency",
"Duration": 0,
"Value": "44"
},
{
"PowerHint": "EXPENSIVE_RENDERING",
"Node": "PowerHALRenderingState",
@@ -483,19 +487,43 @@
"PowerHint": "EXPENSIVE_RENDERING",
"Node": "GPUMinFreq",
"Duration": 0,
"Value": "0"
"Value": "800000000"
},
{
"PowerHint": "EXPENSIVE_RENDERING",
"Node": "GPUMaxFreq",
"Duration": 0,
"Value": "800000000"
},
{
"PowerHint": "DISPLAY_INACTIVE",
"Node": "TASchedtuneBoost",
"Duration": 0,
"Value": "0"
},
{
"PowerHint": "TPU_BOOST",
"Node": "PMQoSCpuDmaLatency",
"Duration": 2000,
"Value": "44"
"PowerHint": "DISPLAY_INACTIVE",
"Node": "FgSchedtunePreferIdle",
"Duration": 0,
"Value": "0"
},
{
"PowerHint": "DISPLAY_INACTIVE",
"Node": "BgSchedtunePreferIdle",
"Duration": 0,
"Value": "0"
},
{
"PowerHint": "DISPLAY_INACTIVE",
"Node": "TASchedtunePreferIdle",
"Duration": 0,
"Value": "0"
},
{
"PowerHint": "DISPLAY_INACTIVE",
"Node": "TASchedtuneHighCap",
"Duration": 0,
"Value": "0"
},
{
"PowerHint": "DOUBLE_TAP_TO_WAKE",

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2021-2024 The LineageOS Project
# Copyright (C) 2021-2025 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
@@ -7,6 +7,16 @@
# Inherit from sm6150-common
$(call inherit-product, device/xiaomi/sm6150-common/sm6150.mk)
# Inherit from dolby
$(call inherit-product-if-exists, device/oneplus/dolby/device.mk)
# MiuiCamera
$(call inherit-product-if-exists, device/xiaomi/miuicamera-sweet/device.mk)
# AAPT
PRODUCT_AAPT_CONFIG := normal
PRODUCT_AAPT_PREF_CONFIG := xxhdpi
# API level, the device has been commercially launched on
PRODUCT_SHIPPING_API_LEVEL := 30
@@ -18,8 +28,7 @@ PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/audio/audio_platform_info_intcodec.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info_intcodec.xml \
$(LOCAL_PATH)/configs/audio/mixer_paths_idp.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_idp.xml \
$(LOCAL_PATH)/configs/audio/mixer_paths_overlay_dynamic.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_overlay_dynamic.xml \
$(LOCAL_PATH)/configs/audio/mixer_paths_overlay_static.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_overlay_static.xml \
$(LOCAL_PATH)/configs/audio/sound_trigger_mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths.xml
$(LOCAL_PATH)/configs/audio/mixer_paths_overlay_static.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_overlay_static.xml
# Display
PRODUCT_COPY_FILES += \
@@ -27,12 +36,25 @@ PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/display/qdcm_calib_data_xiaomi_k6_38_0e_0b_fhd_dsc_video_dsi_panel.xml:$(TARGET_COPY_OUT_VENDOR)/etc/qdcm_calib_data_xiaomi_k6_38_0e_0b_fhd_dsc_video_dsi_panel.xml
PRODUCT_PACKAGES += \
hwcomposer.qcom
hwcomposer.sweet
# Dolby
TARGET_USES_DOLBY := true
PRODUCT_PACKAGES += \
DSPVolumeSynchronizer
# Init
$(call soong_config_set,libinit,vendor_init_lib,//$(LOCAL_PATH):libinit_sweet)
# Init scripts
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/rootdir/etc/init.sweet.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.sweet.rc
# KProfiles
PRODUCT_PACKAGES += \
KProfiles
# NFC
PRODUCT_PACKAGES += \
com.android.nfc_extras \
@@ -52,7 +74,7 @@ PRODUCT_COPY_FILES += \
# IR
PRODUCT_PACKAGES += \
android.hardware.ir-service.xiaomi
android.hardware.ir-service.lineage
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.consumerir.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.consumerir.xml

13
display/Android.bp Normal file
View File

@@ -0,0 +1,13 @@
cc_library_shared {
name: "hwcomposer.sweet",
vendor: true,
relative_install_path: "hw",
shared_libs: [
"hwcomposer.qcom",
],
srcs: [
"display_builtin.cpp",
],
}

View File

@@ -1,11 +0,0 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := hwcomposer.qcom
LOCAL_VENDOR_MODULE := true
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_MODULE_TAGS := optional
LOCAL_SHARED_LIBRARIES := hwcomposer.$(TARGET_BOARD_PLATFORM)
LOCAL_SRC_FILES := display_builtin.cpp
include $(BUILD_SHARED_LIBRARY)

68
evolution.dependencies Normal file
View File

@@ -0,0 +1,68 @@
[
{
"remote": "github-non-los",
"repository": "SoulEye-sweet/device_xiaomi_sm6150-common",
"target_path": "device/xiaomi/sm6150-common",
"branch": "bka"
},
{
"remote": "github-non-los",
"repository": "SoulEye-sweet/device_xiaomi_miuicamera-sweet",
"target_path": "device/xiaomi/miuicamera-sweet",
"branch": "bka"
},
{
"remote": "codeberg",
"repository": "SoulEye-sweet/vendor_xiaomi_sweet",
"target_path": "vendor/xiaomi/sweet",
"branch": "bka"
},
{
"remote": "codeberg",
"repository": "SoulEye-sweet/vendor_xiaomi_sm6150-common",
"target_path": "vendor/xiaomi/sm6150-common",
"branch": "bka"
},
{
"remote": "codeberg",
"repository": "SoulEye-sweet/vendor_xiaomi_miuicamera-sweet",
"target_path": "vendor/xiaomi/miuicamera-sweet",
"branch": "bka"
},
{
"remote": "github-non-los",
"repository": "tbyool/android_kernel_xiaomi_sm6150",
"target_path": "kernel/xiaomi/sm6150",
"branch": "16.0"
},
{
"remote": "github-non-los",
"repository": "SoulEye-sweet/device_oneplus_dolby",
"target_path": "device/oneplus/dolby",
"branch": "bka"
},
{
"remote": "codeberg",
"repository": "SoulEye-sweet/vendor_oneplus_dolby",
"target_path": "vendor/oneplus/dolby",
"branch": "bka"
},
{
"remote": "github-non-los",
"repository": "SoulEye-sweet/hardware_xiaomi",
"target_path": "hardware/xiaomi",
"branch": "bka"
},
{
"remote": "github-non-los",
"repository": "SoulEye-sweet/packages_apps_ViPER4AndroidFX",
"target_path": "packages/apps/ViPER4AndroidFX",
"branch": "bka"
},
{
"remote": "github-non-los",
"repository": "yaap/packages_apps_KProfiles",
"target_path": "packages/apps/KProfiles",
"branch": "sixteen"
}
]

113
extract-files.py Executable file
View File

@@ -0,0 +1,113 @@
#!/usr/bin/env -S PYTHONPATH=../../../tools/extract-utils python3
#
# SPDX-FileCopyrightText: 2024 The LineageOS Project
# SPDX-License-Identifier: Apache-2.0
#
from extract_utils.fixups_blob import (
BlobFixupCtx,
File,
blob_fixup,
blob_fixups_user_type,
)
from extract_utils.fixups_lib import (
lib_fixups,
lib_fixups_user_type,
)
from extract_utils.main import (
ExtractUtils,
ExtractUtilsModule,
)
from extract_utils.tools import (
llvm_objdump_path,
)
from extract_utils.utils import (
run_cmd,
)
namespace_imports = [
'hardware/qcom-caf/sm8150',
'hardware/xiaomi',
'vendor/qcom/opensource/display',
'vendor/xiaomi/sm6150-common',
]
def blob_fixup_graphic_buffer_size(
ctx: BlobFixupCtx,
file: File,
file_path: str,
*args,
**kwargs,
):
for line in run_cmd(
[
llvm_objdump_path,
'--disassemble-all',
file_path,
]
).splitlines():
line = line.split(maxsplit=5)
if len(line) != 6:
continue
# The size of GraphicBuffer changed from 0x100 to 0xd30
offset, _, instruction, register, value, _ = line
if instruction == 'mov' and register[:-1] == 'w0' and value == '#0x100':
with open(file_path, 'rb+') as f:
f.seek(int(offset[:-1], 16))
f.write(b'\x00\xa6\x81\x52') # AArch64 mov w0, #0xd30
lib_fixups: lib_fixups_user_type = {
**lib_fixups,
}
blob_fixups: blob_fixups_user_type = {
'vendor/etc/init/init.batterysecret.rc': blob_fixup()
.regex_replace(' +seclabel u:r:batterysecret:s0\n', ''),
'vendor/etc/init/init.mi_thermald.rc': blob_fixup()
.regex_replace(' +seclabel u:r:mi_thermald:s0\n', ''),
('vendor/lib/hw/audio.primary.sm6150.so', 'vendor/lib/libaudioroute_ext.so'): blob_fixup()
.replace_needed('libaudioroute.so', 'libaudioroute-v34.so'),
'vendor/lib64/camera/components/com.qti.node.watermark.so': blob_fixup()
.add_needed('libpiex_shim.so'),
('vendor/lib64/hw/camera.qcom.so', 'vendor/lib64/libFaceDetectpp-0.5.2.so', 'vendor/lib64/libfacedet.so'): blob_fixup()
.binary_regex_replace(b'libmegface.so', b'libfacedet.so')
.binary_regex_replace(b'libMegviiFacepp-0.5.2.so', b'libFaceDetectpp-0.5.2.so')
.binary_regex_replace(b'megviifacepp_0_5_2_model', b'facedetectpp_0_5_2_model'),
'vendor/lib64/camera/components/com.vidhance.node.eis.so': blob_fixup()
.call(blob_fixup_graphic_buffer_size),
('vendor/lib64/libalLDC.so', 'vendor/lib64/libalhLDC.so'): blob_fixup()
.clear_symbol_version('AHardwareBuffer_allocate')
.clear_symbol_version('AHardwareBuffer_describe')
.clear_symbol_version('AHardwareBuffer_lock')
.clear_symbol_version('AHardwareBuffer_release')
.clear_symbol_version('AHardwareBuffer_unlock'),
('vendor/lib64/libarcsoft_hta.so', 'vendor/lib64/libarcsoft_super_night_raw.so', 'vendor/lib64/libhvx_interface.so', 'vendor/lib64/libmialgo_rfs.so'): blob_fixup()
.clear_symbol_version('remote_handle_close')
.clear_symbol_version('remote_handle_invoke')
.clear_symbol_version('remote_handle_open')
.clear_symbol_version('remote_handle64_close')
.clear_symbol_version('remote_handle64_invoke')
.clear_symbol_version('remote_handle64_open')
.clear_symbol_version('remote_register_buf_attr')
.clear_symbol_version('remote_register_buf')
.clear_symbol_version('rpcmem_alloc')
.clear_symbol_version('rpcmem_free')
.clear_symbol_version('rpcmem_to_fd'),
} # fmt: skip
module = ExtractUtilsModule(
'sweet',
'xiaomi',
blob_fixups=blob_fixups,
lib_fixups=lib_fixups,
namespace_imports=namespace_imports,
)
if __name__ == '__main__':
utils = ExtractUtils.device_with_common(
module, 'sm6150-common', module.vendor
)
utils.run()

View File

@@ -1,47 +0,0 @@
#!/bin/bash
#
# SPDX-FileCopyrightText: 2016 The CyanogenMod Project
# SPDX-FileCopyrightText: 2017-2024 The LineageOS Project
# SPDX-License-Identifier: Apache-2.0
#
function blob_fixup() {
case "${1}" in
vendor/etc/init/init.batterysecret.rc)
[ "$2" = "" ] && return 0
sed -i "/seclabel u:r:batterysecret:s0/d" "${2}"
;;
vendor/etc/init/init.mi_thermald.rc)
[ "$2" = "" ] && return 0
sed -i "/seclabel u:r:mi_thermald:s0/d" "${2}"
;;
vendor/lib64/camera/components/com.qti.node.watermark.so)
[ "$2" = "" ] && return 0
grep -q "libpiex_shim.so" "${2}" || "${PATCHELF}" --add-needed "libpiex_shim.so" "${2}"
;;
*)
return 1
;;
esac
return 0
}
function blob_fixup_dry() {
blob_fixup "$1" ""
}
# If we're being sourced by the common script that we called,
# stop right here. No need to go down the rabbit hole.
if [ "${BASH_SOURCE[0]}" != "${0}" ]; then
return
fi
set -e
export DEVICE=sweet
export DEVICE_COMMON=sm6150-common
export VENDOR=xiaomi
export VENDOR_COMMON=${VENDOR}
"./../../${VENDOR_COMMON}/${DEVICE_COMMON}/extract-files.sh" "$@"

18
libinit/Android.bp Normal file
View File

@@ -0,0 +1,18 @@
//
// SPDX-FileCopyrightText: The LineageOS Project
// SPDX-License-Identifier: Apache-2.0
//
cc_library_static {
name: "libinit_sweet",
srcs: [
"init_xiaomi_sweet.cpp",
"libinit_dalvik_heap.cpp",
"libinit_variant.cpp",
"libinit_utils.cpp",
],
whole_static_libs: ["libbase"],
export_include_dirs: ["include"],
include_dirs: ["system/core/init"],
recovery_available: true,
}

View File

@@ -0,0 +1,23 @@
/*
* SPDX-FileCopyrightText: The LineageOS Project
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef LIBINIT_DALVIK_HEAP_H
#define LIBINIT_DALVIK_HEAP_H
#include <string>
typedef struct dalvik_heap_info {
std::string heapstartsize;
std::string heapgrowthlimit;
std::string heapsize;
std::string heapminfree;
std::string heapmaxfree;
std::string heaptargetutilization;
} dalvik_heap_info_t;
void set_dalvik_heap(void);
#endif // LIBINIT_DALVIK_HEAP_H

View File

@@ -0,0 +1,18 @@
/*
* SPDX-FileCopyrightText: The LineageOS Project
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef LIBINIT_UTILS_H
#define LIBINIT_UTILS_H
#include <string>
void property_override(std::string prop, std::string value, bool add = true);
void set_ro_build_prop(const std::string &prop, const std::string &value, bool product = false);
const std::string fingerprint_to_description(const std::string &fingerprint);
#endif // LIBINIT_UTILS_H

View File

@@ -0,0 +1,30 @@
/*
* SPDX-FileCopyrightText: The LineageOS Project
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef LIBINIT_VARIANT_H
#define LIBINIT_VARIANT_H
#include <string>
#include <vector>
typedef struct variant_info {
std::string hwc_value;
std::string sku_value;
std::string brand;
std::string device;
std::string name;
std::string marketname;
std::string model;
std::string mod_device;
std::string build_fingerprint;
} variant_info_t;
void search_variant(const std::vector<variant_info_t> variants);
void set_variant_props(const variant_info_t variant);
#endif // LIBINIT_VARIANT_H

View File

@@ -0,0 +1,74 @@
/*
* SPDX-FileCopyrightText: The LineageOS Project
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <libinit_dalvik_heap.h>
#include <libinit_variant.h>
#include "vendor_init.h"
static const variant_info_t sweet_info = {
.hwc_value = "GLOBAL",
.sku_value = "pro",
.brand = "Redmi",
.device = "sweet",
.mod_device = "sweet_global",
.name = "sweet_global",
.marketname = "Redmi Note 10 Pro",
.model = "M2101K6G",
.build_fingerprint = "Redmi/sweet_global/sweet:13/RKQ1.210614.002/V14.0.9.0.TKFMIXM:user/release-keys",
};
static const variant_info_t sweetjp_info = {
.hwc_value = "JAPAN",
.sku_value = "",
.brand = "Redmi",
.device = "sweet",
.mod_device = "sweet_global",
.name = "sweet_global",
.marketname = "Redmi Note 10 Pro",
.model = "M2101K6R",
.build_fingerprint = "Redmi/sweet_global/sweet:13/RKQ1.210614.002/V14.0.9.0.TKFMIXM:user/release-keys",
};
static const variant_info_t sweetin_info = {
.hwc_value = "INDIA",
.sku_value = "std",
.brand = "Redmi",
.device = "sweetin",
.mod_device = "sweetin_in_global",
.name = "sweetin",
.marketname = "Redmi Note 10 Pro",
.model = "M2101K6P",
.build_fingerprint = "Redmi/sweetin/sweetin:13/RKQ1.210614.002/V14.0.1.0.TKFINXM:user/release-keys",
};
static const variant_info_t sweetinpro_info = {
.hwc_value = "INDIA",
.sku_value = "pro",
.brand = "Redmi",
.device = "sweetin",
.mod_device = "sweetin_in_global",
.name = "sweetinpro",
.marketname = "Redmi Note 10 Pro Max",
.model = "M2101K6I",
.build_fingerprint = "Redmi/sweetinpro/sweetin:13/RKQ1.210614.002/V14.0.1.0.TKFINXM:user/release-keys",
};
static const std::vector<variant_info_t> variants = {
sweet_info,
sweetjp_info,
sweetin_info,
sweetinpro_info,
};
void vendor_load_properties() {
set_dalvik_heap();
search_variant(variants);
}

View File

@@ -0,0 +1,56 @@
/*
* SPDX-FileCopyrightText: The LineageOS Project
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <sys/sysinfo.h>
#include <libinit_utils.h>
#include <libinit_dalvik_heap.h>
#define HEAPSTARTSIZE_PROP "dalvik.vm.heapstartsize"
#define HEAPGROWTHLIMIT_PROP "dalvik.vm.heapgrowthlimit"
#define HEAPSIZE_PROP "dalvik.vm.heapsize"
#define HEAPMINFREE_PROP "dalvik.vm.heapminfree"
#define HEAPMAXFREE_PROP "dalvik.vm.heapmaxfree"
#define HEAPTARGETUTILIZATION_PROP "dalvik.vm.heaptargetutilization"
#define GB(b) (b * 1024ull * 1024 * 1024)
static const dalvik_heap_info_t dalvik_heap_info_8192 = {
.heapstartsize = "24m",
.heapgrowthlimit = "256m",
.heapsize = "512m",
.heapminfree = "8m",
.heapmaxfree = "48m",
.heaptargetutilization = "0.46",
};
static const dalvik_heap_info_t dalvik_heap_info_6144 = {
.heapstartsize = "16m",
.heapgrowthlimit = "256m",
.heapsize = "512m",
.heapminfree = "8m",
.heapmaxfree = "32m",
.heaptargetutilization = "0.5",
};
void set_dalvik_heap() {
struct sysinfo sys;
const dalvik_heap_info_t *dhi;
sysinfo(&sys);
if (sys.totalram > GB(7))
dhi = &dalvik_heap_info_8192;
else
dhi = &dalvik_heap_info_6144;
property_override(HEAPSTARTSIZE_PROP, dhi->heapstartsize);
property_override(HEAPGROWTHLIMIT_PROP, dhi->heapgrowthlimit);
property_override(HEAPSIZE_PROP, dhi->heapsize);
property_override(HEAPTARGETUTILIZATION_PROP, dhi->heaptargetutilization);
property_override(HEAPMINFREE_PROP, dhi->heapminfree);
property_override(HEAPMAXFREE_PROP, dhi->heapmaxfree);
}

67
libinit/libinit_utils.cpp Normal file
View File

@@ -0,0 +1,67 @@
/*
* SPDX-FileCopyrightText: The LineageOS Project
*
* SPDX-License-Identifier: Apache-2.0
*/
#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
#include <sys/_system_properties.h>
#include <vector>
#include <libinit_utils.h>
void property_override(std::string prop, std::string value, bool add) {
auto pi = (prop_info *) __system_property_find(prop.c_str());
if (pi != nullptr) {
__system_property_update(pi, value.c_str(), value.length());
} else if (add) {
__system_property_add(prop.c_str(), prop.length(), value.c_str(), value.length());
}
}
std::vector<std::string> ro_props_default_source_order = {
"odm.",
"product.",
"system.",
"system_ext.",
"vendor.",
"",
};
void set_ro_build_prop(const std::string &prop, const std::string &value, bool product) {
std::string prop_name;
for (const auto &source : ro_props_default_source_order) {
if (product)
prop_name = "ro.product." + source + prop;
else
prop_name = "ro." + source + "build." + prop;
property_override(prop_name, value, true);
}
}
#define FIND_AND_REMOVE(s, delimiter, variable_name) \
std::string variable_name = s.substr(0, s.find(delimiter)); \
s.erase(0, s.find(delimiter) + delimiter.length());
const std::string fingerprint_to_description(const std::string &fingerprint) {
const std::string delimiter = "/";
const std::string delimiter2 = ":";
std::string build_fingerprint_copy = fingerprint;
FIND_AND_REMOVE(build_fingerprint_copy, delimiter, brand)
FIND_AND_REMOVE(build_fingerprint_copy, delimiter, product)
FIND_AND_REMOVE(build_fingerprint_copy, delimiter2, device)
FIND_AND_REMOVE(build_fingerprint_copy, delimiter, platform_version)
FIND_AND_REMOVE(build_fingerprint_copy, delimiter, build_id)
FIND_AND_REMOVE(build_fingerprint_copy, delimiter2, build_number)
FIND_AND_REMOVE(build_fingerprint_copy, delimiter, build_variant)
std::string build_version_tags = build_fingerprint_copy;
const std::string description = product + "-" + build_variant + " " + platform_version +
" " + build_id + " " + build_number + " " + build_version_tags;
return description;
}

View File

@@ -0,0 +1,51 @@
/*
* SPDX-FileCopyrightText: The LineageOS Project
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <android-base/logging.h>
#include <android-base/properties.h>
#include <libinit_utils.h>
#include <libinit_variant.h>
using android::base::GetProperty;
#define HWC_PROP "ro.boot.hwc"
#define SKU_PROP "ro.boot.product.hardware.sku"
void search_variant(const std::vector<variant_info_t> variants) {
std::string hwc_value = GetProperty(HWC_PROP, "");
std::string sku_value = GetProperty(SKU_PROP, "");
for (const auto& variant : variants) {
if ((variant.hwc_value == "" || variant.hwc_value == hwc_value) &&
(variant.sku_value == "" || variant.sku_value == sku_value)) {
set_variant_props(variant);
break;
}
}
}
void set_variant_props(const variant_info_t variant) {
// Older devices don't have marketname
auto marketname = !variant.marketname.empty() ? variant.marketname : variant.model;
set_ro_build_prop("brand", variant.brand, true);
set_ro_build_prop("device", variant.device, true);
set_ro_build_prop("marketname", marketname, true);
set_ro_build_prop("model", variant.model, true);
set_ro_build_prop("name", variant.name, true);
set_ro_build_prop("mod_device", variant.mod_device, true);
property_override("ro.product.vendor.name", variant.name, true);
property_override("vendor.usb.product_string", marketname, true);
if (access("/system/bin/recovery", F_OK) != 0) {
property_override("bluetooth.device.default_name", marketname, true);
set_ro_build_prop("fingerprint", variant.build_fingerprint);
property_override("ro.bootimage.build.fingerprint", variant.build_fingerprint);
property_override("ro.build.description", fingerprint_to_description(variant.build_fingerprint));
}
}

View File

@@ -1,6 +0,0 @@
[
{
"repository": "android_device_xiaomi_sm6150-common",
"target_path": "device/xiaomi/sm6150-common"
}
]

View File

@@ -1,27 +1,70 @@
#
# Copyright (C) 2021 The LineageOS Project
# Copyright (C) 2021-2025 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
# Inherit from those products. Most specific first.
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
TARGET_SUPPORTS_OMX_SERVICE := false
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
# Inherit from sweet device
# Inherit from sweet device.
$(call inherit-product, device/xiaomi/sweet/device.mk)
# Inherit some common Lineage stuff.
# Inherit some common LineageOS / Evolution-X stuff.
$(call inherit-product, vendor/lineage/config/common_full_phone.mk)
# Bootanimation
TARGET_INCLUDE_BOOT_ANIMATIONS := true
TARGET_SCREEN_WIDTH := 1080
TARGET_SCREEN_HEIGHT := 2400
# Face Unlock
TARGET_SUPPORTS_64_BIT_APPS := true
# DeviceAsWebcam
TARGET_BUILD_DEVICE_AS_WEBCAM := true
# Enable blur
TARGET_ENABLE_BLUR := true
# BCR
TARGET_INCLUDE_BCR := true
# Other ROM feature flags
BYPASS_CHARGE_SUPPORTED := true
PERF_ANIM_OVERRIDE := true
TARGET_ENABLES_IMS_OVERRIDES := true
TORCH_STR_SUPPORTED := true
# Targets
TARGET_INCLUDE_VIPERFX := true
TARGET_DISABLE_LINEAGE_SDK := false
TARGET_DISABLE_EPPE := false
TARGET_BUILD_APERTURE_CAMERA := false
TARGET_EXCLUDES_AUDIOFX := false
TARGET_HAS_UDFPS := false
# Device identifier.
PRODUCT_NAME := lineage_sweet
PRODUCT_DEVICE := sweet
PRODUCT_BRAND := Xiaomi
PRODUCT_MODEL := Redmi Note 10 Pro
PRODUCT_MANUFACTURER := Xiaomi
# GMS
ifeq ($(WITH_GMS),true)
TARGET_USES_MINI_GAPPS := false
TARGET_USES_PICO_GAPPS := false
TARGET_SUPPORTS_QUICK_TAP := true
TARGET_INCLUDE_LIVE_WALLPAPERS := true
TARGET_INCLUDE_STOCK_ARCORE := true
TARGET_SUPPORTS_GOOGLE_RECORDER := true
endif
PRODUCT_GMS_CLIENTID_BASE := android-xiaomi
BUILD_FINGERPRINT := Redmi/sweet_global/sweet:13/TKQ1.221013.002/V14.0.9.0.TKFMIXM:user/release-keys
# Properties
PRODUCT_BUILD_PROP_OVERRIDES += \
PRIVATE_BUILD_DESC="sweet_global-user 13 TKQ1.221013.002 V14.0.9.0.TKFMIXM release-keys"
BuildDesc="sweet_global-user 13 TKQ1.221013.002 V14.0.9.0.TKFMIXM release-keys" \
BuildFingerprint=Redmi/sweet_global/sweet:13/TKQ1.221013.002/V14.0.9.0.TKFMIXM:user/release-keys

View File

@@ -273,7 +273,7 @@
M -24 51.75 a 24 24 0 1 0 48 0 a 24 24 0 1 0 -48 0
but using a radius 24.5 circle to see the antialiasing.
-->
<string name="config_mainBuiltInDisplayCutout">M -24.5 51.75 a 24.5 24.5 0 1 0 49 0 a 24.5 24.5 0 1 0 -49 0 Z</string>
<string name="config_mainBuiltInDisplayCutout" translatable="false">M -24.5 51.75 a 24.5 24.5 0 1 0 49 0 a 24.5 24.5 0 1 0 -49 0 Z</string>
<!--Like config_mainBuiltInDisplayCutout, but this path is used to report the
one single bounding rect per device edge to the app via
@@ -385,21 +385,4 @@
<item>10</item>
<item>10</item>
</integer-array>
<!-- An array of arrays of side fingerprint sensor properties relative to each display.
Note: this value is temporary and is expected to be queried directly
from the HAL in the future. -->
<array name="config_sfps_sensor_props" translatable="false">
<item>@array/config_sfps_sensor_props_0</item>
</array>
<array name="config_sfps_sensor_props_0" translatable="false">
<item>local:4630946711218184577</item> <!--item>displayId</item-->
<item>1080</item> <!--item>sensorLocationX</item-->
<item>990</item> <!--item>sensorLocationY</item-->
<item>200</item> <!--item>sensorRadius</item-->
</array>
<!-- Indicates whether device has a power button fingerprint sensor. -->
<bool name="config_is_powerbutton_fps" translatable="false">true</bool>
</resources>

View File

@@ -23,10 +23,10 @@
<dimen name="rounded_corner_content_padding">10dp</dimen>
<!-- the padding on the start of the statusbar -->
<dimen name="status_bar_padding_start">10dp</dimen>
<dimen name="status_bar_padding_start">8dp</dimen>
<!-- the padding on the end of the statusbar -->
<dimen name="status_bar_padding_end">5dp</dimen>
<dimen name="status_bar_padding_end">2dp</dimen>
<!-- Location on the screen of the center of the fingerprint sensor. For devices with under
display fingerprint sensors, this directly corresponds to the fingerprint sensor's location.

View File

@@ -18,7 +18,10 @@
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Whether to show Smooth Display feature in Settings Options -->
<bool name="config_show_smooth_display">true</bool>
<!-- Whether to show peak refresh rate in display settings -->
<bool name="config_show_peak_refresh_rate_switch">true</bool>
<!-- Whether to show min refresh rate in display settings -->
<bool name="config_show_min_refresh_rate_switch">true</bool>
</resources>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) Evolution X
SPDX-License-Identifier: Apache-2.0
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- About device screen, build maintainer -->
<string name="build_maintainer_summary">therealmharc | donjohanliebert</string>
<string name="build_maintainer_donate_url">https://paypal.me/donjohanliebert</string>
</resources>

View File

@@ -8,12 +8,18 @@ vendor.audio.feature.compr_voip.enable=false
vendor.voice.path.for.pcm.voip=true
# Display
ro.surface_flinger.set_idle_timer_ms=4000
ro.surface_flinger.set_touch_timer_ms=4000
ro.surface_flinger.set_display_power_timer_ms=1000
ro.surface_flinger.use_content_detection_for_refresh_rate=true
debug.sf.frame_rate_multiple_threshold=120
ro.hardware.hwcomposer=sweet
ro.surface_flinger.set_idle_timer_ms=2000
ro.surface_flinger.set_touch_timer_ms=2000
ro.surface_flinger.set_display_power_timer_ms=2000
ro.surface_flinger.use_content_detection_for_refresh_rate=false
vendor.display.override_doze_mode=1
# Fingerprint
persist.vendor.fingerprint.type=side
persist.vendor.fingerprint.sensor_location=1080|990|200|local:4630946711218184577
# Fluence
ro.vendor.audio.sdk.fluencetype=fluence

View File

@@ -1,10 +1,5 @@
# These proprietary files are extracted from Redmi Note 10 Pro (codenamed `sweet`) MIUI V14.0.9.0.TKFMIXM, unless pinned
# Current blobs with ELF checks disabled:
# com.qti.chi.override, libmialgoengine depend on libgrallocutils, which is a gnu makefile target
# libalLDC, libalhLDC depend on NDK libnativewindow and build is unable to resolve its symbols
# libarcsoft_hta, libarcsoft_super_night_raw, libhvx_interface, libmialgo_rfs depend on libsdsprpc and build is unable to resolve its symbols
# ADSP modules
vendor/lib/rfsa/adsp/capi_v2_aptX_CLHDAD_Encoder.so
vendor/lib/rfsa/adsp/capi_v2_aptX_Classic.so
@@ -60,8 +55,6 @@ vendor/lib/libadiertac.so
vendor/lib/libaudcal.so
# Awinic firmware
vendor/firmware/aw8624_haptic.bin
vendor/firmware/aw8624_rtp.bin
vendor/firmware/awinic/aw882xx_pid_1852_acf.bin
vendor/firmware/awinic/aw882xx_pid_1852_monitor.bin
vendor/firmware/awinic/aw882xx_pid_2032_acf.bin
@@ -70,16 +63,18 @@ vendor/firmware/awinic/aw882xx_rcv_reg_l.bin
vendor/firmware/awinic/aw882xx_rcv_reg_r.bin
vendor/firmware/awinic/aw882xx_spk_reg_l.bin
vendor/firmware/awinic/aw882xx_spk_reg_r.bin
vendor/firmware/aw8624_haptic.bin
vendor/firmware/aw8624_rtp.bin
vendor/firmware/osc_rtp_24K_5s.bin
# Audio HAL
vendor/lib/hw/audio.primary.sm6150.so
vendor/lib/vndk/libxlog.so
vendor/lib/libadm.so
vendor/lib/libaudio_log_utils.so
vendor/lib/libaudioparsers.so
vendor/lib/libaudioroute_ext.so
vendor/lib/libqtigef.so
vendor/lib/vndk/libxlog.so
# Audio extensions
vendor/lib/btaudio_offload_if.so
@@ -95,7 +90,7 @@ vendor/etc/init/init.batterysecret.rc
# Camera
vendor/lib64/hw/camera.qcom.so
vendor/lib64/hw/com.qti.chi.override.so;DISABLE_CHECKELF
vendor/lib64/hw/com.qti.chi.override.so
vendor/lib64/libFaceGrade.so
vendor/lib64/libPSNPE.so
vendor/lib64/libSNPE.so
@@ -103,8 +98,8 @@ vendor/lib64/libVDClearShot.so
vendor/lib64/libXMFD_AgeGender.so
vendor/lib64/lib_sr_models.so
vendor/lib64/libalCFR.so
vendor/lib64/libalLDC.so;DISABLE_CHECKELF
vendor/lib64/libalhLDC.so;DISABLE_CHECKELF
vendor/lib64/libalLDC.so
vendor/lib64/libalhLDC.so
vendor/lib64/libarcdualcamsat.so
vendor/lib64/libarcsat.so
vendor/lib64/libbeauty_face_interface.so
@@ -118,22 +113,20 @@ vendor/lib64/libcamxfdengine.so
vendor/lib64/libcamxstatscore.so
vendor/lib64/libcamxswprocessalgo.so
vendor/lib64/libcamxtintlessalgo.so
vendor/lib64/libcapiv2svacnn.so
vendor/lib64/libcapiv2vop.so
vendor/lib64/libcom.qti.chinodeutils.so
vendor/lib64/libdualcam_optical_zoom_control.so
vendor/lib64/libdualcam_video_optical_zoom.so
vendor/lib64/libft2vendor.so
vendor/lib64/libhta.so
vendor/lib64/libhta_hexagon_runtime.so
vendor/lib64/libhvx_interface.so;DISABLE_CHECKELF
vendor/lib64/libhvx_interface.so
vendor/lib64/libmiai_portraitsupernight.so
vendor/lib64/libmialgo_fs.so
vendor/lib64/libmialgo_ie_capture.so
vendor/lib64/libmialgo_rfs.so;DISABLE_CHECKELF
vendor/lib64/libmialgo_rfs.so
vendor/lib64/libmialgo_sd.so
vendor/lib64/libmialgo_utils.so
vendor/lib64/libmialgoengine.so;DISABLE_CHECKELF
vendor/lib64/libmialgoengine.so
vendor/lib64/libmibokeh_712.so
vendor/lib64/libmpbase.so
vendor/lib64/libmulticam_image_optical_zoom.so
@@ -149,7 +142,6 @@ vendor/lib64/libsnpe_dsp_domains_v2.so
vendor/lib64/libsnpe_dsp_domains_v2_system.so
vendor/lib64/libsns_device_mode_stub.so
vendor/lib64/libswregistrationalgo.so
vendor/lib64/libswvdec.so
vendor/lib64/libsymphony-cpu.so
vendor/lib64/libtriplecam_video_optical_zoom.so
vendor/lib64/libvideofilter_only.so
@@ -166,13 +158,18 @@ vendor/lib64/libarcsoft_dualcam_refocus.so
vendor/lib64/libarcsoft_dualcam_refocus_front.so
vendor/lib64/libarcsoft_dualcam_refocus_rear_t.so
vendor/lib64/libarcsoft_dualcam_refocus_rear_w.so
vendor/lib64/libarcsoft_hta.so;DISABLE_CHECKELF
vendor/lib64/libarcsoft_hta.so
vendor/lib64/libarcsoft_portrait_lighting.so
vendor/lib64/libarcsoft_portrait_lighting_c.so
vendor/lib64/libarcsoft_preview_deflicker.so
vendor/lib64/libarcsoft_super_night_raw.so;DISABLE_CHECKELF
vendor/lib64/libarcsoft_super_night_raw.so|a725136e8fe0c9ffd6b5ed527fd480478c9fd57d|a30ef90898eff351e6efc30f71b35db00f4a9d2a
# Camera-components
vendor/lib64/camera/components/etc/morpho_lowlight4.0.xml
vendor/lib64/camera/components/etc/morpho_lowlight4.0_3hdr.xml
vendor/lib64/camera/components/etc/morpho_lowlight4.0_adrc_high.xml
vendor/lib64/camera/components/etc/morpho_lowlight4.0_adrc_high_1.xml
vendor/lib64/camera/components/etc/visidon_clearshot_params.xml
vendor/lib64/camera/components/com.altek.node.depurple.so
vendor/lib64/camera/components/com.altek.node.distortioncorrection.so
vendor/lib64/camera/components/com.arcsoft.node.capturebokeh.so
@@ -227,11 +224,6 @@ vendor/lib64/camera/components/com.xiaomi.node.mifilter.so
vendor/lib64/camera/components/com.xiaomi.node.mifragment.so
vendor/lib64/camera/components/com.xiaomi.node.mimovie.so
vendor/lib64/camera/components/com.xiaomi.node.misegment.so
vendor/lib64/camera/components/etc/morpho_lowlight4.0.xml
vendor/lib64/camera/components/etc/morpho_lowlight4.0_3hdr.xml
vendor/lib64/camera/components/etc/morpho_lowlight4.0_adrc_high.xml
vendor/lib64/camera/components/etc/morpho_lowlight4.0_adrc_high_1.xml
vendor/lib64/camera/components/etc/visidon_clearshot_params.xml
vendor/lib64/camera/components/libdepthmapwrapper.so
vendor/lib64/camera/components/libmmcamera_cac3.so
@@ -269,6 +261,11 @@ vendor/etc/camera/vidhance_calibration_108m
vendor/etc/camera/vidhance_calibration_64m
vendor/etc/camera/watermark_font_2300_3199.dat
# Camera face detection
vendor/etc/camera/megviifacepp_0_5_2_model:vendor/etc/camera/facedetectpp_0_5_2_model
vendor/lib64/libMegviiFacepp-0.5.2.so:vendor/lib64/libFaceDetectpp-0.5.2.so;FIX_SONAME
vendor/lib64/libmegface.so:vendor/lib64/libfacedet.so;FIX_SONAME
# Camera-firmware
vendor/firmware/CAMERA_ICP.elf

View File

@@ -1,5 +1,5 @@
runtime_resource_overlay {
name: "SweetWifiOverlay",
theme: "SweetWifiOverlay",
product_specific: true
product_specific: true,
}

View File

@@ -1,5 +1,5 @@
runtime_resource_overlay {
name: "SweetinproWifiOverlay",
theme: "SweetinproWifiOverlay",
product_specific: true
product_specific: true,
}

1
setup-makefiles.py Executable file
View File

@@ -0,0 +1 @@
#!./extract-files.py --regenerate_makefiles

View File

@@ -1,21 +0,0 @@
#!/bin/bash
#
# SPDX-FileCopyrightText: 2016 The CyanogenMod Project
# SPDX-FileCopyrightText: 2017-2024 The LineageOS Project
# SPDX-License-Identifier: Apache-2.0
#
# If we're being sourced by the common script that we called,
# stop right here. No need to go down the rabbit hole.
if [ "${BASH_SOURCE[0]}" != "${0}" ]; then
return
fi
set -e
export DEVICE=sweet
export DEVICE_COMMON=sm6150-common
export VENDOR=xiaomi
export VENDOR_COMMON=${VENDOR}
"./../../${VENDOR_COMMON}/${DEVICE_COMMON}/setup-makefiles.sh" "$@"