Commit Graph

5 Commits

Author SHA1 Message Date
Kieran Bingham
1ad25efa60 android: cros: Simplify integration
The ChromeOS specific Android HAL support was overly-complex to support
linking an additional library, and then passing the built object into
the libcamera.so build.

Now that it has its own distinct libcamera-hal.so, simplify the CrOS
integration to build directly into that library.

The removal of the -Wno-shadow here is intentional, as it is not
required for compilation of the camera3_hal.o object.

Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-06-25 16:09:46 +01:00
Kieran Bingham
63c4687537 android: Split HAL to its own shared library
The libcamera Android HAL implementation should not be an integral part
of libcamera, but a support library that utilises the libcamera public
API.

Move the implementation to its own distinct library.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2021-06-25 16:09:46 +01:00
Laurent Pinchart
a931188e1d android: Fix unused parameter warnings on Chrome OS
The Chrome OS-specific code has multiple function parameters that are
not used. This results in compilation warnings. Fix them with
[[maybe_unused]].

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
2021-06-01 12:13:07 +03:00
Hirokazu Honda
459b3bc6a9 android: CameraHalManager: Create a static object dynamically
Originally CameraHalManager is created in the libcamera start up
and destroyed in the libcamera termination. However,
CameraHalManager destructor can access  other static objects that
has been destroyed.
Avoid this issue by destroying CameraHalManager when tear_down() is
called in ChromeOS or leaking it in other platforms.

Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2021-05-26 23:41:43 +03:00
Paul Elder
09b0801fdb cros: Support the new cros camera API with set_up and tear_down
Implement and expose the symbol and functions that the new cros camera
API requires. Since we don't actually need them, leave them empty.
Update meson accordingly.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2021-03-03 19:05:12 +09:00