Commit graph

100 commits

Author SHA1 Message Date
Dhina17
acf4649586 sm8350-common: Implement torch light control
[RealJohnGalt: Modify for oneplus usage and add toggle switch]
[cyberknight777/ralph950412: Adapt nodes and SEPolicy for Xiaomi SM8350]
[Hexdare: Adapt nodes and SEPolicy for Haydn]

Change-Id: Icd32d1f6aedb55462c9df4d7cc63a2a4c4e4263e
Signed-off-by: ralph950412 <ralph950412@gmail.com>
Signed-off-by: Hexdare <mohammedasimuddin786@gmail.com>
2025-04-07 23:44:04 +00:00
Chenyang Zhong
9fcc609526 sm8350-common: rootdir: import diag related usb entries
Looks like apps like Network Signal Guru connects to the diag-router
through an emulated(?) USB device.

Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
Signed-off-by: 0mar99 <omarag9099@gmail.com>
2025-04-07 23:41:35 +00:00
Adithya R
ed52a2da30 sm8350-common: Move citsensorservice to background cpuset
This service hogs a considerable amount of CPU all the time as its
busy calculating compensation for our under-display light sensor
(and also spamming logcat, which we can take care of later).

  PID USER         PR  NI VIRT  RES  SHR S[%CPU] %MEM     TIME+ ARGS
 1969 system 20 0 12G 9.2M 9.0M S 4.6 0.1 1:13.15
vendor.xiaomi.sensor.citsensorservice@2.0-service

Move it to background CPU set like the sensors multihal to lower
power consumption from big cores.

Change-Id: I8c7b2835b2b53654642ac20fd97df3b8a5ad96eb
2025-04-07 22:54:37 +00:00
Adithya R
4df8637a38 sm8350-common: init: Move audio-app cpuset to 1-2
audio driver affines pm-qos requests to these cpus so it makes sense
to use them for audio-app as well

Change-Id: I61223db706042e215b1ab5ca9eb4562989e362f6
Signed-off-by: Vaisakh Murali <mvaisakh@statixos.com>
2025-04-07 22:48:53 +00:00
New Author Name
9d295d35ba sm8350-common: Include Moto Dolby Atmos
* Using dolby from: https://github.com/swiitch-OFF-Lab/hardware_dolby
* dolby: Add mediacodecs support (Useful for Apple Music)

Signed-off-by: swiitchOFF <120115258+swiitchOFF@users.noreply.github.com>
Co-Authored-By: HELLBOY017 <abhaygill017@gmail.com>
Co-Authored-By: Pranav Vashi <neobuddy89@gmail.com>
2025-04-07 22:48:53 +00:00
Ramii Ahmed
b5ada337b7 sm8350-common: parts: Add High Touch Polling Rate
Used to handle our node to force enable Xiaomi's High Touch polling rate mode from kernel
2025-04-07 22:48:53 +00:00
kamikaonashi
9ab4ac0793 sm8350-common: parts: Import DC Dimming and HBM Settings
* Implement DC Dimming preference
* Disable DC Dimming if it's not supported
* Implement HBM switch
* Adapt HBM and DC dimming settings to S style
* Define DC dimming and HBM nodes / keys in one place
* Declare exported flags in manifest
* Fix compilation for QPR1
* Fix compilation for Android 15
* Adapt to sm8350-common devices

Co-Authored-By: Nauval Rizky <enuma.alrizky@gmail.com>
Co-Authored-By: Adhitya Mohan <me@adhityamohan.in>
Co-Authored-By: TheScarastic <warabhishek@gmail.com>
Co-Authored-By: alibei <sebastiankotzias83@gmail.com>
Co-Authored-By: kamikaonashi <thorschi93@gmx.at>
2025-04-07 22:48:53 +00:00
Akash Srivastava
994d976a91 sm8350-common: rootdir: Chown the cgroup.procs nodes
* Perf-hal tries to access the nodes but requires permissions as reflected in the logs
* 11-10 19:25:50.044  1055  1080 E ANDR-PERF-OPTSHANDLER: Cannot open/create foreground cgroup file
2025-04-07 22:32:34 +00:00
Jake Weinstein
f30f9c3d0a sm8350-common: rootdir: Move background cpuset to CPU0-1
Background tasks are not UX-critical.
Free up cores to work on more important
UX tasks.
2025-04-07 22:32:13 +00:00
Jake Weinstein
0345dc2da0 sm8350-common: rootdir: Do not allow restricted tasks to run on big cores
The restricted cpuset is for system tasks that are
throttled because the screen is off. Google only
runs these tasks on the little cluster
to save power and we will follow suit.
2025-04-07 22:32:06 +00:00
feiyuchen
09f4530ac8
sm8350-common: rootdir: Add "system" group to Audio HAL
needed for using EdgeTpu.
Due to this code goes to AOSP, please see CL details and test result in
b/289097511#comment24.

Bug: 289097511
Change-Id: Ie0969309346cd85b4bb8ac71860a529710c73345
2025-04-01 08:44:39 +02:00
Andy Hung
e247a8fe8b
sm8350-common: rootdir: Optimize for Spatial Audio
Add CAP_SYS_NICE.
Allow util_clamp_min for Spatializer Effect worker thread.
Reduce glitches caused by core migration.
Reduce power consumption as Spatializer Effect is DSP compute bound.
This change only affects Spatial Audio Effect processing.

Test: instrumented
Test: adb shell 'uclampset -a -p $(pgrep -of
android.hardware.audio.service)'
Test: adb shell cat "/proc/$(adb shell pgrep -of
android.hardware.audio.service)/status"
Test: adb shell 'ps -Tl -p $(pgrep -of android.hardware.audio.service)'
Bug: 181148259
Bug: 260918856
Bug: 261228892
Bug: 261686532
Bug: 262803152
Merged-In: I59ea99e8a1720f61954747f6c29e14cfea9a0f56
Change-Id: I59ea99e8a1720f61954747f6c29e14cfea9a0f56

Change-Id: I21697423e8c20b34040c5a6641126918b0d75bb5
2025-04-01 08:44:39 +02:00
Andy Hung
5a8515c1ac
sm8350-common: rootdir: Enable RT priority inheritance
Test: instrumented
Bug: 181148259
Bug: 260918856
Merged-In: If56e449a9c6f1a49e372591893d8714534574e3a
Change-Id: If56e449a9c6f1a49e372591893d8714534574e3a
2025-04-01 08:44:39 +02:00
emilchung
7204976ce3
sm8350-common: rootdir: add context_hub into audio hal group
While implementing the capo nanoapp for audio configuration, we met
some chre socket connected error due to the access group denied.

Add context_hub group for audio hal to connect chre socket.

go/capo-algo

Bug: 141128522
Bug: 149069556
Test: FULL build with audio hal part and local prebuilts nanoapp.
Test: Audio HAL communicates normally with CHRE socket.
Change-Id: Iea84411682f4c3e08f8b37a5b21818b0e9b04983
2025-04-01 08:44:39 +02:00
Giovanni Ricca
87f82a56b6
sm8350-common: sepolicy: Drop vendor_sysfs_double_tap definition
* We use `/dev/xiaomi-touch` to handle dt2w.

Change-Id: I86f733ad1b0a1d28de67e39b987a8bf19a9dcd5b
2025-03-29 21:50:40 +01:00
Alexander Koskovich
11bdf5c30b
sm8350-common: rootdir: Drop vm-bootsys from fstab
* Unused, and e2fsck is angry that it can't be opened
   because of lack of SEPolicy anyways.

Change-Id: I53d12572ca11f277a09b06b41e821d6acffcd121
2024-12-29 10:50:14 +01:00
dianlujitao
5c34317c05
sm8350-common: Nuke ATFWD
It's normally not used at all.

Change-Id: Idb824b3b8c783b6ac962e604df05f9154beb4ed2
2024-12-29 09:27:24 +01:00
Sebastiano Barezzi
6ec43311ae sm8350-common: Partially revert "Move to QTI health AIDL service"
https://github.com/LineageOS/android_system_core/blob/lineage-21.0/init/init.cpp#L1099

This partially reverts commit 4aca996701.

Change-Id: I284f80f364e9057a8373a015f0acaee3ef9e395d
Signed-off-by: Tashfin Shakeer Rhythm <tashfinshakeerrhythm@gmail.com>
2024-09-13 20:41:07 +05:30
Suren Baghdasaryan
af19263b9c sm8350-common: Replace direct pid writes with setting task profiles for audio interfaces
For easy transition from SchedTune to UtilClamp, direct access to these
cgroups should be abstracted by using task profiles. Replace writepid
commands with new task_profiles command.

Bug: 155419956
Test: change .rc file and confirm task profile is applied
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ide373c283359cf4b73af4cb0813d8c0306942595
2024-02-10 11:53:53 +08:00
Rick Yiu
160297726b sm8350-common: Remove some camera-daemon commands
Those commands have moved to init.rc.

Bug: 170507876
Bug: 171740453
Test: build pass
Change-Id: Icfe520e7f7367461607cc8fb5e524d9699e79124
2024-02-10 11:53:53 +08:00
Bruno Martins
4aca996701 sm8350-common: Move to QTI health AIDL service
The health AIDL HAL service provides functionalities of charger,
therefore system charger at /system/bin/charger is deprecated.
On top of that, QTI health AIDL HAL service enables suspend by
default, the equivalent of setting ro.charger.enable_suspend
for legacy charger.

Change-Id: I59c23e7974cea1174b0161f31a535fa3afa1e5c9
2024-01-26 15:57:47 +01:00
TheStrechh
1cd9cedf75 sm8350-common: rootdir: Set up missing fingerprint data dirs
* needed for redwood/taoyao/vili

Change-Id: I2a9312ec07bf227965d3655709459079926ade9d
2024-01-11 15:44:15 +01:00
Carlos Arriaga
65c8b28baa sm8350-common: rootdir: Update dir's for camera
* Needed for redwood/vili/taoyao/zijin

Change-Id: I93f1d7d016a34e70c2772c8bfabb7d4fd0210cc2
2024-01-11 15:44:15 +01:00
Michael Bestas
22f550f593 sm8350-common: Build Lineage Health HAL
Change-Id: I70cc903a03ac9fa3303bb8fa039c9de4806449bf
2023-08-21 15:07:42 +02:00
Michael Bestas
ba4dd1f2cb sm8350-common: ueventd: Remove all permissions from /sys/devices/soc0/serial_number
Change-Id: I688347cfe59f56e4de2e4bf3c3324ca465f7a897
2023-08-21 13:04:53 +00:00
Michael Bestas
3017c2408c sm8350-common: Implement xtra-daemon control via property
Default to false if the property is not set.
Device init scripts will need to be adapted to restart
loc_launcher service when property change is detected.

Change-Id: Icbda789cd2a9a3391f437af2c07fc5127f2f09ab
2023-08-21 13:04:53 +00:00
FlowerSea0208
afa2607ddd sm8350-common: Configure common Powershare HIDL
Change-Id: I1287d066eca7d1a274b491f80166ed68c5b11459
2023-08-12 16:52:07 +08:00
Giovanni Ricca
6c44bff5f7 sm8350-common: rootdir: Sync rootdir from haydn V14.0.3.0.TKKMIXM
Change-Id: Ibbaf1fd6ac6e45b71c66b79a95fa2c936cd3e695
2023-04-16 17:43:25 +02:00
Alexander Koskovich
8bd2080cc3 sm8350-common: Switch to /vendor_dlkm for kernel modules
* This lets us flash /vendor regardless of the kernel situation.

Change-Id: Ie1c18354b26006e416d06474f5844ceef3cfbaf3
2022-09-26 17:12:40 +02:00
Giovanni Ricca
3bffdc7265 sm8350-common: rootdir: Update init.qti.kernel.rc from haydn V13.0.3.0.SKKMIXM
* Keep previous commits applied

Change-Id: I8b7efe10b25dcd673c770bcf7ae92435065c05ac
2022-09-26 17:12:40 +02:00
Arian
e5b53b9af8 sm8350-common: rootdir: Update kernel post boot scripts from haydn V13.0.3.0.SKKMIXM
Change-Id: Id283d33472e4af8c3397728174908660e3762cd0
2022-09-26 17:12:37 +02:00
Arian
1799fe9571 sm8350-common: Add udfps handler lib
Change-Id: Ib837e4a70015dc24d431458a1cce5b86e87816a9
2022-09-25 20:04:30 +02:00
Bruno Martins
16a45dcda2 sm6150-common: Move to common fingerprint HIDL
Change-Id: I7cb0a45c865d9dbfd800b1d633f8d5ae613bb1b9
2022-09-25 20:04:30 +02:00
stic-server-open
397523e9f0 sm8350-common: rootdir: Remove duplicate "start logd"
* It is started in the on init phase in /system/etc/init/hw/init.rc

Change-Id: Ie10e1d4c520329a76627a965ca139f9ad0f71875
2022-08-29 01:53:16 +02:00
Arian
caaa6afed4 sm8350-common: Revert Xiaomi cpuset changes
* Drop foreground and top-app cpus
* Set 0-3 as background cpus
* Drop xiaomi iolimit and custom types for shima

Change-Id: I3733e196a8ed090c15d6867b0722425435f31474
2022-08-29 01:24:29 +02:00
Arian
b0fed8b209 sm8350-common: rootdir: Configure input boost for shima
Change-Id: I813e6893475caf8196f7c81f6ae237bd1d4b73d1
2022-08-29 01:24:29 +02:00
Arian
611c35bd95 sm8350-common: rootdir: Drop powerkey input boost
Change-Id: I685a215927b445bb2fac9229a1f41de5f88741ef
2022-08-29 01:24:29 +02:00
Giovanni Ricca
eb8b12dea6 sm8350-common: rootdir: Prefer s2idle over deep for lahaina
Change-Id: I6831d37d02012e3ce2d58a9c45818e594a658883
2022-08-29 01:24:29 +02:00
Giovanni Ricca
83662ab93f sm8350-common: rootdir: Add shima and yupik kernel post_boot scripts
While at it, update lahaina one from odin V12.5.12.0.RKMCNXM

Apply the following commits to all scripts:
commit a7efe9f3af
Author: Cosmin Tanislav <demonsingur@gmail.com>
Date:   Tue Sep 28 09:15:41 2021 +0300

    sm8350-common: rootdir: remove cpu 7 from foreground tasks

commit 52fde070d6
Author: Cosmin Tanislav <demonsingur@gmail.com>
Date:   Fri Sep 24 02:44:34 2021 +0300

    sm8350-common: rootdir: do not touch sleep disabled

commit 30ddf5a818
Author: Cosmin Tanislav <demonsingur@gmail.com>
Date:   Sat Sep 18 02:57:51 2021 +0300

    sm8350-common: rootdir: cleanup

Change-Id: Ibd4e8717b52c35faa4d43ade170dbde58c04ed37
2022-08-29 01:24:29 +02:00
Randall Huang
e5413336ca sm8350-common: rootdir: Remove IO read_ahead_kb tune
If we set 2048KB ra value in the beginning of the
boot process, services initialized at this time would
keep 2048KB ra value even though we adjust the ra value
to 128KB after boot completion.

This may cause memory pressure.

Bug: 174700194
Signed-off-by: Randall Huang <huangrandall@google.com>
Change-Id: I97ee0ee9511eaada011f2634afd68d68cdca4570
2022-08-29 01:24:00 +02:00
Arian
163cec32a7 Revert "sm8350-common: let init do read ahead configuration"
Init doesn't handle all dm devices

This reverts commit 17d09b70a0.

Change-Id: I2b42c286307e8fd41140bca8f893ccdf13ebfc06
2022-08-29 01:23:13 +02:00
Arian
d90172a404 sm8350-common: Add power HAL extension and use xiaomi-touch to handle dt2w
Change-Id: I5c65e0df255853eb2b3018a27ceb807c111bc4df
2022-04-02 00:00:58 +02:00
Arian
1a7b42f716 sm8350-common: Drop remaining pieces of qcom system daemon
Change-Id: I4353249682aaa0c08b5af462656974bcb6fdf14a
2022-04-01 23:43:34 +02:00
ItsVixano
2f00448979 sm8350-common: rootdir: Update mi_thermald init script
* From odin V12.5.12.0.RKMCNXM

Change-Id: I5509271b0cdb23e40f8fb4186b740c66d79fe069
2022-04-01 17:50:45 +02:00
Arian
00464fa0d0 sm8350-common: Drop perf learning module
This depends on caf BoostFramework

Change-Id: I1d3e6750ecb88db83f265cc06b175cbc0cfb9726
2022-04-01 17:48:08 +02:00
Arian
4788802371 sm8350-common: Drop IO Prefetcher
This depends on caf BoostFramework

Change-Id: Ie3ea41f7be323472124a395b8fee52aa7333c2fc
2022-04-01 17:47:57 +02:00
Arian
de2c62ffe9 sm8350-common: ueventd: Cleanup unnecessary permissions
Change-Id: Ia37b752c369d8b0dc48aba33898ce7e245f4de2d
2022-04-01 17:39:06 +02:00
Arian
717d76ad6e sm8350-common: ueventd: Setup permissions on mius iio devices
Change-Id: I44004a3c1377d91e887f66905df5f8c61b0d5639
2022-04-01 17:39:06 +02:00
Wang Han
07d7fc7025 sm8350-common: ueventd: Don't modify permissions of /dev/hw_random
This addresses an underlying problem since /dev/hw_random is used. The
issue is that EntropyMixer, which runs in system_server, needs to read
from /dev/hw_random, but thanks to our qualcomm ueventd, EntropyMixer
can never accress this node, resulting in warnings like this:

W EntropyMixer: Failed to add HW RNG output to entropy pool
W EntropyMixer: java.io.FileNotFoundException: /dev/hw_random (Permission denied)

AOSP ueventd handles this well, so just remove this line to get things
back to stage. This issue was never exposed because Google derps the
logging here, which is already fixed on Pie.

c78a463e87

Change-Id: I42c9aaa8f57306536e51c0a17febad57a5a77581
2022-04-01 17:39:06 +02:00
Arian
0072a17f4c sm8350-common: Move ueventd.rc to rootdir and checkout to LA.UM.9.14.r1-19100-LAHAINA.0
Change-Id: I7c0a9ad622a0c42966d84024c22cd03e033fd09b
2022-04-01 17:39:06 +02:00