[libcamera-devel,5/9] android: Add pipeline_config_file parameter for camera_hal.yaml
diff mbox series

Message ID 20220209071917.559993-6-hanlinchen@chromium.org
State New
Headers show
Series
  • Introduce Pipeline configuration preference for IPU3
Related show

Commit Message

Hanlin Chen Feb. 9, 2022, 7:19 a.m. UTC
Add pipeline_config_file parameter for camera_hal.yaml for the ipu3
devices of ChromeOS, which specify a path to a pipeline configuration
file for a camera, and could be empty if no configuration is provided.

The configuration files for soraka [1] and nautilus [2] are added, which
are copied and converted to yaml format from the ChromeOS repos. See:

[1] https://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/master/baseboard-poppy/media-libs/cros-camera-hal-configs-poppy/files/gcss
[2] https://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/refs/heads/main/overlay-nautilus/media-libs/cros-camera-hal-configs-nautilus/files/gcss/

Signed-off-by: Han-Lin Chen <hanlinchen@chromium.org>
---
 src/android/camera_hal_config.cpp         |  17 ++
 src/android/camera_hal_config.h           |   1 +
 src/android/data/nautilus/camera_hal.yaml |   2 +
 src/android/data/nautilus/imx258.yaml     | 248 ++++++++++++++++++++++
 src/android/data/soraka/camera_hal.yaml   |   2 +
 src/android/data/soraka/ov13858.yaml      | 236 ++++++++++++++++++++
 src/android/data/soraka/ov5670.yaml       | 242 +++++++++++++++++++++
 7 files changed, 748 insertions(+)
 create mode 100644 src/android/data/nautilus/imx258.yaml
 create mode 100644 src/android/data/soraka/ov13858.yaml
 create mode 100644 src/android/data/soraka/ov5670.yaml

Comments

Laurent Pinchart April 6, 2022, 1:35 a.m. UTC | #1
Hi Han-Lin,

Thank you for the patch.

On Wed, Feb 09, 2022 at 03:19:13PM +0800, Han-Lin Chen wrote:
> Add pipeline_config_file parameter for camera_hal.yaml for the ipu3
> devices of ChromeOS, which specify a path to a pipeline configuration
> file for a camera, and could be empty if no configuration is provided.
> 
> The configuration files for soraka [1] and nautilus [2] are added, which
> are copied and converted to yaml format from the ChromeOS repos. See:
> 
> [1] https://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/master/baseboard-poppy/media-libs/cros-camera-hal-configs-poppy/files/gcss
> [2] https://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/refs/heads/main/overlay-nautilus/media-libs/cros-camera-hal-configs-nautilus/files/gcss/
> 
> Signed-off-by: Han-Lin Chen <hanlinchen@chromium.org>
> ---
>  src/android/camera_hal_config.cpp         |  17 ++
>  src/android/camera_hal_config.h           |   1 +
>  src/android/data/nautilus/camera_hal.yaml |   2 +
>  src/android/data/nautilus/imx258.yaml     | 248 ++++++++++++++++++++++
>  src/android/data/soraka/camera_hal.yaml   |   2 +
>  src/android/data/soraka/ov13858.yaml      | 236 ++++++++++++++++++++
>  src/android/data/soraka/ov5670.yaml       | 242 +++++++++++++++++++++
>  7 files changed, 748 insertions(+)
>  create mode 100644 src/android/data/nautilus/imx258.yaml
>  create mode 100644 src/android/data/soraka/ov13858.yaml
>  create mode 100644 src/android/data/soraka/ov5670.yaml
> 
> diff --git a/src/android/camera_hal_config.cpp b/src/android/camera_hal_config.cpp
> index 54611956..f378df9d 100644
> --- a/src/android/camera_hal_config.cpp
> +++ b/src/android/camera_hal_config.cpp
> @@ -40,6 +40,7 @@ private:
>  	int parseCameraConfigData(const std::string &cameraId, const YamlObject &);
>  	int parseLocation(const YamlObject &, CameraConfigData &cameraConfigData);
>  	int parseRotation(const YamlObject &, CameraConfigData &cameraConfigData);
> +	int parsePipelineConf(const YamlObject &, CameraConfigData &cameraConfigData);
>  
>  	std::map<std::string, CameraConfigData> *cameras_;
>  	YamlParser yamlParser_;
> @@ -63,11 +64,13 @@ int CameraHalConfig::Private::parseConfigFile(FILE *fh,
>  	 *   "camera0 id":
>  	 *     location: value
>  	 *     rotation: value
> +	 *     pipeline_config_file: path
>  	 *     ...
>  	 *
>  	 *   "camera1 id":
>  	 *     location: value
>  	 *     rotation: value
> +	 *     pipeline_config_file: path

Hmmmm... I'm in two minds about this.

On one hand, the HAL layer is a user of the libcamera public API,
similarly to other applications using the libcamera native API, so it
can make sense to consider it as the entity in charge of passing the
configuration file name to libcamera. On the other hand, I think we need
the ability to have a system-wide configuration file for the libcamera
code (including the pipeline handlers, excluding the HAL) as we don't
want to force applications to supply a configuration file in the general
case. This will also be needed when using the V4L2 adaptation layer, as
it can't supply a configuration file to libcamera (well, technically
speaking it could, but that would have to be a system-wide file, so
libcamera could read that default system-wide file directly), and the
GStreamer element would also need something similar I believe (we have a
bit more flexibility here, we could add a property to libcamerasrc to
specific a configuration file, but I'm not sure that's desirable). That
system-wide configuration file  could thus also be used when libcamera
is used through the HAL.

>  	 *     ...
>  	 */
>  
> @@ -116,6 +119,10 @@ int CameraHalConfig::Private::parseCameraConfigData(const std::string &cameraId,
>  	if (parseRotation(cameraObject, cameraConfigData))
>  		return -EINVAL;
>  
> +	/* Parse property "pipeline_config_file" */
> +	if (parsePipelineConf(cameraObject, cameraConfigData))
> +		return -EINVAL;
> +
>  	(*cameras_)[cameraId] = cameraConfigData;
>  
>  	return 0;
> @@ -157,6 +164,16 @@ int CameraHalConfig::Private::parseRotation(const YamlObject &cameraObject,
>  	return 0;
>  }
>  
> +int CameraHalConfig::Private::parsePipelineConf(const YamlObject &cameraObject,
> +						CameraConfigData &cameraConfigData)
> +{
> +	if (!cameraObject.isMember("pipeline_config_file"))
> +		return -EINVAL;

Shouldn't the pipeline configuration file be optional ?

> +
> +	cameraConfigData.pipelineConfigFile = cameraObject.get("pipeline_config_file").asString();
> +	return 0;
> +}
> +
>  CameraHalConfig::CameraHalConfig()
>  	: Extensible(std::make_unique<Private>()), exists_(false), valid_(false)
>  {
> diff --git a/src/android/camera_hal_config.h b/src/android/camera_hal_config.h
> index 9df554f9..3a905c92 100644
> --- a/src/android/camera_hal_config.h
> +++ b/src/android/camera_hal_config.h
> @@ -15,6 +15,7 @@
>  struct CameraConfigData {
>  	int facing = -1;
>  	int rotation = -1;
> +	std::string pipelineConfigFile;
>  };
>  
>  class CameraHalConfig final : public libcamera::Extensible
> diff --git a/src/android/data/nautilus/camera_hal.yaml b/src/android/data/nautilus/camera_hal.yaml
> index faddd29e..18a2b7a9 100644
> --- a/src/android/data/nautilus/camera_hal.yaml
> +++ b/src/android/data/nautilus/camera_hal.yaml
> @@ -2,7 +2,9 @@ cameras:
>    "\\_SB_.PCI0.I2C2.CAM0":
>      location: back
>      rotation: 0
> +    pipeline_config_file: "/etc/camera/libcamera/imx258.yaml"
>  
>    "\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647":
>      location: front
>      rotation: 0
> +    pipeline_config_file: ""
> diff --git a/src/android/data/nautilus/imx258.yaml b/src/android/data/nautilus/imx258.yaml
> new file mode 100644
> index 00000000..be52e752
> --- /dev/null
> +++ b/src/android/data/nautilus/imx258.yaml
> @@ -0,0 +1,248 @@
> +still_mode:
> +- bds: [4208, 3116]
> +  cio2: [4208, 3118]
> +  gdc: [4096, 3072]
> +  iff: [4208, 3116]
> +  main: [4096, 3072]
> +  viewfinder: [0, 0]

While both are valid and parse the same way, I think

still_mode:
  - bds: [4208, 3116]
    cio2: [4208, 3118]
    gdc: [4096, 3072]
    iff: [4208, 3116]
    main: [4096, 3072]
    viewfinder: [0, 0]

would avoid confusion, given how the indentation matters in

still_mode:
bds: [4208, 3116]
cio2: [4208, 3118]

vs.

still_mode:
  bds: [4208, 3116]
  cio2: [4208, 3118]

I'm also tempted to support writing sizes as

still_mode:
  - bds: 4208x3116
    cio2: 4208x3118
    gdc: 4096x3072
    iff: 4208x3116
    main: 4096x3072
    viewfinder: 0x0

(which would of course require adapting the asSize() function of the
YamlObject class). What do you think ?

Regarding the structure of the YAML file itself, maybe we should use
something like

still_mode:
  4096x3072:
    bds: [4208, 3116]
    cio2: [4208, 3118]
    gdc: [4096, 3072]
    iff: [4208, 3116]
    main: [4096, 3072]
    viewfinder: [0, 0]
  1920x1080:
    bds: [1968, 1184]
    cio2: [4208, 3118]
    gdc: [1920, 1080]
    iff: [4182, 2516]
    main: [1920, 1080]
    viewfinder: [0, 0]
  ...

which I think would not only make it a bit more readable, but also
prevent multiple configurations with identical output sizes. The name of
each mode entry is meaningless, it's just there for readability, and the
naming scheme would need to also allow specifying the viewfinder output
size where applicable.

One downside is that this would allow a mismatch between the mode name
and the configuration, one could write

still_mode:
  4096x3072:
    bds: [4208, 3116]
    cio2: [4208, 3118]
    gdc: [4096, 3072]
    iff: [4208, 3116]
    main: [4096, 3070]
    viewfinder: [0, 0]

and that wouldn't result in any error at runtime. Matching the main and
viewfinder resolutions with the mode name could be done, but that's
likely overkill.

Finally, it could be nice if the actual configuration files could be
moved to a different patch, reviewing them here is a bit more difficult
as their format hasn't been introduced yet.

> +- bds: [1968, 1184]
> +  cio2: [4208, 3118]
> +  gdc: [1920, 1080]
> +  iff: [4182, 2516]
> +  main: [1920, 1080]
> +  viewfinder: [0, 0]
> +- bds: [1632, 1216]
> +  cio2: [4208, 3118]
> +  gdc: [1600, 1200]
> +  iff: [4182, 3116]
> +  main: [1600, 1200]
> +  viewfinder: [0, 0]
> +- bds: [1632, 1216]
> +  cio2: [4208, 3118]
> +  gdc: [1600, 1200]
> +  iff: [4182, 3116]
> +  main: [1280, 960]
> +  viewfinder: [0, 0]
> +- bds: [1968, 1184]
> +  cio2: [4208, 3118]
> +  gdc: [1920, 1080]
> +  iff: [4182, 2516]
> +  main: [1280, 720]
> +  viewfinder: [0, 0]
> +- bds: [1632, 1216]
> +  cio2: [4208, 3118]
> +  gdc: [1600, 1200]
> +  iff: [4182, 3116]
> +  main: [640, 480]
> +  viewfinder: [0, 0]
> +- bds: [1632, 1216]
> +  cio2: [4208, 3118]
> +  gdc: [1600, 1200]
> +  iff: [4182, 3116]
> +  main: [320, 240]
> +  viewfinder: [0, 0]
> +video_mode:
> +- bds: [4208, 3116]
> +  cio2: [4208, 3118]
> +  gdc: [4096, 3072]
> +  iff: [4208, 3116]
> +  main: [4096, 3072]
> +  viewfinder: [0, 0]
> +- bds: [1968, 1184]
> +  cio2: [4208, 3118]
> +  gdc: [1920, 1080]
> +  iff: [4182, 2516]
> +  main: [1920, 1080]
> +  viewfinder: [0, 0]
> +- bds: [1632, 1216]
> +  cio2: [4208, 3118]
> +  gdc: [1600, 1200]
> +  iff: [4182, 3116]
> +  main: [1600, 1200]
> +  viewfinder: [0, 0]
> +- bds: [1632, 1216]
> +  cio2: [4208, 3118]
> +  gdc: [1600, 1200]
> +  iff: [4182, 3116]
> +  main: [1280, 960]
> +  viewfinder: [0, 0]
> +- bds: [1968, 1184]
> +  cio2: [4208, 3118]
> +  gdc: [1920, 1080]
> +  iff: [4182, 2516]
> +  main: [1280, 720]
> +  viewfinder: [0, 0]
> +- bds: [1632, 1216]
> +  cio2: [4208, 3118]
> +  gdc: [1600, 1200]
> +  iff: [4182, 3116]
> +  main: [640, 480]
> +  viewfinder: [0, 0]
> +- bds: [1632, 1216]
> +  cio2: [4208, 3118]
> +  gdc: [1600, 1200]
> +  iff: [4182, 3116]
> +  main: [320, 240]
> +  viewfinder: [0, 0]
> +- bds: [4208, 3116]
> +  cio2: [4208, 3118]
> +  gdc: [4160, 3072]
> +  iff: [4208, 3116]
> +  main: [4096, 3072]
> +  viewfinder: [4096, 3072]
> +- bds: [4208, 3116]
> +  cio2: [4208, 3118]
> +  gdc: [4160, 3072]
> +  iff: [4208, 3116]
> +  main: [4096, 3072]
> +  viewfinder: [1920, 1080]
> +- bds: [4208, 3116]
> +  cio2: [4208, 3118]
> +  gdc: [4096, 3072]
> +  iff: [4208, 3116]
> +  main: [4096, 3072]
> +  viewfinder: [1600, 1200]
> +- bds: [4208, 3116]
> +  cio2: [4208, 3118]
> +  gdc: [4096, 3072]
> +  iff: [4208, 3116]
> +  main: [4096, 3072]
> +  viewfinder: [1280, 960]
> +- bds: [4208, 3116]
> +  cio2: [4208, 3118]
> +  gdc: [4160, 3072]
> +  iff: [4208, 3116]
> +  main: [4096, 3072]
> +  viewfinder: [1280, 720]
> +- bds: [4208, 3116]
> +  cio2: [4208, 3118]
> +  gdc: [4096, 3072]
> +  iff: [4208, 3116]
> +  main: [4096, 3072]
> +  viewfinder: [640, 480]
> +- bds: [4208, 3116]
> +  cio2: [4208, 3118]
> +  gdc: [4096, 3072]
> +  iff: [4208, 3116]
> +  main: [4096, 3072]
> +  viewfinder: [320, 240]
> +- bds: [1968, 1184]
> +  cio2: [4208, 3118]
> +  gdc: [1920, 1080]
> +  iff: [4182, 2516]
> +  main: [1920, 1080]
> +  viewfinder: [1920, 1080]
> +- bds: [1968, 1440]
> +  cio2: [4208, 3118]
> +  gdc: [1920, 1424]
> +  iff: [4182, 3060]
> +  main: [1920, 1080]
> +  viewfinder: [1600, 1200]
> +- bds: [1968, 1440]
> +  cio2: [4208, 3118]
> +  gdc: [1920, 1424]
> +  iff: [4182, 3060]
> +  main: [1920, 1080]
> +  viewfinder: [1280, 960]
> +- bds: [1968, 1184]
> +  cio2: [4208, 3118]
> +  gdc: [1920, 1080]
> +  iff: [4182, 2516]
> +  main: [1920, 1080]
> +  viewfinder: [1280, 720]
> +- bds: [1968, 1440]
> +  cio2: [4208, 3118]
> +  gdc: [1920, 1424]
> +  iff: [4182, 3060]
> +  main: [1920, 1080]
> +  viewfinder: [640, 480]
> +- bds: [1968, 1440]
> +  cio2: [4208, 3118]
> +  gdc: [1920, 1424]
> +  iff: [4182, 3060]
> +  main: [1920, 1080]
> +  viewfinder: [320, 240]
> +- bds: [1632, 1216]
> +  cio2: [4208, 3118]
> +  gdc: [1600, 1200]
> +  iff: [4182, 3116]
> +  main: [1600, 1200]
> +  viewfinder: [1600, 1200]
> +- bds: [1632, 1216]
> +  cio2: [4208, 3118]
> +  gdc: [1600, 1200]
> +  iff: [4182, 3116]
> +  main: [1600, 1200]
> +  viewfinder: [1280, 960]
> +- bds: [1680, 1240]
> +  cio2: [4208, 3118]
> +  gdc: [1664, 1200]
> +  iff: [4200, 3100]
> +  main: [1600, 1200]
> +  viewfinder: [1280, 720]
> +- bds: [1632, 1216]
> +  cio2: [4208, 3118]
> +  gdc: [1600, 1200]
> +  iff: [4182, 3116]
> +  main: [1600, 1200]
> +  viewfinder: [640, 480]
> +- bds: [1632, 1216]
> +  cio2: [4208, 3118]
> +  gdc: [1600, 1200]
> +  iff: [4182, 3116]
> +  main: [1600, 1200]
> +  viewfinder: [320, 240]
> +- bds: [1344, 992]
> +  cio2: [4208, 3118]
> +  gdc: [1280, 960]
> +  iff: [4200, 3100]
> +  main: [1280, 960]
> +  viewfinder: [1280, 960]
> +- bds: [1400, 1036]
> +  cio2: [4208, 3118]
> +  gdc: [1344, 960]
> +  iff: [4200, 3108]
> +  main: [1280, 960]
> +  viewfinder: [1280, 720]
> +- bds: [1344, 992]
> +  cio2: [4208, 3118]
> +  gdc: [1280, 960]
> +  iff: [4200, 3100]
> +  main: [1280, 960]
> +  viewfinder: [640, 480]
> +- bds: [1344, 992]
> +  cio2: [4208, 3118]
> +  gdc: [1280, 960]
> +  iff: [4200, 3100]
> +  main: [1280, 960]
> +  viewfinder: [320, 240]
> +- bds: [1288, 800]
> +  cio2: [4208, 3118]
> +  gdc: [1280, 720]
> +  iff: [4186, 2600]
> +  main: [1280, 720]
> +  viewfinder: [1280, 720]
> +- bds: [1312, 960]
> +  cio2: [4208, 3118]
> +  gdc: [1280, 952]
> +  iff: [4182, 3060]
> +  main: [1280, 720]
> +  viewfinder: [640, 480]
> +- bds: [1312, 960]
> +  cio2: [4208, 3118]
> +  gdc: [1280, 952]
> +  iff: [4182, 3060]
> +  main: [1280, 720]
> +  viewfinder: [320, 240]
> +- bds: [700, 520]
> +  cio2: [2104, 1560]
> +  gdc: [640, 480]
> +  iff: [2100, 1560]
> +  main: [640, 480]
> +  viewfinder: [320, 240]
> +- bds: [364, 276]
> +  cio2: [4208, 3118]
> +  gdc: [320, 240]
> +  iff: [1456, 1104]
> +  main: [320, 240]
> +  viewfinder: [320, 240]
> diff --git a/src/android/data/soraka/camera_hal.yaml b/src/android/data/soraka/camera_hal.yaml
> index 2e996403..6f0062e9 100644
> --- a/src/android/data/soraka/camera_hal.yaml
> +++ b/src/android/data/soraka/camera_hal.yaml
> @@ -2,7 +2,9 @@ cameras:
>    "\\_SB_.PCI0.I2C4.CAM1":
>      location: front
>      rotation: 0
> +    pipeline_config_file: "/etc/camera/libcamera/ov5670.yaml"
>  
>    "\\_SB_.PCI0.I2C2.CAM0":
>      location: back
>      rotation: 0
> +    pipeline_config_file: "/etc/camera/libcamera/ov13858.yaml"
> diff --git a/src/android/data/soraka/ov13858.yaml b/src/android/data/soraka/ov13858.yaml
> new file mode 100644
> index 00000000..c6f4d091
> --- /dev/null
> +++ b/src/android/data/soraka/ov13858.yaml
> @@ -0,0 +1,236 @@
> +still_mode:
> +- bds: [4224, 3136]
> +  cio2: [4224, 3136]
> +  gdc: [4096, 3072]
> +  iff: [4224, 3136]
> +  main: [640, 480]
> +  viewfinder: [0, 0]
> +- bds: [4224, 3136]
> +  cio2: [4224, 3136]
> +  gdc: [4096, 3072]
> +  iff: [4224, 3136]
> +  main: [320, 240]
> +  viewfinder: [0, 0]
> +- bds: [4216, 2386]
> +  cio2: [4224, 3136]
> +  gdc: [4128, 2322]
> +  iff: [4216, 2386]
> +  main: [1920, 1080]
> +  viewfinder: [0, 0]
> +- bds: [4216, 2386]
> +  cio2: [4224, 3136]
> +  gdc: [4128, 2322]
> +  iff: [4216, 2386]
> +  main: [1280, 720]
> +  viewfinder: [0, 0]
> +- bds: [4224, 3136]
> +  cio2: [4224, 3136]
> +  gdc: [4096, 3072]
> +  iff: [4224, 3136]
> +  main: [1280, 960]
> +  viewfinder: [0, 0]
> +- bds: [4224, 3136]
> +  cio2: [4224, 3136]
> +  gdc: [4096, 3072]
> +  iff: [4224, 3136]
> +  main: [1600, 1200]
> +  viewfinder: [0, 0]
> +- bds: [4224, 3136]
> +  cio2: [4224, 3136]
> +  gdc: [4096, 3072]
> +  iff: [4224, 3136]
> +  main: [4096, 3072]
> +  viewfinder: [0, 0]
> +video_mode:
> +- bds: [4224, 3136]
> +  cio2: [4224, 3136]
> +  gdc: [4096, 3072]
> +  iff: [4224, 3136]
> +  main: [4096, 3072]
> +  viewfinder: [1920, 1080]
> +- bds: [1984, 1184]
> +  cio2: [4224, 3136]
> +  gdc: [1920, 1080]
> +  iff: [4216, 2516]
> +  main: [1920, 1080]
> +  viewfinder: [0, 0]
> +- bds: [4224, 3136]
> +  cio2: [4224, 3136]
> +  gdc: [4096, 3072]
> +  iff: [4224, 3136]
> +  main: [4096, 3072]
> +  viewfinder: [1280, 720]
> +- bds: [1984, 1184]
> +  cio2: [4224, 3136]
> +  gdc: [1920, 1080]
> +  iff: [4216, 2516]
> +  main: [1280, 720]
> +  viewfinder: [0, 0]
> +- bds: [4224, 3136]
> +  cio2: [4224, 3136]
> +  gdc: [4096, 3072]
> +  iff: [4224, 3136]
> +  main: [4096, 3072]
> +  viewfinder: [640, 480]
> +- bds: [4224, 3136]
> +  cio2: [4224, 3136]
> +  gdc: [4096, 3072]
> +  iff: [4224, 3136]
> +  main: [4096, 3072]
> +  viewfinder: [1280, 960]
> +- bds: [1632, 1216]
> +  cio2: [4224, 3136]
> +  gdc: [1600, 1200]
> +  iff: [4182, 3116]
> +  main: [1280, 960]
> +  viewfinder: [0, 0]
> +- bds: [4224, 3136]
> +  cio2: [4224, 3136]
> +  gdc: [4096, 3072]
> +  iff: [4224, 3136]
> +  main: [4096, 3072]
> +  viewfinder: [1600, 1200]
> +- bds: [4224, 3136]
> +  cio2: [4224, 3136]
> +  gdc: [4096, 3072]
> +  iff: [4224, 3136]
> +  main: [4096, 3072]
> +  viewfinder: [320, 240]
> +- bds: [1296, 800]
> +  cio2: [4224, 3136]
> +  gdc: [1280, 720]
> +  iff: [4212, 2600]
> +  main: [1280, 720]
> +  viewfinder: [1280, 720]
> +- bds: [1296, 960]
> +  cio2: [4224, 3136]
> +  gdc: [1280, 952]
> +  iff: [4212, 3120]
> +  main: [1280, 720]
> +  viewfinder: [640, 480]
> +- bds: [4224, 3136]
> +  cio2: [4224, 3136]
> +  gdc: [4160, 3120]
> +  iff: [4224, 3136]
> +  main: [1920, 1080]
> +  viewfinder: [1600, 1200]
> +- bds: [1984, 1472]
> +  cio2: [4224, 3136]
> +  gdc: [1920, 1432]
> +  iff: [4216, 3128]
> +  main: [1920, 1080]
> +  viewfinder: [1600, 1200]
> +- bds: [1296, 960]
> +  cio2: [4224, 3136]
> +  gdc: [1280, 952]
> +  iff: [4212, 3120]
> +  main: [1280, 720]
> +  viewfinder: [320, 240]
> +- bds: [1984, 1184]
> +  cio2: [4224, 3136]
> +  gdc: [1920, 1080]
> +  iff: [4216, 2516]
> +  main: [1920, 1080]
> +  viewfinder: [1920, 1080]
> +- bds: [1984, 1184]
> +  cio2: [4224, 3136]
> +  gdc: [1920, 1080]
> +  iff: [4216, 2516]
> +  main: [1920, 1080]
> +  viewfinder: [1280, 720]
> +- bds: [1984, 1472]
> +  cio2: [4224, 3136]
> +  gdc: [1920, 1432]
> +  iff: [4216, 3128]
> +  main: [1920, 1080]
> +  viewfinder: [640, 480]
> +- bds: [1984, 1472]
> +  cio2: [4224, 3136]
> +  gdc: [1920, 1432]
> +  iff: [4216, 3128]
> +  main: [1920, 1080]
> +  viewfinder: [1280, 960]
> +- bds: [1984, 1472]
> +  cio2: [4224, 3136]
> +  gdc: [1920, 1432]
> +  iff: [4216, 3128]
> +  main: [1920, 1080]
> +  viewfinder: [320, 240]
> +- bds: [1688, 1248]
> +  cio2: [4224, 3136]
> +  gdc: [1664, 1200]
> +  iff: [4220, 3120]
> +  main: [1600, 1200]
> +  viewfinder: [1280, 720]
> +- bds: [1632, 1216]
> +  cio2: [4224, 3136]
> +  gdc: [1600, 1200]
> +  iff: [4182, 3116]
> +  main: [1600, 1200]
> +  viewfinder: [640, 480]
> +- bds: [1632, 1216]
> +  cio2: [4224, 3136]
> +  gdc: [1600, 1200]
> +  iff: [4182, 3116]
> +  main: [1600, 1200]
> +  viewfinder: [1280, 960]
> +- bds: [1632, 1216]
> +  cio2: [4224, 3136]
> +  gdc: [1600, 1200]
> +  iff: [4182, 3116]
> +  main: [1600, 1200]
> +  viewfinder: [1600, 1200]
> +- bds: [1632, 1216]
> +  cio2: [4224, 3136]
> +  gdc: [1600, 1200]
> +  iff: [4182, 3116]
> +  main: [1600, 1200]
> +  viewfinder: [320, 240]
> +- bds: [1376, 1024]
> +  cio2: [4224, 3136]
> +  gdc: [1344, 960]
> +  iff: [4214, 3136]
> +  main: [1280, 960]
> +  viewfinder: [1280, 720]
> +- bds: [1344, 992]
> +  cio2: [4224, 3136]
> +  gdc: [1280, 960]
> +  iff: [4200, 3100]
> +  main: [1280, 960]
> +  viewfinder: [640, 480]
> +- bds: [1344, 992]
> +  cio2: [4224, 3136]
> +  gdc: [1280, 960]
> +  iff: [4200, 3100]
> +  main: [1280, 960]
> +  viewfinder: [1280, 960]
> +- bds: [1344, 992]
> +  cio2: [4224, 3136]
> +  gdc: [1280, 960]
> +  iff: [4200, 3100]
> +  main: [1280, 960]
> +  viewfinder: [320, 240]
> +- bds: [1632, 1216]
> +  cio2: [4224, 3136]
> +  gdc: [1600, 1200]
> +  iff: [4182, 3116]
> +  main: [640, 480]
> +  viewfinder: [0, 0]
> +- bds: [1632, 1216]
> +  cio2: [4224, 3136]
> +  gdc: [1600, 1200]
> +  iff: [4182, 3116]
> +  main: [320, 240]
> +  viewfinder: [0, 0]
> +- bds: [1632, 1216]
> +  cio2: [4224, 3136]
> +  gdc: [1600, 1200]
> +  iff: [4182, 3116]
> +  main: [1600, 1200]
> +  viewfinder: [0, 0]
> +- bds: [4224, 3136]
> +  cio2: [4224, 3136]
> +  gdc: [4096, 3072]
> +  iff: [4224, 3136]
> +  main: [4096, 3072]
> +  viewfinder: [0, 0]
> diff --git a/src/android/data/soraka/ov5670.yaml b/src/android/data/soraka/ov5670.yaml
> new file mode 100644
> index 00000000..35ad8684
> --- /dev/null
> +++ b/src/android/data/soraka/ov5670.yaml
> @@ -0,0 +1,242 @@
> +still_mode:
> +- bds: [2592, 1944]
> +  cio2: [2592, 1944]
> +  gdc: [2560, 1920]
> +  iff: [2592, 1944]
> +  main: [1600, 1200]
> +  viewfinder: [0, 0]
> +- bds: [2592, 1944]
> +  cio2: [2592, 1944]
> +  gdc: [2560, 1920]
> +  iff: [2592, 1944]
> +  main: [1280, 960]
> +  viewfinder: [0, 0]
> +- bds: [2592, 1944]
> +  cio2: [2592, 1944]
> +  gdc: [2560, 1920]
> +  iff: [2592, 1944]
> +  main: [2560, 1920]
> +  viewfinder: [0, 0]
> +- bds: [2592, 1944]
> +  cio2: [2592, 1944]
> +  gdc: [2560, 1920]
> +  iff: [2592, 1944]
> +  main: [1920, 1080]
> +  viewfinder: [0, 0]
> +- bds: [2592, 1944]
> +  cio2: [2592, 1944]
> +  gdc: [2560, 1920]
> +  iff: [2592, 1944]
> +  main: [1280, 720]
> +  viewfinder: [0, 0]
> +- bds: [2592, 1944]
> +  cio2: [2592, 1944]
> +  gdc: [2560, 1920]
> +  iff: [2592, 1944]
> +  main: [640, 480]
> +  viewfinder: [0, 0]
> +- bds: [2592, 1944]
> +  cio2: [2592, 1944]
> +  gdc: [2560, 1920]
> +  iff: [2592, 1944]
> +  main: [320, 240]
> +  viewfinder: [0, 0]
> +video_mode:
> +- bds: [1952, 1152]
> +  cio2: [2592, 1944]
> +  gdc: [1920, 1080]
> +  iff: [2562, 1512]
> +  main: [1920, 1080]
> +  viewfinder: [1920, 1080]
> +- bds: [2592, 1944]
> +  cio2: [2592, 1944]
> +  gdc: [2560, 1920]
> +  iff: [2592, 1944]
> +  main: [2560, 1920]
> +  viewfinder: [1920, 1080]
> +- bds: [1952, 1152]
> +  cio2: [2592, 1944]
> +  gdc: [1920, 1080]
> +  iff: [2562, 1512]
> +  main: [1920, 1080]
> +  viewfinder: [0, 0]
> +- bds: [1952, 1152]
> +  cio2: [2592, 1944]
> +  gdc: [1920, 1080]
> +  iff: [2562, 1512]
> +  main: [1920, 1080]
> +  viewfinder: [1280, 720]
> +- bds: [1296, 972]
> +  cio2: [2592, 1944]
> +  gdc: [1280, 960]
> +  iff: [2592, 1944]
> +  main: [1280, 960]
> +  viewfinder: [1280, 720]
> +- bds: [1296, 804]
> +  cio2: [2592, 1944]
> +  gdc: [1280, 720]
> +  iff: [2592, 1608]
> +  main: [1280, 720]
> +  viewfinder: [1280, 720]
> +- bds: [1632, 1216]
> +  cio2: [2592, 1944]
> +  gdc: [1600, 1200]
> +  iff: [2550, 1900]
> +  main: [1600, 1200]
> +  viewfinder: [1280, 720]
> +- bds: [2592, 1944]
> +  cio2: [2592, 1944]
> +  gdc: [2560, 1920]
> +  iff: [2592, 1944]
> +  main: [2560, 1920]
> +  viewfinder: [1280, 720]
> +- bds: [1952, 1152]
> +  cio2: [2592, 1944]
> +  gdc: [1920, 1080]
> +  iff: [2562, 1512]
> +  main: [1280, 720]
> +  viewfinder: [0, 0]
> +- bds: [1952, 1472]
> +  cio2: [2592, 1944]
> +  gdc: [1920, 1440]
> +  iff: [2562, 1932]
> +  main: [1920, 1080]
> +  viewfinder: [640, 480]
> +- bds: [1296, 972]
> +  cio2: [2592, 1944]
> +  gdc: [1280, 960]
> +  iff: [2592, 1944]
> +  main: [1280, 960]
> +  viewfinder: [640, 480]
> +- bds: [1296, 972]
> +  cio2: [2592, 1944]
> +  gdc: [1280, 960]
> +  iff: [2592, 1944]
> +  main: [1280, 720]
> +  viewfinder: [640, 480]
> +- bds: [1632, 1216]
> +  cio2: [2592, 1944]
> +  gdc: [1600, 1200]
> +  iff: [2550, 1900]
> +  main: [1600, 1200]
> +  viewfinder: [640, 480]
> +- bds: [2592, 1944]
> +  cio2: [2592, 1944]
> +  gdc: [2560, 1920]
> +  iff: [2592, 1944]
> +  main: [2560, 1920]
> +  viewfinder: [640, 480]
> +- bds: [1632, 1216]
> +  cio2: [2592, 1944]
> +  gdc: [1600, 1200]
> +  iff: [2550, 1900]
> +  main: [1600, 1200]
> +  viewfinder: [1600, 1200]
> +- bds: [2592, 1944]
> +  cio2: [2592, 1944]
> +  gdc: [2560, 1920]
> +  iff: [2592, 1944]
> +  main: [2560, 1920]
> +  viewfinder: [1600, 1200]
> +- bds: [2592, 1944]
> +  cio2: [2592, 1944]
> +  gdc: [2560, 1920]
> +  iff: [2592, 1944]
> +  main: [1600, 1200]
> +  viewfinder: [0, 0]
> +- bds: [1952, 1472]
> +  cio2: [2592, 1944]
> +  gdc: [1920, 1440]
> +  iff: [2562, 1932]
> +  main: [1920, 1080]
> +  viewfinder: [1280, 960]
> +- bds: [1296, 972]
> +  cio2: [2592, 1944]
> +  gdc: [1280, 960]
> +  iff: [2592, 1944]
> +  main: [1280, 960]
> +  viewfinder: [1280, 960]
> +- bds: [1632, 1216]
> +  cio2: [2592, 1944]
> +  gdc: [1600, 1200]
> +  iff: [2550, 1900]
> +  main: [1600, 1200]
> +  viewfinder: [1280, 960]
> +- bds: [2592, 1944]
> +  cio2: [2592, 1944]
> +  gdc: [2560, 1920]
> +  iff: [2592, 1944]
> +  main: [2560, 1920]
> +  viewfinder: [1280, 960]
> +- bds: [2592, 1944]
> +  cio2: [2592, 1944]
> +  gdc: [2560, 1920]
> +  iff: [2592, 1944]
> +  main: [1280, 960]
> +  viewfinder: [0, 0]
> +- bds: [1952, 1472]
> +  cio2: [2592, 1944]
> +  gdc: [1920, 1440]
> +  iff: [2562, 1932]
> +  main: [1920, 1080]
> +  viewfinder: [320, 240]
> +- bds: [1296, 972]
> +  cio2: [2592, 1944]
> +  gdc: [1280, 960]
> +  iff: [2592, 1944]
> +  main: [1280, 960]
> +  viewfinder: [320, 240]
> +- bds: [1296, 972]
> +  cio2: [2592, 1944]
> +  gdc: [1280, 960]
> +  iff: [2592, 1944]
> +  main: [1280, 720]
> +  viewfinder: [320, 240]
> +- bds: [1632, 1216]
> +  cio2: [2592, 1944]
> +  gdc: [1600, 1200]
> +  iff: [2550, 1900]
> +  main: [1600, 1200]
> +  viewfinder: [320, 240]
> +- bds: [2592, 1944]
> +  cio2: [2592, 1944]
> +  gdc: [2560, 1920]
> +  iff: [2592, 1944]
> +  main: [2560, 1920]
> +  viewfinder: [2560, 1920]
> +- bds: [2592, 1944]
> +  cio2: [2592, 1944]
> +  gdc: [2560, 1920]
> +  iff: [2592, 1944]
> +  main: [2560, 1920]
> +  viewfinder: [0, 0]
> +- bds: [1296, 972]
> +  cio2: [2592, 1944]
> +  gdc: [1280, 960]
> +  iff: [2592, 1944]
> +  main: [640, 480]
> +  viewfinder: [0, 0]
> +- bds: [1296, 972]
> +  cio2: [2592, 1944]
> +  gdc: [1280, 960]
> +  iff: [2592, 1944]
> +  main: [320, 240]
> +  viewfinder: [0, 0]
> +- bds: [976, 736]
> +  cio2: [2576, 1936]
> +  gdc: [960, 720]
> +  iff: [2562, 1932]
> +  main: [960, 720]
> +  viewfinder: [320, 240]
> +- bds: [2572, 1936]
> +  cio2: [2576, 1936]
> +  gdc: [2560, 1920]
> +  iff: [2572, 1936]
> +  main: [2560, 1920]
> +  viewfinder: [320, 240]
> +- bds: [2592, 1944]
> +  cio2: [2592, 1944]
> +  gdc: [2560, 1920]
> +  iff: [2592, 1944]
> +  main: [1920, 1080]
> +  viewfinder: [1600, 1200]

Patch
diff mbox series

diff --git a/src/android/camera_hal_config.cpp b/src/android/camera_hal_config.cpp
index 54611956..f378df9d 100644
--- a/src/android/camera_hal_config.cpp
+++ b/src/android/camera_hal_config.cpp
@@ -40,6 +40,7 @@  private:
 	int parseCameraConfigData(const std::string &cameraId, const YamlObject &);
 	int parseLocation(const YamlObject &, CameraConfigData &cameraConfigData);
 	int parseRotation(const YamlObject &, CameraConfigData &cameraConfigData);
+	int parsePipelineConf(const YamlObject &, CameraConfigData &cameraConfigData);
 
 	std::map<std::string, CameraConfigData> *cameras_;
 	YamlParser yamlParser_;
@@ -63,11 +64,13 @@  int CameraHalConfig::Private::parseConfigFile(FILE *fh,
 	 *   "camera0 id":
 	 *     location: value
 	 *     rotation: value
+	 *     pipeline_config_file: path
 	 *     ...
 	 *
 	 *   "camera1 id":
 	 *     location: value
 	 *     rotation: value
+	 *     pipeline_config_file: path
 	 *     ...
 	 */
 
@@ -116,6 +119,10 @@  int CameraHalConfig::Private::parseCameraConfigData(const std::string &cameraId,
 	if (parseRotation(cameraObject, cameraConfigData))
 		return -EINVAL;
 
+	/* Parse property "pipeline_config_file" */
+	if (parsePipelineConf(cameraObject, cameraConfigData))
+		return -EINVAL;
+
 	(*cameras_)[cameraId] = cameraConfigData;
 
 	return 0;
@@ -157,6 +164,16 @@  int CameraHalConfig::Private::parseRotation(const YamlObject &cameraObject,
 	return 0;
 }
 
+int CameraHalConfig::Private::parsePipelineConf(const YamlObject &cameraObject,
+						CameraConfigData &cameraConfigData)
+{
+	if (!cameraObject.isMember("pipeline_config_file"))
+		return -EINVAL;
+
+	cameraConfigData.pipelineConfigFile = cameraObject.get("pipeline_config_file").asString();
+	return 0;
+}
+
 CameraHalConfig::CameraHalConfig()
 	: Extensible(std::make_unique<Private>()), exists_(false), valid_(false)
 {
diff --git a/src/android/camera_hal_config.h b/src/android/camera_hal_config.h
index 9df554f9..3a905c92 100644
--- a/src/android/camera_hal_config.h
+++ b/src/android/camera_hal_config.h
@@ -15,6 +15,7 @@ 
 struct CameraConfigData {
 	int facing = -1;
 	int rotation = -1;
+	std::string pipelineConfigFile;
 };
 
 class CameraHalConfig final : public libcamera::Extensible
diff --git a/src/android/data/nautilus/camera_hal.yaml b/src/android/data/nautilus/camera_hal.yaml
index faddd29e..18a2b7a9 100644
--- a/src/android/data/nautilus/camera_hal.yaml
+++ b/src/android/data/nautilus/camera_hal.yaml
@@ -2,7 +2,9 @@  cameras:
   "\\_SB_.PCI0.I2C2.CAM0":
     location: back
     rotation: 0
+    pipeline_config_file: "/etc/camera/libcamera/imx258.yaml"
 
   "\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647":
     location: front
     rotation: 0
+    pipeline_config_file: ""
diff --git a/src/android/data/nautilus/imx258.yaml b/src/android/data/nautilus/imx258.yaml
new file mode 100644
index 00000000..be52e752
--- /dev/null
+++ b/src/android/data/nautilus/imx258.yaml
@@ -0,0 +1,248 @@ 
+still_mode:
+- bds: [4208, 3116]
+  cio2: [4208, 3118]
+  gdc: [4096, 3072]
+  iff: [4208, 3116]
+  main: [4096, 3072]
+  viewfinder: [0, 0]
+- bds: [1968, 1184]
+  cio2: [4208, 3118]
+  gdc: [1920, 1080]
+  iff: [4182, 2516]
+  main: [1920, 1080]
+  viewfinder: [0, 0]
+- bds: [1632, 1216]
+  cio2: [4208, 3118]
+  gdc: [1600, 1200]
+  iff: [4182, 3116]
+  main: [1600, 1200]
+  viewfinder: [0, 0]
+- bds: [1632, 1216]
+  cio2: [4208, 3118]
+  gdc: [1600, 1200]
+  iff: [4182, 3116]
+  main: [1280, 960]
+  viewfinder: [0, 0]
+- bds: [1968, 1184]
+  cio2: [4208, 3118]
+  gdc: [1920, 1080]
+  iff: [4182, 2516]
+  main: [1280, 720]
+  viewfinder: [0, 0]
+- bds: [1632, 1216]
+  cio2: [4208, 3118]
+  gdc: [1600, 1200]
+  iff: [4182, 3116]
+  main: [640, 480]
+  viewfinder: [0, 0]
+- bds: [1632, 1216]
+  cio2: [4208, 3118]
+  gdc: [1600, 1200]
+  iff: [4182, 3116]
+  main: [320, 240]
+  viewfinder: [0, 0]
+video_mode:
+- bds: [4208, 3116]
+  cio2: [4208, 3118]
+  gdc: [4096, 3072]
+  iff: [4208, 3116]
+  main: [4096, 3072]
+  viewfinder: [0, 0]
+- bds: [1968, 1184]
+  cio2: [4208, 3118]
+  gdc: [1920, 1080]
+  iff: [4182, 2516]
+  main: [1920, 1080]
+  viewfinder: [0, 0]
+- bds: [1632, 1216]
+  cio2: [4208, 3118]
+  gdc: [1600, 1200]
+  iff: [4182, 3116]
+  main: [1600, 1200]
+  viewfinder: [0, 0]
+- bds: [1632, 1216]
+  cio2: [4208, 3118]
+  gdc: [1600, 1200]
+  iff: [4182, 3116]
+  main: [1280, 960]
+  viewfinder: [0, 0]
+- bds: [1968, 1184]
+  cio2: [4208, 3118]
+  gdc: [1920, 1080]
+  iff: [4182, 2516]
+  main: [1280, 720]
+  viewfinder: [0, 0]
+- bds: [1632, 1216]
+  cio2: [4208, 3118]
+  gdc: [1600, 1200]
+  iff: [4182, 3116]
+  main: [640, 480]
+  viewfinder: [0, 0]
+- bds: [1632, 1216]
+  cio2: [4208, 3118]
+  gdc: [1600, 1200]
+  iff: [4182, 3116]
+  main: [320, 240]
+  viewfinder: [0, 0]
+- bds: [4208, 3116]
+  cio2: [4208, 3118]
+  gdc: [4160, 3072]
+  iff: [4208, 3116]
+  main: [4096, 3072]
+  viewfinder: [4096, 3072]
+- bds: [4208, 3116]
+  cio2: [4208, 3118]
+  gdc: [4160, 3072]
+  iff: [4208, 3116]
+  main: [4096, 3072]
+  viewfinder: [1920, 1080]
+- bds: [4208, 3116]
+  cio2: [4208, 3118]
+  gdc: [4096, 3072]
+  iff: [4208, 3116]
+  main: [4096, 3072]
+  viewfinder: [1600, 1200]
+- bds: [4208, 3116]
+  cio2: [4208, 3118]
+  gdc: [4096, 3072]
+  iff: [4208, 3116]
+  main: [4096, 3072]
+  viewfinder: [1280, 960]
+- bds: [4208, 3116]
+  cio2: [4208, 3118]
+  gdc: [4160, 3072]
+  iff: [4208, 3116]
+  main: [4096, 3072]
+  viewfinder: [1280, 720]
+- bds: [4208, 3116]
+  cio2: [4208, 3118]
+  gdc: [4096, 3072]
+  iff: [4208, 3116]
+  main: [4096, 3072]
+  viewfinder: [640, 480]
+- bds: [4208, 3116]
+  cio2: [4208, 3118]
+  gdc: [4096, 3072]
+  iff: [4208, 3116]
+  main: [4096, 3072]
+  viewfinder: [320, 240]
+- bds: [1968, 1184]
+  cio2: [4208, 3118]
+  gdc: [1920, 1080]
+  iff: [4182, 2516]
+  main: [1920, 1080]
+  viewfinder: [1920, 1080]
+- bds: [1968, 1440]
+  cio2: [4208, 3118]
+  gdc: [1920, 1424]
+  iff: [4182, 3060]
+  main: [1920, 1080]
+  viewfinder: [1600, 1200]
+- bds: [1968, 1440]
+  cio2: [4208, 3118]
+  gdc: [1920, 1424]
+  iff: [4182, 3060]
+  main: [1920, 1080]
+  viewfinder: [1280, 960]
+- bds: [1968, 1184]
+  cio2: [4208, 3118]
+  gdc: [1920, 1080]
+  iff: [4182, 2516]
+  main: [1920, 1080]
+  viewfinder: [1280, 720]
+- bds: [1968, 1440]
+  cio2: [4208, 3118]
+  gdc: [1920, 1424]
+  iff: [4182, 3060]
+  main: [1920, 1080]
+  viewfinder: [640, 480]
+- bds: [1968, 1440]
+  cio2: [4208, 3118]
+  gdc: [1920, 1424]
+  iff: [4182, 3060]
+  main: [1920, 1080]
+  viewfinder: [320, 240]
+- bds: [1632, 1216]
+  cio2: [4208, 3118]
+  gdc: [1600, 1200]
+  iff: [4182, 3116]
+  main: [1600, 1200]
+  viewfinder: [1600, 1200]
+- bds: [1632, 1216]
+  cio2: [4208, 3118]
+  gdc: [1600, 1200]
+  iff: [4182, 3116]
+  main: [1600, 1200]
+  viewfinder: [1280, 960]
+- bds: [1680, 1240]
+  cio2: [4208, 3118]
+  gdc: [1664, 1200]
+  iff: [4200, 3100]
+  main: [1600, 1200]
+  viewfinder: [1280, 720]
+- bds: [1632, 1216]
+  cio2: [4208, 3118]
+  gdc: [1600, 1200]
+  iff: [4182, 3116]
+  main: [1600, 1200]
+  viewfinder: [640, 480]
+- bds: [1632, 1216]
+  cio2: [4208, 3118]
+  gdc: [1600, 1200]
+  iff: [4182, 3116]
+  main: [1600, 1200]
+  viewfinder: [320, 240]
+- bds: [1344, 992]
+  cio2: [4208, 3118]
+  gdc: [1280, 960]
+  iff: [4200, 3100]
+  main: [1280, 960]
+  viewfinder: [1280, 960]
+- bds: [1400, 1036]
+  cio2: [4208, 3118]
+  gdc: [1344, 960]
+  iff: [4200, 3108]
+  main: [1280, 960]
+  viewfinder: [1280, 720]
+- bds: [1344, 992]
+  cio2: [4208, 3118]
+  gdc: [1280, 960]
+  iff: [4200, 3100]
+  main: [1280, 960]
+  viewfinder: [640, 480]
+- bds: [1344, 992]
+  cio2: [4208, 3118]
+  gdc: [1280, 960]
+  iff: [4200, 3100]
+  main: [1280, 960]
+  viewfinder: [320, 240]
+- bds: [1288, 800]
+  cio2: [4208, 3118]
+  gdc: [1280, 720]
+  iff: [4186, 2600]
+  main: [1280, 720]
+  viewfinder: [1280, 720]
+- bds: [1312, 960]
+  cio2: [4208, 3118]
+  gdc: [1280, 952]
+  iff: [4182, 3060]
+  main: [1280, 720]
+  viewfinder: [640, 480]
+- bds: [1312, 960]
+  cio2: [4208, 3118]
+  gdc: [1280, 952]
+  iff: [4182, 3060]
+  main: [1280, 720]
+  viewfinder: [320, 240]
+- bds: [700, 520]
+  cio2: [2104, 1560]
+  gdc: [640, 480]
+  iff: [2100, 1560]
+  main: [640, 480]
+  viewfinder: [320, 240]
+- bds: [364, 276]
+  cio2: [4208, 3118]
+  gdc: [320, 240]
+  iff: [1456, 1104]
+  main: [320, 240]
+  viewfinder: [320, 240]
diff --git a/src/android/data/soraka/camera_hal.yaml b/src/android/data/soraka/camera_hal.yaml
index 2e996403..6f0062e9 100644
--- a/src/android/data/soraka/camera_hal.yaml
+++ b/src/android/data/soraka/camera_hal.yaml
@@ -2,7 +2,9 @@  cameras:
   "\\_SB_.PCI0.I2C4.CAM1":
     location: front
     rotation: 0
+    pipeline_config_file: "/etc/camera/libcamera/ov5670.yaml"
 
   "\\_SB_.PCI0.I2C2.CAM0":
     location: back
     rotation: 0
+    pipeline_config_file: "/etc/camera/libcamera/ov13858.yaml"
diff --git a/src/android/data/soraka/ov13858.yaml b/src/android/data/soraka/ov13858.yaml
new file mode 100644
index 00000000..c6f4d091
--- /dev/null
+++ b/src/android/data/soraka/ov13858.yaml
@@ -0,0 +1,236 @@ 
+still_mode:
+- bds: [4224, 3136]
+  cio2: [4224, 3136]
+  gdc: [4096, 3072]
+  iff: [4224, 3136]
+  main: [640, 480]
+  viewfinder: [0, 0]
+- bds: [4224, 3136]
+  cio2: [4224, 3136]
+  gdc: [4096, 3072]
+  iff: [4224, 3136]
+  main: [320, 240]
+  viewfinder: [0, 0]
+- bds: [4216, 2386]
+  cio2: [4224, 3136]
+  gdc: [4128, 2322]
+  iff: [4216, 2386]
+  main: [1920, 1080]
+  viewfinder: [0, 0]
+- bds: [4216, 2386]
+  cio2: [4224, 3136]
+  gdc: [4128, 2322]
+  iff: [4216, 2386]
+  main: [1280, 720]
+  viewfinder: [0, 0]
+- bds: [4224, 3136]
+  cio2: [4224, 3136]
+  gdc: [4096, 3072]
+  iff: [4224, 3136]
+  main: [1280, 960]
+  viewfinder: [0, 0]
+- bds: [4224, 3136]
+  cio2: [4224, 3136]
+  gdc: [4096, 3072]
+  iff: [4224, 3136]
+  main: [1600, 1200]
+  viewfinder: [0, 0]
+- bds: [4224, 3136]
+  cio2: [4224, 3136]
+  gdc: [4096, 3072]
+  iff: [4224, 3136]
+  main: [4096, 3072]
+  viewfinder: [0, 0]
+video_mode:
+- bds: [4224, 3136]
+  cio2: [4224, 3136]
+  gdc: [4096, 3072]
+  iff: [4224, 3136]
+  main: [4096, 3072]
+  viewfinder: [1920, 1080]
+- bds: [1984, 1184]
+  cio2: [4224, 3136]
+  gdc: [1920, 1080]
+  iff: [4216, 2516]
+  main: [1920, 1080]
+  viewfinder: [0, 0]
+- bds: [4224, 3136]
+  cio2: [4224, 3136]
+  gdc: [4096, 3072]
+  iff: [4224, 3136]
+  main: [4096, 3072]
+  viewfinder: [1280, 720]
+- bds: [1984, 1184]
+  cio2: [4224, 3136]
+  gdc: [1920, 1080]
+  iff: [4216, 2516]
+  main: [1280, 720]
+  viewfinder: [0, 0]
+- bds: [4224, 3136]
+  cio2: [4224, 3136]
+  gdc: [4096, 3072]
+  iff: [4224, 3136]
+  main: [4096, 3072]
+  viewfinder: [640, 480]
+- bds: [4224, 3136]
+  cio2: [4224, 3136]
+  gdc: [4096, 3072]
+  iff: [4224, 3136]
+  main: [4096, 3072]
+  viewfinder: [1280, 960]
+- bds: [1632, 1216]
+  cio2: [4224, 3136]
+  gdc: [1600, 1200]
+  iff: [4182, 3116]
+  main: [1280, 960]
+  viewfinder: [0, 0]
+- bds: [4224, 3136]
+  cio2: [4224, 3136]
+  gdc: [4096, 3072]
+  iff: [4224, 3136]
+  main: [4096, 3072]
+  viewfinder: [1600, 1200]
+- bds: [4224, 3136]
+  cio2: [4224, 3136]
+  gdc: [4096, 3072]
+  iff: [4224, 3136]
+  main: [4096, 3072]
+  viewfinder: [320, 240]
+- bds: [1296, 800]
+  cio2: [4224, 3136]
+  gdc: [1280, 720]
+  iff: [4212, 2600]
+  main: [1280, 720]
+  viewfinder: [1280, 720]
+- bds: [1296, 960]
+  cio2: [4224, 3136]
+  gdc: [1280, 952]
+  iff: [4212, 3120]
+  main: [1280, 720]
+  viewfinder: [640, 480]
+- bds: [4224, 3136]
+  cio2: [4224, 3136]
+  gdc: [4160, 3120]
+  iff: [4224, 3136]
+  main: [1920, 1080]
+  viewfinder: [1600, 1200]
+- bds: [1984, 1472]
+  cio2: [4224, 3136]
+  gdc: [1920, 1432]
+  iff: [4216, 3128]
+  main: [1920, 1080]
+  viewfinder: [1600, 1200]
+- bds: [1296, 960]
+  cio2: [4224, 3136]
+  gdc: [1280, 952]
+  iff: [4212, 3120]
+  main: [1280, 720]
+  viewfinder: [320, 240]
+- bds: [1984, 1184]
+  cio2: [4224, 3136]
+  gdc: [1920, 1080]
+  iff: [4216, 2516]
+  main: [1920, 1080]
+  viewfinder: [1920, 1080]
+- bds: [1984, 1184]
+  cio2: [4224, 3136]
+  gdc: [1920, 1080]
+  iff: [4216, 2516]
+  main: [1920, 1080]
+  viewfinder: [1280, 720]
+- bds: [1984, 1472]
+  cio2: [4224, 3136]
+  gdc: [1920, 1432]
+  iff: [4216, 3128]
+  main: [1920, 1080]
+  viewfinder: [640, 480]
+- bds: [1984, 1472]
+  cio2: [4224, 3136]
+  gdc: [1920, 1432]
+  iff: [4216, 3128]
+  main: [1920, 1080]
+  viewfinder: [1280, 960]
+- bds: [1984, 1472]
+  cio2: [4224, 3136]
+  gdc: [1920, 1432]
+  iff: [4216, 3128]
+  main: [1920, 1080]
+  viewfinder: [320, 240]
+- bds: [1688, 1248]
+  cio2: [4224, 3136]
+  gdc: [1664, 1200]
+  iff: [4220, 3120]
+  main: [1600, 1200]
+  viewfinder: [1280, 720]
+- bds: [1632, 1216]
+  cio2: [4224, 3136]
+  gdc: [1600, 1200]
+  iff: [4182, 3116]
+  main: [1600, 1200]
+  viewfinder: [640, 480]
+- bds: [1632, 1216]
+  cio2: [4224, 3136]
+  gdc: [1600, 1200]
+  iff: [4182, 3116]
+  main: [1600, 1200]
+  viewfinder: [1280, 960]
+- bds: [1632, 1216]
+  cio2: [4224, 3136]
+  gdc: [1600, 1200]
+  iff: [4182, 3116]
+  main: [1600, 1200]
+  viewfinder: [1600, 1200]
+- bds: [1632, 1216]
+  cio2: [4224, 3136]
+  gdc: [1600, 1200]
+  iff: [4182, 3116]
+  main: [1600, 1200]
+  viewfinder: [320, 240]
+- bds: [1376, 1024]
+  cio2: [4224, 3136]
+  gdc: [1344, 960]
+  iff: [4214, 3136]
+  main: [1280, 960]
+  viewfinder: [1280, 720]
+- bds: [1344, 992]
+  cio2: [4224, 3136]
+  gdc: [1280, 960]
+  iff: [4200, 3100]
+  main: [1280, 960]
+  viewfinder: [640, 480]
+- bds: [1344, 992]
+  cio2: [4224, 3136]
+  gdc: [1280, 960]
+  iff: [4200, 3100]
+  main: [1280, 960]
+  viewfinder: [1280, 960]
+- bds: [1344, 992]
+  cio2: [4224, 3136]
+  gdc: [1280, 960]
+  iff: [4200, 3100]
+  main: [1280, 960]
+  viewfinder: [320, 240]
+- bds: [1632, 1216]
+  cio2: [4224, 3136]
+  gdc: [1600, 1200]
+  iff: [4182, 3116]
+  main: [640, 480]
+  viewfinder: [0, 0]
+- bds: [1632, 1216]
+  cio2: [4224, 3136]
+  gdc: [1600, 1200]
+  iff: [4182, 3116]
+  main: [320, 240]
+  viewfinder: [0, 0]
+- bds: [1632, 1216]
+  cio2: [4224, 3136]
+  gdc: [1600, 1200]
+  iff: [4182, 3116]
+  main: [1600, 1200]
+  viewfinder: [0, 0]
+- bds: [4224, 3136]
+  cio2: [4224, 3136]
+  gdc: [4096, 3072]
+  iff: [4224, 3136]
+  main: [4096, 3072]
+  viewfinder: [0, 0]
diff --git a/src/android/data/soraka/ov5670.yaml b/src/android/data/soraka/ov5670.yaml
new file mode 100644
index 00000000..35ad8684
--- /dev/null
+++ b/src/android/data/soraka/ov5670.yaml
@@ -0,0 +1,242 @@ 
+still_mode:
+- bds: [2592, 1944]
+  cio2: [2592, 1944]
+  gdc: [2560, 1920]
+  iff: [2592, 1944]
+  main: [1600, 1200]
+  viewfinder: [0, 0]
+- bds: [2592, 1944]
+  cio2: [2592, 1944]
+  gdc: [2560, 1920]
+  iff: [2592, 1944]
+  main: [1280, 960]
+  viewfinder: [0, 0]
+- bds: [2592, 1944]
+  cio2: [2592, 1944]
+  gdc: [2560, 1920]
+  iff: [2592, 1944]
+  main: [2560, 1920]
+  viewfinder: [0, 0]
+- bds: [2592, 1944]
+  cio2: [2592, 1944]
+  gdc: [2560, 1920]
+  iff: [2592, 1944]
+  main: [1920, 1080]
+  viewfinder: [0, 0]
+- bds: [2592, 1944]
+  cio2: [2592, 1944]
+  gdc: [2560, 1920]
+  iff: [2592, 1944]
+  main: [1280, 720]
+  viewfinder: [0, 0]
+- bds: [2592, 1944]
+  cio2: [2592, 1944]
+  gdc: [2560, 1920]
+  iff: [2592, 1944]
+  main: [640, 480]
+  viewfinder: [0, 0]
+- bds: [2592, 1944]
+  cio2: [2592, 1944]
+  gdc: [2560, 1920]
+  iff: [2592, 1944]
+  main: [320, 240]
+  viewfinder: [0, 0]
+video_mode:
+- bds: [1952, 1152]
+  cio2: [2592, 1944]
+  gdc: [1920, 1080]
+  iff: [2562, 1512]
+  main: [1920, 1080]
+  viewfinder: [1920, 1080]
+- bds: [2592, 1944]
+  cio2: [2592, 1944]
+  gdc: [2560, 1920]
+  iff: [2592, 1944]
+  main: [2560, 1920]
+  viewfinder: [1920, 1080]
+- bds: [1952, 1152]
+  cio2: [2592, 1944]
+  gdc: [1920, 1080]
+  iff: [2562, 1512]
+  main: [1920, 1080]
+  viewfinder: [0, 0]
+- bds: [1952, 1152]
+  cio2: [2592, 1944]
+  gdc: [1920, 1080]
+  iff: [2562, 1512]
+  main: [1920, 1080]
+  viewfinder: [1280, 720]
+- bds: [1296, 972]
+  cio2: [2592, 1944]
+  gdc: [1280, 960]
+  iff: [2592, 1944]
+  main: [1280, 960]
+  viewfinder: [1280, 720]
+- bds: [1296, 804]
+  cio2: [2592, 1944]
+  gdc: [1280, 720]
+  iff: [2592, 1608]
+  main: [1280, 720]
+  viewfinder: [1280, 720]
+- bds: [1632, 1216]
+  cio2: [2592, 1944]
+  gdc: [1600, 1200]
+  iff: [2550, 1900]
+  main: [1600, 1200]
+  viewfinder: [1280, 720]
+- bds: [2592, 1944]
+  cio2: [2592, 1944]
+  gdc: [2560, 1920]
+  iff: [2592, 1944]
+  main: [2560, 1920]
+  viewfinder: [1280, 720]
+- bds: [1952, 1152]
+  cio2: [2592, 1944]
+  gdc: [1920, 1080]
+  iff: [2562, 1512]
+  main: [1280, 720]
+  viewfinder: [0, 0]
+- bds: [1952, 1472]
+  cio2: [2592, 1944]
+  gdc: [1920, 1440]
+  iff: [2562, 1932]
+  main: [1920, 1080]
+  viewfinder: [640, 480]
+- bds: [1296, 972]
+  cio2: [2592, 1944]
+  gdc: [1280, 960]
+  iff: [2592, 1944]
+  main: [1280, 960]
+  viewfinder: [640, 480]
+- bds: [1296, 972]
+  cio2: [2592, 1944]
+  gdc: [1280, 960]
+  iff: [2592, 1944]
+  main: [1280, 720]
+  viewfinder: [640, 480]
+- bds: [1632, 1216]
+  cio2: [2592, 1944]
+  gdc: [1600, 1200]
+  iff: [2550, 1900]
+  main: [1600, 1200]
+  viewfinder: [640, 480]
+- bds: [2592, 1944]
+  cio2: [2592, 1944]
+  gdc: [2560, 1920]
+  iff: [2592, 1944]
+  main: [2560, 1920]
+  viewfinder: [640, 480]
+- bds: [1632, 1216]
+  cio2: [2592, 1944]
+  gdc: [1600, 1200]
+  iff: [2550, 1900]
+  main: [1600, 1200]
+  viewfinder: [1600, 1200]
+- bds: [2592, 1944]
+  cio2: [2592, 1944]
+  gdc: [2560, 1920]
+  iff: [2592, 1944]
+  main: [2560, 1920]
+  viewfinder: [1600, 1200]
+- bds: [2592, 1944]
+  cio2: [2592, 1944]
+  gdc: [2560, 1920]
+  iff: [2592, 1944]
+  main: [1600, 1200]
+  viewfinder: [0, 0]
+- bds: [1952, 1472]
+  cio2: [2592, 1944]
+  gdc: [1920, 1440]
+  iff: [2562, 1932]
+  main: [1920, 1080]
+  viewfinder: [1280, 960]
+- bds: [1296, 972]
+  cio2: [2592, 1944]
+  gdc: [1280, 960]
+  iff: [2592, 1944]
+  main: [1280, 960]
+  viewfinder: [1280, 960]
+- bds: [1632, 1216]
+  cio2: [2592, 1944]
+  gdc: [1600, 1200]
+  iff: [2550, 1900]
+  main: [1600, 1200]
+  viewfinder: [1280, 960]
+- bds: [2592, 1944]
+  cio2: [2592, 1944]
+  gdc: [2560, 1920]
+  iff: [2592, 1944]
+  main: [2560, 1920]
+  viewfinder: [1280, 960]
+- bds: [2592, 1944]
+  cio2: [2592, 1944]
+  gdc: [2560, 1920]
+  iff: [2592, 1944]
+  main: [1280, 960]
+  viewfinder: [0, 0]
+- bds: [1952, 1472]
+  cio2: [2592, 1944]
+  gdc: [1920, 1440]
+  iff: [2562, 1932]
+  main: [1920, 1080]
+  viewfinder: [320, 240]
+- bds: [1296, 972]
+  cio2: [2592, 1944]
+  gdc: [1280, 960]
+  iff: [2592, 1944]
+  main: [1280, 960]
+  viewfinder: [320, 240]
+- bds: [1296, 972]
+  cio2: [2592, 1944]
+  gdc: [1280, 960]
+  iff: [2592, 1944]
+  main: [1280, 720]
+  viewfinder: [320, 240]
+- bds: [1632, 1216]
+  cio2: [2592, 1944]
+  gdc: [1600, 1200]
+  iff: [2550, 1900]
+  main: [1600, 1200]
+  viewfinder: [320, 240]
+- bds: [2592, 1944]
+  cio2: [2592, 1944]
+  gdc: [2560, 1920]
+  iff: [2592, 1944]
+  main: [2560, 1920]
+  viewfinder: [2560, 1920]
+- bds: [2592, 1944]
+  cio2: [2592, 1944]
+  gdc: [2560, 1920]
+  iff: [2592, 1944]
+  main: [2560, 1920]
+  viewfinder: [0, 0]
+- bds: [1296, 972]
+  cio2: [2592, 1944]
+  gdc: [1280, 960]
+  iff: [2592, 1944]
+  main: [640, 480]
+  viewfinder: [0, 0]
+- bds: [1296, 972]
+  cio2: [2592, 1944]
+  gdc: [1280, 960]
+  iff: [2592, 1944]
+  main: [320, 240]
+  viewfinder: [0, 0]
+- bds: [976, 736]
+  cio2: [2576, 1936]
+  gdc: [960, 720]
+  iff: [2562, 1932]
+  main: [960, 720]
+  viewfinder: [320, 240]
+- bds: [2572, 1936]
+  cio2: [2576, 1936]
+  gdc: [2560, 1920]
+  iff: [2572, 1936]
+  main: [2560, 1920]
+  viewfinder: [320, 240]
+- bds: [2592, 1944]
+  cio2: [2592, 1944]
+  gdc: [2560, 1920]
+  iff: [2592, 1944]
+  main: [1920, 1080]
+  viewfinder: [1600, 1200]