[v2,5/5] rkisp1: Add support for camera flash devices
diff mbox series

Message ID 20250912-flash_reco-v2-5-d5bb80a2e619@emfend.at
State New
Headers show
Series
  • Support for v4l2 flash devices
Related show

Commit Message

Matthias Fend Sept. 12, 2025, 7:13 a.m. UTC
Use the flash device pipeline helpers to bring flash support to the
RKISP1 pipeline.

Signed-off-by: Matthias Fend <matthias.fend@emfend.at>
---
 src/libcamera/pipeline/rkisp1/rkisp1.cpp | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Isaac Scott Sept. 16, 2025, 11:11 a.m. UTC | #1
Hi Matthias,

Thank you for the patch!

Quoting Matthias Fend (2025-09-12 08:13:24)
> Use the flash device pipeline helpers to bring flash support to the
> RKISP1 pipeline.
> 
> Signed-off-by: Matthias Fend <matthias.fend@emfend.at>
> ---
>  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> index cfcbb3b2590a293106cb4d1a5c5c6adb504a61af..44ffc9b68d17f271fbab5867cc72b4d4f9330381 100644
> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> @@ -39,6 +39,7 @@
>  #include "libcamera/internal/converter/converter_v4l2_m2m.h"
>  #include "libcamera/internal/delayed_controls.h"
>  #include "libcamera/internal/device_enumerator.h"
> +#include "libcamera/internal/flash_control.h"
>  #include "libcamera/internal/framebuffer.h"
>  #include "libcamera/internal/ipa_manager.h"
>  #include "libcamera/internal/media_device.h"
> @@ -1296,6 +1297,8 @@ int PipelineHandlerRkISP1::updateControls(RkISP1CameraData *data)
>                 activeCrop_ = scalerMaxCrop_;
>         }
>  
> +       FlashControl::updateFlashControls(data->sensor_->flash(), controls);
> +
>         /* Add the IPA registered controls to list of camera controls. */
>         for (const auto &ipaControl : data->ipaControls_)
>                 controls[ipaControl.first] = ipaControl.second;
> @@ -1503,6 +1506,8 @@ void PipelineHandlerRkISP1::imageBufferReady(FrameBuffer *buffer)
>                         info->metadataProcessed = true;
>         }
>  
> +       FlashControl::handleFlashControls(data->sensor_->flash(), request->controls(), request->metadata());
> +

Nice!

Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>

>         if (!useDewarper_) {
>                 completeBuffer(request, buffer);
>                 tryCompleteRequest(info);
> 
> -- 
> 2.34.1
> 

Best wishes,

Isaac

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index cfcbb3b2590a293106cb4d1a5c5c6adb504a61af..44ffc9b68d17f271fbab5867cc72b4d4f9330381 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -39,6 +39,7 @@ 
 #include "libcamera/internal/converter/converter_v4l2_m2m.h"
 #include "libcamera/internal/delayed_controls.h"
 #include "libcamera/internal/device_enumerator.h"
+#include "libcamera/internal/flash_control.h"
 #include "libcamera/internal/framebuffer.h"
 #include "libcamera/internal/ipa_manager.h"
 #include "libcamera/internal/media_device.h"
@@ -1296,6 +1297,8 @@  int PipelineHandlerRkISP1::updateControls(RkISP1CameraData *data)
 		activeCrop_ = scalerMaxCrop_;
 	}
 
+	FlashControl::updateFlashControls(data->sensor_->flash(), controls);
+
 	/* Add the IPA registered controls to list of camera controls. */
 	for (const auto &ipaControl : data->ipaControls_)
 		controls[ipaControl.first] = ipaControl.second;
@@ -1503,6 +1506,8 @@  void PipelineHandlerRkISP1::imageBufferReady(FrameBuffer *buffer)
 			info->metadataProcessed = true;
 	}
 
+	FlashControl::handleFlashControls(data->sensor_->flash(), request->controls(), request->metadata());
+
 	if (!useDewarper_) {
 		completeBuffer(request, buffer);
 		tryCompleteRequest(info);