Skip to content

Initial packages for gyroscope / accelerometer#2692

Draft
gio3k wants to merge 18 commits into
ROCKNIX:nextfrom
gio3k:dev/gio/odin3-gyro
Draft

Initial packages for gyroscope / accelerometer#2692
gio3k wants to merge 18 commits into
ROCKNIX:nextfrom
gio3k:dev/gio/odin3-gyro

Conversation

@gio3k
Copy link
Copy Markdown
Contributor

@gio3k gio3k commented May 11, 2026

Summary

Adds ssc-uinput, hexagonrpc and dependencies of them (notably libssc)

To finish this and get these sensors actually working, we need to:

  • Change the xbox-series InputPlumber target to something that supports gyro
  • Add the IMU to the InputPlumber device configs
  • Add the Hexagon / sensor data files to /usr/share/qcom

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

@gio3k
Copy link
Copy Markdown
Contributor Author

gio3k commented May 13, 2026

@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 extra-firmware/sensors/SM8750/Ayn Odin 3? that looks a bit confusing
maybe a new repo? like sensor-firmware/SM8750/Ayn Odin 3/

take a look at the sensor file structure when you get a chance: https://github.com/user-attachments/files/27588824/message.txt

@spycat88
Copy link
Copy Markdown
Contributor

@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 extra-firmware/sensors/SM8750/Ayn Odin 3? that looks a bit confusing maybe a new repo? like sensor-firmware/SM8750/Ayn Odin 3/

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.

@gio3k
Copy link
Copy Markdown
Contributor Author

gio3k commented May 14, 2026

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

@gio3k gio3k force-pushed the dev/gio/odin3-gyro branch 2 times, most recently from 6f1a89a to 409c72f Compare May 15, 2026 05:19
@aenertia
Copy link
Copy Markdown
Contributor

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.

@r3claimer
Copy link
Copy Markdown
Contributor

Why? this is for SM8750. SM8250 can be added later if possible.

@aenertia
Copy link
Copy Markdown
Contributor

I just meant in context of 'WHERE' such things live.

@gio3k gio3k force-pushed the dev/gio/odin3-gyro branch from 409c72f to 4676cbd Compare May 17, 2026 10:28
@loki666
Copy link
Copy Markdown
Contributor

loki666 commented May 19, 2026

Merged InputPlumber DS5

@gio3k
Copy link
Copy Markdown
Contributor Author

gio3k commented May 20, 2026

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 🙂

@gio3k gio3k force-pushed the dev/gio/odin3-gyro branch from 4676cbd to 8f3aeb8 Compare May 22, 2026 04:13
@gio3k
Copy link
Copy Markdown
Contributor Author

gio3k commented May 23, 2026

Need to remove unused stuff from the protobuf package, install_pkg is ~40M

Comment thread projects/ROCKNIX/packages/tools/inputplumber/package.mk Outdated
@gio3k gio3k force-pushed the dev/gio/odin3-gyro branch 3 times, most recently from 4c325ea to 10f92b0 Compare May 26, 2026 10:44
gio3k added 12 commits May 26, 2026 18:45
Adds Protobuf 33.6, a requirement for libprotobuf-c and by extension 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, requirements of hexagonrpc & libssc

Requires the libprotobuf-c package

Signed-off-by: Gianni Spadoni <me@gio.blue>
Adds the libssc package, a dependency of hexagonrpc

Depends on the libqmi package

Signed-off-by: Gianni Spadoni <me@gio.blue>
NOTE: This package is using the tree from this PR: linux-msm/hexagonrpc#21
Without this PR (by @z3ntu), newer Snapdragon chips won't work (as there are missing calls)

This package comes with the hexagonrpcd service which works alongside libssc

Both this service and the data files in /usr/share/qcom are required for the Qualcomm SSC sensors to work.

Signed-off-by: Gianni Spadoni <me@gio.blue>
ssc-uinput takes data from libssc & hexagonrpc and outputs it as a virtual IMU (through evdev / uinput)

Signed-off-by: Gianni Spadoni <me@gio.blue>
Adds ssc-uinput as an additional package for SM8750 devices

Adds mount matrix info for the Ayn Odin 3

Signed-off-by: Gianni Spadoni <me@gio.blue>
libqmi depends on this package

Signed-off-by: Gianni Spadoni <me@gio.blue>
No need to install protobuf to the device, everything else links to it statically

Signed-off-by: Gianni Spadoni <me@gio.blue>
Contains sensor data for the Qualcomm SSC

The repo needs to be moved to the ROCKNIX organisation

Signed-off-by: Gianni Spadoni <me@gio.blue>
This commit needs to be removed in a rebase

Signed-off-by: Gianni Spadoni <me@gio.blue>
We need to build InputPlumber as SSC support is still unmerged

Pretty standard Rust build

Signed-off-by: Gianni Spadoni <me@gio.blue>
gio3k added 6 commits May 26, 2026 18:45
Accepts the structure used in the sensor-firmware repo

Signed-off-by: Gianni Spadoni <me@gio.blue>
Keeps this stuff we don't need off of the device

Signed-off-by: Gianni Spadoni <me@gio.blue>
Signed-off-by: Gianni Spadoni <me@gio.blue>
Repo was transferred to the org

Signed-off-by: Gianni Spadoni <me@gio.blue>
Signed-off-by: Gianni Spadoni <me@gio.blue>
Easier data structuring

Signed-off-by: Gianni Spadoni <me@gio.blue>
@gio3k gio3k force-pushed the dev/gio/odin3-gyro branch from 10f92b0 to b0bac29 Compare May 26, 2026 10:45

post_makeinstall_target() {
cp -rf ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin/
chmod +x ${INSTALL}/usr/bin/*
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove the commented out lines, also if you chmod 755 the file in your commit then the chmod line is not needed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants