Commit Graph
209 Commits
Author SHA1 Message Date
pjgowtham 2ed3f63d32 ferrari: Use synthesized vibrator effects
Generate the effects and composition primitives of
libqtivibratoreffect.oplus for this LRA. The response constants are
starting points to tune by feel.

Assisted-by: LLM
Change-Id: I3ddaaeb797be1f4240dea315868adc67e84a20d7
2026-11-24 08:29:18 +05:30
pjgowtham e994804063 ferrari: Drop the SurfaceFlinger UDFPS extension
The display HAL matches the UDFPS layers by name for hbm_enable, and
SystemUI now stacks the overlay above the dim layer itself, so the
oplus z-order overrides are no longer needed.

Change-Id: I1f3a4572195528136e4d757f968d99042a6015e6
2026-11-23 22:27:53 +05:30
pjgowtham 41424fcfbe ferrari: Report the face unlock no-face timeout as TIMEOUT
The face HAL ends an attempt that sees no face for 151 frames with
UNABLE_TO_PROCESS. SystemUI treats that as a hardware error and
retries up to four times, so a single lock screen wake keeps the front
camera cycling for about a minute, racing any other camera client.

  E face_aidl.FaceSession: No face times have reached 151 counts, so cancel!
  E face_aidl.FaceSession: onError(error=2, vendor=0)
  E FaceAuthenticateOptions:  unmapped FaceAuthUiEvent FACE_AUTH_TRIGGERED_RETRY_AFTER_HW_UNAVAILABLE

One such camera close stalled while Aperture opened the rear camera,
and the HAL's watchdog killed it:

  F DEBUG   : signal 11 (SIGSEGV), code 0 (SI_USER), fault addr --------
  F DEBUG   :       #08 pc 000000000003dfcc  /vendor/lib64/libcamera2ndk_vendor.so (ACameraDevice_close.cfi+36)
  F DEBUG   :       #09 pc 0000000000025e60  /odm/bin/hw/vendor.oplus.hardware.biometrics.face@1.0-service (CameraHelper::closeCameraNoLock()+316)

Report it as TIMEOUT, which is what it is.

Assisted-by: LLM
Change-Id: Ibbb5189c7181427d975e3c26695927ffbca2b9e6
2026-11-23 22:27:53 +05:30
pjgowtham 7c430cb2dc ferrari: Restore the default auto brightness adjustment gamma
At 100% the adjustment gamma is 1^x, so the framework divides by log(1)
when inferring the adjustment and never reshapes the curve: setting
screen_auto_brightness_adj to +0.8 or -0.8 left the backlight at 21.
Use the default 300% so the adjustment slider works again.

Assisted-by: LLM
Change-Id: Ie029fb68ee82fccf658ca9b98bdd8e715d5d7767
2026-11-23 22:27:53 +05:30
pjgowtham fd4bcb5df7 ferrari: Extend auto brightness into high brightness mode
The curve ended at 502 nits for 5000 lux, right at the HBM transition
point, so auto brightness never went brighter in sunlight. Add the
points stock uses from 8700 lux, hbm_lux_table 8 in
display_brightness_config_common.xml. That is the HBM minimum lux, so
brightness stays at the transition point below it, as on stock.

Assisted-by: LLM
Change-Id: If315c5e7bf6016ef9c7fb678d9ac21e1dd14024e
2026-11-23 22:27:53 +05:30
pjgowtham e427470034 ferrari: Move brightness thresholds and debounce to displayconfig
The display device config overrides these overlays, and the framework
reads the doze brightness only as a fallback for it. Values unchanged;
the config thresholds are in percent rather than permille.

Assisted-by: LLM
Change-Id: I86a5632ce1c5b3af0ab1d4c61c3a58d880a25409
2026-11-23 22:27:53 +05:30
pjgowtham ba03f295ac ferrari: displayconfig: Map brightness from the stock panel table
Two points, 2 to 800 nits, are linear in the backlight level, but the
panel isn't: at backlight 1000 it gives 253 nits, not the 196 the map
assumes, and it tops out at 789 nits. Take the points from the S6E3HC3
table stock uses, display_brightness_config_samsung1024.xml, so auto
brightness reaches the nits it asks for. The points keep the error
within 2.5% above the darkest levels.

Assisted-by: LLM
Change-Id: I5d38144e0219ff11e4e8a8ad315111052f565eaa
2026-11-23 22:27:53 +05:30
pjgowtham 9166c13bf6 ferrari: Drop camera data Aperture can't reach
Without OplusCamera, APS only runs for the Night and Bokeh extensions,
which use its night and portrait modes. Drop the data of algorithms
outside those modes (PerfectColor, 3D photo, AI color, CFR, video
retention, document detection, face distortion correction), the video
filters, the unreferenced fwk_config.json, and the filter LUTs, which
are loaded by name only when a filter is selected.

Assisted-by: LLM
Change-Id: Iaaee2418ce13df3f1e6529c67183a4a28c8105b7
2026-11-23 22:27:53 +05:30
pjgowtham 81f74ada89 ferrari: Drop blobs only OplusCamera used
Only the OplusCamera JNI libraries referenced the filter resources, the
sticker models and the double exposure and face beauty libraries. APS,
which the camera extensions keep, loads the filter LUTs by name, so those
stay.

Assisted-by: LLM
Change-Id: I2c6fac030370125a45a789ac686e1d45fc869673
2026-11-23 22:27:53 +05:30
pjgowtham 6401b33c1a ferrari: Enable Oplus camera extensions
Take the extensions, the camera unit SDK they drive and its sepolicy
from vendor/oplus/camera, and declare Night and Bokeh on the main
camera in camera_unit_config, which predates the SDK's
cameraExtensionConfig. Pin the Night preview sizes, as newer Oplus
devices do, since the SDK otherwise derives portrait oriented ones from
the screen and CameraX finds no output size.

The rear portrait preview is configured for two cameras, but an
extension session has a single stream, so APS rejects every frame
("dispatchInputData() undefined case!!") and the viewfinder stays black.
Configure it for one camera.

Front Night is left out: the HAL aborts on the capture request.

Assisted-by: LLM
Change-Id: Iecbc00963d94c3f13a01a91f218b2ea10d08e443
2026-11-23 22:27:53 +05:30
pjgowtham 4bb7af2fc9 ferrari: Treat Aperture as the system camera
The camera HAL gives multi-frame noise reduction only to the package
named in the PackageName Group's SystemCamera key. Every other client
gets a JPEG encoded from a single preview frame:

  IPE ... pipeline:JPEGEncodePreviewMctfOplus_IPE19_cam0

With Aperture listed, the same capture is blended from eight frames on
every lens:

  IPE ... pipeline:MfsrPrefilter_IPE0_cam0
  IPE ... pipeline:MfsrBlend_IPE1_cam0 (x7)
  IPE ... pipeline:MfsrPostFilter_IPE3_cam0

The key holds a single package, so the Oplus camera app loses it.

Assisted-by: LLM
Change-Id: I4c644c7895340a12b2f738f48792352baa12eeea
2026-11-23 22:27:53 +05:30
tonyfan 271e8669b6 ferrari: Ship face unlock service
Change-Id: I89226f7124948b7433778056547ae6bddacb43af
2026-11-06 08:20:59 +05:30
pjgowtham 07072ddfc3 ferrari: Build pixelworks additions to qti composer
The display panel that is used by ferrari/wly (Samsung S6E3HC3)
supports pixelworks soft-iris feature and its evident with the
presence of /odm/etcirissoft_samsung_S6E3HC3_dsc_cmd_mode_panel.xml.

This fixes color modes with stock render intents.

Change-Id: Iea2cf85eeb2aee9463d08759df04e5a6ec823df2
2026-11-06 08:20:59 +05:30
pjgowtham b0cc201038 ferrari: Build composer with support for userspace dim layer
Change-Id: Ib3515e9a93c62c31082243cd09a1782503761791
2026-11-06 08:20:59 +05:30
pjgowtham 83725e41d7 ferrari: Avoid shipping firmware
Let the devices be repairable for those who prefer it.

Change-Id: Id6b5d4a9bc894edd3ad08411c7c048ba56ee2b3b
2026-11-06 08:20:59 +05:30
pjgowtham 8869c54496 ferrari: displayconfig: Default to max resolution on the first boot
Depends-on:I629d3b843f3f2a55c190c58bff03568db3ba8116
Change-Id: Iddc7a2574f94fafdffc7eba9fa2b1a962f44c6a2
2026-11-06 08:20:59 +05:30
Pavel Dubrova ba7355b189 ferrari: audio: Disable native speaker protection
Speaker protection and calibration loading are
handled by the tfa98xx kernel driver.

Change-Id: Iccd187e6111f9a004cfa1cde4bb2f1ffd0ce4d54
Signed-off-by: Pavel Dubrova <pashadubrova@gmail.com>
2026-11-06 08:20:59 +05:30
pjgowtham aa711dc9fe ferrari: Initial tree update from RMX3301_15.0.0.1410(EX01)
Change-Id: I14581196331c7ba714c352c3fbca330683eedabf
2026-11-06 08:20:59 +05:30
pjgowtham a760b27dfb Revert "lemonadep: We now run at 1080p by default ^.^"
This reverts commit 67e3055242.

Change-Id: I349159718e74b8231e7ede2cf6d4b4f0bc31cd0f
2026-11-06 08:20:59 +05:30
pjgowtham 950fbeb35c ferrari: Update display density for 1440p resolution
(1440/1080) * 450 = 600

Change-Id: I0007a5aac1ac771c03184a15b245a0cc0e3889da
2026-11-06 08:20:59 +05:30
pjgowtham 8d2b9aced6 ferrari: Redo brightness configuration and move partially to displayconfig
* Updated minimum brightness calculation from 4/2047 to 4/4095
to align with display DTSI's max level (qcom,mdss-brightness-min-level = 1,
qcom,mdss-brightness-max-level = 4095).

* Synced screenBrightnessRamp with Oplus SM8650.

* screenBrightnessMap is preferred as it supports only floating-point values.

* Calculated High Brightness Mode (HBM) transition point as 2047/(4095-4).
The transition lux is also obtained from OplusSmartBrightnessController.

* Removed some overlays so as to prefer the defaults.

* Update auto brightness overlays from stock display dumpsys under
OplusSmartBrightnessController.

Change-Id: I0b2513be866728f3ddf93f7fbe296d78d862c813
2026-11-06 08:20:59 +05:30
pjgowtham d06569429d ferrari: Update supported framerates for camera
* Stock oplus camera does not expose 480p videos on any cameras and they are not needed.
* Rear Main camera: 60fps video is supported on oplus camera but unexposed, so lets expose it.
* Front cam: Only HD and FHD qualities are exposed and only upto 30fps in oplus camera. The same modes are exposed properly.
* UW: Supports upto HD FHD 30|60 fps but with shitty quality even in oplus camera. Oplus camera switches to main lens if 4k quality is selected. 60fps remains unexposed, so lets expose it
* Microscope supports HD 30|60 FPS modes. But unsupported FHD quality is exposed too.

Change-Id: I32df3a96854d8ed1cad33a6d6b7d287610f3756f
2026-11-06 08:20:59 +05:30
pjgowtham 71f6a64a0d ferrari: Utilize oplus fingerprint HIDL with wrapper
Certain devices uses oplus fingerprint AIDL where we don't
have to build the wrapper.

Change-Id: Ie49a36d7199407d424ebaba9863ba1bd04e531a1
2026-11-06 08:18:48 +05:30
Bruno Martins 1366341490 ferrari: Enable UDFPS framework dimming
Uses default udfps dimming LUT.

Change-Id: Ie6d94c5d4350a574fbc61ff5a892293cb95ce5a7
2026-11-06 08:18:48 +05:30
pjgowtham 28816d096f ferrari: Fix lockscreen text overlapping UDFPS sensor location
Now the text appears at an equal distance from the fod sensor and the bottom end of the screen

Change-Id: I752488fb2ad96c5f5c67a0ad87abc4f8527dcc8a
2026-11-06 08:18:48 +05:30
pjgowtham 1c12ba9845 ferrari: Update UDFPS sensor location for ferrari
sensorlocationX is calculated as width/2
sensorlocationY is calculated as (height - persist.vendor.fingerprint.optical.iconlocation) ie (3216 - 753 = 2463)
sensorRadius is calculated as persist.vendor.fingerprint.optical.iconsize/2 ie (228/2 = 114)
config_udfpsEnrollProgressBar is calculated as sensorRadius+5

Change-Id: If6556437abc7c760a45bd3f73f34e38f5d9bb3f2
2026-11-06 08:18:48 +05:30
pjgowtham b5b508d11c ferrari: Remove unsupported powershare and tristatekey features
Change-Id: I29adc129eae09f5378537c0d0356b85da4774095
2026-11-06 08:18:48 +05:30
pjgowtham d7f84c72bc ferrari: Commonize Lineage Health control charging path
There aren't two power drivers in kernel anymore starting SM8450.

Change-Id: I5e802bc87a1b2966f8e13190e2df44ac1df63597
2026-11-06 08:18:48 +05:30
Shashank Sivakumar 9cb33097b0 ferrari: Moving core 64 bit only makefile
Moving the corresponding core_64_bit_only make file after removing the
entry from the common64.mk file. This is to enable the GSI components for
64 bit option available.

Change-Id: Idefd924e096371ae53fd76781257667b4f5a2fb7
2026-11-06 08:18:48 +05:30
pjgowtham 93ef56586d ferrari: Intial rebrand for realme GT 2 pro
Change-Id: I326aabe3c36b87106e567a028a59f37cf7c54603
2026-11-06 08:18:48 +05:30
Bruno Martins 07728a70f2 lemonadep: Drop stats HIDL dependency
Support for android.frameworks.stats HIDL HAL has been removed in CP2A.
Camera still works, so move on.

Change-Id: I9753714c7447cbd05a85a3fe537c949f6fc5c0ec
2026-06-28 15:23:00 +00:00
Bruno Martins 561132deec lemonadep: De-blob oplus interfaces
Change-Id: Ic241b620ead819c477554b637b4618d66bc2ec8a
2026-06-13 16:04:47 +01:00
Bruno Martins 6fb80392ea lemonadep: Create standalone RRO for KeyHandler
Change-Id: Ia6867ce4443de4edfd54dc61db5550fc3a59ccd8
2026-01-22 09:47:56 +01:00
Bruno Martins faaabce519 lemonadep: overlay: Configure alert slider position
Change-Id: I791db40c50bb1ca48e4b14e4d6dbb9a9ad2cf4e6
2026-01-15 11:45:09 +02:00
Michael Bestas 9b05573e6e lemonadep: Correct display height
Change-Id: Ib0a222c0695096c518f68edd0eb758da1c42c26d
2026-01-15 09:32:20 +02:00
LuK1337 0ad2291a52 lemonadep: Get rid of rfsa module suffixes
See: I99c0ce57609d4b8354fd3ca6c13fb89497fef02c
Change-Id: Ic978bb7783a8b822e0a3f9b948fa0983bff3a5bb
2025-12-12 12:33:26 +01:00
LuK1337 acaa597a91 lemonadep: Update from OOS 14.0.0.1902(EX01)
Change-Id: Ifd43ebe3d181b10849c493b1e17f11ea2063e481
2025-12-07 17:52:04 +01:00
Michael Bestas c0be1e83e8 lemonadep: Depend on android.hardware.graphics.common-V7
Required for BP3A.

Change-Id: Id071b20aa56d5c2e2717215fa6bb6f16f91198ec
2025-11-21 01:43:15 +02:00
Georg Veichtlbauer 5f9bc4b5b7 lemonadep: overlay: Update deprecated screen power items
* screen.on -> screen.on.display0
* screen.full -> screen.full.display0

AOSP frameworks/base: 8ac63071a4e6da7e0740f5eb6c6753218efcfd3a

Change-Id: Iad50e6cb63368e2d71e6fa1dbb6997c0f95d321e
2025-10-06 11:32:23 +02:00
pjgowtham 39ecce15d6 lemonadep: displayconfig: Correct inverted width and height
The initial densityMapping configuration had references from AOSP
DisplayDeviceConfig.java template which actually has this inverted.
Let's correct it to account for the native portrait orientation in phones.

Change-Id: I07c9567c1d0c72b7ed77c1fe8fdf399bae30dd85
2025-10-02 22:08:52 +01:00
Bruno Martins 7c28a4e67d lemonadep: Move display config file and rename it locally
Change-Id: Ia8c31aaf2e281c8ac50b1c4008ba623d84484d04
2025-10-02 22:05:59 +01:00
LuK1337 3a545e1bd5 lemonadep: Update from OOS 14.0.0.1901(EX01)
Change-Id: I04cbe452c1675594754e4281419229fb019fd2a9
2025-05-13 13:19:03 +02:00
Bruno Martins 6aa2fbd9c6 lemonadep: Switch to PowerShare AIDL
Change-Id: I97400638493a3b9d5a3b87fa6831c9affc7c3def
2025-05-10 11:48:42 +00:00
Bruno Martins 148d2753b0 lemonadep: Migrate Lineage Health to soong_config_set
Change-Id: I2eff39e83b9673aa2989d05de65c646241ba61da
2025-04-29 23:49:41 +01:00
Michael Bestas c10ac4b947 lemonadep: Bump libAlgoProcess android.hardware.graphics.common dep
Change-Id: I6fa3a4fade0b600384e0f25bd5f14eb3d09d97a7
2025-03-09 23:41:17 +02:00
LuK1337 082ffc5c46 lemonadep: audio: Set SND_DEVICE_IN_VOICE_DMIC_TMUS ACDB ID to 41
Fixes: https://gitlab.com/LineageOS/issues/android/-/issues/8422
Change-Id: If241864b79439029057aded8b90a623317110c25
2025-03-02 19:40:31 +01:00
pjgowtham d0ec07ca13 lemonadep: Remove prebuilt audio HAL
Change-Id: I6e2c879d97c9dce7a5731b7b3a4a377583cb91a8
2025-02-07 04:44:31 +02:00
LuK1337 27b5134b0f lemonadep: Pin OOS 13 abl
For some users, bootloader mode crashes with OOS 14 abl.

Change-Id: Ib799befe2b437090b5a593cbc454cc761123dfca
2025-01-26 11:49:40 +00:00
Michael Bestas 9ef997233c lemonadep: Disable OMX service
Change-Id: I5381e098af64271f9d71c484262e1710e8fcacea
2025-01-03 23:24:12 +02:00
LuK1337 6fbaa6abb8 lemonadep: Update from OOS 14.0.0.730(EX01)
Change-Id: I7022ba89d1a163d5f0bb8e112ec5a92da287392c
2024-12-24 12:52:05 +01:00