Commit graph

366 commits

Author SHA1 Message Date
xNombre db04371ae3 LG8n: Add blkio tuning from sunfish
Signed-off-by: xNombre <kartapolska@gmail.com>
Change-Id: Id8a6ef29c85c94dab17d590918e80837bc84838d
Signed-off-by: Pascoato <viniciuspascoato@gmail.com>
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 08:15:58 +08:00
alanndz e18d9c8275 LG8n: rootdir: power: Report max frequency to miHoYo games
[xyzuniverse] Add HoYoVerse too as the it's the same (Honkai Star Rail game)

Change-Id: I07b171edab40e49bd734c19d8f1729cc31f2f47c
Signed-off-by: xyzuniverse <dev.xyzuniverse@gmail.com>
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 08:15:41 +08:00
Jimmy Shiu 34271eea2d LG8n: rootdir: Always report max cpu freq to unity tasks
Unity app incorrectly sets cpu affinity to max capacity cores. Setup the library name and mask to always report the same max cpu freq to the tasks.

Change-Id: I1705f79249d1aa393d184caa3cccfec1563bdec7
Signed-off-by: 01soni247 <01soni247@gmail.com>
Signed-off-by: xyzuniverse <dev.xyzuniverse@gmail.com>
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 08:15:23 +08:00
Kshitij Gupta 37e65e2af9 LG8n: init: Fix backlight on charger
Change-Id: I10115623f79dcf9ebe6904c9f736885eab0b3233
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 08:15:04 +08:00
Shirayuki39 0edf1634b4 LG8n: Enable zram
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 08:14:31 +08:00
Shirayuki39 37f633a5ae LG8n: props: Import recommended dexopt props
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 08:11:14 +08:00
Shirayuki39 9c6b212804 LG8n: update device.mk
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 08:08:42 +08:00
bengris32 3bf5c1c76a LG8n: Use enable instead of start for Neural Networks service
* The MTK Neural Networks service is started via a property trigger.
  This HAL starts a lot earlier than other HALs since it is started
  with start instead of enable, the difference between them being
  that start will immediately cause the service to try and start, while
  enable effectively removes the disabled attribute from the service
  (so in the case of a HAL, it will be started with all the other services
  in class hal instead of immediately).

* This initially didn't have any side effects until I noticed the Neural Networks
  service constantly crashing in offline charger mode. To fix this, simply
  convert the start command to an enable to ensure that this service is not
  only started at the right time (in class hal), but also only started when
  needed (and not in offline charger mode).

Change-Id: Iacf310fb2211117aaf028ad6bf0814a7d447cf53
Signed-off-by: bengris32 <bengris32@protonmail.ch>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 08:07:12 +08:00
bengris32 8dfc5f00c3 LG8n: Patchelf C2 service to link against libavservices_minijail
* The libavservices_minijail_vendor library was substituted for
  the vendor variant of libavservices_minijail in Android 13.

* Patchelf the C2 service to link against libavservices_minijail
  instead of libavservices_minijail_vendor.

Signed-off-by: bengris32 <bengris32@protonmail.ch>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 08:06:27 +08:00
Shirayuki39 43cff21a0d LG8n: Import LG8n Media Configs
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 08:05:32 +08:00
Shirayuki39 78e7e75f0e LG8n: Import LG8n stock audio configs
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 08:02:15 +08:00
Woomymy 71e2e0126a LG8n: Use 64-bits c2 service
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 08:00:21 +08:00
fjrXTR d6b0cd985e LG8n: Build Power@1.3 libs
Change-Id: Ic242a0b918756ef04a13df968a40765f237b50ea
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:58:52 +08:00
fjrXTR b6e7810f08 LG8n: configs: Add missing IMS permission
Change-Id: If916d8ac813d1aea54c4fba31745de09f78fec95
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:58:07 +08:00
Arne Coucheron 5dce2c3461 LG8n: Add 0x2000 to additional gralloc usage bits
Fixes warning.

| gralloc4: Buffer descriptor with invalid usage bits 0x2000

Change-Id: I8e67bec9ade6e80e2e362f7a3c287f74b7d81242
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:57:30 +08:00
Andrzej Perczak 990f33dc83 [PATCH] LG8n: Import oriole cpuctl tuning
This is done in preparation for uclamp migration and FAIR_GROUP_SCHED
enablement in kernel.

Change-Id: Ib486c9bcdfa18d7362461e1a8f66d6fb288af709
Signed-off-by: xyzuniverse <dev.xyzuniverse@gmail.com>
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:55:29 +08:00
fjrXTR ece084b8ec LG8n: props: Silence more logspam
Change-Id: I9e3d9db063e1fffd1346e0b2aa6921727d0513b7
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:54:56 +08:00
LuK1337 2bc258d83b LG8n: overlay-lineage: Configure aux camera for Aperture
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:54:34 +08:00
mvaisakh 0533b4c54d LG8n: Enable EAS instead of HMP
EAS is better on power and perf

The node accepts 3 values
0: Unknown
1: EAS
2: HMP

Signed-off-by: SayuZX <todraihan95@gmail.com>
Signed-off-by: gtw xtr <fajarslebew31@gmail.com>
Signed-off-by: fjrneedayang aww <fajarslebew31@gmail.com>
Signed-off-by: xyzuniverse <dev.xyzuniverse@gmail.com>
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:53:13 +08:00
Albert I 87d6151861 LG8n: Inherit several Android Go configurations
Beneficial for everyone, even on non-Go devices.

Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:52:26 +08:00
fjrXTR 0f64e0ba6c LG8n: rootdir: Drop useless service
Change-Id: Id40e1f2a8136f12f8ade87d79bfe1525f83ffa39
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:52:14 +08:00
TheMalachite a1d19367db LG8n: rootdir: Remove sdcard symlink and iso mount
Signed-off-by: TheMalachite <eliasgheeraert@gmail.com>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:51:51 +08:00
LuK1337 55f4ca66d6 LG8n: prop: Disallow aux cam usage for Telegram / Telegram X
These seem to misbehave when they reach certain camera IDs.

Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:51:23 +08:00
Shirayuki39 9291b4388c LG8n: build some libs
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:50:37 +08:00
Matsvei Niaverau d5b96df521 LG8n: Build PowerOffAlarm
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:48:32 +08:00
AndroidHQ254 c7a171b3ea LG8n: Link older libhidlbase & libbinder for PQ service
F linker  : CANNOT LINK EXECUTABLE /vendor/bin/hw/vendor.mediatek.hardware.pq@2.2-service: cannot locate symbol _ZN7android8String16aSEOS0_ referenced by /apex/com.android.vndk.v34/lib64/libhidlbase.so...
2024-07-17 07:46:45 +08:00
Shirayuki39 3c77cdc9d7 LG8n: Fix readme
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:45:24 +08:00
Shirayuki39 c3b528e171 LG8n: BoardConfig: Use appropriate security patch level
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:43:46 +08:00
Shirayuki39 a5d018b999 LG8n: vintf: Fixup manifest and FCM
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:42:45 +08:00
AndroidHQ254 bab3d6632a LG8n: Import stock public.libraries.txt
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:41:07 +08:00
xyzuniverse cd89c61258 LG8n: Build neuralnetworks
Change-Id: I73b2362019b0b3a7b5273736e1a48e610e89d41f
Signed-off-by: xyzuniverse <dev.xyzuniverse@gmail.com>
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:40:33 +08:00
telepathine 35966292e8 LG8n: InCallService: Map AOSP gain step range to MTK one
MTK has 15 volume steps, we have whatever is set in vc_call_vol_steps.
Mapping our range to theirs allows reaching higher volume levels.

A log curve is used to make gain transitions less abrupt at higher volumes.

Change-Id: I5f0e6467ba9fd0779d7e4abbf9f258b0b42224e4
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: xyzuniverse <dev.xyzuniverse@gmail.com>
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:40:08 +08:00
LinkBoi00 f8d0b72323 LG8n: app: MtkInCallService: Adjust gain values in all situations
Signed-off-by: LinkBoi00 <linkdevel@protonmail.com>
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: xyzuniverse <dev.xyzuniverse@gmail.com>
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:39:52 +08:00
bengris32 ea1e552263 LG8n: InCallService: Bugfixes and refactor
* Refactor and cleanup code
* Use proper way of getting audioDevice with getPort().type()
* Stop mixing up values between AudioSystem and AudioManager,
  as values between AudioManager (java) and AudioSystem (native)
  could change and become different from eachother.

Signed-off-by: bengris32 <bengris32@protonmail.ch>
Change-Id: I2311ed02b88148b71b374b19aaaf458f82f23824
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: xyzuniverse <dev.xyzuniverse@gmail.com>
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:39:37 +08:00
bengris32 84d2411127 LG8n: Introduce Mediatek In-Call Service
* My attempt at fixing in call gain control on MediaTek devices.

* It attempts to replicate what the stock MediaTek framework does
  when controlling the volume of the earpiece speaker, since MTK's
  audio HAL is not able to set the gain of the speaker from the
  values sent by AOSP framework.

[LinkBoi00] Rebrand to Mediatek In-Call Service

Change-Id: I43f727f6fb73a0d38457a41a8361653d1d00e220
Signed-off-by: LinkBoi00 <linkdevel@protonmail.com>
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: xyzuniverse <dev.xyzuniverse@gmail.com>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:39:11 +08:00
xyzuniverse 7452b8dea2 LG8n: Add gatekeeper trustonic symlink
Change-Id: I6508b7e443f99a03a285224668aaa36f48ac7b19
Signed-off-by: xyzuniverse <dev.xyzuniverse@gmail.com>
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:38:23 +08:00
Tim Zimmermann 311fd01400 LG8n: props: Enable FS-Verity
* fsverity flag in fstab is needed to make init run tune2fs -O verity on it

Change-Id: Iebc34457f8d92bf8e09cf1981a47e597aa7ab7c3
Signed-off-by: DarkJoker360 <simoespo159@gmail.com>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:37:20 +08:00
bengris32 58b947bbeb LG8n: Ship MediaTek cgroup/task_profiles configuration
* MediaTek ship their own modified task_profiles and use the V30 cgroups configuration.

Change-Id: I15245ea87b00925597db65f1564e808a094c937a
Signed-off-by: bengris32 <bengris32@protonmail.ch>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:32:28 +08:00
Ash Blake e07e944fba LG8n: rootdir: Fix ownership for /dev/video{0,1}
Mediacodec did not have access and video recording didn't work.

Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:32:07 +08:00
TheMalachite 3bbc6a1428 LG8n: rootdir: Drop on property:vold.decrypt
- We don't use FDE encryption

Signed-off-by: TheMalachite <eliasgheeraert@gmail.com>
Change-Id: Icd9c16a5f5b92992e8e41539971302a09cdde9be
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:31:48 +08:00
Vaisakh Murali 4a4d563117 LG8n: rootdir: Elevate read permissions for mtk_cmdq and mdp_sync
Apparently on AOSP builds, these nodes when read by the hals
with O_RDONLY attribute, need an elevated read permission, which
is apparently unneeded on mtk builds/stock rom.

This fixes video playback/OMX

Signed-off-by: Vaisakh Murali <mvaisakh@statixos.com>
Change-Id: I7f358d0037de569a4eb038e5ac2a17b7651d307d
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:31:30 +08:00
Kshitij Gupta 21f9644fad LG8n: rootdir: Correct mode for video0 and video1
- init services fail to setup encoders on boot and camera and
  screenrecord fails to open video1 when trying to encode a video.
- While we may wanna consider looking through services that make use of
  these devs and correct their groups for AOSP, this gets the job done
  for now.

Change-Id: I0278efe201a9cbaa20c650fdc32bed6f9ecfd017
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:31:09 +08:00
Minchan Kim 33f5215929 LG8n: rootdir: Add zram parameter
* We also changed zram_loopback_size with zram_backingdev_size so correct it.

Bug: 145116439
Test: confirmed there is no warning and zram backing device was configured
Signed-off-by: Minchan Kim <minchan@google.com>
Change-Id: I51be34c59203813a2f493eee6ab442c9940b75d7
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:30:54 +08:00
Wei Wang 5983bbb725 LG8n: rootdir: Tune zram performance
-Set max_comp_streams to num of cores since upstream also moves this to percpu.

Bug: 38249616
Test: boot and run zram-perf showing better performance
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:28:54 +08:00
bengris32 c6eedc41a1 LG8n: rootdir: Add ZRAM entry from fstab.enableswap
Change-Id: I84333394bd27f67fcd30e054f0446e7c45f39bde
Signed-off-by: bengris32 <bengris32@protonmail.ch>
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:28:37 +08:00
fjrXTR afc7e6f426 LG8n: link older libutils for audio.primary.mt6789
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:28:11 +08:00
Jiyong Park 48ae642a21 LG8n: power: Remove ndk_platform backend. Use ndk backend instead
The ndk_platform backend will soon be deprecated because the ndk backend
can serve the same purpose. This is to eliminate the confusion about
having two variants (ndk and ndk_platform) for the same ndk backend.

Bug: 161456198
Test: m

Signed-off-by: xyzuniverse <dev.xyzuniverse@gmail.com>
Signed-off-by: fjrXTR <fajarslebew31@gmail.com>
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:26:43 +08:00
AndroidHQ254 8fdb8d0d07 LG8n: Link older libhidlbase & libbinder for camerahalserver
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:26:05 +08:00
AndroidHQ254 cfdce7385f LG8n: Link older libutils for camerahalserver 2024-07-17 07:25:30 +08:00
Shirayuki39 f069c2fbc2 LG8n: Build required blobs
Signed-off-by: Shirayuki39 <lorddemecrius83@proton.me>
2024-07-17 07:23:39 +08:00