File: README.md

package info (click to toggle)
libssc 0.3.0-1
  • links: PTS
  • area: main
  • in suites: experimental
  • size: 1,840 kB
  • sloc: ansic: 3,551; python: 647; sh: 15; makefile: 11
file content (83 lines) | stat: -rw-r--r-- 2,627 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# libssc

`libssc` is a library to <b>expose the sensors</b> managed by the <b>Qualcomm Sensor Core</b>
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 <b>Digital Signal Processor (DSP)</b>
for <b>optimizing power consumption</b> and <b>reducing the tasks of the main CPU</b>.
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.
<b>Direct access to the sensors is prohibited</b> 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 <b>exposes the sensors as a GLib-based library</b>
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](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](./LICENSE).<br>
Copyright (c) by libssc Authors (2022-2025)