android: camera_device: Save capture settings unconditionally
diff mbox series

Message ID 20240227021320.3443016-1-hui.fang@nxp.com
State Accepted
Headers show
Series
  • android: camera_device: Save capture settings unconditionally
Related show

Commit Message

Fang Hui Feb. 27, 2024, 2:13 a.m. UTC
If not, it will be deferred to the next frame,
as there's a bug assigned to this issue
https://bugs.libcamera.org/show_bug.cgi?id=210

Signed-off-by: Fang Hui <hui.fang@nxp.com>
---
 src/android/camera_device.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jacopo Mondi Feb. 27, 2024, 7:34 a.m. UTC | #1
Hi,

On Tue, Feb 27, 2024 at 10:13:20AM +0800, Fang Hui wrote:
> If not, it will be deferred to the next frame,

I proposed an extended commit message in the previous review. If
ignored on purpose, could you suggest me how it could be improved.
Just this one line is too short and not explicative imo

> as there's a bug assigned to this issue
> https://bugs.libcamera.org/show_bug.cgi?id=210

What I meant was to add:

Bug: https://bugs.libcamera.org/show_bug.cgi?id=210
>
> Signed-off-by: Fang Hui <hui.fang@nxp.com>

Before the Signed-off-by tag

> ---
>  src/android/camera_device.cpp | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
> index 25cedd44..d45ed1a5 100644
> --- a/src/android/camera_device.cpp
> +++ b/src/android/camera_device.cpp
> @@ -952,8 +952,8 @@ int CameraDevice::processCaptureRequest(camera3_capture_request_t *camera3Reques
>  	 */
>  	if (camera3Request->settings)
>  		lastSettings_ = camera3Request->settings;
> -	else
> -		descriptor->settings_ = lastSettings_;
> +
> +	descriptor->settings_ = lastSettings_;

I still think you should re-initialize lastSettings_ as I proposed in
the review of the previous version. Was it left out intentionally
because you think it's not needed ? Could you explain why ?

As I've said, with your ack, I could have made the changes I proposed
before applying the patch, but as you sent a new version I deduce you
disagree with the proposed changes ?

>
>  	LOG(HAL, Debug) << "Queueing request " << descriptor->request_->cookie()
>  			<< " with " << descriptor->buffers_.size() << " streams";
> --
> 2.25.1
>
Fang Hui Feb. 28, 2024, 5:37 a.m. UTC | #2
Hi, Jacopo

Sorry for inconvenience. I just updated patches in the previous email  "[PATCH] android: camera_device: The first valid settings should be saved".
Let's go back to this one.

Yesterday,  after I refined patch, I still used "git send-email", so miss generated this email.

BRs,
Fang Hui

Patch
diff mbox series

diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
index 25cedd44..d45ed1a5 100644
--- a/src/android/camera_device.cpp
+++ b/src/android/camera_device.cpp
@@ -952,8 +952,8 @@  int CameraDevice::processCaptureRequest(camera3_capture_request_t *camera3Reques
 	 */
 	if (camera3Request->settings)
 		lastSettings_ = camera3Request->settings;
-	else
-		descriptor->settings_ = lastSettings_;
+
+	descriptor->settings_ = lastSettings_;
 
 	LOG(HAL, Debug) << "Queueing request " << descriptor->request_->cookie()
 			<< " with " << descriptor->buffers_.size() << " streams";