[libcamera-devel,v3,0/7] Report Android HAL client test pattern modes
mbox series

Message ID 20210428073617.373422-1-hiroh@chromium.org
Headers show
Series
  • Report Android HAL client test pattern modes
Related show

Message

Hirokazu Honda April 28, 2021, 7:36 a.m. UTC
This patch series enables Android HAL implementation to report
sensor test pattern modes.
ChromeOS camera test tests that a camera frame is not corrupted
while it specifies some test pattern mode. If no test pattern
mode is available, the test fails. In order to pass the test,
libcamera needs to report available test pattern modes and
produce camera frames with requested pattern modes.

This patch series does as follows;
0.) Define libcamera test pattern control values.
1.) V4L2Device store all supported test pattern values (index and name) in ControlInfo.
2.) CameraSensor gets the test pattern values (name, etc) via
V4L2Device::controls().
3.) CameraSensor converts them to libcamera test pattern control
values by using a conversion table in CameraSensorDatabase
4.) IPU3 reports the libcamera test pattern control values to Android HAL.
5.) Android HAL convers the libcamera test pattern control values to
Android test pattern values.

Change in v3:
- Rather than adding a new ControlType for menu, the values for name/value of v4l2 menu are stored in ControlInfo together with values for indices.
- Initialize test pattern modes in CameraSensor initialization and use the cached values later.

Change in v2:
- Add (1) and (5) patches to the series

Hirokazu Honda (7):
  libcamera: controls: Add sensor test pattern mode
  libcamera: controls: Add extra control values to ControlInfo
  libcamera: V4L2Device: Support v4l2 menu control
  libcamera: SensorDatabase: Adds table of v4l2 name and test pattern
  libcamera: CameraSensor: Enable retrieving supported test pattern
    modes
  libcamera: pipeline: ipu3: Report available sensor test pattern mode
  android: CameraDevice: Report queried test pattern modes

 include/libcamera/controls.h                 |  5 ++
 include/libcamera/internal/camera_sensor.h   |  5 ++
 include/libcamera/internal/sensor_database.h |  2 +
 include/libcamera/internal/v4l2_device.h     |  3 +
 src/android/camera_device.cpp                | 46 ++++++++++--
 src/libcamera/camera_sensor.cpp              | 40 +++++++++++
 src/libcamera/control_ids.yaml               | 58 ++++++++++++++++
 src/libcamera/controls.cpp                   | 22 ++++++
 src/libcamera/pipeline/ipu3/ipu3.cpp         | 10 +++
 src/libcamera/sensor_database.cpp            | 39 +++++++++--
 src/libcamera/v4l2_device.cpp                | 73 ++++++++++++++++++--
 11 files changed, 285 insertions(+), 18 deletions(-)

--
2.31.1.498.g6c1eba8ee3d-goog