1
0
Fork
You've already forked libssc
0
Library for exposing Qualcomm Sensor Core sensors to Linux.
  • C 74.4%
  • Python 21.6%
  • Meson 3.8%
  • Shell 0.2%
Dylan Van Assche 0da6a755e2
mocking: ssc-server: load libqrtr in Debian
We need to handle this better in a dynamic way.
2025年01月13日 20:17:33 +01:00
data meson.build: mocking Protobuf message dir 2025年01月12日 16:44:37 +01:00
docs docs: stream type attribute and QMI header length 2024年09月27日 18:43:28 +02:00
mocking mocking: ssc-server: load libqrtr in Debian 2025年01月13日 20:17:33 +01:00
src treewide: bump copyright to 2025 2025年01月11日 20:18:01 +01:00
tests treewide: bump copyright to 2025 2025年01月11日 20:18:01 +01:00
utils treewide: bump copyright to 2025 2025年01月11日 20:18:01 +01:00
.gitmodules mocking: add SSC Server for emulating DSP 2024年09月27日 18:43:27 +02:00
CHANGELOG.md mocking: ssc-server: load libqrtr in Debian 2025年01月13日 20:17:33 +01:00
LICENSE LICENSE: fix GPLv3 document 2024年05月25日 08:01:17 +02:00
meson.build CHANGELOG: release v0.2.1 2025年01月12日 17:10:02 +01:00
README.md mocking: ssc-server: allow running with OS libs 2025年01月12日 17:03:02 +01:00
RELEASE.md meson.build: mocking Protobuf message dir 2025年01月12日 16:44:37 +01:00
run-tests.sh tests: run meson reconfigure 2024年09月27日 19:01:29 +02:00

libssc

libssc is a library to expose the sensors managed by the Qualcomm Sensor Core found in many Qualcomm System-on-Chips (SoCs) from 2018 and onwards.

Qualcomm SoCs feature a Sensor Lower Power Island (SLPI) to offload sensors to a dedicated Digital Signal Processor (DSP) for optimizing power consumption and reducing the tasks of the main CPU. This way, the main CPU may enter full suspend while the DSP can detect proximity from the proximity sensor and wake up the main CPU. Direct access to the sensors is prohibited by the hypervisor, thus the only way to access sensors on these SoCs is by talking to the DSP managing these sensors. Libssc performs this task and exposes the sensors as a GLib-based library which allows seamless integration with the existing Linux ecosystem.

Qualcomm, Sensor Low Power Island (SLPI), and Qualcomm Sensor Core are registed trademarks of QUALCOMM Incorporated. Any rights therein are reserved to QUALCOMM Incorporated. Any use by the libssc project is for referential purposes only and does not indicate any sponsorship, endorsement or affiliation between QUALCOMM Incorporated and the libssc project.

Documentation

General information about libssc, documentation, and other information can be found at https://libssc.dylanvanassche.be.

Building

libssc uses the Meson build system with a minimal list of external dependencies:

  • libqmi >=1.33.4
  • glib >= 2.56
  • protobuf-c

libssc tests requires an additional dependency to compile the ProtoBuf messages for simulating the DSP QMI responses:

  • protobuf
  • python-gobject3
  • qrtr-libs
cd build
meson ..
ninja

Linking against libssc

Use pkg-config in your favorite build system to link against libssc. The library is called libssc, in Meson it looks like this:

libssc_dep = dependency('libssc')

Lockdown

Systemd features a lockdown feature to reduce access to resources for services. If libssc is used in a service such as iio-sensor-proxy, make sure access to the address family AF_QIPCRTR otherwise access to the QRTR bus is prohibited.

Tests

Libssc has tests with and without the SSC mocking server to verify also the behavior of libssc when the QMI service is not present. It is advisable to run them separate:

Without mocking server

meson test tests-no-service

With mocking server

./mocking/ssc-server
meson test tests-general

License

Available under the GPLv3 license.
Copyright (c) by libssc Authors (2022-2025)