[0/2] Add GyroSensor
mbox series

Message ID 20241014140038.1133270-1-chenghaoyang@chromium.org
Headers show
Series
  • Add GyroSensor
Related show

Message

Harvey Yang Oct. 14, 2024, 1:18 p.m. UTC
Hi folks,

This series of patches adds GyroSensor as a core library class, and a
CrOS implementation that provides gyroscope sensor data via
CameraMojoChannelManagerToken and SensorHalClient APIs.

I believe it's controversial. The reason that the gyro sensor sample
might not be one of the control ids is that applications will pre-queue
capture requests, and they might delay some capture requests due to lack
of buffers or other issues in the upper layers. Counting on capture
requests to deliver real-time gyroscope sensor samples isn't a good
idea.

This passes gitlab pipeline:
https://gitlab.freedesktop.org/chenghaoyang/libcamera/-/pipelines/1289676

Please let me know your concerns and other possible approaches. Thanks!

BR,
Harvey


Harvey Yang (2):
  libcamera: android: include token only in cros_mojo_token.h
  libcamera: Add GyroSensor as a base class

 include/libcamera/internal/gyro_sensor.h |  65 ++++++++
 src/android/cros_mojo_token.h            |   2 +-
 src/libcamera/cros_gyro_sensor.cpp       | 179 +++++++++++++++++++++++
 src/libcamera/gyro_sensor.cpp            |  82 +++++++++++
 src/libcamera/meson.build                |   8 +
 5 files changed, 335 insertions(+), 1 deletion(-)
 create mode 100644 include/libcamera/internal/gyro_sensor.h
 create mode 100644 src/libcamera/cros_gyro_sensor.cpp
 create mode 100644 src/libcamera/gyro_sensor.cpp