[libcamera-devel] [PATCH v2 0/3] libcamera: Do not default the location property

Jacopo Mondi jacopo at jmondi.org
Fri Mar 19 14:01:17 CET 2021


Hello
   we've been discussion about how to handle the camera location
properly in libcamera and Android HAL.

The current setup
- defaults location to External in libcamera if the fw does not provide that
- sets FRONT if location is External in Android Camera HAL

This will make very complex to discern in future if a camera is actually
external once the camera HAL will support the EXTERNAL HW level.

To simplify this and make it easier to fallback to a getting location from
a configuration file in the Camera HAL:
- Do not report property::Location in libcamera if not available in fw
- Do not default External to FRONT in HAL
- To maintain compatibility with Android set location to FRONT if not available
  from the library in the Camera HAL.

No regressions in CTS testing.

v1->v2:
- Add a patch for cam not to assume Location is available. The naming
  scheme now looks like (Soraka)

	Available cameras:
	1: 'ov13858' (\_SB_.PCI0.I2C2.CAM0)
	2: 'ov5670' (\_SB_.PCI0.I2C4.CAM1)

  While it was:
	Available cameras:
	1: Internal front camera (\_SB_.PCI0.I2C2.CAM0)
	2: Internal front camera (\_SB_.PCI0.I2C4.CAM1)

- Patch 3/3 said
  "To maintain compatibility with CTS requirements, default location to
   FRONT only if the camera property is not available."
  Well, that hunk was missing in v1, sorry about that. I've kept Laurent's tag
  anyhow. Let me know if it's ok.

Thanks
   j


Jacopo Mondi (3):
  cam: Do not assume Location is available
  libcamera: camera_sensor: Do not register Location if not available
  android: camera_device: Do not default External to Front

 src/android/camera_device.cpp   | 12 +++++++-----
 src/cam/main.cpp                | 32 ++++++++++++++++++++------------
 src/libcamera/camera_sensor.cpp |  6 ++----
 3 files changed, 29 insertions(+), 21 deletions(-)

--
2.30.0



More information about the libcamera-devel mailing list