@@ -20,6 +20,7 @@
#include <libcamera/control_ids.h>
#include <libcamera/controls.h>
#include <libcamera/fence.h>
+#include <libcamera/option_ids.h>
#include <libcamera/formats.h>
#include <libcamera/property_ids.h>
@@ -293,6 +294,24 @@ std::unique_ptr<CameraDevice> CameraDevice::create(unsigned int id,
*/
int CameraDevice::initialize(const CameraConfigData *cameraConfigData)
{
+ /*
+ * Initialize pipeline configuration file for the camera.
+ *
+ * If the libcamera::Camera supports the PipelineConfigFile option and
+ * the HAL configuration file provides the path, set the option before
+ * opening the camera.
+ */
+ const ControlInfoMap optionInfo = camera_->options();
+
+ if (cameraConfigData &&
+ cameraConfigData->pipelineConfigFile != "" &&
+ optionInfo.count(&options::PipelineConfigFile)) {
+ ControlList options(optionInfo);
+ options.set(options::PipelineConfigFile,
+ cameraConfigData->pipelineConfigFile);
+ camera_->setOptions(&options);
+ }
+
/*
* Initialize orientation and facing side of the camera.
*
If the libcamera::Camera supports the PipelineConfigFile option and the HAL configuration file provides the path, set the option before opening the camera. Signed-off-by: Han-Lin Chen <hanlinchen@chromium.org> --- src/android/camera_device.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)