Package: iio-sensor-proxy / 3.7-3

Metadata

Package Version Patches format
iio-sensor-proxy 3.7-3 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
drv iio buffer relocate the .discover method to bring the.patch | (download)

src/drv-iio-buffer-accel.c | 26 13 + 13 - 0 !
src/drv-iio-buffer-compass.c | 26 13 + 13 - 0 !
src/drv-iio-buffer-light.c | 26 13 + 13 - 0 !
3 files changed, 39 insertions(+), 39 deletions(-)

 drv-iio-buffer-*: relocate the .discover method to bring the .open
 and .close methods into scope

To fix #411 [0], the .discover method will now attempt to read from the sensor
buffer. Therefore, it will need to call .open and .close. Relocate the method
to ensure the former are within scope. There is no functional change in the
.discover method.

[0] https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/issues/411

buffer_drv_data_new rework trigger_name handling.patch | (download)

src/drv-iio-buffer-accel.c | 6 1 + 5 - 0 !
src/drv-iio-buffer-compass.c | 10 1 + 9 - 0 !
src/drv-iio-buffer-light.c | 9 1 + 8 - 0 !
src/iio-buffer-utils.c | 9 4 + 5 - 0 !
src/iio-buffer-utils.h | 3 1 + 2 - 0 !
5 files changed, 8 insertions(+), 29 deletions(-)

 buffer_drv_data_new: rework trigger_name handling

In each buffer driver, the get_trigger_name() call is always immediately
followed by a call to buffer_drv_data_new(). To simplify the code,
buffer_drv_data_new() now calls get_trigger_name().  Incidentally,
iio-sensor-proxy does not actually use the buffer sensor's trigger for
anything.

iio buffer attempt to read from buffer during sensor disc.patch | (download)

src/drv-iio-buffer-accel.c | 20 19 + 1 - 0 !
src/drv-iio-buffer-compass.c | 24 21 + 3 - 0 !
src/drv-iio-buffer-light.c | 24 21 + 3 - 0 !
src/iio-buffer-utils.c | 30 20 + 10 - 0 !
src/iio-buffer-utils.h | 2 1 + 1 - 0 !
tests/integration-test.py | 16 14 + 2 - 0 !
6 files changed, 96 insertions(+), 20 deletions(-)

 iio-buffer: attempt to read from buffer during sensor discovery

The kernel drivers for some sensors report support for buffer mode, and allow
the buffer to be enabled, but never return any data in the buffer. Since
59c29aca616f ("drivers: accel: Remove trigger requirement on
iio-buffer-accel"), these sensors fail silently. iio-sensor-proxy must use the
polling method on these sensors.

To achieve this, during sensor discovery, enable the sensor in buffer mode,
then attempt to read data off the buffer. Modify tests in order for the data
file to be opened before startDaemon() is called, since this is now necessary
for sensor discovery.

Fixes: #411 [0]
[0] https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/issues/411

integration test add test for sensors that report non wor.patch | (download)

tests/integration-test.py | 36 36 + 0 - 0 !
1 file changed, 36 insertions(+)

 integration-test: add test for sensors that report non-working
 buffers

Confirm that when a sensor reports support for buffer operation, and the mode
can actually be enabled, but no data is returned, iio-sensor-proxy will detect
this and switch to polling mode.