[libcamera-devel,2/8] android: hal_manager: Report supported API version

Message ID 20200526142237.407557-3-jacopo@jmondi.org
State Accepted
Headers show
Series
  • android: Implament format translation
Related show

Commit Message

Jacopo Mondi May 26, 2020, 2:22 p.m. UTC
Report the supported API version in the camera_info structure provided
to the framework.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
---
 src/android/camera_hal_manager.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Laurent Pinchart June 4, 2020, 12:42 a.m. UTC | #1
Hi Jacopo,

Thank you for the patch.

On Tue, May 26, 2020 at 04:22:31PM +0200, Jacopo Mondi wrote:
> Report the supported API version in the camera_info structure provided
> to the framework.
> 
> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  src/android/camera_hal_manager.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/android/camera_hal_manager.cpp b/src/android/camera_hal_manager.cpp
> index 759e320dcd3b..b02d8d1a8362 100644
> --- a/src/android/camera_hal_manager.cpp
> +++ b/src/android/camera_hal_manager.cpp
> @@ -110,7 +110,7 @@ int CameraHalManager::getCameraInfo(unsigned int id, struct camera_info *info)
>  	/* \todo Get these info dynamically inspecting the camera module. */
>  	info->facing = id ? CAMERA_FACING_FRONT : CAMERA_FACING_BACK;
>  	info->orientation = 0;
> -	info->device_version = 0;
> +	info->device_version = CAMERA_DEVICE_API_VERSION_3_3;
>  	info->resource_cost = 0;
>  	info->static_camera_characteristics = camera->getStaticMetadata();
>  	info->conflicting_devices = nullptr;

Patch

diff --git a/src/android/camera_hal_manager.cpp b/src/android/camera_hal_manager.cpp
index 759e320dcd3b..b02d8d1a8362 100644
--- a/src/android/camera_hal_manager.cpp
+++ b/src/android/camera_hal_manager.cpp
@@ -110,7 +110,7 @@  int CameraHalManager::getCameraInfo(unsigned int id, struct camera_info *info)
 	/* \todo Get these info dynamically inspecting the camera module. */
 	info->facing = id ? CAMERA_FACING_FRONT : CAMERA_FACING_BACK;
 	info->orientation = 0;
-	info->device_version = 0;
+	info->device_version = CAMERA_DEVICE_API_VERSION_3_3;
 	info->resource_cost = 0;
 	info->static_camera_characteristics = camera->getStaticMetadata();
 	info->conflicting_devices = nullptr;