[libcamera-devel] [PATCH v3 2/2] android: camera_device: Set the camera location to Front if External

Jacopo Mondi jacopo at jmondi.org
Wed Feb 24 10:58:45 CET 2021


Hi Paul,

On Wed, Feb 24, 2021 at 06:48:32PM +0900, Paul Elder wrote:
> Our android HAL implementation currently does not support external
> cameras, so if the camera location property is external, set it to
> front.
>
> This allows the following CTS test to pass:
> - android.hardware.camera2.cts.CameraManagerTest#testCameraManagerGetDeviceIdList
>
> Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
> Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
> Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
> Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
>
> ---
> No change in v2
> ---
>  src/android/camera_device.cpp | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
> index 1e2a5b5f..16cb8c6d 100644
> --- a/src/android/camera_device.cpp
> +++ b/src/android/camera_device.cpp
> @@ -405,7 +405,11 @@ int CameraDevice::initialize()
>  			facing_ = CAMERA_FACING_BACK;
>  			break;
>  		case properties::CameraLocationExternal:
> -			facing_ = CAMERA_FACING_EXTERNAL;
> +			/*
> +			 * \todo Set this to EXTERNAL once we support
> +			 * HARDWARE_LEVEL_EXTERNAL
> +			 */
> +			facing_ = CAMERA_FACING_FRONT;

I keep thinking that we're calling for troubles once we'll have to
really determinate if a camera is external for real. But since there
has been a too long discussion already:

Reviewed-by: Jacopo Mondi <jacopo at jmondi.org>

Thanks
  j
>  			break;
>  		}
>  	}
> --
> 2.27.0
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel


More information about the libcamera-devel mailing list