From patchwork Fri Dec 6 14:27:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 22212 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 8D419BE173 for ; Fri, 6 Dec 2024 14:27:54 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 966B366175; Fri, 6 Dec 2024 15:27:50 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="bAbjHXHO"; dkim-atps=neutral Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 95CAA66158 for ; Fri, 6 Dec 2024 15:27:46 +0100 (CET) Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-434a9f2da82so14413385e9.2 for ; Fri, 06 Dec 2024 06:27:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1733495266; x=1734100066; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ix5wJI5o5aG4F8QgGrowVLLKPUwwpcwGZhwknVZBHnc=; b=bAbjHXHOelFxx712eez0mE6q6u5ghnyWS0rBbhzV+cnno9tTFu0gADZ4nMEQ6hxY4g me0MtSvKaVHLYG6CwqATvYOVu6CxejJjm6gtHwL6zPT53hnDC81JFT93Mod02xt4Gsqj Q8veguoWF/70Xavz6Dy1KipTgWGds7L59GVazCc4H+N4W4w4pz7j7oe/jFaQnGFhNwC3 R8KPPi4wNd8I3S5J3iwbBiQj5vfCwj6BBgYRdRK7KRbeWUPYqA23Cv/WbAJmiBab7JVh OCteCsTTNL2DicohIE+fnCoQuqTrW9pw1TfqHbJp03cCz2yvpDetSa5811MsKAM9LIGf HrXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733495266; x=1734100066; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ix5wJI5o5aG4F8QgGrowVLLKPUwwpcwGZhwknVZBHnc=; b=aOA+4Dt4fCepfpGTpZbHTnuEzosiyZPhHoIzl5x3djKDJzIiZ2l2fa0H6j0uKjn1hy 2FHCF3mmU6Zvzf+ypw8DUEa+zCYmhmoaxJXYJqNoY+4BpQwC+KlJiv3Mw1GeaMGFXeHk /V6Z9Dn8nnsEdbXetH606OZOzXvLx6wyb6FJhdXTGMHysn5AvqGKFZM2RRd/ZG0SkPji IkdMnG54DWA5mBsbzyuGMSvCFPt6DKmhLkqUA0i01/isFefPEDW+BEehr4K3KJPPWJQM vonxxtk+uEMIgGCL8+Btr1ceakYg1SP+dzcZpdE1Rk8laTiVkdalhCapVPig5ZlKVKYc ichw== X-Gm-Message-State: AOJu0YwBK9ElVogO2Fq20s1BlrXdOJgurorFm8+RWMsTtGa7Skh63V+/ qUhZQUsgki1OhYpZVHFOWfQeSJo0ztp9VhXYXmyXwnVpwqLDT1KH5vL1pCJneve59JMYnRB0SAr c X-Gm-Gg: ASbGncuZzidmLEErD89My1ptOp93vS2ZFZBDrr719edIpYD3uG28/jAMpkUieFvHzgf pBsUrhH9s/WYcZCalZXF31oyOCFhFsm3dVWyOkRCgDOSvMnKrxu+ppjaFYaic68M+d/UDKqAZgz SUPw+2XoSTZR1MUlPY0f9/GATP/8wijct/7tSdj82Rzka6ZVyof+XaqGFgmZuxpiLsOLyl+NRzi LMPdz9nQV4mqBs+Ld9p2nmkEfkgTVYHOcEif/uav1lu35TKdi9wFp16DBxWWAJM9bVtff3apyA= X-Google-Smtp-Source: AGHT+IF0Udg/FhpCltpUlBqjSU3EGJbhseUhuu/cEkZHmRB+cMRxy/aIkD9Kn5DHsETac8i8rrMIWA== X-Received: by 2002:a05:600c:1d21:b0:434:9cc4:5139 with SMTP id 5b1f17b1804b1-434ddeb0492mr33102595e9.17.1733495265845; Fri, 06 Dec 2024 06:27:45 -0800 (PST) Received: from localhost.localdomain ([88.202.252.90]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-386220b071dsm4608219f8f.101.2024.12.06.06.27.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Dec 2024 06:27:45 -0800 (PST) From: David Plowman To: libcamera-devel@lists.libcamera.org Cc: David Plowman Subject: [PATCH 1/5] controls: Add FrameWallClock control Date: Fri, 6 Dec 2024 14:27:38 +0000 Message-Id: <20241206142742.7931-2-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241206142742.7931-1-david.plowman@raspberrypi.com> References: <20241206142742.7931-1-david.plowman@raspberrypi.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 FrameWallClock control that reports the same moment as the frame's SensorTimestamp, but in wallclock units. Signed-off-by: David Plowman Reviewed-by: Kieran Bingham Reviewed-by: Naushir Patuck Reviewed-by: Laurent Pinchart --- src/libcamera/control_ids_core.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/libcamera/control_ids_core.yaml b/src/libcamera/control_ids_core.yaml index d45cf8e5..d951b2a3 100644 --- a/src/libcamera/control_ids_core.yaml +++ b/src/libcamera/control_ids_core.yaml @@ -971,4 +971,18 @@ controls: description: | Enable or disable the debug metadata. + - FrameWallClock: + type: int64_t + description: | + This timestamp corresponds to the same moment in time as the + SensorTimestamp, but is represented as a wall clock time as measured by + the Linux-specific CLOCK_REALTIME clock id. + + Being a wall clock measurement, it can be used to synchronise timing + across different devices. + + \sa SensorTimestamp + + The FrameWallClock control can only be returned in metadata. + ...