SM8750: AYN Odin 3 Snapdragon Sensor Core accel+gyro (gyro in games)#3005
Open
aanze wants to merge 4 commits into
Open
SM8750: AYN Odin 3 Snapdragon Sensor Core accel+gyro (gyro in games)#3005aanze wants to merge 4 commits into
aanze wants to merge 4 commits into
Conversation
Add drivers/iio/imu/sns_iio.c (patch 0514) exposing the Snapdragon Sensor Core accel+gyro as a standard IIO device 'bmi323-imu', fed from userspace via /dev/sns_iio_feed. The QMI8658 sits on the ADSP-owned SSC island bus, unreachable from the AP; a userspace daemon reads it over QRTR and feeds the latest 6-axis sample here. A kfifo buffer is attached only so a /dev/iio:deviceN node exists for InputPlumber's udev discovery. CONFIG_SNS_IIO=m. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
New sysutils/odin3-sensors package (SM8750 only, added via ADDITIONAL_PACKAGES): - adsprpcd, built from qualcomm/fastrpc for glibc (LE_ENABLE + USE_SYSLOG, strlcpy shim, no libyaml/libbsd): spawns the ADSP sensorspd static PD and runs the reverse-RPC listener; - snsfeed: reads accel+gyro over QRTR (sns_client) with gyro bias auto-calibration and feeds the sns_iio bridge; - ships the merged Hexagon sensor registry (qcom-hexagon-fs) plus a boot service (stage registry, modprobe sns_iio, run the daemons). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add the bmi323-imu (sns_iio bridge) as an 'imu' source on the Odin 3 composite. InputPlumber routes its motion only to the DualSense (ds5-edge) target; the Xbox profiles have no motion capability and ignore it, so gyro is DualSense-profile-only with no extra logic. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The qcom-hexagon-fs registry/config files come from the ROCKNIX/sensor-firmware project, which collects the AYN Odin 3 SSC registry and calibration data. This package builds on that foundation. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
The QMI8658 sits on the ADSP-owned Snapdragon Sensor Core (SSC) island bus — unreachable from the AP directly. Android reads it through the sensor DSP; this PR does the same:
odin3-sensorspackage (sysutils/, SM8750-gated viaADDITIONAL_PACKAGES):adsprpcd— built from qualcomm/fastrpc for glibc — spawns the ADSPsensorspdstatic PD (mainline fastrpc, no kernel changes) and runs the reverse-RPC listener;snsfeedreads accel+gyro over QRTR (sns_client) with gyro bias auto-calibration; ships the Hexagon sensor registry (qcom-hexagon-fs) + a boot service.sns_iiokernel module (patch 0514,CONFIG_SNS_IIO=m): exposes accel+gyro as a standard IIO device, fed from userspace via/dev/sns_iio_feed.imusource → motion routes to the DualSense (ds5-edge) target. Works with stock InputPlumber (no fork).Credit: the sensor registry data comes from Gio's ROCKNIX/sensor-firmware — all credit for collecting the Odin 3 SSC registry/calibration data goes there.
Note (transparency): Gio is also adding SSC support inside InputPlumber via libssc. This PR takes a different last-mile — a userspace-fed standard IIO device consumed by stock InputPlumber, so the sensors are also usable by anything reading
/sys/bus/iioand there's no InputPlumber fork to maintain. Trade-off: the IIO bridge is poll-based vs Gio's event-driven path (his is better for very precise aiming). Flagging so the two efforts don't collide — happy to align/merge approaches.Testing
Additional Context
ds5-edgeis the default target, so gyro is active by default — no extra config needed, no dependency on other changes.bmi323-imuso InputPlumber'siio_imudriver binds via its glob). Suggested review focus: the fastrpc build recipe in the package, and the compositeimusource.AI Usage
Did you use AI tools to help write this code? YES