Commit Graph

51 Commits

Author SHA1 Message Date
LuK1337
690071580e Introduce vendor.oplus.hardware.urcc-service
Change-Id: I7fe1a4e9b590d077f43bbaac03e483724d3198e0
2025-09-26 00:37:26 +05:30
LuK1337
20b9ca79d6 livedisplay: Use PWM turbo for IAntiFlicker if available
Change-Id: I4162f79c5309038dfff1bd00f2ca8a726c7eb206
2025-09-06 13:56:59 +00:00
LuK1337
3633fe6cbe oplus: Get rid of in_ prefix
Change-Id: Ibdafd315098ccc54ec19f298bdb28cb894017489
2025-09-04 11:17:09 +00:00
pjgowtham
b122025d2d Introduce vendor.oplus.hardware.performance-service
Dummy service named differently from the stock one to avoid conflicts.

This can be used on devices that do not include CPU ricing, but still
require the service to register for camera and prebuilt audio stack to
actually work.

Change-Id: I41087aefe9af57e7a1161a3a71ab3b9e849925f2
2025-09-04 10:14:22 +00:00
LuK1337
4ee6ecda7e livedisplay: Add IAdaptiveBacklight support
Change-Id: Id11b96f58efb494b05e089d9954139d0c01366be
2025-08-18 00:16:52 +02:00
LuK1337
622f8070f3 livedisplay: Migrate to AIDL
Change-Id: I8dbe9ed99549aff3e7fcff553482a4c45aae67ef
2025-08-17 23:40:08 +02:00
Bruno Martins
1a462ed83c touch: Implement GloveMode support
Change-Id: I1bb2f502e5b6947dfb2d68572b098d0e5b058c28
2025-07-06 23:56:31 +01:00
dianlujitao
12190ecbc4 aidl: vibrator: qti: load effects from blobs
Change-Id: I55350bea3b7c4f31a62b60a6792ba2a343c72970
2025-07-06 23:01:45 +01:00
DtHnAme
00f0edf25e power: Implement DT2W through OplusTouch
Co-authored-by: Maitreya25 <maitreyapatni25@gmail.com>
Co-authored-by: Mashopy <eliasgheeraert@gmail.com>
Co-authored-by: Bruno Martins <bgcngm@gmail.com>
Change-Id: I5ad57428aeefe68c8a188aa1e445f4091cbc0d8a
2025-07-06 14:51:26 +01:00
Maitreya25
165c5e47a9 touch: Support interfacing with stock OplusTouch service
Co-authored-by: inferno0230 <mail@inferno0230.in>
Co-authored-by: Mashopy <eliasgheeraert@gmail.com>
Co-authored-by: Bruno Martins <bgcngm@gmail.com>
Change-Id: I305ac931dac35a7fa422745f4250ffb1145c3bf6
2025-07-06 15:39:16 +02:00
LuK1337
8b6ff63e03 touch: Introduce vendor.oplus.hardware.touch-headers
Change-Id: If93b1305f7ee82f2c954969f83c052d0b3a2772b
2025-07-06 15:39:15 +02:00
Fenglin Wu
e42da48bbd vibrator: qti: Add external control support for sun platform
Add haptics module in sun platform to support external control.

Change-Id: Ie735e8fb50912156b680fd2bf4a0d38c7d2f1c77
2025-06-29 14:48:01 +00:00
Fenglin Wu
332e7e4baf vibrator: qti: Add external control support for pineapple
Pineapple SOC uses PMIC that has haptics module can support external
control. Add support for it.

Change-Id: I471561a91be8fd054d34dc83860b5b53b8026706
Signed-off-by: madmax7896 <madmax78968@gmail.com>
2025-06-21 11:44:48 +00:00
Bruno Martins
dc9a1d06e2 touch: Use CHECK_EQ(a, b) assertion
Change-Id: I7522c86f168a2a5226b2ef28903afa74cee62997
2025-06-07 19:00:50 +01:00
Bruno Martins
ae39496553 touch: Enable HighTouchPollingRate by default
Every new device supports the feature.

Change-Id: I9a08dfb6f8f416af99f9811aa1fa1f1166d2b9f4
2025-06-06 20:56:56 +00:00
Bruno Martins
a79e50e87a touch: Add soong configuration for features
Change-Id: I73870f82b6dfc5f9b13e1a450796060bc8dc58f1
2025-06-06 20:56:56 +00:00
Bruno Martins
cfceb7c1c3 touch: Migrate to AIDL
Change-Id: I7fc7992744df049835213c58261eb81579d6f3c1
2025-06-06 20:56:56 +00:00
LuK1337
90b33a8325 powershare: Use EX_SERVICE_SPECIFIC exception code for setEnabled()
Makes it match hardware/lineage/interfaces/powershare/aidl/default.

Change-Id: I5a4978cc7b62127dd00795dd6aaff10c2f2ade38
2025-05-27 00:39:02 +02:00
Bruno Martins
7f612125c2 powershare: Migrate to AIDL
Change-Id: I181478469e0de7e913a8e3fb665155b63a74f63a
2025-05-10 11:48:17 +00:00
Mashopy
406d2da3d3 vibrator: richtap: Fixup service declaration for loading AAC effects
The previous declaration was resulting in non-working vibrator effects
on vitamin due to the perms being set too late and the service running
too soon at the same time.

This match vitamin's vendor.oplus.hardware.vibrator-service declaration.

Change-Id: Iec7bf9c070da280b9b4920b4d85a22abea3aad67
2025-04-13 23:45:55 +00:00
Mashopy
4cdcb94010 oplus: Run bpfix
Change-Id: Ida4dd24167f0f15b1e67a3ae3f73454caa4e1f6e
2025-04-13 23:45:13 +00:00
Bruno Martins
d5f168f6a8 aidl: vibrator: Drop compile_multilib from dummy richtap lib
Not necessarily needed and prevents builds to start on 32-bit-only
targets with this repository also present.

Change-Id: Ic9838753240a25883d591b4be385691f2e070a07
2025-03-31 17:39:50 +00:00
Bruno Martins
5134fa4830 Introduce vendor.oplus.hardware.commondcs-service
Change-Id: I4d91094cc2274a168b147a53d5ebe412a867e920
2025-02-26 00:22:54 +00:00
pjgowtham
c342915eda Introduce android.hardware.ir-service.oplus
Change-Id: Iffeb34f8c7864dad223d20e1de2a819a345678c6
2025-02-08 23:25:14 +00:00
Sebastiano Barezzi
ad80010b94 oplus: Keep a single clang-format in rootdir
Change-Id: Iffe5b37c311dc0ed0c9b5c91a2f94e9ff72f4a8a
2025-02-07 19:17:25 +00:00
LuK1337
b2c137ff35 aidl: vibrator: Clean up aac_vibra_function.h
Change-Id: I9ec5c9631679624d8dc710e790d84895de183d54
2025-02-07 12:49:19 +01:00
Bruno Martins
d2bc42dafc aidl: vibrator: Add dummy libaacvibrator shared_lib
All targets must provide it and dummy one will be overriden.

Change-Id: I64b6180e93cf2c34382282dc8574bf79814f096e
2025-02-07 01:09:54 +00:00
Cosmin Tanislav
538d6790d0 aidl: vibrator: implement richtap vibrator service
Change-Id: Ieab0cfca22c0fd8a63c33ce2a6a21e982e57aee8
2025-02-07 00:34:28 +00:00
Bruno Martins
32be43fe84 aidl: vibrator: Place modded QTI impl into its own dir
Change-Id: Ie21de7e1ddfd964c9d1b4a838521503887dcc994
2025-02-06 23:12:37 +00:00
Tim Zimmermann
2ac71df739 aidl: Add missing vintf version entries
* This is required for devices using a target-level that actually
  has these HALs in their compatibility matrix

Change-Id: I29cba455ab92e7708ece405bb29ea1c46e46cf41
2025-02-06 23:12:34 +00:00
LuK1337
60f641a773 vibrator: Migrate to select()
Change-Id: I625cfa648f321ba5f3b3d255a42b4d489a7abaef
2024-11-22 22:15:24 +01:00
LuK1337
276b1e0c0b Introduce vendor.oplus.hardware.osense.client-service
Change-Id: I5b9e1324a70966e1505e45fca54273ea22028be5
2024-08-26 18:02:29 +02:00
Bruno Martins
e2c46bdac8 vibrator: Remove offload support remnants
The code to support offload was never fully imported when the aidl
vibrator HAL was first added and rebranded to oplus, so remove this
non-working code.

Change-Id: Ifd2e38b362d5fa6a83ecc045401c8e97a34bb1db
2023-09-21 20:56:10 +01:00
Subbaraman Narayanamurthy
090a8f56f8 Vibrator: add support for kalama
Kalama SOC uses PMIC which has haptics module that can support
external control. Add the entry for it.

Change-Id: I49e714837062840f180a4b9e0ed89125cb71c781
2023-09-21 20:56:10 +01:00
Subbaraman Narayanamurthy
19b07b8103 Vibrator: add support for taro
Taro SOC uses same PMICs as Lahaina. Add the entry for it so that
external control is supported.

Change-Id: I43dbbc55cb443897789eca4b65b375836c046a48
2023-09-21 20:56:10 +01:00
Bruno Martins
b9a84761a4 vibrator: Add new SoC ID's
In order to match waipio and kailua tags.

Change-Id: Ib250d373b4eddeeed209f773a662c498d261fc66
2023-09-21 20:56:10 +01:00
pjgowtham
9c8db69b57 vibrator: Import default fifo data from porsche
* These effects from realme GT2 works well across all devices that use
  pm8350b_haptic. The vmax-mv and lra-period-us must be matched with
  realme GT2 configuration ie 9100 and 5882 respectively in the device
  tree for the effects to work well.
* TICK effects are used for CLICK effect because the stock click effect
  feels subjectively weak and are hardly used in stock.
* THUD effects are used for HEAVY_CLICK effects since stock has empty
  HEAVY_CLICK effect

Change-Id: I7e15681693777176c19f70ced807c4cabb95c7a1
2023-05-23 14:09:30 +02:00
pjgowtham
478f00f337 vibrator: Make vibration effects and stream effect configurable
SOONG_CONFIG_NAMESPACES += OPLUS_LINEAGE_VIBRATOR_HAL
SOONG_CONFIG_OPLUS_LINEAGE_VIBRATOR_HAL := \
    INCLUDE_DIR \
    USE_EFFECT_STREAM
SOONG_CONFIG_OPLUS_LINEAGE_VIBRATOR_HAL_INCLUDE_DIR := \
    $(DEVICE_PATH)/vibrator/include
SOONG_CONFIG_OPLUS_LINEAGE_VIBRATOR_HAL_USE_EFFECT_STREAM := true

Change-Id: I8b352a6dc4acc742c319d81ef7a7f33eb970e325
2023-05-23 14:57:40 +03:00
pjgowtham
84fa0a5a1f vibrator: Import and rebrand libqtivibratoreffect
Change-Id: I568767b5b8463b059fb5fd4de4ac0b551fe0e3c9
2023-05-22 21:46:26 +03:00
jabashque
12fcd01d96 vibrator: Redo LedVibratorDevice effects and vibrator timeout handling
For aw8697_haptic, OOS 12 never really properly implemented any effect
other than CLICK and HEAVY_CLICK. Let's implement our own TEXTURE_TICK,
TICK, CLICK, and HEAVY_CLICK so that the user can actually feel a
noticeable difference between each haptic effect.

As a quick summary:
- CLICK: same as oplus CLICK, but with vmax set to 2500.
- DOUBLE_CLICK: replaced with our CLICK played twice in a row, w/ a
100ms delay
- TICK: same as oplus CLICK, but with vmax set to 1400.
- HEAVY_CLICK: same as oplus CLICK, but with vmax set to 2500 and
  waveform_index set to 4.
- TEXTURE_TICK: same as oplus CLICK, but with vmax set to 60 and
  waveform_index set to 2.

In addition, modify LedVibratorDevice's on() to better reflect the
timeout duration actually being passed in to the function. The original
tried to change waveforms instead for various durations at 102 ms or
lower, which didn't really work out in practice for our vibrator.

Change-Id: Ifb769bc2292774afa4977026787a7882430c09d0
2022-11-12 20:20:44 +00:00
jabashque
83cfc07394 vibrator: Ensure waveform_index and vmax is set for other effects
It seems that the DOUBLE_CLICK and HEAVY_CLICK effects assume that
`waveform_index` is always set to 1 and `vmax` is set to 1600, because
if the last played effect is TICK, then all the other effects (aside
from CLICK) end up feeling different, presumably because
`waveform_index` is left as set to 2 and `vmax` is left as set to 1600.

Fix this by having DOUBLE_CLICK and HEAVY_CLICK set `waveform_index`
back to 1 and `vmax` back to 1600.

Change-Id: Ic116f45894cf4af25bcd25b66764eeb472631af5
2022-10-21 17:40:04 +02:00
Jiyong Park
9171299e0f vibrator: Remove ndk_platform backend. Use the ndk backend.
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
Merged-In: I14a1c57bd06f1f2aa52491f779c7030d4de03547
Change-Id: I7b9055909b901843631314b9577a9e578a739d00
2022-09-13 16:09:30 +02:00
jabashque
cf2723baa3 vibrator: Implement Effect::TICK
The AOSP TICK effect generated from the following test app:
- https://github.com/luk1337/VibeTest
was used as the starting point. It is more or less the same as oplus
CLICK, except waveform_index is set to 2.

The vibration effect from this TICK was stronger than oplus CLICK, which
is not really desirable, so adjustments were made to vmax in an
unscientific manner until it felt and sounded just right.

Change-Id: I472db022c2b0182e9a0d544c9d439bc3e47e4d82
2022-07-14 16:04:17 +02:00
Umang Chheda
d3d75f3ddd vibrator: Fix check for no of bytes in Slate SSR monitor thread
No of bytes returned by uevent_kernel_multicast_recv() can be 0 or
equal to 1025 bytes. Add change to remove '=' check in Slate SSR
monitor thread to fix the issue of thread not processing UEVENTs
because of wrong check.

Change-Id: I6d8c35a758371b853b545e3eece2fd7788a1424e
2022-07-06 13:14:42 +02:00
Alexander Koskovich
6b6d45fe1f vibrator: Add missing chowns
Change-Id: Id9d1d1b0075e50c9918aebb456c7a0974163e6d6
2022-04-12 14:39:35 +02:00
LuK1337
b64c8238ac vibrator: Implement Oplus effects
Change-Id: Ic0cf2ed41a7d7fe55a6b5e1ea8418583981a62b0
2022-04-11 16:27:27 +01:00
Daniel Jacob Chittoor
92f894fd2a vibrator: Rebrand for Oplus
Change-Id: Ib3530fbc0f321fe88d16921ba8c381f0f2f5e385
2022-04-11 16:27:27 +01:00
Nolen Johnson
f3fdce9afd vibrator: Drop kernel header dependency
* This is a partial revert of 5fba81168e8446448da68a5e546c2aa77b8dd148.
* CAF adds the kernel headers dep to fetch one single value that is
  removed in that commit. Easier to just carry it here, especially
  considering most devices won't have this in generated_kernel_headers,
  even.

Change-Id: I5b7daab2731e4b6b529cdb1ccf0fe173f677f8fd
2022-04-11 16:27:27 +01:00
Pig
fdfa73426a vibrator: Simplify soc check and drop prop dep
[npjohnson]: adapt to reflect 18.1 upstream merges as well as
include now required headers.

Change-Id: I8581d22deac451d0c44e4b3135d2729da2865a36
2022-04-11 16:27:27 +01:00
Jeongik Cha
41f8f88040 vibrator: Use new vibrator NDK platform
Change-Id: I191e1b942dea3a5cb38e79b8a05803a8b72acdc7
2022-04-11 16:27:24 +01:00