From patchwork Mon Feb 26 03:08:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fang Hui X-Patchwork-Id: 19538 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 41DA9BD80A for ; Mon, 26 Feb 2024 03:46:12 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 886EB627FE; Mon, 26 Feb 2024 04:46:11 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="YqSCVC82"; dkim-atps=neutral Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on20600.outbound.protection.outlook.com [IPv6:2a01:111:f403:2607::600]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C2B8361C95 for ; Mon, 26 Feb 2024 04:40:26 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ql2B9Pz9/QEBPxIZjKAtfIMZINYCNHBIvPZdjjRny3Wg5jWUoSjvS9OG7AwTvTB7L+K6wxEpMS4egdUMV2sl8ouaroQBbAebLN3X49JFuB3a0WRWzUq9kI8p8YsVqIMJQHxIy/7ZCbdFqmUOMib+LgxaCb4BjgsWVHP/aYFdqgQPRkZ3ytUeIbkjPKah56XJpluWuEAKgpaObBUFVKnC/Qzh1EsDUYHpIY71jL7n6p2lvhsGxuXJAkKz5yt2tIEPkD6teoFDmpG5eOK1VmKkIx82wJU2ynW0vYLWVg3/4q27sIZcP3oYcUEu5N3xIaVfQzLRlG0XX5HUsaOD0iu2Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gH9LAjTlzRwhfzfuLSyQdhQrrZ6LMuCo2t98fnE6ejI=; b=IQ7kATnBgvXIbCfX8WZrAxSpUztXJ878KBO5HDwJEOPxMNkMS69iFQoqv99v3OITHzIPsFG0j9RuZ8Ldpkn3S6zALPBx07mVEMaN6ZqlQB5v/UdR+cGO2XACEaSt2bCrlVaRn9Fmn43MaOVi46UdIuDO2uMg3T2WtE2ChFpQx2KhZ558lS7Z816Jq6kwCYGuG5bmnnRIjyEecvaOeF6lVqVFk91925OgY3sFIFM+TDLLWzVtk6D6/Kt+WFAHBuA4uFoDLqUA7vq5ejiM/wBvDX6674BO41C0mLHwu2HXXdO+/KEBavCr8Ldk94tHZEDSy114CguCCY6q46D/1Crsig== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gH9LAjTlzRwhfzfuLSyQdhQrrZ6LMuCo2t98fnE6ejI=; b=YqSCVC82q7NU/Gp7r0uMy271uH11U5NVW0BHuXKaPHvpm/sQ483TzJ+CZwaj0ktyl92uEITq8XIOZaXBAapOTQ1QLoqXT5d3vN0Xl7/AzPHF/fTYhJI2FIRheEoiiP0FTCX+3WFQ6qT3l0UNU/qXpz7GXcMHjpCNEWbukPZrDuQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DB9PR04MB9284.eurprd04.prod.outlook.com (2603:10a6:10:36c::8) by AS8PR04MB8562.eurprd04.prod.outlook.com (2603:10a6:20b:421::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.34; Mon, 26 Feb 2024 03:40:25 +0000 Received: from DB9PR04MB9284.eurprd04.prod.outlook.com ([fe80::7d9b:76bb:b6c6:7f69]) by DB9PR04MB9284.eurprd04.prod.outlook.com ([fe80::7d9b:76bb:b6c6:7f69%6]) with mapi id 15.20.7316.031; Mon, 26 Feb 2024 03:40:25 +0000 From: Fang Hui To: libcamera-devel@lists.libcamera.org Subject: [PATCH] android: camera_device: The first valid settings should be saved Date: Mon, 26 Feb 2024 11:08:12 +0800 Message-Id: <20240226030812.2225757-1-hui.fang@nxp.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: SI2PR04CA0004.apcprd04.prod.outlook.com (2603:1096:4:197::22) To DB9PR04MB9284.eurprd04.prod.outlook.com (2603:10a6:10:36c::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR04MB9284:EE_|AS8PR04MB8562:EE_ X-MS-Office365-Filtering-Correlation-Id: c32c0268-9c65-4f5f-66d4-08dc367caac4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mayGy14lF0YgHLnsOAR0egsKuUHZs6v4R2FWTOpaW3Fk+DvugUo6sMQZHZu21ihcq35ZXdV2kh5OSN/4Tt/Auac8w2zhgBRvEzg8eoYuw8Wjsym/oBgJQQDrUCQISZU1EX2HTDQOgdHTdOUIK5GBhuL0rfFa26HImlrnAr7Gz0A8uXnXYToLEW120xvdsbgK1f67/chxjdDhVoWbOdrW5/0GjzsCxOnD3K53MdS3J9viDqnrOQlN+Ga9UN/h4OPY/mUWUFVt9RWCPYiR38aWSrNUNHu37v/m8lNl0ziWAJ01O3HmUxcZJV7f2ipPoTuzX4qcnkZR7n9ljpnaWYMq9KG/VDfxYb+wCd2+8lmoqfYt5hRqzutwB8jM/mxg/c7iKwxzQpP0gfKOPwP6/bSWIJjM6q4HdU7+hwna+QoA6AFv7KmpWWGcnviXTLevjxKATwqbMIHr+bFEObyXDEx4BJFfrLSXinNlQFSQha8/KZElkUaRvSxZb4ERfAhOtlMr4Et4iSmVfocn1PvL0EuJSI27mJrada5EsF9Gweiv+poNyjKIbV1XhlAddfjzBl6LwJzbctkw8P5J4Fol8xIA18HcLu3w8TuUnkak8ScHNhlDiSiGnbqpUCYT7vPhaoWjgmvhCYksPTpd75OusHC6NYT5DwWIy5Ae1WrLEkxbrrs7D2r2Lvpl8VE1eHe9LxbSFcASssHWfHOq/MVGEWwLuKuP3MmhXQvXMEshUB/9LG4= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB9PR04MB9284.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(38350700005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ZyVM0U1EIq8+m0ZhVzWETcEmhtm/kxeG8PtJYBORKwNuJ5eGLL5f9fxaC8QukpyRbblB9mtXbLBKoCr30iAyB1d40YMgxxOMCfDwbFIld2oskBOiDLrej0hD6M77Y+kfaP7N5KulN1GoFH8QDLI17Y0cOoFl5BvWBsLAoPHo/6iHAubVK4fRCuVA3mYQ7tgQnALN4wdX2GGRjmLp8YCMWM1TyQ8z2UesmG8CIsWprKw53iI6jTukF3xkfhVxF287AASf2vdjy//zL+Htfy1x124P1I2o3zyOX+xa9xQzad1mrxXRmK4ZM+28LocsRVSoWZHVV9/3P0pJx401cx2sFeBkvqFQ20No4sU4EF00bjHMtT64TyhAa05yQX60jI5t29fmE6aqCBCc/o1hufM+oVdBUdMj/2hHuCy4ZN8ZpsP+axmHbhScWQh8Poq5DexX4YVbpq5fDrIb7nENYy9RqIRsZG+J3yPVPD/buedwMtyRGPDKgu13oOtqhpkRsBSSsDHoZS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riginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c32c0268-9c65-4f5f-66d4-08dc367caac4 X-MS-Exchange-CrossTenant-AuthSource: DB9PR04MB9284.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Feb 2024 03:40:25.1710 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SYmsbbWvPHqjC/FkwEs/UvTyyVw3C0sb/rVE8FRzuVPSlQHhBZAF0FXPOjNHl8sUQ3tUxE3AUkE3tFBa5j+jLg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8562 X-Mailman-Approved-At: Mon, 26 Feb 2024 04:46:09 +0100 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: biomifang118@gmail.com Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" If not, it will be deferred to the next frame. Signed-off-by: Fang Hui Reviewed-by: Umang Jain Tested-by: Jacopo Mondi --- 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_; LOG(HAL, Debug) << "Queueing request " << descriptor->request_->cookie() << " with " << descriptor->buffers_.size() << " streams";