Initial packages for gyroscope / accelerometer#2692
Conversation
|
@spycat88 where would you like to put the sensor data? I'm not sure if it's fully device specific or not, so I'm a bit torn on putting it in extra-firmware maybe take a look at the sensor file structure when you get a chance: https://github.com/user-attachments/files/27588824/message.txt |
What would you like to do? I'm fine with either. |
|
A new sensor-firmware repo sounds good (I can't make the repo though obv), if you create it I can PR / commit the files |
6f1a89a to
409c72f
Compare
|
Just a bit of an aside - the rp5/flip2; needs a full dump of the android firmware as the rocketboard mbm that's upstream and currently used doesn't include its gyro sensor. So potentially this needs to include such consideration. |
|
Why? this is for SM8750. SM8250 can be added later if possible. |
|
I just meant in context of 'WHERE' such things live. |
409c72f to
4676cbd
Compare
|
Merged InputPlumber DS5 |
Lovely, thanks This PR will be modified soon - I'm working on getting libssc support directly in InputPlumber as a source device instead of going through a virtual device (which was the point of ssc-uinput) InputPlumber has some issues with IMU support though virtual devices, so this should help out a lot If the changes to InputPlumber get accepted, I can remove the ssc-uinput part of this PR 🙂 |
4676cbd to
8f3aeb8
Compare
|
Need to remove unused stuff from the protobuf package, install_pkg is ~40M |
10f92b0 to
b0bac29
Compare
|
The chain is getting a bit cleaner as I've added Qualcomm's official fastrpc tool as a replacement for the patched hexagonrpc we were using This also makes the sensor filesystem a bit closer to what it would be like on Android The install_pkg footprint of this PR is a lot smaller now too: In the next coming days I'll remove hexagonrpc & ssc-uinput and rebase this, can probably cut down these 21 commits to 6 or so |
19c85d5 to
30f8089
Compare
Adds Protobuf 33.6, a requirement for libprotobuf-c and libssc Signed-off-by: Gianni Spadoni <me@gio.blue>
Adds libprotobuf-c, a requirement for libssc Requires the protobuf package Signed-off-by: Gianni Spadoni <me@gio.blue>
Adds libqmi and its dependency libqrtr-glib. Requires the libprotobuf-c package. Signed-off-by: Gianni Spadoni <me@gio.blue>
Adds the libssc package, which powers SSC in InputPlumber. Depends on the libqmi package. Signed-off-by: Gianni Spadoni <me@gio.blue>
libqmi depends on this package. Signed-off-by: Gianni Spadoni <me@gio.blue>
30f8089 to
f5ebd6c
Compare
We need to build InputPlumber as SSC support is still unmerged. Pretty standard Rust build. Signed-off-by: Gianni Spadoni <me@gio.blue>
Contains sensor data for the Qualcomm SSC Signed-off-by: Gianni Spadoni <me@gio.blue> gyro/sensor-firmware: use ROCKNIX/sensor-firmware Repo was transferred to the org Signed-off-by: Gianni Spadoni <me@gio.blue> gyro: update sensor-firmware, use overlayfs Easier data structuring Signed-off-by: Gianni Spadoni <me@gio.blue> sensor-firmware: update package Needed for qcom-fastrpc Signed-off-by: Gianni Spadoni <me@gio.blue>
Handles the HexagonFS Also adds the required packages libbsd, libmd and libyaml Signed-off-by: Gianni Spadoni <me@gio.blue>
qcom-fastrpc expects this (but it also expects /vendor) Signed-off-by: Gianni Spadoni <me@gio.blue>
Adds the packages to SM8750/options & configures the IMU in InputPlumber Signed-off-by: Gianni Spadoni <me@gio.blue>
f5ebd6c to
83a2d40
Compare
| cp -a ${PKG_BUILD}/rootfs/* ${INSTALL} | ||
|
|
||
| mkdir -p ${INSTALL}/usr/bin | ||
| # TODO: change this from debug to release when this PR is ready to merge |
There was a problem hiding this comment.
keep this in mind
|
This PR is ready on this side, but the PR to InputPlumber isn't merged yet. It's a bit weird having my branch being used for the InputPlumber package, so maybe we should just wait for the other PR to get merged or make patch files |
|
@gio3k could you check on what is blocking the InputPlumber PR to move |
|
will do tomorrow |
Summary
Adds support for the SSC sensors used for IMU data on some modern Qualcomm devices
Uses qcom-fastrpc, libssc and dependencies
Sensor data is fetched from https://github.com/ROCKNIX/sensor-firmware, and a virtual "hexagon file system" is created at /tmp/qcom-hexagon-fs (overlayfs for
/usr/share/qcom/and/storage/.config/qcom-hexagon-fs)A basic guide on sourcing this sensor data can be found at: https://github.com/ROCKNIX/sensor-firmware/blob/main/README.md
Calibration note
The sensor firmware contains calibration data for my specific unit. If the gyroscope bias isn't that different between units, then we should be OK (especially in Steam which has its own calibration)
This must be looked into though. Some sort of gyroscope calibration tool would be good
Old PR description
open here
To finish this and get these sensors actually working, we need to:
If a device has the ssc-uinput additional package and has the data files in /usr/share/qcom, the input device should show up in evtest
Virtual IMU
The virtual IMU shows up as "Sunshine gamepad (virtual) motion sensors", as InputPlumber has a whitelist for virtual input devices (see InputPlumber manager.rs)
The IMU values are scaled 100x (with
SSCU_IMU_OUTPUT_SCALE) so InputPlumber works (see InputPlumber translator.rs)Sensor data in /usr/share/qcom
The sensor data can be found downstream in /vendor/etc/sensors and /vendor/etc/acdbdata (see hexagonrpc README)
On this Odin 3, the /usr/share/qcom folder looks like this: message.txt
AI Usage
While ROCKNIX doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it
helps set the right context for reviewers.
Did you use AI tools to help write this code? NO