From patchwork Thu Jan 9 14:32:05 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 22500 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 5DE00C32EA for ; Thu, 9 Jan 2025 14:32:21 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 34EDD684EA; Thu, 9 Jan 2025 15:32:18 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="pH2dbdOs"; dkim-atps=neutral Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E24D2684E0 for ; Thu, 9 Jan 2025 15:32:15 +0100 (CET) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-436249df846so7781685e9.3 for ; Thu, 09 Jan 2025 06:32:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1736433135; x=1737037935; 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=FK56TuW/KQijiRb8LKpul7gor7QkK2FNyQNIdQ+Swkk=; b=pH2dbdOsf3S/OhZVqewff8gmW1DkUkZgZHzxd9sXdzG2jlNzyNrNcNYA6t78iX3tZz eI6s02yb/hjpXVctB0G+PQjyLBVUyKV/RqmnasRsyNXSKVnGw0psHD8N9Vf/Nqby+ycU LHrrebcbcSNAWRrPzII8HF6lV4+hu6D9lHaXcV4qhpGT/At43IFfDGnXP+pjO7HZl0lB jYn78uZfT3SR6hwmjyH0X//wPvbygEaLkOuwqshMr1Qc5z4yK3t0TtU+NviW7txt0Prn z2YOw3GXmJwaGws2DUg2Yueo+Y1yPW4Oetgamufa63ttNahAUZle2IFX4CT4ZrwF8V+v 7DcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736433135; x=1737037935; 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=FK56TuW/KQijiRb8LKpul7gor7QkK2FNyQNIdQ+Swkk=; b=P25YHmbltffUgpHWMURD0t6RIAfLieqLZLTBHZ7EaKt83ZsrexxjWaoEAa/0nV6JEC TSU5JSelvdGIKrv3fvHDbxwGwkimD9mB8dhbQPoifFoByYDokF4Zunky3v9gNGvWc1wI pROv6kdN1i0S2ngYznX/VX/zPzMoKu5Vek3s3ZPNu0CZcW3CfWWJMQ2wGOV6NeoqWHPK f97JBuhVnq6n/ax+9neUmemtwxKca8dJF3UUkAfmLv1SvF16MBiF1GQsvkLmG9ii9Nqj jVMAAYejtQefE9DCa+SJMEvMMED3x6KjD2wSsq5AH8XNXqot0jJVFoJ+310C+8pprNO4 DRMQ== X-Gm-Message-State: AOJu0YwHWAJ5LNBfz7skKfGyxtm6rZCOYZesmC3QhZ+XtW/CVaHog+Tl AgR8pQEBKnUunUPEGnDNmTt+hNdnShfCioto3a2xdcIcG3Mm5O4IcMpjni0G4mCXfdzq8uzBIfc Y X-Gm-Gg: ASbGnctdqZkvl5F5i0MvYX6MAZWWbzH4Zx3VJeYQ6jqQdJdh8akDqEpbzECf8R4uz6Z 8HPp8ZRGhBp7bim8dmtgBGq2zufSQxmNKKFpLPS+emzOrVVAwgUgH9lX/iXhbMy4vJSZPG04wod 6tRECQBuQ4/bHYzlZU0fS07xvmjQvmK92Lzk2HlABXJXmeeeYivwqzsZp6TC7+Ci2RdZmn3E61O /DOILIxZzVncjxeaOkkcnytDZ50t4/yEYU465yGq1PURiDzFJhIu3OywaRZyuazlYQYi5AWzFoU 6jpBzEPG33ah X-Google-Smtp-Source: AGHT+IEO3VqYmxG0ReB1StjX43HzdN+UpSjR0NN3IrPy2vGUx4dvngLFcoTItOI0Tgmbb4K8G6EZ5w== X-Received: by 2002:a05:600c:5698:b0:434:a7f1:6545 with SMTP id 5b1f17b1804b1-436e2d91910mr56188355e9.27.1736433135221; Thu, 09 Jan 2025 06:32:15 -0800 (PST) Received: from raspberrypi.pitowers.org ([2a00:1098:3142:1f:ffc9:aff6:7f7f:893b]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a8e4b80b2sm1952569f8f.80.2025.01.09.06.32.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jan 2025 06:32:14 -0800 (PST) From: David Plowman To: libcamera-devel@lists.libcamera.org Cc: David Plowman , Kieran Bingham , Naushir Patuck , Laurent Pinchart Subject: [PATCH v3 1/7] controls: Add FrameWallClock control Date: Thu, 9 Jan 2025 14:32:05 +0000 Message-Id: <20250109143211.11939-2-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250109143211.11939-1-david.plowman@raspberrypi.com> References: <20250109143211.11939-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 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/libcamera/control_ids_core.yaml b/src/libcamera/control_ids_core.yaml index 1dfaee0c..b0555d76 100644 --- a/src/libcamera/control_ids_core.yaml +++ b/src/libcamera/control_ids_core.yaml @@ -1049,4 +1049,19 @@ controls: description: | Enable or disable the debug metadata. + - FrameWallClock: + type: int64_t + direction: out + 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 CLOCK_REALTIME clock. + + 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. + ...