SM8750: add rumble/haptics support for AYN Odin 3#3047
Open
simper wants to merge 1 commit into
Open
Conversation
Adds force feedback / rumble support for the AYN Odin 3 (SM8750) using the Qualcomm PMIH0108 HV haptics driver, bridged to the rsinput gamepad driver so that rumble events from games reach the LRA vibration motor. Patches: - 1000: Qualcomm HV haptics driver (from OnePlus SM8750 Android kernel) - 1001: Periodic/sine FF support + usleep->udelay fixes for the driver - 1002: rsinput FF bridge: forwards gamepad FF events to haptics driver - 1003: DTS: add PMIH0108 hv-haptics node + effect/primitive waveforms Kernel config: enable CONFIG_INPUT_QCOM_HV_HAPTICS=m Based on the initial experimental work by Gianni Spadoni (gio3k) in PR ROCKNIX#2613, adapted to the current ROCKNIX next rsinput driver rewrite. Tested on SM8550 (Odin 2) with the same driver approach by r3claimer (ROCKNIX#2519).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds force feedback / rumble support for the AYN Odin 3 (SM8750) using the Qualcomm PMIH0108 HV haptics driver, bridged to the rsinput gamepad driver so rumble events from games reach the LRA vibration motor.
This brings feature parity with SM8550 (Odin 2 / RP6), which already has haptics support merged via #2519.
Background
Armada OS issue #16 ("Enable rumble support") was closed as completed for SM8550 devices, but Odin 3 (SM8750) remains without rumble — the ROCKNIX SM8750 branch only has the base rsinput driver without FF support, and no haptics driver at all.
Gianni Spadoni (@gio3k) wrote experimental haptics patches in his initial Odin 3 PR #2613, but the haptics commits were not carried forward when that PR was partially merged. This PR resurrects and adapts that work.
Changes
1000-input-misc-qcom-hv-haptics-sm8750.patchqcom-hv-haptics.c, 6736 lines). ImplementsFF_CONSTANTandFF_PERIODIC/FF_CUSTOMFIFO streaming for the PMIH0108 LRA actuator. Exportsqcom_spmi_haptics_global_{upload,playback,set_gain}for cross-driver access.1001-haptics-driver-support-periodic-sine-and-fixes.patchFF_SINEwaveform handling,usleep_rangetoudelayfixes for atomic context, and gain-during-playback logic.1002-input-rsinput-sm8750-ff.patchnext(Philippe Simons' rewrite). AddsFF_PERIODICcapability +input_ff_create()to the rsinput gamepad, with upload/playback callbacks that forward events to the haptics driver via its exported API. Includesrumble_enablemodule param for runtime control.1003-arm64-dts-qcom-ayn-cq8725s-common-hv-haptics.patchpmih0108_hv_hapticsnode tocq8725s-ayn-common.dtsiwith SDAM config, LRA parameters, and 6 effect + 9 primitive waveform definitions from AYN's downstream DTS.linux.aarch64.confCONFIG_INPUT_QCOM_HV_HAPTICS=mHow it works
Testing
Not yet tested on hardware. I don't have an Odin 3. This PR is based on:
cab1d7fin PR SM8750: Add support for the Ayn Odin 3 and SM8750 platform #2613)If you have an Odin 3, please test and report back. Build the SM8750 image from this branch, flash, and try rumble in games or
fftest /dev/input/event*.Credits
cab1d7f)qcom-hv-haptics.cdriver sourceAI Usage
AI was used to: research the gap, extract/adapt patches from the original fork, and rewrite the rsinput FF bridge patch to match the current
nextrsinput driver. The actual driver code is from Qualcomm/OnePlus downstream.