From patchwork Fri Aug 29 09:10:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 24260 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 89A31BD87C for ; Fri, 29 Aug 2025 09:10:32 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3D7E66931A; Fri, 29 Aug 2025 11:10:32 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="XgdSaJNS"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0961C6931F for ; Fri, 29 Aug 2025 11:10:30 +0200 (CEST) Received: from neptunite.hamster-moth.ts.net (unknown [IPv6:2404:7a81:160:2100:af44:1f54:23d7:1088]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 924274B31; Fri, 29 Aug 2025 11:09:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1756458564; bh=iidtMOML//b3GZb3MKcCtuSa9v5eXv0IixEihlaMFsY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XgdSaJNS7WGJqQ1R3fwlOu1MM3Zn7dLzRu67mAh2Be5V+NGV0+GGyEBgiintYsE4P jMxF7IgfQjFcDDt5/B3w5En4Q2Jtx4kAdnzpiQ6lHuDmIWNSXxiTxhg/WDBi/AbErc 6e9RwHHSuBarp3zZEMVWSc6N4hKAQEJ/YaPvbjCY= From: Paul Elder To: libcamera-devel@lists.libcamera.org Cc: Paul Elder , david.plowman@raspberrypi.com, naush@raspberrypi.com, kieran.bingham@ideasonboard.com, stefan.klug@ideasonboard.com Subject: [PATCH 1/4] controls: Add SyncAdjustment and SyncInterface controls Date: Fri, 29 Aug 2025 18:10:07 +0900 Message-ID: <20250829091011.2628954-2-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250829091011.2628954-1-paul.elder@ideasonboard.com> References: <20250829091011.2628954-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add a couple of controls related to the sync algorithm. The SyncAdjustment control signals to the Camera the amount to adjust the frame duration by for a single frame. Any Camera that implements this control (and FrameDurationLimits and SensorTimestamp metadata) will be supported by the sync algorithm layer. The SyncInterface control signals to the sync layer which network interface to use for listening (on client mode) or for multicasting (on server mode). Given that enabling/disabling sync is done via control (as opposed to always being on via environment variable), choosing the network interface should be chosen in a similar manner. Signed-off-by: Paul Elder --- src/libcamera/control_ids_core.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/libcamera/control_ids_core.yaml b/src/libcamera/control_ids_core.yaml index eec4b4f937ee..8721b5e80e97 100644 --- a/src/libcamera/control_ids_core.yaml +++ b/src/libcamera/control_ids_core.yaml @@ -1284,4 +1284,27 @@ controls: The FrameWallClock control can only be returned in metadata. + - SyncAdjustment: + type: int32_t + direction: inout + description: | + This is an adjustment value that can be either positive or negative, in + microseconds, that tells the Camera how much to adjust the frame + duration by. This is meant to be used by the Sync layer, and any camera + that implements this control (and FrameDurationLimits) will be + supported by the sync layer. When reported in metadata, this reports + any frame duration adjustment that occurred based on the control value + that was passed in. + + - SyncInterface: + type: string + direction: inout + description: | + This is the IP address of the network interface to use for the Sync + algorithm provided by the Sync layer. When set using the SyncMode + control to client mode, this will be the network interface to listen + on, and for server mode it will multicast from this network interface. + If no network interface is supplied by this control then INADDR_ANY + will be used. + ...