[PATCH 0/2] Add GyroSensor

Harvey Yang chenghaoyang at chromium.org
Mon Oct 14 15:18:55 CEST 2024


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

-- 
2.47.0.rc1.288.g06298d1525-goog



More information about the libcamera-devel mailing list