summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libcamera/pipeline/ipu3/ipu3.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index 1c0a9825..e4efb972 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -22,6 +22,7 @@
#include "media_device.h"
#include "pipeline_handler.h"
#include "utils.h"
+#include "v4l2_controls.h"
#include "v4l2_subdevice.h"
#include "v4l2_videodevice.h"
@@ -194,6 +195,12 @@ private:
class PipelineHandlerIPU3 : public PipelineHandler
{
public:
+ static constexpr unsigned int V4L2_CID_IPU3_PIPE_MODE = 0x009819c1;
+ enum IPU3PipeModes {
+ IPU3PipeModeVideo = 0,
+ IPU3PipeModeStillCapture = 1,
+ };
+
PipelineHandlerIPU3(CameraManager *manager);
CameraConfiguration *generateConfiguration(Camera *camera,
@@ -559,6 +566,17 @@ int PipelineHandlerIPU3::configure(Camera *camera, CameraConfiguration *c)
if (ret)
return ret;
+ /* Apply the "pipe_mode" control to the ImgU subdevice. */
+ V4L2ControlList ctrls;
+ ctrls.add(V4L2_CID_IPU3_PIPE_MODE, vfStream->active_ ?
+ IPU3PipeModeVideo :
+ IPU3PipeModeStillCapture);
+ ret = imgu->imgu_->setControls(&ctrls);
+ if (ret) {
+ LOG(IPU3, Error) << "Unable to set pipe_mode control";
+ return ret;
+ }
+
return 0;
}