Compare commits

49 Commits
bka ... vic

Author SHA1 Message Date
Atakan
a20c55e212 sm7325-common: Ship prebuilt audio hal extensions
These extensions have dependencies on Samsung specific libraries such as libsecaudioinfo or libsamsungVoipResampler.

Ship prebuilts to be sure everything is fine under the hood.

Change-Id: Ic1ec29a1a19f3e1a9c1d93426eb2f1bca06b4a01
2025-10-03 13:35:19 +07:00
Atakan
9b866f15ea sm7325-common: Align audio flags with prebuilt hal
Change-Id: I8c3e7c5e18b05494e831155a4242c3667bf702d2
2025-10-03 13:35:15 +07:00
anhdat1024
35fa2d6cb5 sm7325-common: overlay: Adjust status bar start padding
Change-Id: If815c593e0bfcc77946e1fea6b9454660a0004c4
2025-10-03 13:20:58 +07:00
anhdat1024
3d933ac125 sm7325-common: overlay: Adjust carrier text margin
Change-Id: I3208fb334df86e0ac6cb3e9b292a6822b13fe7d7
2025-10-03 13:20:58 +07:00
Simon1511
e7aefdb908 Revert "sm7325-common: rootdir: move goodix_fp permissions to early-init"
This reverts commit 5310153bca.

Fixed by https://review.lineageos.org/c/LineageOS/android_hardware_samsung/+/434076

Change-Id: I604036ccc73edc448278aa0b06f0c22effffb812
2025-10-03 13:20:58 +07:00
anhdat1024
9820b42d06 sm7325-common: Initialize for EvolutionX 10.X
Change-Id: I993dcecb1263e122e157162278a9f0a66d27df89
2025-10-03 13:20:27 +07:00
Bruno Martins
fc0db8e84a sm7325-common: Move to Samsung common LiveDisplay HAL
Change-Id: I5df8cede62b050f9e562e680d171768d4c9ad26c
2025-10-03 12:26:25 +07:00
Bruno Martins
94cd56de96 sm7325-common: sepolicy: Migrate to LiveDisplay QTI domain
Change-Id: I59f1e145cab525a69065296778ec4e48645bd439
2025-10-03 12:26:04 +07:00
Bruno Martins
8a5d6e586d sm7325-common: overlay: Update color modes
Change-Id: Id99196a894eff5ce7a6eb83399495a6ad5f8884a
2025-10-03 12:25:53 +07:00
Bruno Martins
ba7e829f91 sm7325-common: Move to Samsung common Touch HAL
Change-Id: I5c4de6e4956e316600e327b725b863ddf9e63fc1
2025-10-03 12:25:43 +07:00
LuK1337
86990e11e9 sm7325-common: Migrate to lineagehealth IFastCharge
Change-Id: Ia2f1f213de2f2e5afd913e5de38712fddc386b49
2025-10-03 12:25:34 +07:00
Bruno Martins
5e5cb751cb sm7325-common: Set vendor init lib via soong config
Change-Id: I8f7e6b987bee58dbf09ca9ad7cfd5a7e99e19c3b
2025-10-03 12:24:16 +07:00
Bruno Martins
6b0191fc61 sm7325-common: touch: Use pragma once directive
Change-Id: I3a3404a0ffa8ae9da845ba422adc0ff2ab0590ef
2025-10-03 12:23:44 +07:00
Bruno Martins
37b1cadbe8 sm7325-common: touch: Migrate to AIDL
Change-Id: Ibbac9b4320fc64c5b6f365b8e9bd977d71d0d4dd
2025-10-03 12:23:36 +07:00
Bruno Martins
ddbeac45c5 sm7325-common: touch: Fix access node for gestures support check
Change-Id: Idfed98d2c0d940abeb15f98dea65bad1b0bcafb6
2025-10-03 12:23:22 +07:00
Bruno Martins
e56f967349 sm7325-common: touch: Properly check if gestures are supported
Considering that only "Single Tap" gesture support is currently
implemented here, it is more proper to check if the corresponding
command is listed as available.

Change-Id: I94697d572c8d5cf04fabfd76c6db9c25257aad29
2025-10-03 12:23:01 +07:00
Atakan
36bdb60e16 sm7325-common: touch: Add HighTouchPollingRate
Change-Id: I3a9629660baa874ab958ba5640951d4f62d669d7
2025-10-03 12:22:43 +07:00
DY3413
f3cb4c7f64 sm7325-common: touch: Use samsung_header_path_defaults
Reference: Ibdfd255efafd471e59dfec0860ace40c21a6e27f
Change-Id: If6d25ec56dc46a4527480f13d6a084e4cca4fe44
Signed-off-by: DY3413 <milosix3413@gmail.com>
2025-10-03 12:22:34 +07:00
Bruno Martins
1319de6729 sm7325-common: touch: Include VINTF fragment
Change-Id: I477318ba43537e43d1a19a6183abc8b893f8c1cf
2025-10-03 12:22:25 +07:00
Atakan
f339c415bc sm7325-common: livedisplay: Stop controlling ALPM
ALPM controls display LPM for AoD and should be controlled by Doze services, not by the user.

Import AdaptiveBacklight from hardware_samsung to give proper control to the user.

Change-Id: I51860027c4c4ae062945dd982f9ae69e1ba1cf2d
2025-10-03 12:22:15 +07:00
Atakan
21afb50c85 sm7325-common: livedisplay: Add DisplayModes
Change-Id: Ic8288ad9f4de5f7f7615ced8ac855feeac5dbfce
2025-10-03 12:22:07 +07:00
Bruno Martins
2aa3a069ce sm7325-common: livedisplay: Use pragma once directive
Change-Id: Icb26f68f769ccd202d415d6e4df3568694514fc1
2025-10-03 12:21:54 +07:00
Cosmin Tanislav
086303e2a5 sm7325-common: livedisplay: Use VINTF fragment
Change-Id: I5f48fda01125933db7dccc76902675efef1fb2e5
2025-10-03 12:21:22 +07:00
tilt-rgb
f5d7430a9e sm7325-common: Fix Spatial Audio 2025-08-10 08:24:58 +07:00
anhdat1024
7bb5181d56 sm7325-common: overlay: Enable screen-off UDFPS unlock
Allows devices with Under Display FingerPrint Sensor to unlock while the screen is off.
2025-08-10 08:24:58 +07:00
ShevT
b58fed1df8 sm7325-common: overlay: Allow restart SystemUI 2025-08-10 08:24:58 +07:00
justinntime
8d5beab76f sm7325-common: overlay: Update qs panel padding top 2025-08-10 08:24:57 +07:00
Tilt
4205e75a5c sm7325-common: Track hardware/samsung-extra 2025-08-10 08:24:57 +07:00
kamikaonashi
1c2735dfbc sm7325-common: Add charging bypass manual toggle [2/2] 2025-08-10 08:24:57 +07:00
emilchung
15d12bff40 sm7325-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-08-10 08:24:57 +07:00
Andy Hung
413a753905 sm7325-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-08-10 08:24:57 +07:00
Andy Hung
a2a68bbe66 sm7325-common: rootdir: Enable RT priority inheritance
Test: instrumented
Bug: 181148259
Bug: 260918856
Merged-In: If56e449a9c6f1a49e372591893d8714534574e3a
Change-Id: If56e449a9c6f1a49e372591893d8714534574e3a
2025-08-10 08:24:56 +07:00
koko-07870
8e4eebbbd5 sm7325-common: Add flash control app
- App to modify flash intesity

Signed-off-by: koko-07870 <ko282ko82@gmail.com>
Co-authored-by: Soo-Hwan Na <whiteshell2544@naver.com>
2025-08-10 08:24:56 +07:00
swiitchOFF
56ef533035 sm7325-common: audio: Sync with Spatial Audio 2025-08-10 08:24:56 +07:00
justinntime
a7bcab7617 sm7325-common: sepolicy: Introduce Charging info tile functionality [2/2] 2025-08-10 08:24:56 +07:00
just_inntime
46f1374693 sm7325-common: sepolicy: Update parts thermal access 2025-08-10 08:24:56 +07:00
just_inntime
e14b765a0e sm7325-common: Introduce parts [2/2]
Based on XiaomiParts for peridot
Special thanks to kenway214
2025-08-10 08:24:56 +07:00
swiitchOFF
d5119be483 sm7325-common: Include Sony Dolby Atmos
* Using dolby from: https://github.com/swiitch-OFF-Lab/hardware_dolby
[1]: sm8350-common: Add dolby volume listener effect
[2]: sm8350-common: audio: Bring all stream effects

Co-Authored-By: HELLBOY017 <abhaygill017@gmail.com>
Signed-off-by: swiitchOFF <120115258+swiitchOFF@users.noreply.github.com>
2025-08-10 08:24:56 +07:00
Tilt
64b601b3a8 sm7325-common: Uprev manifest target level to 6 and set kernel target level to 5
Signed-off-by: tilt-rgb <lesma_chan@pm.me>
2025-08-10 08:24:55 +07:00
tilt-rgb
05416f8d1c sm7325-common: manifest_yupik => manifest_lahaina
* Needed for dolby compatibility

Signed-off-by: tilt-rgb <lesma_chan@pm.me>
2025-08-10 08:24:55 +07:00
Hakam Assouad
b410754e3a sm7325-common: audio: Drop 24 and 32 bit recording support 2025-08-10 08:24:55 +07:00
Anh Dat
2ee39b72d5 sm7325-common: Add crdroid.dependencies 2025-08-10 08:24:55 +07:00
Simon1511
21667ce404 sm7325-common: rootdir: add bind mounts for M526B/BR BL rev7
Change-Id: I91cf27c5cc5adc4bfa65e11a163df0a2ead59293
2025-08-10 08:24:55 +07:00
Anh Dat
6a0fa982bd sm7325-common: rootdir: add bind mounts for A528N BL rev7 2025-08-10 08:24:55 +07:00
Anh Dat
31c3a5cc1a sm7325-common: Migrate Lineage Health to soong_config_set 2025-08-10 08:24:54 +07:00
anhdat1024
eb5a66a1ac sm7325-common: Rename lineage.dependencies to crdroid.dependencies 2025-08-10 08:24:54 +07:00
anhdat1024
9a20be388a sm7325-common: overlay: Update padding for status bar and QS panel, keyguard carrier context 2025-08-10 08:24:54 +07:00
anhdat1024
5bf3318dd3 sm7325-common: overlay: Set screen recorder and AOD max refresh rate to 60Hz and Refine status bar padding top 2025-08-10 08:24:54 +07:00
anhdat1024
f87759b0df sm7325-common: overlay: Adjust status bar height and corner padding 2025-08-10 08:24:14 +07:00
55 changed files with 412 additions and 1058 deletions

View File

@@ -1,3 +1,8 @@
//
// Copyright (C) 2024-2025 The LineageOS Project
// SPDX-License-Identifier: Apache-2.0
//
soong_namespace {
}

View File

@@ -139,14 +139,15 @@ USE_XML_AUDIO_POLICY_CONF := 1
AUDIOSERVER_MULTILIB := 32
# Audio
AUDIO_FEATURE_ENABLED_AHAL_EXT := false
AUDIO_FEATURE_ENABLED_AHAL_EXT := true
AUDIO_FEATURE_ENABLED_COMPRESS_VOIP := false
AUDIO_FEATURE_ENABLED_DLKM := true
AUDIO_FEATURE_ENABLED_DS2_DOLBY_DAP := false
AUDIO_FEATURE_ENABLED_DS2_DOLBY_DAP := true
AUDIO_FEATURE_ENABLED_DTS_EAGLE := false
AUDIO_FEATURE_ENABLED_DYNAMIC_LOG := false
AUDIO_FEATURE_ENABLED_DYNAMIC_LOG := true
AUDIO_FEATURE_ENABLED_EXT_AMPLIFIER := false
AUDIO_FEATURE_ENABLED_EXTENDED_COMPRESS_FORMAT := true
AUDIO_FEATURE_ENABLED_GEF_SUPPORT := true
AUDIO_FEATURE_ENABLED_GEF_SUPPORT := false
AUDIO_FEATURE_ENABLED_GKI := true
AUDIO_FEATURE_ENABLED_HW_ACCELERATED_EFFECTS := false
AUDIO_FEATURE_ENABLED_INSTANCE_ID := true
@@ -154,6 +155,7 @@ AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true
AUDIO_FEATURE_ENABLED_SSR := false
AUDIO_FEATURE_ENABLED_SVA_MULTI_STAGE := true
BOARD_SUPPORTS_SOUND_TRIGGER := true
TARGET_PROVIDES_AUDIO_EXTNS := true
# Camera
SOONG_CONFIG_NAMESPACES += samsungCameraVars
@@ -166,14 +168,10 @@ SOONG_CONFIG_samsungCameraVars_extra_ids := 54
SOONG_CONFIG_samsungCameraVars_needs_sec_reserved_field := true
# Init
TARGET_INIT_VENDOR_LIB := //$(COMMON_PATH):libinit_samsung_sm7325
# HIDL manifests
DEVICE_MANIFEST_SKUS := yupik
DEVICE_MANIFEST_YUPIK_FILES += $(COMMON_PATH)/configs/manifest_yupik.xml
DEVICE_MANIFEST_FILE += $(COMMON_PATH)/configs/manifest_lahaina.xml
DEVICE_MATRIX_FILE := hardware/qcom-caf/common/compatibility_matrix.xml
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE += \
$(COMMON_PATH)/configs/framework_compatibility_matrix.xml \
hardware/samsung/vintf/samsung_framework_compatibility_matrix.xml \
hardware/qcom-caf/common/vendor_framework_compatibility_matrix.xml \
@@ -185,12 +183,6 @@ BOARD_USES_QCOM_HARDWARE := true
# Samsung
BOARD_VENDOR := samsung
# Lineage Health
TARGET_HEALTH_CHARGING_CONTROL_CHARGING_PATH := /sys/class/power_supply/battery/batt_slate_mode
TARGET_HEALTH_CHARGING_CONTROL_CHARGING_ENABLED := 0
TARGET_HEALTH_CHARGING_CONTROL_CHARGING_DISABLED := 1
TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_BYPASS := false
# DRM
TARGET_ENABLE_MEDIADRM_64 := true
@@ -225,6 +217,7 @@ TARGET_RELEASETOOLS_EXTENSIONS := $(COMMON_PATH)/releasetools
# SePolicy
include device/qcom/sepolicy_vndr/SEPolicy.mk
include hardware/samsung-ext/interfaces/sepolicy/SEPolicy.mk
BOARD_VENDOR_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/vendor
PRODUCT_PRIVATE_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/private
PRODUCT_PUBLIC_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/public

View File

@@ -41,6 +41,19 @@
<library name="volume_listener" path="libvolumelistener.so"/>
<library name="audiosphere" path="libasphere.so"/>
<library name="shoebox" path="libshoebox.so"/>
<!--DOLBY DAP-->
<library name="dap" path="libswdap.so"/>
<library name="dvl" path="libdlbvol.so"/>
<!--DOLBY END-->
<!--DOLBY GAME-->
<library name="gamedap" path="libswgamedap.so"/>
<!--DOLBY END-->
<!--DOLBY VQE-->
<library name="vqe" path="libswvqe.so"/>
<!--DOLBY END-->
<!--Spatial Audio-->
<library name="spatializer" path="libspatialaudio.so"/>
<!--Spatial Audio-->
</libraries>
<effects>
<effectProxy name="bassboost" library="proxy" uuid="14804144-a5ee-4d24-aa88-0002a5d5c51b">
@@ -89,23 +102,29 @@
<effect name="notification_helper" library="volume_listener" uuid="0b776dde-0590-11e5-81ba-0025b32654a0"/>
<effect name="audiosphere" library="audiosphere" uuid="184e62ab-2d19-4364-9d1b-c0a40733866c"/>
<effect name="shoebox" library="shoebox" uuid="1eab784c-1a36-4b2a-b7fc-e34c44cab89e"/>
<!--DOLBY DAP-->
<effect name="dap" library="dap" uuid="9d4921da-8225-4f29-aefa-39537a04bcaa"/>
<effect name="dlb_music_listener" library="dvl" uuid="40f66c8b-5aa5-4345-8919-53ec431aaa98"/>
<effect name="dlb_ring_listener" library="dvl" uuid="21d14087-558a-4f21-94a9-5002dce64bce"/>
<effect name="dlb_alarm_listener" library="dvl" uuid="6aff229c-30c6-4cc8-9957-dbfe5c1bd7f6"/>
<effect name="dlb_system_listener" library="dvl" uuid="874db4d8-051d-4b7b-bd95-a3bebc837e9e"/>
<effect name="dlb_notification_listener" library="dvl" uuid="1f0091e3-6ad8-40fe-9b09-5948f9a26e7e"/>
<effect name="dlb_voice_call_listener" library="dvl" uuid="58d13383-b41d-05df-d94e-bb23db293260"/>
<!--DOLBY END-->
<!--DOLBY GAME-->
<effect name="gamedap" library="gamedap" uuid="3783c334-d3a0-4d13-874f-0032e5fb80e2"/>
<!--DOLBY END-->
<!--DOLBY VQE-->
<effect name="vqe" library="vqe" uuid="64a0f614-7fa4-48b8-b081-d59dc954616f"/>
<!--DOLBY END-->
<!--Spatial Audio-->
<effect name="spatializer" library="spatializer" uuid="cc4677de-ff72-11eb-9a03-0242ac130003"/>
<!--Spatial Audio-->
</effects>
<postprocess>
<stream type="music">
<apply effect="music_helper"/>
</stream>
<stream type="ring">
<apply effect="ring_helper"/>
</stream>
<stream type="alarm">
<apply effect="alarm_helper"/>
</stream>
<stream type="voice_call">
<apply effect="voice_helper"/>
</stream>
<stream type="notification">
<apply effect="notification_helper"/>
</stream>
</stream>
</postprocess>
<preprocess>
<stream type="voice_communication">

View File

@@ -145,25 +145,10 @@ inputs {
bit_width 16
app_type 69938
}
record_24bit {
formats AUDIO_FORMAT_PCM_8_24_BIT|AUDIO_FORMAT_PCM_24_BIT_PACKED|AUDIO_FORMAT_PCM_24_BIT
sampling_rates 44100|48000|88200|96000|176400|192000
bit_width 24
# [[ SEC_AUDIO
app_type 69944
# SEC_AUDIO ]]
#app_type 69948
}
#record_32bit {
# formats AUDIO_FORMAT_PCM_32_BIT|AUDIO_FORMAT_PCM_FLOAT
# sampling_rates 44100|48000|88200|96000|176400|192000
# bit_width 32
# app_type 69949
#}
record_compress_16 {
flags AUDIO_INPUT_FLAG_COMPRESS
formats AUDIO_FORMAT_PCM_16_BIT
sampling_rates 8000|16000|32000|44100|48000|88200|96000|176400|192000
sampling_rates 48000|96000
bit_width 16
app_type 69938
}

View File

@@ -111,6 +111,12 @@
</mixPort>
<mixPort name="hifi_playback" role="source" />
<mixPort name="hifi_input" role="sink" />
<!--Spatial Audio-->
<mixPort name="immersive_out" role="source" flags="AUDIO_OUTPUT_FLAG_SPATIALIZER">
<profile name="" format="AUDIO_FORMAT_PCM_FLOAT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
<!--Spatial Audio-->
</mixPort>
</mixPorts>
<devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@@ -205,25 +211,25 @@
<route type="mix" sink="Earpiece"
sources="primary output,deep_buffer,fast,compressed_offload"/>
<route type="mix" sink="Speaker"
sources="primary output,deep_buffer,fast,compressed_offload,mmap_no_irq_out"/>
sources="primary output,deep_buffer,fast,compressed_offload,mmap_no_irq_out,immersive_out"/>
<route type="mix" sink="Wired Headset"
sources="primary output,deep_buffer,fast,compressed_offload,mmap_no_irq_out"/>
sources="primary output,deep_buffer,fast,compressed_offload,mmap_no_irq_out,immersive_out"/>
<route type="mix" sink="Wired Headphones"
sources="primary output,deep_buffer,fast,compressed_offload,mmap_no_irq_out"/>
sources="primary output,deep_buffer,fast,compressed_offload,mmap_no_irq_out,immersive_out"/>
<route type="mix" sink="USB Device Out"
sources="primary output,deep_buffer,fast,direct_pcm,compressed_offload,mmap_no_irq_out,hifi_playback"/>
sources="primary output,deep_buffer,fast,direct_pcm,compressed_offload,mmap_no_irq_out,hifi_playback,immersive_out"/>
<route type="mix" sink="USB Headset Out"
sources="primary output,deep_buffer,fast,direct_pcm,compressed_offload,mmap_no_irq_out,hifi_playback"/>
sources="primary output,deep_buffer,fast,direct_pcm,compressed_offload,mmap_no_irq_out,hifi_playback,immersive_out"/>
<route type="mix" sink="usb_surround_sound"
sources="USB Device In,USB Headset In"/>
<route type="mix" sink="hifi_input"
sources="USB Device In,USB Headset In"/>
<route type="mix" sink="BT SCO"
sources="primary output,deep_buffer,fast,voip_rx"/>
sources="primary output,deep_buffer,fast,voip_rx,immersive_out"/>
<route type="mix" sink="BT SCO Headset"
sources="primary output,deep_buffer,fast,voip_rx"/>
sources="primary output,deep_buffer,fast,voip_rx,immersive_out"/>
<route type="mix" sink="BT SCO Car Kit"
sources="primary output,deep_buffer,fast,voip_rx"/>
sources="primary output,deep_buffer,fast,voip_rx,immersive_out"/>
<route type="mix" sink="Telephony Tx"
sources="voice_tx,incall_music_uplink"/>
<route type="mix" sink="voice_rx"

View File

@@ -58,6 +58,8 @@ PRODUCT_PACKAGES += \
wifi_qcom_wcn6750.rc \
wifi_sec.rc
$(call soong_config_set,libinit,vendor_init_lib,//$(LOCAL_PATH):libinit_samsung_sm7325)
# Vendor scripts
PRODUCT_PACKAGES += \
init.class_main.sh \
@@ -168,6 +170,9 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \
SamsungDoze
# Dolby
$(call inherit-product, hardware/dolby/dolby.mk)
# DRM
PRODUCT_PACKAGES += \
android.hardware.drm-service.clearkey \
@@ -179,14 +184,18 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \
fastbootd
# FastCharge
PRODUCT_PACKAGES += \
vendor.lineage.fastcharge@1.0-service.samsung
# Lineage Health
PRODUCT_PACKAGES += \
vendor.lineage.health-service.default
$(call soong_config_set,lineage_health,charging_control_charging_path,/sys/class/power_supply/battery/batt_slate_mode)
$(call soong_config_set,lineage_health,charging_control_charging_enabled,0)
$(call soong_config_set,lineage_health,charging_control_charging_disabled,1)
$(call soong_config_set,lineage_health,charging_control_supports_bypass,false)
$(call soong_config_set,lineage_health,fast_charge_node,/sys/class/sec/switch/afc_disable)
$(call soong_config_set,lineage_health,fast_charge_value_none,1)
$(call soong_config_set,lineage_health,fast_charge_value_fast_charge,0)
# Fingerprint
PRODUCT_PACKAGES += \
android.hardware.biometrics.fingerprint-service.samsung
@@ -232,7 +241,7 @@ $(call soong_config_set,samsungVars,target_keymaster4_library,//vendor/samsung/s
# LiveDisplay
PRODUCT_PACKAGES += \
vendor.lineage.livedisplay@2.0-service.samsung-qcom.sm7325
vendor.lineage.livedisplay@2.0-service.samsung-qcom
# Media
PRODUCT_PACKAGES += \
@@ -380,7 +389,7 @@ PRODUCT_PACKAGES += \
# Touch features
PRODUCT_PACKAGES += \
vendor.lineage.touch@1.0-service.samsung_sm7325
vendor.lineage.touch-service.samsung
# Vendor service manager
PRODUCT_PACKAGES += \
@@ -397,6 +406,11 @@ PRODUCT_PACKAGES += \
PRODUCT_SOONG_NAMESPACES += vendor/qcom/opensource/usb/etc
# Samsung Ext Flash
PRODUCT_PACKAGES += \
vendor.samsung_ext.hardware.camera.flashlight-service \
FlashControl
# Vibrator
PRODUCT_PACKAGES += \
android.hardware.vibrator-service.samsung
@@ -447,6 +461,7 @@ PRODUCT_SOONG_NAMESPACES += \
$(LOCAL_PATH) \
hardware/google/interfaces \
hardware/google/pixel \
hardware/samsung-ext/interfaces \
hardware/samsung
# Inherit proprietary blobs

View File

@@ -1,4 +1,5 @@
<manifest version="2.0" type="device" target-level="5">
<manifest version="2.0" type="device" target-level="6">
<kernel target-level="5"/>
<hal format="hidl">
<name>android.hardware.audio</name>
<transport>hwbinder</transport>
@@ -136,6 +137,43 @@
<name>com.qualcomm.qti.uceservice</name>
<transport>hwbinder</transport>
</hal>
<hal format="hidl">
<name>vendor.lineage.livedisplay</name>
<transport>hwbinder</transport>
<version>2.0</version>
<interface>
<name>IAdaptiveBacklight</name>
<instance>default</instance>
</interface>
<interface>
<name>IDisplayColorCalibration</name>
<instance>default</instance>
</interface>
<interface>
<name>IDisplayModes</name>
<instance>default</instance>
</interface>
<interface>
<name>ISunlightEnhancement</name>
<instance>default</instance>
</interface>
</hal>
<hal format="aidl">
<name>vendor.lineage.touch</name>
<version>1</version>
<interface>
<name>IGloveMode</name>
<instance>default</instance>
</interface>
<interface>
<name>IHighTouchPollingRate</name>
<instance>default</instance>
</interface>
<interface>
<name>ITouchscreenGesture</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl" override="true">
<name>vendor.qti.data.factory</name>
<transport>hwbinder</transport>
@@ -358,38 +396,5 @@
<fqname>@2.0::ISehChannel/imsd</fqname>
<fqname>@2.0::ISehChannel/imsd2</fqname>
</hal>
<hal format="hidl">
<name>vendor.lineage.livedisplay</name>
<transport>hwbinder</transport>
<version>2.0</version>
<interface>
<name>IAdaptiveBacklight</name>
<instance>default</instance>
</interface>
<interface>
<name>IDisplayColorCalibration</name>
<instance>default</instance>
</interface>
<interface>
<name>ISunlightEnhancement</name>
<instance>default</instance>
</interface>
<fqname>@2.0::IAdaptiveBacklight/default</fqname>
<fqname>@2.0::IDisplayColorCalibration/default</fqname>
<fqname>@2.0::ISunlightEnhancement/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.lineage.touch</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IGloveMode</name>
<instance>default</instance>
</interface>
<interface>
<name>ITouchscreenGesture</name>
<instance>default</instance>
</interface>
</hal>
<kernel target-level="5"/>
</manifest>

View File

@@ -290,4 +290,5 @@
</MediaCodec>
</Encoders>
<Include href="media_codecs_google_c2.xml" />
<Include href="media_codecs_dolby_audio.xml" />
</MediaCodecs>

35
evolution.dependencies Normal file
View File

@@ -0,0 +1,35 @@
[
{
"repository": "kernel_samsung_sm7325",
"target_path": "kernel/samsung/sm7325",
"branch": "vic"
},
{
"remote": "github-non-los",
"repository": "LineageOS/android_hardware_samsung",
"target_path": "hardware/samsung",
"branch": "lineage-22.2"
},
{
"remote": "github-non-los",
"repository": "LineageOS/android_hardware_samsung_nfc",
"target_path": "hardware/samsung/nfc",
"branch": "lineage-23.0"
},
{
"repository": "vendor_samsung_sm7325-common",
"target_path": "vendor/samsung/sm7325-common",
"branch": "vic"
},
{
"remote": "github-non-los",
"repository": "anhdat1024/android_hardware_dolby",
"target_path": "hardware/dolby",
"branch": "16.0"
},
{
"repository": "hardware_samsung-extra_interfaces",
"target_path": "hardware/samsung-ext/interfaces",
"branch": "vic"
}
]

View File

@@ -1,10 +0,0 @@
[
{
"repository": "android_kernel_samsung_sm7325",
"target_path": "kernel/samsung/sm7325"
},
{
"repository": "android_hardware_samsung",
"target_path": "hardware/samsung"
}
]

View File

@@ -1,61 +0,0 @@
/*
* Copyright (C) 2019-2023 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <android-base/file.h>
#include <android-base/strings.h>
#include <fstream>
#include "AdaptiveBacklight.h"
using android::base::ReadFileToString;
using android::base::Trim;
using android::base::WriteStringToFile;
namespace vendor {
namespace lineage {
namespace livedisplay {
namespace V2_0 {
namespace samsung {
static constexpr const char* kBacklightPath = "/sys/class/lcd/panel/alpm";
bool AdaptiveBacklight::isSupported() {
std::fstream backlight(kBacklightPath, backlight.in | backlight.out);
return backlight.good();
}
// Methods from ::vendor::lineage::livedisplay::V2_0::IAdaptiveBacklight follow.
Return<bool> AdaptiveBacklight::isEnabled() {
std::string tmp;
int32_t contents = 0;
if (ReadFileToString(kBacklightPath, &tmp)) {
contents = std::stoi(Trim(tmp));
}
return contents > 0;
}
Return<bool> AdaptiveBacklight::setEnabled(bool enabled) {
return WriteStringToFile(enabled ? "2" : "0", kBacklightPath, true);
}
} // namespace samsung
} // namespace V2_0
} // namespace livedisplay
} // namespace lineage
} // namespace vendor

View File

@@ -1,55 +0,0 @@
/*
* Copyright (C) 2019-2023 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef VENDOR_LINEAGE_LIVEDISPLAY_V2_0_ADAPTIVEBACKLIGHT_H
#define VENDOR_LINEAGE_LIVEDISPLAY_V2_0_ADAPTIVEBACKLIGHT_H
#include <hidl/MQDescriptor.h>
#include <hidl/Status.h>
#include <vendor/lineage/livedisplay/2.0/IAdaptiveBacklight.h>
namespace vendor {
namespace lineage {
namespace livedisplay {
namespace V2_0 {
namespace samsung {
using ::android::hardware::hidl_array;
using ::android::hardware::hidl_memory;
using ::android::hardware::hidl_string;
using ::android::hardware::hidl_vec;
using ::android::hardware::Return;
using ::android::hardware::Void;
using ::android::sp;
class AdaptiveBacklight : public IAdaptiveBacklight {
public:
bool isSupported();
// Methods from ::vendor::lineage::livedisplay::V2_0::IAdaptiveBacklight follow.
Return<bool> isEnabled() override;
Return<bool> setEnabled(bool enabled) override;
// Methods from ::android::hidl::base::V1_0::IBase follow.
};
} // namespace samsung
} // namespace V2_0
} // namespace livedisplay
} // namespace lineage
} // namespace vendor
#endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_0_ADAPTIVEBACKLIGHT_H

View File

@@ -1,34 +0,0 @@
// Copyright (C) 2019-2023 The LineageOS Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
cc_binary {
name: "vendor.lineage.livedisplay@2.0-service.samsung-qcom.sm7325",
defaults: ["hidl_defaults"],
init_rc: ["vendor.lineage.livedisplay@2.0-service.samsung-qcom.sm7325.rc"],
relative_install_path: "hw",
srcs: [
"AdaptiveBacklight.cpp",
"SunlightEnhancement.cpp",
"DisplayColorCalibration.cpp",
"service.cpp",
],
shared_libs: [
"libbase",
"libbinder",
"libhidlbase",
"libutils",
"vendor.lineage.livedisplay@2.0",
],
vendor: true,
}

View File

@@ -1,77 +0,0 @@
/*
* Copyright (C) 2019-2023 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <android-base/file.h>
#include <android-base/strings.h>
#include <fstream>
#include "DisplayColorCalibration.h"
using android::base::ReadFileToString;
using android::base::Split;
using android::base::Trim;
using android::base::WriteStringToFile;
namespace vendor {
namespace lineage {
namespace livedisplay {
namespace V2_0 {
namespace samsung {
static constexpr const char* kColorPath = "/sys/class/mdnie/mdnie/sensorRGB";
bool DisplayColorCalibration::isSupported() {
std::fstream rgb(kColorPath, rgb.in | rgb.out);
return rgb.good();
}
Return<int32_t> DisplayColorCalibration::getMaxValue() {
return 255;
}
Return<int32_t> DisplayColorCalibration::getMinValue() {
return 1;
}
Return<void> DisplayColorCalibration::getCalibration(getCalibration_cb resultCb) {
std::vector<int32_t> rgb;
std::string tmp;
if (ReadFileToString(kColorPath, &tmp)) {
std::vector<std::string> colors = Split(Trim(tmp), " ");
for (const std::string& color : colors) {
rgb.push_back(std::stoi(color));
}
}
resultCb(rgb);
return Void();
}
Return<bool> DisplayColorCalibration::setCalibration(const hidl_vec<int32_t>& rgb) {
std::string contents;
for (const int32_t& color : rgb) {
contents += std::to_string(color) + " ";
}
return WriteStringToFile(Trim(contents), kColorPath, true);
}
} // namespace samsung
} // namespace V2_0
} // namespace livedisplay
} // namespace lineage
} // namespace vendor

View File

@@ -1,54 +0,0 @@
/*
* Copyright (C) 2019-2023 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <hidl/MQDescriptor.h>
#include <hidl/Status.h>
#include <vendor/lineage/livedisplay/2.0/IDisplayColorCalibration.h>
namespace vendor {
namespace lineage {
namespace livedisplay {
namespace V2_0 {
namespace samsung {
using ::android::hardware::hidl_array;
using ::android::hardware::hidl_memory;
using ::android::hardware::hidl_string;
using ::android::hardware::hidl_vec;
using ::android::hardware::Return;
using ::android::hardware::Void;
using ::android::sp;
class DisplayColorCalibration : public IDisplayColorCalibration {
public:
bool isSupported();
// Methods from ::vendor::lineage::livedisplay::V2_0::IDisplayColorCalibration follow.
Return<int32_t> getMaxValue() override;
Return<int32_t> getMinValue() override;
Return<void> getCalibration(getCalibration_cb resultCb) override;
Return<bool> setCalibration(const hidl_vec<int32_t>& rgb) override;
// Methods from ::android::hidl::base::V1_0::IBase follow.
};
} // namespace samsung
} // namespace V2_0
} // namespace livedisplay
} // namespace lineage
} // namespace vendor

View File

@@ -1,62 +0,0 @@
/*
* Copyright (C) 2019-2023 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <android-base/file.h>
#include <android-base/strings.h>
#include <fstream>
#include "SunlightEnhancement.h"
using android::base::ReadFileToString;
using android::base::Trim;
using android::base::WriteStringToFile;
namespace vendor {
namespace lineage {
namespace livedisplay {
namespace V2_0 {
namespace samsung {
static constexpr const char* kSREPath = "/sys/class/mdnie/mdnie/outdoor";
// Methods from ::vendor::lineage::livedisplay::V2_0::ISunlightEnhancement follow.
bool SunlightEnhancement::isSupported() {
std::fstream sre(kSREPath, sre.in | sre.out);
return sre.good();
}
// Methods from ::vendor::lineage::livedisplay::V2_0::IAdaptiveBacklight follow.
Return<bool> SunlightEnhancement::isEnabled() {
std::string tmp;
int32_t statusSRE = 0;
if (ReadFileToString(kSREPath, &tmp)) {
statusSRE = std::stoi(Trim(tmp));
}
return statusSRE == 1;
}
Return<bool> SunlightEnhancement::setEnabled(bool enabled) {
return WriteStringToFile(enabled ? "1" : "0", kSREPath, true);
}
} // namespace samsung
} // namespace V2_0
} // namespace livedisplay
} // namespace lineage
} // namespace vendor

View File

@@ -1,50 +0,0 @@
/*
* Copyright (C) 2019-2023 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <hidl/MQDescriptor.h>
#include <hidl/Status.h>
#include <vendor/lineage/livedisplay/2.0/ISunlightEnhancement.h>
namespace vendor {
namespace lineage {
namespace livedisplay {
namespace V2_0 {
namespace samsung {
using ::android::hardware::hidl_array;
using ::android::hardware::hidl_memory;
using ::android::hardware::hidl_string;
using ::android::hardware::hidl_vec;
using ::android::hardware::Return;
using ::android::hardware::Void;
using ::android::sp;
class SunlightEnhancement : public ISunlightEnhancement {
public:
bool isSupported();
// Methods from ::vendor::lineage::livedisplay::V2_0::ISunlightEnhancement follow.
Return<bool> isEnabled() override;
Return<bool> setEnabled(bool enabled) override;
};
} // namespace samsung
} // namespace V2_0
} // namespace livedisplay
} // namespace lineage
} // namespace vendor

View File

@@ -1,109 +0,0 @@
/*
* Copyright (C) 2019-2023 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifdef LIVES_IN_SYSTEM
#define LOG_TAG "lineage.livedisplay@2.0-service.samsung-qcom.sm7325"
#else
#define LOG_TAG "vendor.lineage.livedisplay@2.0-service.samsung-qcom.sm7325"
#endif
#include <android-base/logging.h>
#include <binder/ProcessState.h>
#include <hidl/HidlTransportSupport.h>
#include "AdaptiveBacklight.h"
#include "SunlightEnhancement.h"
#include "DisplayColorCalibration.h"
using android::hardware::configureRpcThreadpool;
using android::hardware::joinRpcThreadpool;
using android::sp;
using android::status_t;
using android::OK;
using vendor::lineage::livedisplay::V2_0::samsung::AdaptiveBacklight;
using vendor::lineage::livedisplay::V2_0::samsung::SunlightEnhancement;
using vendor::lineage::livedisplay::V2_0::samsung::DisplayColorCalibration;
int main() {
sp<AdaptiveBacklight> adaptiveBacklight;
sp<SunlightEnhancement> sunlightEnhancement;
sp<DisplayColorCalibration> displayColorCalibration;
status_t status;
LOG(INFO) << "LiveDisplay HAL service is starting.";
adaptiveBacklight = new AdaptiveBacklight();
if (adaptiveBacklight == nullptr) {
LOG(ERROR)
<< "Can not create an instance of LiveDisplay HAL AdaptiveBacklight Iface, exiting.";
goto shutdown;
}
sunlightEnhancement = new SunlightEnhancement();
if (sunlightEnhancement == nullptr) {
LOG(ERROR)
<< "Can not create an instance of LiveDisplay HAL SunlightEnhancement Iface, exiting.";
goto shutdown;
}
displayColorCalibration = new DisplayColorCalibration();
if (displayColorCalibration == nullptr) {
LOG(ERROR) << "Can not create an instance of LiveDisplay HAL DisplayColorCalibration "
"Iface, exiting.";
goto shutdown;
}
configureRpcThreadpool(1, true /*callerWillJoin*/);
if (adaptiveBacklight->isSupported()) {
status = adaptiveBacklight->registerAsService();
if (status != OK) {
LOG(ERROR) << "Could not register service for LiveDisplay HAL AdaptiveBacklight Iface ("
<< status << ")";
goto shutdown;
}
}
if (sunlightEnhancement->isSupported()) {
status = sunlightEnhancement->registerAsService();
if (status != OK) {
LOG(ERROR)
<< "Could not register service for LiveDisplay HAL SunlightEnhancement Iface ("
<< status << ")";
goto shutdown;
}
}
if (displayColorCalibration->isSupported()) {
status = displayColorCalibration->registerAsService();
if (status != OK) {
LOG(ERROR)
<< "Could not register service for LiveDisplay HAL DisplayColorCalibration Iface ("
<< status << ")";
goto shutdown;
}
}
LOG(INFO) << "LiveDisplay HAL service is ready.";
joinRpcThreadpool();
// Should not pass this line
shutdown:
// In normal operation, we don't expect the thread pool to shutdown
LOG(ERROR) << "LiveDisplay HAL service is shutting down.";
return 1;
}

View File

@@ -1,7 +0,0 @@
on post-fs-data
mkdir /data/vendor/display 0770 system system
service vendor.livedisplay-hal-2-0-samsung-qcom.sm7325 /vendor/bin/hw/vendor.lineage.livedisplay@2.0-service.samsung-qcom.sm7325
class late_start
user system
group system

View File

@@ -119,10 +119,8 @@
<!-- List supported color modes. -->
<integer-array name="config_availableColorModes">
<item>0</item> <!-- COLOR_MODE_NATURAL -->
<item>1</item> <!-- COLOR_MODE_BOOSTED -->
<item>2</item> <!-- COLOR_MODE_SATURATED -->
<item>3</item> <!-- COLOR_MODE_AUTOMATIC -->
<item>0</item> <!-- COLOR_MODE_NATURAL -->
<item>256</item> <!-- COLOR_MODE_VENDOR -->
</integer-array>
<!-- Screen brightness used to dim the screen while dozing in a very low power state.
@@ -1347,4 +1345,7 @@
<!-- Whether the new Auto Selection Network UI should be shown -->
<bool name="config_enableNewAutoSelectNetworkUI">true</bool>
<!-- Whether devices suports in-display fingerprint when screen is off -->
<bool name="config_supportScreenOffUdfps">true</bool>
</resources>

View File

@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2023, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources>
<!-- The default height of the status bar used in {@link SystemBarUtils#getStatusBarHeight} to
calculate the status bar height. -->
<dimen name="status_bar_height_default">100px</dimen>
<!-- Height of the status bar.
Do not read this dimen directly. Use {@link SystemBarUtils#getStatusBarHeight} instead.
-->
<dimen name="status_bar_height">100px</dimen>
<!-- Height of the status bar in portrait.
Do not read this dimen directly. Use {@link SystemBarUtils#getStatusBarHeight} instead.
-->
<dimen name="status_bar_height_portrait">100px</dimen>
<!-- Height of the status bar in landscape.
Do not read this dimen directly. Use {@link SystemBarUtils#getStatusBarHeight} instead.
-->
<dimen name="status_bar_height_landscape">100px</dimen>
<!-- Default paddings for content around the corners. -->
<dimen name="rounded_corner_content_padding">50px</dimen>
</resources>

View File

@@ -24,5 +24,11 @@
<bool name="doze_display_state_supported">true</bool>
<!-- the padding on the top of the statusbar (usually 0) -->
<dimen name="status_bar_padding_top">6dp</dimen>
<dimen name="status_bar_padding_top">7dp</dimen>
<!-- If not zero, limits the internal screen recorder's framerate to the set value. -->
<integer name="config_screenRecorderMaxFramerate">60</integer>
<!-- Preferred max refresh rate at AOD & Ambient Display, if supported by the display. -->
<integer name="config_aodMaxRefreshRate">60</integer>
</resources>

View File

@@ -21,5 +21,16 @@
default that should be overridden by device-specific overlays. -->
<dimen name="physical_power_button_center_screen_location_y">980px</dimen>
<dimen name="rounded_corner_content_padding">8dp</dimen>
<!-- the padding on the start of the statusbar -->
<dimen name="status_bar_padding_start">-1dp</dimen>
<!-- the padding on the end of the statusbar -->
<dimen name="status_bar_padding_end">0dp</dimen>
<!-- QS padding controllers-->
<dimen name="qs_panel_padding_top">100dp</dimen>
<!-- Margin on the left side of the carrier text on Keyguard -->
<dimen name="keyguard_carrier_text_margin">12dp</dimen>
</resources>

View File

@@ -18,6 +18,7 @@
<!-- Defines the actions shown in advanced reboot submenu -->
<string-array name="config_restartActionsList">
<item>restart</item>
<item>restart_systemui</item>
<item>restart_recovery</item>
<item>restart_download</item>
</string-array>

View File

@@ -37,4 +37,20 @@
<!-- Max network scan search time in seconds -->
<integer name="config_network_scan_helper_max_search_time_sec">254</integer>
<!-- Display settings screen, Color mode options. Must be the same length and order as
config_color_mode_options_values below. Only the values that also appear in
frameworks/base/core/res/res/values/config.xml's config_availableColorModes are shown. -->
<string-array name="config_color_mode_options_strings" translatable="false">
<item>Natural</item>
<item>Vivid</item>
</string-array>
<!-- Display settings screen, Color mode options. Must be the same length and order as
config_color_mode_options_strings above. Only the values that also appear in
frameworks/base/core/res/res/values/config.xml's config_availableColorModes are shown. -->
<integer-array name="config_color_mode_options_values" translatable="false">
<item>0</item>
<item>256</item>
</integer-array>
</resources>

View File

@@ -1,7 +1,3 @@
on early-init
chmod 0660 /dev/goodix_fp
chown system system /dev/goodix_fp
on init
write /sys/class/sec/tsp/cmd "fod_enable,1,1,0"
write /sys/class/sec/tsp/cmd "set_fod_rect,421,2018,659,2256"
@@ -11,6 +7,9 @@ on boot
chmod 0660 /dev/esfp0
chown system system /dev/esfp0
chmod 0660 /dev/goodix_fp
chown system system /dev/goodix_fp
chmod 0660 /dev/qbt2000_fd
chmod 0660 /dev/qbt2000_ipc
chmod 0660 /dev/qbtspi

View File

@@ -66,6 +66,9 @@ on early-init
on init
# AFC permissions for fast charge
chown system radio /sys/class/sec/switch/afc_disable
# Support legacy paths
symlink /sdcard /mnt/sdcard
symlink /sdcard /storage/sdcard0
@@ -570,6 +573,11 @@ on property:vold.decrypt=trigger_restart_framework
start qcom-c_main-sh
start wcnss-service
on post-fs-data
# Charge Bypass
chown system system /sys/class/power_supply/battery
chmod 0660 /sys/class/power_supply/battery
service vendor.qrtr-ns /vendor/bin/qrtr-ns -f
class core
user vendor_qrtr
@@ -908,8 +916,10 @@ service vendor.audio-hal /vendor/bin/hw/android.hardware.audio.service
class hal
user audioserver
# media gid needed for /dev/fm (radio) and for /data/misc/media (tee)
group audio camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct oem_2901 wakelock
capabilities BLOCK_SUSPEND
group audio camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct oem_2901 wakelock context_hub
capabilities BLOCK_SUSPEND SYS_NICE
# setting RLIMIT_RTPRIO allows binder RT priority inheritance
rlimit rtprio 10 10
ioprio rt 4
writepid /dev/cpuset/foreground/tasks /dev/stune/foreground/tasks
onrestart restart audioserver

View File

@@ -111,6 +111,10 @@ on post-fs-data
on early-boot
start vendor.sensors
# Dolby
mkdir /data/vendor/dolby 0770 media media
mkdir /data/vendor/multimedia 0775 system system
on boot
setprop vendor.powerhal.init 1

View File

@@ -79,6 +79,18 @@ on fs && property:ro.boot.rp=6 && property:ro.boot.em.model=SM-A528N
mount none /vendor/firmware/wlan/a528n/rev6/wpss.b07 /vendor/firmware/wpss.b07 bind
mount none /vendor/firmware/wlan/a528n/rev6/wpss.mdt /vendor/firmware/wpss.mdt bind
# bootloader revision 7, A528N (asia)
on fs && property:ro.boot.rp=7 && property:ro.boot.em.model=SM-A528N
mount none /vendor/firmware/wlan/a528n/rev7/wpss.b00 /vendor/firmware/wpss.b00 bind
mount none /vendor/firmware/wlan/a528n/rev7/wpss.b01 /vendor/firmware/wpss.b01 bind
mount none /vendor/firmware/wlan/a528n/rev7/wpss.b02 /vendor/firmware/wpss.b02 bind
mount none /vendor/firmware/wlan/a528n/rev7/wpss.b03 /vendor/firmware/wpss.b03 bind
mount none /vendor/firmware/wlan/a528n/rev7/wpss.b04 /vendor/firmware/wpss.b04 bind
mount none /vendor/firmware/wlan/a528n/rev7/wpss.b05 /vendor/firmware/wpss.b05 bind
mount none /vendor/firmware/wlan/a528n/rev7/wpss.b06 /vendor/firmware/wpss.b06 bind
mount none /vendor/firmware/wlan/a528n/rev7/wpss.b07 /vendor/firmware/wpss.b07 bind
mount none /vendor/firmware/wlan/a528n/rev7/wpss.mdt /vendor/firmware/wpss.mdt bind
# bootloader revision 3, A528B (international)
on fs && property:ro.boot.rp=3 && property:ro.boot.em.model=SM-A528B
mount none /vendor/firmware/wlan/a528b/rev3/wpss.b01 /vendor/firmware/wpss.b01 bind
@@ -317,6 +329,30 @@ on fs && property:ro.boot.rp=6 && property:ro.boot.em.model=SM-M526B
mount none /vendor/firmware/wlan/m526b/rev6/wpss.b07 /vendor/firmware/wpss.b07 bind
mount none /vendor/firmware/wlan/m526b/rev6/wpss.mdt /vendor/firmware/wpss.mdt bind
# bootloader revision 7, M526BR (international)
on fs && property:ro.boot.rp=7 && property:ro.boot.em.model=SM-M526BR
mount none /vendor/firmware/wlan/m526br/rev7/wpss.b00 /vendor/firmware/wpss.b00 bind
mount none /vendor/firmware/wlan/m526br/rev7/wpss.b01 /vendor/firmware/wpss.b01 bind
mount none /vendor/firmware/wlan/m526br/rev7/wpss.b02 /vendor/firmware/wpss.b02 bind
mount none /vendor/firmware/wlan/m526br/rev7/wpss.b03 /vendor/firmware/wpss.b03 bind
mount none /vendor/firmware/wlan/m526br/rev7/wpss.b04 /vendor/firmware/wpss.b04 bind
mount none /vendor/firmware/wlan/m526br/rev7/wpss.b05 /vendor/firmware/wpss.b05 bind
mount none /vendor/firmware/wlan/m526br/rev7/wpss.b06 /vendor/firmware/wpss.b06 bind
mount none /vendor/firmware/wlan/m526br/rev7/wpss.b07 /vendor/firmware/wpss.b07 bind
mount none /vendor/firmware/wlan/m526br/rev7/wpss.mdt /vendor/firmware/wpss.mdt bind
# bootloader revision 7, M526B (america)
on fs && property:ro.boot.rp=7 && property:ro.boot.em.model=SM-M526B
mount none /vendor/firmware/wlan/m526b/rev7/wpss.b00 /vendor/firmware/wpss.b00 bind
mount none /vendor/firmware/wlan/m526b/rev7/wpss.b01 /vendor/firmware/wpss.b01 bind
mount none /vendor/firmware/wlan/m526b/rev7/wpss.b02 /vendor/firmware/wpss.b02 bind
mount none /vendor/firmware/wlan/m526b/rev7/wpss.b03 /vendor/firmware/wpss.b03 bind
mount none /vendor/firmware/wlan/m526b/rev7/wpss.b04 /vendor/firmware/wpss.b04 bind
mount none /vendor/firmware/wlan/m526b/rev7/wpss.b05 /vendor/firmware/wpss.b05 bind
mount none /vendor/firmware/wlan/m526b/rev7/wpss.b06 /vendor/firmware/wpss.b06 bind
mount none /vendor/firmware/wlan/m526b/rev7/wpss.b07 /vendor/firmware/wpss.b07 bind
mount none /vendor/firmware/wlan/m526b/rev7/wpss.mdt /vendor/firmware/wpss.mdt bind
# bootloader revision 3, A736B
on fs && property:ro.boot.rp=3 && property:ro.boot.em.model=SM-A736B
mount none /vendor/firmware/wlan/rev3/wpss.b01 /vendor/firmware/wpss.b01 bind

View File

@@ -0,0 +1,67 @@
app_domain(devicesettings_app)
# Allow devicesettings_app to find *_service
allow devicesettings_app {
activity_service
activity_task_service
app_api_service
audioserver_service
audio_service
autofill_service
batterystats_service
cameraserver_service
cameraserver_service
content_capture_service
device_state_service
drmserver_service
game_service
gpu_service
hint_service
media_session_service
mediaextractor_service
mediametrics_service
mediaserver_service
netstats_service
permission_checker_service
sensorservice_service
statusbar_service
surfaceflinger_service
thermal_service
trust_service
voiceinteraction_service
}:service_manager find;
# Allow devicesettings_app read and write /data/data subdirectory
allow devicesettings_app system_app_data_file:dir create_dir_perms;
allow devicesettings_app system_app_data_file:{ file lnk_file } create_file_perms;
# Allow binder communication with gpuservice
binder_call(devicesettings_app, gpuservice)
# Allow devicesettings_app to get settingsdebug.instant.packages prop
get_prop(devicesettings_app, settingslib_prop)
# Allow reading thermal sensor data
r_dir_file(devicesettings_app, sysfs_thermal)
allow devicesettings_app sysfs_thermal:file { read open };
allow devicesettings_app sysfs:file { read open };
# Allow reading battery information for charging speed tile
# Primary battery sysfs paths
allow devicesettings_app sysfs_batteryinfo:file r_file_perms;
allow devicesettings_app sysfs_power:file r_file_perms;
allow devicesettings_app sysfs_battery:dir search;
allow devicesettings_app sysfs_battery:file r_file_perms;
# Allow charging bypass to overwrite
allow devicesettings_app sysfs_battery_writable:dir r_dir_perms;
allow devicesettings_app sysfs_battery_writable:file { open read write getattr ioctl };
# Specific battery file access (fallback if contexts above don't work)
allow devicesettings_app sysfs:file { read open getattr ioctl };
# Allow reading battery manager information
allow devicesettings_app proc_stat:file r_file_perms;
# Allow Quick Settings tile service binding
allow devicesettings_app system_server:binder { call transfer };

View File

@@ -0,0 +1,2 @@
# Charging Bypass
/sys/class/power_supply/battery/batt_slate_mode u:object_r:sysfs_battery_writable:s0

View File

@@ -0,0 +1,4 @@
allow hal_samsung_camera_flashlight_default sysfs_camera:dir search;
allow hal_samsung_camera_flashlight_default sysfs_camera:file rw_file_perms;
allow hal_samsung_camera_flashlight_default sysfs_camera_writable:dir search;
allow hal_samsung_camera_flashlight_default sysfs_camera_writable:file rw_file_perms;

View File

@@ -0,0 +1,2 @@
# SettingsLib
settingsdebug.instant.packages u:object_r:settingslib_prop:s0

View File

@@ -0,0 +1,2 @@
# Parts
user=system seinfo=platform name=org.lineageos.settings domain=devicesettings_app type=system_app_data_file levelFrom=all

View File

@@ -0,0 +1,2 @@
type devicesettings_app, domain;
typeattribute devicesettings_app mlstrustedsubject;

View File

@@ -1 +1,4 @@
type sysfs_battery, sysfs_type, r_fs_type, fs_type;
type sysfs_battery_writable, sysfs_type, rw_fs_type, fs_type;
type sysfs_camera, sysfs_type, r_fs_type, fs_type;
type sysfs_camera_writable, sysfs_type, r_fs_type, fs_type;

View File

@@ -0,0 +1,2 @@
# SettingsLib
system_public_prop(settingslib_prop)

16
sepolicy/vendor/devicesettings_app.te vendored Normal file
View File

@@ -0,0 +1,16 @@
allow devicesettings_app vendor_sysfs_graphics:dir search;
allow devicesettings_app vendor_sysfs_graphics:file rw_file_perms;
allow devicesettings_app vendor_sysfs_kgsl:dir search;
allow devicesettings_app vendor_sysfs_kgsl:{ file lnk_file } rw_file_perms;
allow devicesettings_app property_socket:sock_file { read write getattr };
allow devicesettings_app init:unix_stream_socket connectto;
allow devicesettings_app vendor_sysfs_battery_supply:dir search;
allow devicesettings_app vendor_sysfs_battery_supply:file r_file_perms;
allow devicesettings_app proc_stat:file { read open getattr };
allow devicesettings_app vendor_sysfs_kgsl_gpuclk:file { read open getattr };

View File

@@ -1,5 +1,4 @@
# SYSFS
type sysfs_camera, sysfs_type, r_fs_type, fs_type;
type sysfs_fingerprint, sysfs_type, r_fs_type, fs_type;
type sysfs_iio, sysfs_type, r_fs_type, fs_type;
type sysfs_input, sysfs_type, r_fs_type, fs_type;
@@ -13,8 +12,6 @@ type sysfs_wifi, sysfs_type, r_fs_type, fs_type;
type sysfs_audio_writable, sysfs_type, rw_fs_type, fs_type;
type sysfs_backlight_writable, sysfs_type, rw_fs_type, fs_type;
type sysfs_camera_writable, sysfs_type, r_fs_type, fs_type;
type sysfs_battery_writable, sysfs_type, rw_fs_type, fs_type;
type sysfs_lcd_writable, sysfs_type, rw_fs_type, fs_type;
type sysfs_power_writable, sysfs_type, rw_fs_type, fs_type;
type sysfs_sensors_writable, sysfs_type, rw_fs_type, fs_type;

View File

@@ -31,6 +31,9 @@
# radio
/dev/drb u:object_r:drb_device:s0
# Process and system statistics files
/proc/stat u:object_r:proc_stat:s0
# EFS
/efs/Battery(/.*)? u:object_r:battery_efs_file:s0
/efs/biometrics(/.*)? u:object_r:biometrics_efs_file:s0
@@ -58,10 +61,9 @@
/(vendor|system/vendor)/bin/hw/android\.hardware\.power(@[0-9]\.[0-9])?-service\.pixel-libperfmgr u:object_r:hal_power_default_exec:s0
/(vendor|system/vendor)/bin/hw/android\.hardware\.nfc@[0-9]\.[0-9]-service\.samsung u:object_r:hal_nfc_default_exec:s0
/(vendor|system/vendor)/bin/hw/nxp\.android\.hardware\.nfc@[0-9]\.[0-9]-service u:object_r:hal_nfc_default_exec:s0
/(vendor|system/vendor)/bin/hw/vendor\.lineage\.fastcharge@[0-9]\.[0-9]-service\.samsung u:object_r:hal_lineage_fastcharge_default_exec:s0
/(vendor|system/vendor)/bin/hw/vendor\.lineage\.touch\@[0-9]\.[0-9]-service.samsung_sm7325 u:object_r:hal_lineage_touch_default_exec:s0
/(vendor|system/vendor)/bin/hw/vendor\.lineage\.touch-service\.samsung u:object_r:hal_lineage_touch_default_exec:s0
/(vendor|system/vendor)/bin/secril_config_svc u:object_r:secril_config_svc_exec:s0
/(vendor|system/vendor)/bin/hw/vendor\.lineage\.livedisplay@2\.0-service.samsung-qcom\.sm7325 u:object_r:hal_lineage_livedisplay_sysfs_exec:s0
/(vendor|system/vendor)/bin/hw/vendor\.lineage\.livedisplay@2\.0-service\.samsung-qcom u:object_r:hal_lineage_livedisplay_qti_exec:s0
/(vendor|system/vendor)/bin/hw/android.hardware.biometrics.fingerprint-service.samsung u:object_r:hal_fingerprint_default_exec:s0
/(vendor|system/vendor)/bin/hw/vendor.samsung.hardware.thermal@1.0-service u:object_r:hal_thermal_default_exec:s0
/(vendor|system/vendor)/bin/hw/android.hardware.sensors-service.samsung-multihal u:object_r:hal_sensors_default_exec:s0

View File

@@ -1,6 +0,0 @@
# hal_lineage_fastcharge_default
set_prop(hal_lineage_fastcharge, vendor_fastcharge_prop)
allow hal_lineage_fastcharge_default sysfs_sec_switch:dir search;
allow hal_lineage_fastcharge_default sysfs_sec_switch_writable:file rw_file_perms;

View File

@@ -1,2 +1,5 @@
allow hal_lineage_health_default sysfs_sec_switch:dir search;
allow hal_lineage_health_default sysfs_sec_switch_writable:file rw_file_perms;
rw_dir_file(hal_lineage_health_default, sysfs_battery_writable)
r_dir_file(hal_lineage_health_default, sysfs_battery)

View File

@@ -0,0 +1,7 @@
# /sys/devices/virtual/lcd/panel
allow hal_lineage_livedisplay_qti sysfs_lcd_writable:file { read write open };
# /sys/devices/virtual/mdnie/mdnie/
allow hal_lineage_livedisplay_qti sysfs_mdnie_writable:dir search;
allow hal_lineage_livedisplay_qti sysfs_mdnie_writable:file { read write open getattr };
allow hal_lineage_livedisplay_qti vendor_sysfs_graphics:file write;

View File

@@ -1,10 +0,0 @@
# /sys/devices/virtual/lcd/panel
allow hal_lineage_livedisplay_sysfs sysfs_lcd_writable:file { read write open };
# /sys/devices/virtual/mdnie/mdnie/
allow hal_lineage_livedisplay_sysfs sysfs_mdnie_writable:dir search;
allow hal_lineage_livedisplay_sysfs sysfs_mdnie_writable:file { read write open getattr };
allow hal_lineage_livedisplay_sysfs vendor_sysfs_graphics:file write;
allow hal_lineage_livedisplay_sysfs vendor_display_vendor_data_file:dir { write add_name search };
allow hal_lineage_livedisplay_sysfs vendor_display_vendor_data_file:file { read write open create getattr };

View File

@@ -1,6 +1,3 @@
# Fastcharge
vendor_internal_prop(vendor_fastcharge_prop)
# NFC
vendor_internal_prop(vendor_nfc_prop)

View File

@@ -6,9 +6,6 @@ vendor.bluetooth_fw_ver u:object_r:vendor_bluetooth_pro
vendor.bluetooth_nv_ver u:object_r:vendor_bluetooth_prop:s0
persist.vendor.bt. u:object_r:vendor_bluetooth_prop:s0
# fastcharge
persist.vendor.sec.fastchg_enabled u:object_r:vendor_fastcharge_prop:s0
# NFC
ro.vendor.nfc. u:object_r:vendor_nfc_prop:s0

View File

@@ -1,36 +0,0 @@
// Copyright (C) 2019 The LineageOS Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
cc_binary {
name: "vendor.lineage.touch@1.0-service.samsung_sm7325",
init_rc: ["vendor.lineage.touch@1.0-service.samsung_sm7325.rc"],
defaults: ["hidl_defaults"],
relative_install_path: "hw",
// FIXME: this should be 'vendor: true' for modules that will eventually be
// on AOSP.
proprietary: true,
local_include_dirs: ["include"],
srcs: [
"GloveMode.cpp",
"TouchscreenGesture.cpp",
"service.cpp"
],
shared_libs: [
"libbase",
"libbinder",
"libhidlbase",
"libutils",
"vendor.lineage.touch@1.0",
],
}

View File

@@ -1,61 +0,0 @@
/*
* Copyright (C) 2019 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <fstream>
#include "GloveMode.h"
namespace vendor {
namespace lineage {
namespace touch {
namespace V1_0 {
namespace samsung {
bool GloveMode::isSupported() {
std::ifstream file(TSP_CMD_LIST_NODE);
if (file.is_open()) {
std::string line;
while (getline(file, line)) {
if (!line.compare("glove_mode")) return true;
}
file.close();
}
return false;
}
// Methods from ::vendor::lineage::touch::V1_0::IGloveMode follow.
Return<bool> GloveMode::isEnabled() {
std::ifstream file(TSP_CMD_RESULT_NODE);
if (file.is_open()) {
std::string line;
getline(file, line);
if (!line.compare("glove_mode,1:OK")) return true;
file.close();
}
return false;
}
Return<bool> GloveMode::setEnabled(bool enabled) {
std::ofstream file(TSP_CMD_NODE);
file << "glove_mode," << (enabled ? "1" : "0");
return true;
}
} // namespace samsung
} // namespace V1_0
} // namespace touch
} // namespace lineage
} // namespace vendor

View File

@@ -1,55 +0,0 @@
/*
* Copyright (C) 2019-2022 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <hidl/MQDescriptor.h>
#include <hidl/Status.h>
#include <vendor/lineage/touch/1.0/IGloveMode.h>
#include "samsung_touch.h"
namespace vendor {
namespace lineage {
namespace touch {
namespace V1_0 {
namespace samsung {
using ::android::hardware::hidl_array;
using ::android::hardware::hidl_memory;
using ::android::hardware::hidl_string;
using ::android::hardware::hidl_vec;
using ::android::hardware::Return;
using ::android::hardware::Void;
using ::android::sp;
class GloveMode : public IGloveMode {
public:
GloveMode() = default;
bool isSupported();
// Methods from ::vendor::lineage::touch::V1_0::IGloveMode follow.
Return<bool> isEnabled() override;
Return<bool> setEnabled(bool enabled) override;
// Methods from ::android::hidl::base::V1_0::IBase follow.
};
} // namespace samsung
} // namespace V1_0
} // namespace touch
} // namespace lineage
} // namespace vendor

View File

@@ -1,67 +0,0 @@
/*
* Copyright (C) 2019 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <fstream>
#include "TouchscreenGesture.h"
namespace vendor {
namespace lineage {
namespace touch {
namespace V1_0 {
namespace samsung {
static constexpr const char* kTspPath = TSP_CMD_NODE;
const std::map<int32_t, TouchscreenGesture::GestureInfo> TouchscreenGesture::kGestureInfoMap = {
// clang-format off
{0, {0x1c7, "Single Tap"}},
// clang-format on
};
bool TouchscreenGesture::isSupported() {
std::ifstream file(kTspPath);
return file.good();
}
// Methods from ::vendor::lineage::touch::V1_0::ITouchscreenGesture follow.
Return<void> TouchscreenGesture::getSupportedGestures(getSupportedGestures_cb resultCb) {
std::vector<Gesture> gestures;
for (const auto& entry : kGestureInfoMap) {
gestures.push_back({entry.first, entry.second.name, entry.second.keycode});
}
resultCb(gestures);
return Void();
}
Return<bool> TouchscreenGesture::setGestureEnabled(
const ::vendor::lineage::touch::V1_0::Gesture&, bool enabled) {
std::fstream file(kTspPath);
file << "singletap_enable," << (enabled ? "1" : "0");
return !file.fail();
}
// Methods from ::android::hidl::base::V1_0::IBase follow.
} // namespace samsung
} // namespace V1_0
} // namespace touch
} // namespace lineage
} // namespace vendor

View File

@@ -1,62 +0,0 @@
/*
* Copyright (C) 2019-2022 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <hidl/MQDescriptor.h>
#include <hidl/Status.h>
#include <vendor/lineage/touch/1.0/ITouchscreenGesture.h>
#include "samsung_touch.h"
namespace vendor {
namespace lineage {
namespace touch {
namespace V1_0 {
namespace samsung {
using ::android::hardware::hidl_array;
using ::android::hardware::hidl_memory;
using ::android::hardware::hidl_string;
using ::android::hardware::hidl_vec;
using ::android::hardware::Return;
using ::android::hardware::Void;
using ::android::sp;
class TouchscreenGesture : public ITouchscreenGesture {
public:
bool isSupported();
// Methods from ::vendor::lineage::touch::V1_0::ITouchscreenGesture follow.
Return<void> getSupportedGestures(getSupportedGestures_cb resultCb) override;
Return<bool> setGestureEnabled(const ::vendor::lineage::touch::V1_0::Gesture& gesture,
bool enabled) override;
private:
typedef struct {
int32_t keycode;
const char* name;
} GestureInfo;
static const std::map<int32_t, GestureInfo> kGestureInfoMap; // id -> info
};
// FIXME: most likely delete, this is only for passthrough implementations
// extern "C" ITouchscreenGesture* HIDL_FETCH_ITouchscreenGesture(const char* name);
} // namespace samsung
} // namespace V1_0
} // namespace touch
} // namespace lineage
} // namespace vendor

View File

@@ -1,33 +0,0 @@
/*
* Copyright (C) 2021 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef SAMSUNG_TOUCH_H
#define SAMSUNG_TOUCH_H
/*
* Board specific nodes
*
* If your kernel exposes these controls in another place, you can either
* symlink to the locations given here, or override this header in your
* device tree.
*/
// For GloveMode
#define TSP_CMD_LIST_NODE "/sys/class/sec/tsp/cmd_list"
#define TSP_CMD_RESULT_NODE "/sys/class/sec/tsp/cmd_result"
#define TSP_CMD_NODE "/sys/class/sec/tsp/cmd"
#endif // SAMSUNG_TOUCH_H

View File

@@ -1,82 +0,0 @@
/*
* Copyright (C) 2019 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#define LOG_TAG "vendor.lineage.touch@1.0-service.samsung_sm7325"
#include <android-base/logging.h>
#include <binder/ProcessState.h>
#include <hidl/HidlTransportSupport.h>
#include "GloveMode.h"
#include "TouchscreenGesture.h"
using android::hardware::configureRpcThreadpool;
using android::hardware::joinRpcThreadpool;
using android::sp;
using android::status_t;
using android::OK;
using ::vendor::lineage::touch::V1_0::samsung::GloveMode;
using ::vendor::lineage::touch::V1_0::samsung::TouchscreenGesture;
int main() {
sp<GloveMode> gloveMode;
sp<TouchscreenGesture> touchscreenGesture;
status_t status;
LOG(INFO) << "Touch HAL service is starting.";
gloveMode = new GloveMode();
if (gloveMode == nullptr) {
LOG(ERROR) << "Can not create an instance of Touch HAL GloveMode Iface, exiting.";
goto shutdown;
}
touchscreenGesture = new TouchscreenGesture();
if (touchscreenGesture == nullptr) {
LOG(ERROR) << "Can not create an instance of Touch HAL TouchscreenGesture Iface, exiting.";
goto shutdown;
}
configureRpcThreadpool(1, true /*callerWillJoin*/);
if (gloveMode->isSupported()) {
status = gloveMode->registerAsService();
if (status != OK) {
LOG(ERROR) << "Could not register service for Touch HAL GloveMode Iface (" << status
<< ")";
goto shutdown;
}
}
if (touchscreenGesture->isSupported()) {
status = touchscreenGesture->registerAsService();
if (status != OK) {
LOG(ERROR) << "Could not register service for Touch HAL TouchscreenGesture Iface ("
<< status << ")";
goto shutdown;
}
}
LOG(INFO) << "Touch HAL service is ready.";
joinRpcThreadpool();
// Should not pass this line
shutdown:
// In normal operation, we don't expect the thread pool to shutdown
LOG(ERROR) << "Touch HAL service is shutting down.";
return 1;
}

View File

@@ -1,8 +0,0 @@
on early-init
chown system radio /sys/class/sec/tsp/cmd
chmod 0664 /sys/class/sec/tsp/cmd
service vendor.touch-hal-1-0 /vendor/bin/hw/vendor.lineage.touch@1.0-service.samsung_sm7325
class hal
user system
group system

View File

@@ -21,8 +21,6 @@ audio.offload.video=true
vendor.audio.offload.track.enable=true
audio.deep_buffer.media=true
vendor.audio.offload.multiaac.enable=true
vendor.audio.dolby.ds2.enabled=false
vendor.audio.dolby.ds2.hardbypass=false
vendor.audio.offload.multiple.enabled=false
vendor.audio.offload.passthrough=false
vendor.voice.path.for.pcm.voip=true