[{"id":34596,"web_url":"https://patchwork.libcamera.org/comment/34596/","msgid":"<CAEmqJPosa7wUChHCw0p6Zk2Mg4VfM81yn7Xs2kUBqYkUszxg4A@mail.gmail.com>","date":"2025-06-23T10:44:54","subject":"Re: [PATCH v1] libcamera: controls: Clarify units of\n\t`FrameWallClock`","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi Barnabás,\n\nThanks for updating this.\n\nOn Mon, 23 Jun 2025 at 09:19, Barnabás Pőcze\n<barnabas.pocze@ideasonboard.com> wrote:\n>\n> The description of the control mentions SensorTimestamp multiple\n> times, but it omits that the two do not have the same units.\n> Clarify that.\n>\n> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n\nReviewed-by: Naushir Patuck <naush@raspberrypi.com>\n\n> ---\n>\n> Or could it easily be converted to nanoseconds? Is there an overflow issue\n> in the ClockRecovery class in that case? What was the motivation for making\n> it μs? (I suppose nanosecond resolution is not that useful when synchronizing\n> across a network, etc?)\n>\n> ---\n>  src/libcamera/control_ids_core.yaml | 3 ++-\n>  1 file changed, 2 insertions(+), 1 deletion(-)\n>\n> diff --git a/src/libcamera/control_ids_core.yaml b/src/libcamera/control_ids_core.yaml\n> index 028919ef3..0708ec7cc 100644\n> --- a/src/libcamera/control_ids_core.yaml\n> +++ b/src/libcamera/control_ids_core.yaml\n> @@ -1272,7 +1272,8 @@ controls:\n>        description: |\n>          This timestamp corresponds to the same moment in time as the\n>          SensorTimestamp, but is represented as a wall clock time as measured by\n> -        the CLOCK_REALTIME clock.\n> +        the CLOCK_REALTIME clock. Note that this control measures time in units\n> +        of microseconds as opposed to nanoseconds in case of SensorTimestamp.\n>\n>          Being a wall clock measurement, it can be used to synchronise timing\n>          across different devices.\n> --\n> 2.50.0","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 121D6BDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 23 Jun 2025 10:45:29 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1B27B68DE3;\n\tMon, 23 Jun 2025 12:45:28 +0200 (CEST)","from mail-vs1-xe33.google.com (mail-vs1-xe33.google.com\n\t[IPv6:2607:f8b0:4864:20::e33])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B2CF968DC9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Jun 2025 12:45:26 +0200 (CEST)","by mail-vs1-xe33.google.com with SMTP id\n\tada2fe7eead31-4e7f553aec9so174273137.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Jun 2025 03:45:26 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"jDUUxLMJ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1750675525; x=1751280325;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:cc:to:subject:message-id:date:from\n\t:in-reply-to:references:mime-version:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=fQP7urIH/FJoa1sOXyKUVcDKH14VMJwaKg9ShPOmAEE=;\n\tb=jDUUxLMJESKeH4BKY56jj1Xu3I6X+5Qb3lawXyiHcmd9Rl1bWDhotLDf/BArvc/hrL\n\tiQcJvf5PSzJXs9Bnj7olNyzigv/pqkHy+jXoHve+zRgZCfcq2rmImkysNtEazaED5OSv\n\tuMRAaJhKuKaHc0ODuhptq4mKHdXeK1S/xv7n3CtQBcBUCEwQrvYZJsp93ihvbZRun0pP\n\t3e1BouBlsuPy0ZHxj9t4zUzGQoPQfS++HznILF+JQoT0x6QdcAkWIu02UqgtMsM4fHGT\n\t9PazGi1Kp3NREkeZizBeYfImjq/9OWNqfI8/d9jKO6yx3EKPSl7P9eRHE3FVXRelG9L8\n\tizXQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1750675525; x=1751280325;\n\th=content-transfer-encoding:cc:to:subject:message-id:date:from\n\t:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=fQP7urIH/FJoa1sOXyKUVcDKH14VMJwaKg9ShPOmAEE=;\n\tb=rS20f6ZDaHmAYQs+1u2eBO6L9BR2CK/P2+GYHCREk9I1SYj+DP4TynDvZMW/ljbRgE\n\tJ9awtuVhlROZNkNQIJOaA9Zuu/X8NpcqlqAxQWpmy11TeMOsOZWAipTnlcKmMaZa9hAY\n\t7PtGT9QOr822jsubDUxIgxypP7LaUPyV6xuBI98sNKwgKkws2+vo5Hz7GKcM2icimVXY\n\t0m2bYmu2O5Tx7/24Td0CuzwswSFrKPFv5KRkV+D9oc/+g6/DxH6Bjg7FWYBKnPuNsYgW\n\tkOd1JziZqvRZ7nmg+1hHyVuFnr7/s96fNwY8oHG8E3HV12d960C57e2QQdIamFFokDNS\n\tBFxA==","X-Gm-Message-State":"AOJu0Yysuv8OAT2FQbSi6UAqTyC1cNsobmSVo589yIMMqZ3RLmRhx2Ov\n\th1zAGqOZKwa9k65iTQzc/J0X+VzVRJUH+zoCYijiQQPIuUvkHno9KXM/dpEtQy2zPK8JcuYHIFJ\n\tI9C2sAnxC79wMoJDKS1xR6qIJrWjrpo7hQTkrlp21IXfM1qw5uJ/h","X-Gm-Gg":"ASbGnculU4qurHOVkr8t+ixv8h0kvXG3Hd7lxWHAVTUPgPiJXeqO4VBZmvi/v1dzp7e\n\tpZR1qAh+dDa9UQjUZYem6BjlfOsWAN0TMlrVX3uSn39BboGXgckeXcp8w1BpjaRDqp5/oZ0mT5R\n\tAAmjo0zMNulopn9HRUgucTkSA4psaimgDJYTTuzjv0k/5VIo02aHTwxLCoxN9nytCus5IrF0AFt\n\tNk=","X-Google-Smtp-Source":"AGHT+IH2etOFTkLvh+ghzHdX/MdWLOckcC0UcYeswXC/V+VPxup2BvMZ/16qREq6fh7Q1G9JO1Xv8B3MYnmqDn+tt1E=","X-Received":"by 2002:a05:6102:3048:b0:4de:ece4:d260 with SMTP id\n\tada2fe7eead31-4e9c2a1b02cmr2045668137.3.1750675525651;\n\tMon, 23 Jun 2025 03:45:25 -0700 (PDT)","MIME-Version":"1.0","References":"<20250623081922.96900-1-barnabas.pocze@ideasonboard.com>","In-Reply-To":"<20250623081922.96900-1-barnabas.pocze@ideasonboard.com>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Mon, 23 Jun 2025 11:44:54 +0100","X-Gm-Features":"Ac12FXxY4AlSWJf-OlnE5Y26Id04O4x4MHCh48JbiY33Zmhlxi0ZI9afGtZVsPQ","Message-ID":"<CAEmqJPosa7wUChHCw0p6Zk2Mg4VfM81yn7Xs2kUBqYkUszxg4A@mail.gmail.com>","Subject":"Re: [PATCH v1] libcamera: controls: Clarify units of\n\t`FrameWallClock`","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org, \n\tDavid Plowman <david.plowman@raspberrypi.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":34597,"web_url":"https://patchwork.libcamera.org/comment/34597/","msgid":"<175067998917.3871677.16365233218504380614@ping.linuxembedded.co.uk>","date":"2025-06-23T11:59:49","subject":"Re: [PATCH v1] libcamera: controls: Clarify units of\n\t`FrameWallClock`","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Naushir Patuck (2025-06-23 11:44:54)\n> Hi Barnabás,\n> \n> Thanks for updating this.\n> \n> On Mon, 23 Jun 2025 at 09:19, Barnabás Pőcze\n> <barnabas.pocze@ideasonboard.com> wrote:\n> >\n> > The description of the control mentions SensorTimestamp multiple\n> > times, but it omits that the two do not have the same units.\n> > Clarify that.\n> >\n> > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> \n> Reviewed-by: Naushir Patuck <naush@raspberrypi.com>\n> \n> > ---\n> >\n> > Or could it easily be converted to nanoseconds? Is there an overflow issue\n> > in the ClockRecovery class in that case? What was the motivation for making\n> > it μs? (I suppose nanosecond resolution is not that useful when synchronizing\n> > across a network, etc?)\n\nWould this be more beneficial for the accuracy of the sync algorithm?\n(And also keep both timestamps 'aligned' for units usage?)\n\n> >\n> > ---\n> >  src/libcamera/control_ids_core.yaml | 3 ++-\n> >  1 file changed, 2 insertions(+), 1 deletion(-)\n> >\n> > diff --git a/src/libcamera/control_ids_core.yaml b/src/libcamera/control_ids_core.yaml\n> > index 028919ef3..0708ec7cc 100644\n> > --- a/src/libcamera/control_ids_core.yaml\n> > +++ b/src/libcamera/control_ids_core.yaml\n> > @@ -1272,7 +1272,8 @@ controls:\n> >        description: |\n\nShould we maybe have some sort of explicit units field on controls when\nit makes sense?\n\n> >          This timestamp corresponds to the same moment in time as the\n> >          SensorTimestamp, but is represented as a wall clock time as measured by\n> > -        the CLOCK_REALTIME clock.\n> > +        the CLOCK_REALTIME clock. Note that this control measures time in units\n> > +        of microseconds as opposed to nanoseconds in case of SensorTimestamp.\n> >\n> >          Being a wall clock measurement, it can be used to synchronise timing\n> >          across different devices.\n> > --\n> > 2.50.0","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id B45D4BDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 23 Jun 2025 11:59:54 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E1D7A68DE3;\n\tMon, 23 Jun 2025 13:59:53 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1D7DF68DC9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Jun 2025 13:59:52 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 62AC813BE;\n\tMon, 23 Jun 2025 13:59:35 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"K0C2BD4a\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1750679975;\n\tbh=V0QuxeFKpDDyoz1RkSFhXxHNBUryt4CW3Ff9d+QlEJg=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=K0C2BD4aNL4XqQjb1t1kfesiOtW5phdcLJ/qm8yPElIalWEM5pyY/wvrmW6Gcllev\n\tp+NN7fQ5zswxAPgo2h9UqLw22xRfbSmKrQ5lXZ8SJeIy3uUGfTfqdMcO+/EzIayOuX\n\tDbNKBC77AlzgIPTxsWX5m1ifg1C/qNdi0LLv2m8s=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<CAEmqJPosa7wUChHCw0p6Zk2Mg4VfM81yn7Xs2kUBqYkUszxg4A@mail.gmail.com>","References":"<20250623081922.96900-1-barnabas.pocze@ideasonboard.com>\n\t<CAEmqJPosa7wUChHCw0p6Zk2Mg4VfM81yn7Xs2kUBqYkUszxg4A@mail.gmail.com>","Subject":"Re: [PATCH v1] libcamera: controls: Clarify units of\n\t`FrameWallClock`","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org,\n\tDavid Plowman <david.plowman@raspberrypi.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tNaushir Patuck <naush@raspberrypi.com>","Date":"Mon, 23 Jun 2025 12:59:49 +0100","Message-ID":"<175067998917.3871677.16365233218504380614@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":34598,"web_url":"https://patchwork.libcamera.org/comment/34598/","msgid":"<CAEmqJPrXA3b1iBK4OvrfR+jGEEbY7yhXCM7E5PFx=yG7n4aa8A@mail.gmail.com>","date":"2025-06-23T12:11:48","subject":"Re: [PATCH v1] libcamera: controls: Clarify units of\n\t`FrameWallClock`","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"On Mon, 23 Jun 2025 at 12:59, Kieran Bingham\n<kieran.bingham@ideasonboard.com> wrote:\n>\n> Quoting Naushir Patuck (2025-06-23 11:44:54)\n> > Hi Barnabás,\n> >\n> > Thanks for updating this.\n> >\n> > On Mon, 23 Jun 2025 at 09:19, Barnabás Pőcze\n> > <barnabas.pocze@ideasonboard.com> wrote:\n> > >\n> > > The description of the control mentions SensorTimestamp multiple\n> > > times, but it omits that the two do not have the same units.\n> > > Clarify that.\n> > >\n> > > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> >\n> > Reviewed-by: Naushir Patuck <naush@raspberrypi.com>\n> >\n> > > ---\n> > >\n> > > Or could it easily be converted to nanoseconds? Is there an overflow issue\n> > > in the ClockRecovery class in that case? What was the motivation for making\n> > > it μs? (I suppose nanosecond resolution is not that useful when synchronizing\n> > > across a network, etc?)\n>\n> Would this be more beneficial for the accuracy of the sync algorithm?\n> (And also keep both timestamps 'aligned' for units usage?)\n\nNo benefit wrt accuracy going from us to ns in the sync algorithm.\nThe only benefit would be to align the units for these two controls.\nBut, to be honest, I don't think that's such a big deal either.\n\nNaush\n\n\n>\n> > >\n> > > ---\n> > >  src/libcamera/control_ids_core.yaml | 3 ++-\n> > >  1 file changed, 2 insertions(+), 1 deletion(-)\n> > >\n> > > diff --git a/src/libcamera/control_ids_core.yaml b/src/libcamera/control_ids_core.yaml\n> > > index 028919ef3..0708ec7cc 100644\n> > > --- a/src/libcamera/control_ids_core.yaml\n> > > +++ b/src/libcamera/control_ids_core.yaml\n> > > @@ -1272,7 +1272,8 @@ controls:\n> > >        description: |\n>\n> Should we maybe have some sort of explicit units field on controls when\n> it makes sense?\n>\n> > >          This timestamp corresponds to the same moment in time as the\n> > >          SensorTimestamp, but is represented as a wall clock time as measured by\n> > > -        the CLOCK_REALTIME clock.\n> > > +        the CLOCK_REALTIME clock. Note that this control measures time in units\n> > > +        of microseconds as opposed to nanoseconds in case of SensorTimestamp.\n> > >\n> > >          Being a wall clock measurement, it can be used to synchronise timing\n> > >          across different devices.\n> > > --\n> > > 2.50.0","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 250E1C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 23 Jun 2025 12:12:23 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5FB0468DCE;\n\tMon, 23 Jun 2025 14:12:22 +0200 (CEST)","from mail-vk1-xa31.google.com (mail-vk1-xa31.google.com\n\t[IPv6:2607:f8b0:4864:20::a31])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5380968DC9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Jun 2025 14:12:20 +0200 (CEST)","by mail-vk1-xa31.google.com with SMTP id\n\t71dfb90a1353d-532d07a648cso22434e0c.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Jun 2025 05:12:20 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"lV/IR9NO\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1750680739; x=1751285539;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:cc:to:subject:message-id:date:from\n\t:in-reply-to:references:mime-version:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=h0yDNJHD4gjP3xPeZeg3IYWPCSEP0SxyV6qeNMuw10o=;\n\tb=lV/IR9NOB2F/5E+DestsOyY0XL44bQSI0/S22Y28HYav/pKOx+z2AfJvJ/2nxsFNGC\n\tXxZiB6tvlL7qtnlLO5FS+uvaSvr1prnw7bD9HWDV+666sMXfquMJ9qQt4JOrW3e/KpLC\n\tYgRlfCksIfzCmv0EM7mKvmvn2cUoJsf5dbzfB3JcQm+y9m5/sFtVOyFWgS1IpKChi55N\n\tAKykMaFcmg+kMUitawItXwfWOy7LlpOZojHTjsCPwIx388YzuwU/X5UD4Ly5bvwh6gMK\n\tfwzE7JgwWEoTHnJT+HM/gFIUqhVGbX0wxOOMMjZimxLn4uaPCkSvfrxEFr1dzZ/3uNa9\n\tg2FA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1750680739; x=1751285539;\n\th=content-transfer-encoding:cc:to:subject:message-id:date:from\n\t:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=h0yDNJHD4gjP3xPeZeg3IYWPCSEP0SxyV6qeNMuw10o=;\n\tb=cj0XMSSBMsQIAKCI3BfGNDm2o+L+v7Ehn8JgsT+Fdu7yeiK1BHTED8g7yvUhhW3gh3\n\t9RBPD1DWaPTR3fv8nNKmq11e4Vlrc64YeJa5hqNgpH+h1rQqa14m45e0i97HxQyR7Yf5\n\tSSHSci5lGQiZNHQAFWVONCHvpGe/OEE0kJAJR38gPnJ4UnAlw24R68CQ9I0vsEe4hFsS\n\tguMQglygpzWJ6eyur0xQWlC26o02I02+ONC62YRHuWs+CAj9reFa3UVyX+N2IneI7WD9\n\tj05kbhM3XYlURvDO3asHqF89zQHe2cocBqCCLQGTjeaPTSOm5B0IhSmZ5qOwPtP8dNZX\n\tMBgw==","X-Forwarded-Encrypted":"i=1;\n\tAJvYcCXraI5UgJ4DTldjM1lWS4/mYXxC8Qdyf91BzniOiRMne++kzctHmcFFOdnLgT+Q+XuIHTWFSV0B9OfKuwHT+uo=@lists.libcamera.org","X-Gm-Message-State":"AOJu0YyQhshZZeQZFSpt1ABNv02DCPja1phWJgZZm7iNV4vbIjShbRzt\n\tPMaHY+sNi92iHimT7VNBeYtwo9lR9zd3yuVNDebQTCjqKiCxe+y2KRc4jr8AF11g9jLOQPpS/7l\n\tt1jkha9GZaMi9mzKRKgDvRNb9sTdfs+gbTjT9FpeA6Q==","X-Gm-Gg":"ASbGnctag3s3CbJn/cifRzFqTMoRyVKWNLGp7SQy6Ki6K134s0eangBB/xEvavaZ2R8\n\tzINdGbRm58rUqUZggxEwSVSBJ/e6F6e8RLhHmB//hl5LrfkaHxeHseSjigrdQlQYi6dIyl7o+dZ\n\tWu6MVnpUYnQ/FK8e5kDtXqxX6p29d0bXwNMi75Wa/DLY1ww2ktobNn3Im5sDNFLg0MdsnpVwTPN\n\tVWKg18MFFvYxg==","X-Google-Smtp-Source":"AGHT+IERBlFgHQrZi/JavIQ5xPSInNrdUNRzrHvAnj+MgHjWVyh2bsBomg55xoJHeH1jSCOXXiCGwVg3Pras3/SlVZs=","X-Received":"by 2002:a05:6122:640f:b0:531:c06f:7e0d with SMTP id\n\t71dfb90a1353d-531c06f9927mr642824e0c.0.1750680739046; Mon, 23 Jun 2025\n\t05:12:19 -0700 (PDT)","MIME-Version":"1.0","References":"<20250623081922.96900-1-barnabas.pocze@ideasonboard.com>\n\t<CAEmqJPosa7wUChHCw0p6Zk2Mg4VfM81yn7Xs2kUBqYkUszxg4A@mail.gmail.com>\n\t<175067998917.3871677.16365233218504380614@ping.linuxembedded.co.uk>","In-Reply-To":"<175067998917.3871677.16365233218504380614@ping.linuxembedded.co.uk>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Mon, 23 Jun 2025 13:11:48 +0100","X-Gm-Features":"Ac12FXz7U8MglUGPCIUmHAkpdNj5S1TggyBOjDmB8rlKeuc-aDxi5ZYfGuZ-k4o","Message-ID":"<CAEmqJPrXA3b1iBK4OvrfR+jGEEbY7yhXCM7E5PFx=yG7n4aa8A@mail.gmail.com>","Subject":"Re: [PATCH v1] libcamera: controls: Clarify units of\n\t`FrameWallClock`","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org, David Plowman\n\t<david.plowman@raspberrypi.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":34599,"web_url":"https://patchwork.libcamera.org/comment/34599/","msgid":"<20250623123836.GC19319@pendragon.ideasonboard.com>","date":"2025-06-23T12:38:36","subject":"Re: [PATCH v1] libcamera: controls: Clarify units of\n\t`FrameWallClock`","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Mon, Jun 23, 2025 at 12:59:49PM +0100, Kieran Bingham wrote:\n> Quoting Naushir Patuck (2025-06-23 11:44:54)\n> > On Mon, 23 Jun 2025 at 09:19, Barnabás Pőcze wrote:\n> > >\n> > > The description of the control mentions SensorTimestamp multiple\n> > > times, but it omits that the two do not have the same units.\n> > > Clarify that.\n> > >\n> > > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> > \n> > Reviewed-by: Naushir Patuck <naush@raspberrypi.com>\n> > \n> > > ---\n> > >\n> > > Or could it easily be converted to nanoseconds? Is there an overflow issue\n> > > in the ClockRecovery class in that case? What was the motivation for making\n> > > it μs? (I suppose nanosecond resolution is not that useful when synchronizing\n> > > across a network, etc?)\n> \n> Would this be more beneficial for the accuracy of the sync algorithm?\n> (And also keep both timestamps 'aligned' for units usage?)\n\nI would really like to standardize on the same unit for all timestamps,\nunless there's a compeling reason not to do so.\n\n> > >\n> > > ---\n> > >  src/libcamera/control_ids_core.yaml | 3 ++-\n> > >  1 file changed, 2 insertions(+), 1 deletion(-)\n> > >\n> > > diff --git a/src/libcamera/control_ids_core.yaml b/src/libcamera/control_ids_core.yaml\n> > > index 028919ef3..0708ec7cc 100644\n> > > --- a/src/libcamera/control_ids_core.yaml\n> > > +++ b/src/libcamera/control_ids_core.yaml\n> > > @@ -1272,7 +1272,8 @@ controls:\n> > >        description: |\n> \n> Should we maybe have some sort of explicit units field on controls when\n> it makes sense?\n\nThat could be an interesting addition, but I'm not sure yet how useful\nit would be in practice.\n\n> > >          This timestamp corresponds to the same moment in time as the\n> > >          SensorTimestamp, but is represented as a wall clock time as measured by\n> > > -        the CLOCK_REALTIME clock.\n> > > +        the CLOCK_REALTIME clock. Note that this control measures time in units\n> > > +        of microseconds as opposed to nanoseconds in case of SensorTimestamp.\n> > >\n> > >          Being a wall clock measurement, it can be used to synchronise timing\n> > >          across different devices.","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id B1BF5BDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 23 Jun 2025 12:38:58 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BEF8D68DE3;\n\tMon, 23 Jun 2025 14:38:57 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 99B9D68DC9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Jun 2025 14:38:56 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id C0E15D77;\n\tMon, 23 Jun 2025 14:38:39 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"BcE9lE82\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1750682320;\n\tbh=Ir+IvwthImZ8AhcsdzTO/8eqWyMcDZlJBTgyMhK6gPQ=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=BcE9lE82qPnebuNIKD0XIFj+dhth/OuIg0NiZUNRd2sYJGJM029GWM8ZdIimCxTA2\n\tcYTQAtnrKXKVFMO2sBST6DqcIQ60B6HhMwQq552GvJZkpiEEUFWr7Lq5kQzUDiMT4D\n\tMfLk0fosZDjKQFjDERyHogfUd9T7r9jX8h/0aG3I=","Date":"Mon, 23 Jun 2025 15:38:36 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tNaushir Patuck <naush@raspberrypi.com>, \n\tlibcamera-devel@lists.libcamera.org, David Plowman\n\t<david.plowman@raspberrypi.com>","Subject":"Re: [PATCH v1] libcamera: controls: Clarify units of\n\t`FrameWallClock`","Message-ID":"<20250623123836.GC19319@pendragon.ideasonboard.com>","References":"<20250623081922.96900-1-barnabas.pocze@ideasonboard.com>\n\t<CAEmqJPosa7wUChHCw0p6Zk2Mg4VfM81yn7Xs2kUBqYkUszxg4A@mail.gmail.com>\n\t<175067998917.3871677.16365233218504380614@ping.linuxembedded.co.uk>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<175067998917.3871677.16365233218504380614@ping.linuxembedded.co.uk>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":34616,"web_url":"https://patchwork.libcamera.org/comment/34616/","msgid":"<175069073335.3871677.7073126963146361504@ping.linuxembedded.co.uk>","date":"2025-06-23T14:58:53","subject":"Re: [PATCH v1] libcamera: controls: Clarify units of\n\t`FrameWallClock`","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart (2025-06-23 13:38:36)\n> On Mon, Jun 23, 2025 at 12:59:49PM +0100, Kieran Bingham wrote:\n> > Quoting Naushir Patuck (2025-06-23 11:44:54)\n> > > On Mon, 23 Jun 2025 at 09:19, Barnabás Pőcze wrote:\n> > > >\n> > > > The description of the control mentions SensorTimestamp multiple\n> > > > times, but it omits that the two do not have the same units.\n> > > > Clarify that.\n> > > >\n> > > > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> > > \n> > > Reviewed-by: Naushir Patuck <naush@raspberrypi.com>\n> > > \n> > > > ---\n> > > >\n> > > > Or could it easily be converted to nanoseconds? Is there an overflow issue\n> > > > in the ClockRecovery class in that case? What was the motivation for making\n> > > > it μs? (I suppose nanosecond resolution is not that useful when synchronizing\n> > > > across a network, etc?)\n> > \n> > Would this be more beneficial for the accuracy of the sync algorithm?\n> > (And also keep both timestamps 'aligned' for units usage?)\n> \n> I would really like to standardize on the same unit for all timestamps,\n> unless there's a compeling reason not to do so.\n\nI'd probably be on this side of the fence too ... it seems confusing to\nme to have timestamps in different units in different places...\n\nI wish I'd noticed that before I merged the control ;-(\n\n--\nKieran\n\n\n> \n> > > >\n> > > > ---\n> > > >  src/libcamera/control_ids_core.yaml | 3 ++-\n> > > >  1 file changed, 2 insertions(+), 1 deletion(-)\n> > > >\n> > > > diff --git a/src/libcamera/control_ids_core.yaml b/src/libcamera/control_ids_core.yaml\n> > > > index 028919ef3..0708ec7cc 100644\n> > > > --- a/src/libcamera/control_ids_core.yaml\n> > > > +++ b/src/libcamera/control_ids_core.yaml\n> > > > @@ -1272,7 +1272,8 @@ controls:\n> > > >        description: |\n> > \n> > Should we maybe have some sort of explicit units field on controls when\n> > it makes sense?\n> \n> That could be an interesting addition, but I'm not sure yet how useful\n> it would be in practice.\n> \n> > > >          This timestamp corresponds to the same moment in time as the\n> > > >          SensorTimestamp, but is represented as a wall clock time as measured by\n> > > > -        the CLOCK_REALTIME clock.\n> > > > +        the CLOCK_REALTIME clock. Note that this control measures time in units\n> > > > +        of microseconds as opposed to nanoseconds in case of SensorTimestamp.\n> > > >\n> > > >          Being a wall clock measurement, it can be used to synchronise timing\n> > > >          across different devices.\n> \n> -- \n> Regards,\n> \n> Laurent Pinchart","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id CC156BDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 23 Jun 2025 14:58:58 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 925DC68DE5;\n\tMon, 23 Jun 2025 16:58:57 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C4C9968DC9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Jun 2025 16:58:56 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1E44B6F3;\n\tMon, 23 Jun 2025 16:58:40 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Wb06OtzW\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1750690720;\n\tbh=A87bYsgNE1Cs7/V5tPBfJwQ/xgtRF+LGY0HTG5MTP2Q=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=Wb06OtzW3HVEQQtQf37bm4xwTuDCdjZjtsFwwGuRTGTfi8//l3IrceX55hQEaN+gG\n\tIfwrfGMrTsdNtqGT53hzarQWX+Mkc0XWocUr8hqVqUwEbNfmwbiJegZ4N65IU5U2vl\n\tq2FLs/CQz19LzMRi0UKmPMOVZYqE+RHsCtF791DE=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20250623123836.GC19319@pendragon.ideasonboard.com>","References":"<20250623081922.96900-1-barnabas.pocze@ideasonboard.com>\n\t<CAEmqJPosa7wUChHCw0p6Zk2Mg4VfM81yn7Xs2kUBqYkUszxg4A@mail.gmail.com>\n\t<175067998917.3871677.16365233218504380614@ping.linuxembedded.co.uk>\n\t<20250623123836.GC19319@pendragon.ideasonboard.com>","Subject":"Re: [PATCH v1] libcamera: controls: Clarify units of\n\t`FrameWallClock`","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tNaushir Patuck <naush@raspberrypi.com>,\n\tlibcamera-devel@lists.libcamera.org, David Plowman\n\t<david.plowman@raspberrypi.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Date":"Mon, 23 Jun 2025 15:58:53 +0100","Message-ID":"<175069073335.3871677.7073126963146361504@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":34788,"web_url":"https://patchwork.libcamera.org/comment/34788/","msgid":"<CAEmqJPpQDj7wNTMpwBaFkqToE4ShZ_qa4st=wHcC=3Oxb8S1_Q@mail.gmail.com>","date":"2025-07-07T08:25:04","subject":"Re: [PATCH v1] libcamera: controls: Clarify units of\n\t`FrameWallClock`","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"On Mon, 23 Jun 2025 at 15:58, Kieran Bingham\n<kieran.bingham@ideasonboard.com> wrote:\n>\n> Quoting Laurent Pinchart (2025-06-23 13:38:36)\n> > On Mon, Jun 23, 2025 at 12:59:49PM +0100, Kieran Bingham wrote:\n> > > Quoting Naushir Patuck (2025-06-23 11:44:54)\n> > > > On Mon, 23 Jun 2025 at 09:19, Barnabás Pőcze wrote:\n> > > > >\n> > > > > The description of the control mentions SensorTimestamp multiple\n> > > > > times, but it omits that the two do not have the same units.\n> > > > > Clarify that.\n> > > > >\n> > > > > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> > > >\n> > > > Reviewed-by: Naushir Patuck <naush@raspberrypi.com>\n> > > >\n> > > > > ---\n> > > > >\n> > > > > Or could it easily be converted to nanoseconds? Is there an overflow issue\n> > > > > in the ClockRecovery class in that case? What was the motivation for making\n> > > > > it μs? (I suppose nanosecond resolution is not that useful when synchronizing\n> > > > > across a network, etc?)\n> > >\n> > > Would this be more beneficial for the accuracy of the sync algorithm?\n> > > (And also keep both timestamps 'aligned' for units usage?)\n> >\n> > I would really like to standardize on the same unit for all timestamps,\n> > unless there's a compeling reason not to do so.\n>\n> I'd probably be on this side of the fence too ... it seems confusing to\n> me to have timestamps in different units in different places...\n>\n> I wish I'd noticed that before I merged the control ;-(\n\nSo what's the plan here?  I think ns might be a bit overkill, but if\nwe prefer to use the same units throughout this can be changed.\n\nRegards,\nNaush\n\n\n>\n> --\n> Kieran\n>\n>\n> >\n> > > > >\n> > > > > ---\n> > > > >  src/libcamera/control_ids_core.yaml | 3 ++-\n> > > > >  1 file changed, 2 insertions(+), 1 deletion(-)\n> > > > >\n> > > > > diff --git a/src/libcamera/control_ids_core.yaml b/src/libcamera/control_ids_core.yaml\n> > > > > index 028919ef3..0708ec7cc 100644\n> > > > > --- a/src/libcamera/control_ids_core.yaml\n> > > > > +++ b/src/libcamera/control_ids_core.yaml\n> > > > > @@ -1272,7 +1272,8 @@ controls:\n> > > > >        description: |\n> > >\n> > > Should we maybe have some sort of explicit units field on controls when\n> > > it makes sense?\n> >\n> > That could be an interesting addition, but I'm not sure yet how useful\n> > it would be in practice.\n> >\n> > > > >          This timestamp corresponds to the same moment in time as the\n> > > > >          SensorTimestamp, but is represented as a wall clock time as measured by\n> > > > > -        the CLOCK_REALTIME clock.\n> > > > > +        the CLOCK_REALTIME clock. Note that this control measures time in units\n> > > > > +        of microseconds as opposed to nanoseconds in case of SensorTimestamp.\n> > > > >\n> > > > >          Being a wall clock measurement, it can be used to synchronise timing\n> > > > >          across different devices.\n> >\n> > --\n> > Regards,\n> >\n> > Laurent Pinchart","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 5C508C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  7 Jul 2025 08:25:39 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0D29468E7F;\n\tMon,  7 Jul 2025 10:25:39 +0200 (CEST)","from mail-ua1-x929.google.com (mail-ua1-x929.google.com\n\t[IPv6:2607:f8b0:4864:20::929])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B7C9168E66\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  7 Jul 2025 10:25:36 +0200 (CEST)","by mail-ua1-x929.google.com with SMTP id\n\ta1e0cc1a2514c-87ec6fb9cb9so110686241.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 07 Jul 2025 01:25:36 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"UjOc81DJ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1751876736; x=1752481536;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:cc:to:subject:message-id:date:from\n\t:in-reply-to:references:mime-version:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=P8lH3xWp9Ed2XrWyzonwRoQLklchgGLbcNdDfFDglMY=;\n\tb=UjOc81DJUQ2nlXO37OOLTfR5KBA6xjVu/EgUvYPdqpC8CbOWy57PNFadQxOahVh3aV\n\t1azfbJoahWvLxCUalP6MsdPNAOO/A0GyDJNAdvmMTSqo0YpzWbDEMNVm+TfWUDbLups/\n\tK24rmDpxQ2XZM5jFXquy2nFSgJBXuqBTmD2d2ZrTzWlAcYMvN8yhpiWRQWMsGKB4fqQQ\n\tkYSJ6BbjUKf+nkdbvhUbjst5g+oRVmQjqssg2VMRFOtbR3D2wS6jbcpTcjIe7/vslPb4\n\tHxe3PsgGk6ZLvFmO9mIzNj/o8ZfNugZr5h+emnA/Yph8lesZKuobm9ID38HBH9PWYNnV\n\tkLsA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1751876736; x=1752481536;\n\th=content-transfer-encoding:cc:to:subject:message-id:date:from\n\t:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=P8lH3xWp9Ed2XrWyzonwRoQLklchgGLbcNdDfFDglMY=;\n\tb=fo7ytzf7F9+AzkAs1yPayWeGzcBFooH1dQY0O7ysCz6FMUPUIzf2kzgI2ynmcO8eSZ\n\tRBIapPFgxUoe8Ln8x2UDiNWh0lkPDIPwtQpKBWCjCeQm50esIvmFqeNVPBHcZ0NowZt4\n\tioikMeFSAXMPspM9VgbcygzDGCTuyUA2XVFtdh3v3vqKZE+u4ioeQwQKk+nhf3J2al8w\n\tYoz5mThW02ETZ7WQzlZGvQ0rGjSJrWga5JAq6Miv3ip+oiMNK2hpq5ypuYQj+gGfR8Vw\n\tDXFptAlbOpXcPXENHmwNpRvWX/OoGe8pqm6dybvIBETUmYHEvb0l6TiLuAwAt8grLCfk\n\tt2Qw==","X-Forwarded-Encrypted":"i=1;\n\tAJvYcCVqoJ97CEsdLKSfa/V3iklDcJkqqLJQc+vgVONDIcSFtvPpIsNchLfZ2vpbncdLgBXq/lShcMQdl/TpiVVdEDk=@lists.libcamera.org","X-Gm-Message-State":"AOJu0YyGmgdeLQdcpIv96rHWrT8+47m47XpyTx+esLEbphngUH/u+k92\n\ti2xZ05EF9u0pHqbB05rdaw3cdgk7apk6P+xPXwg8OxG1nZdtL52UszmpJd6jTKIfekmtQU84ziA\n\tmhmMxfUS4qeeEu9YzXDty7owo/R+USbE4KuVzYbmHCy4mJZFKDyNj","X-Gm-Gg":"ASbGncti2mCDIfx3Ubul8ZDLJL39tdUWquUv3qj63DYo/AVBUw43cJUUsQ4kE+sWOwP\n\tBcen3TBILTLLBTuW74uhGnUrqXvb3MpsyR9nW+b/6mW+0iL6/YLlvOL9cUuhnSWQN4RpMOO56wS\n\tj1GmpJdI7X9pJ5H+Gfi8XFwzDuetEZx1cZuFg8CECr2eIbvw8EMg4sHjMQSStHY5HQq0DBERtHo\n\tTJtGavKarovIg==","X-Google-Smtp-Source":"AGHT+IF8YBRD20sz7Z7syhJTNk05v5C+18iP2TV1bXyd7X8TCilR0xKIWXdE3H+Fr11KB3JgB1xAzMpZKlPAzmEmWkg=","X-Received":"by 2002:a05:6102:5f0c:b0:4e7:b31f:d7ce with SMTP id\n\tada2fe7eead31-4f2f191bbddmr2061657137.6.1751876735529;\n\tMon, 07 Jul 2025 01:25:35 -0700 (PDT)","MIME-Version":"1.0","References":"<20250623081922.96900-1-barnabas.pocze@ideasonboard.com>\n\t<CAEmqJPosa7wUChHCw0p6Zk2Mg4VfM81yn7Xs2kUBqYkUszxg4A@mail.gmail.com>\n\t<175067998917.3871677.16365233218504380614@ping.linuxembedded.co.uk>\n\t<20250623123836.GC19319@pendragon.ideasonboard.com>\n\t<175069073335.3871677.7073126963146361504@ping.linuxembedded.co.uk>","In-Reply-To":"<175069073335.3871677.7073126963146361504@ping.linuxembedded.co.uk>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Mon, 7 Jul 2025 09:25:04 +0100","X-Gm-Features":"Ac12FXwpTb8e8PeLQPJAyyTXVOHZNiWuheKcBrJOrgA_TpGqLMRxqvz8YJGWRXc","Message-ID":"<CAEmqJPpQDj7wNTMpwBaFkqToE4ShZ_qa4st=wHcC=3Oxb8S1_Q@mail.gmail.com>","Subject":"Re: [PATCH v1] libcamera: controls: Clarify units of\n\t`FrameWallClock`","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>, =?utf-8?q?Barna?=\n\t=?utf-8?b?YsOhcyBQxZFjemU=?= <barnabas.pocze@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org, David Plowman\n\t<david.plowman@raspberrypi.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":34798,"web_url":"https://patchwork.libcamera.org/comment/34798/","msgid":"<175188600016.2340557.3899420045258412365@ping.linuxembedded.co.uk>","date":"2025-07-07T11:00:00","subject":"Re: [PATCH v1] libcamera: controls: Clarify units of\n\t`FrameWallClock`","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Naushir Patuck (2025-07-07 09:25:04)\n> On Mon, 23 Jun 2025 at 15:58, Kieran Bingham\n> <kieran.bingham@ideasonboard.com> wrote:\n> >\n> > Quoting Laurent Pinchart (2025-06-23 13:38:36)\n> > > On Mon, Jun 23, 2025 at 12:59:49PM +0100, Kieran Bingham wrote:\n> > > > Quoting Naushir Patuck (2025-06-23 11:44:54)\n> > > > > On Mon, 23 Jun 2025 at 09:19, Barnabás Pőcze wrote:\n> > > > > >\n> > > > > > The description of the control mentions SensorTimestamp multiple\n> > > > > > times, but it omits that the two do not have the same units.\n> > > > > > Clarify that.\n> > > > > >\n> > > > > > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> > > > >\n> > > > > Reviewed-by: Naushir Patuck <naush@raspberrypi.com>\n> > > > >\n> > > > > > ---\n> > > > > >\n> > > > > > Or could it easily be converted to nanoseconds? Is there an overflow issue\n> > > > > > in the ClockRecovery class in that case? What was the motivation for making\n> > > > > > it μs? (I suppose nanosecond resolution is not that useful when synchronizing\n> > > > > > across a network, etc?)\n> > > >\n> > > > Would this be more beneficial for the accuracy of the sync algorithm?\n> > > > (And also keep both timestamps 'aligned' for units usage?)\n> > >\n> > > I would really like to standardize on the same unit for all timestamps,\n> > > unless there's a compeling reason not to do so.\n> >\n> > I'd probably be on this side of the fence too ... it seems confusing to\n> > me to have timestamps in different units in different places...\n> >\n> > I wish I'd noticed that before I merged the control ;-(\n> \n> So what's the plan here?  I think ns might be a bit overkill, but if\n> we prefer to use the same units throughout this can be changed.\n\nI think https://github.com/raspberrypi/libcamera/issues/283 probably\nindicates users expect the units to be the same too.\n\nSo ideally we need a patch to both the control documentation and the\nimplementation, before the next release...\n\n--\nKieran\n\n\n\n> \n> Regards,\n> Naush\n> \n> \n> >\n> > --\n> > Kieran\n> >\n> >\n> > >\n> > > > > >\n> > > > > > ---\n> > > > > >  src/libcamera/control_ids_core.yaml | 3 ++-\n> > > > > >  1 file changed, 2 insertions(+), 1 deletion(-)\n> > > > > >\n> > > > > > diff --git a/src/libcamera/control_ids_core.yaml b/src/libcamera/control_ids_core.yaml\n> > > > > > index 028919ef3..0708ec7cc 100644\n> > > > > > --- a/src/libcamera/control_ids_core.yaml\n> > > > > > +++ b/src/libcamera/control_ids_core.yaml\n> > > > > > @@ -1272,7 +1272,8 @@ controls:\n> > > > > >        description: |\n> > > >\n> > > > Should we maybe have some sort of explicit units field on controls when\n> > > > it makes sense?\n> > >\n> > > That could be an interesting addition, but I'm not sure yet how useful\n> > > it would be in practice.\n> > >\n> > > > > >          This timestamp corresponds to the same moment in time as the\n> > > > > >          SensorTimestamp, but is represented as a wall clock time as measured by\n> > > > > > -        the CLOCK_REALTIME clock.\n> > > > > > +        the CLOCK_REALTIME clock. Note that this control measures time in units\n> > > > > > +        of microseconds as opposed to nanoseconds in case of SensorTimestamp.\n> > > > > >\n> > > > > >          Being a wall clock measurement, it can be used to synchronise timing\n> > > > > >          across different devices.\n> > >\n> > > --\n> > > Regards,\n> > >\n> > > Laurent Pinchart","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id D419CC3293\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  7 Jul 2025 11:00:05 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 96B1868EA4;\n\tMon,  7 Jul 2025 13:00:04 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 47B5F68E92\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  7 Jul 2025 13:00:03 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 3FB5A9CA;\n\tMon,  7 Jul 2025 12:59:36 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"duQSsl0n\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1751885976;\n\tbh=343I19snJaM67AGFt9SuTM+X9Ib6vJSWH6rPGqHezTs=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=duQSsl0nfIPn8/9lg1PkCb91u4aK1nvj9E+j0xLLdLhHqaY4Wb/tqVug05N6FrR5r\n\t7OiEy/Y5Ib+l7rdqghykqajign0/Z5h4mRotR4d6oKjA5dCHU/ZX5Mk0qrvSoKMPv0\n\ti25ldZyatS3NAvEttgsBNULzxSgibMLSTeKtnLe0=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<CAEmqJPpQDj7wNTMpwBaFkqToE4ShZ_qa4st=wHcC=3Oxb8S1_Q@mail.gmail.com>","References":"<20250623081922.96900-1-barnabas.pocze@ideasonboard.com>\n\t<CAEmqJPosa7wUChHCw0p6Zk2Mg4VfM81yn7Xs2kUBqYkUszxg4A@mail.gmail.com>\n\t<175067998917.3871677.16365233218504380614@ping.linuxembedded.co.uk>\n\t<20250623123836.GC19319@pendragon.ideasonboard.com>\n\t<175069073335.3871677.7073126963146361504@ping.linuxembedded.co.uk>\n\t<CAEmqJPpQDj7wNTMpwBaFkqToE4ShZ_qa4st=wHcC=3Oxb8S1_Q@mail.gmail.com>","Subject":"Re: [PATCH v1] libcamera: controls: Clarify units of\n\t`FrameWallClock`","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>, =?utf-8?q?Barnab?=\n\t=?utf-8?b?w6FzIFDFkWN6ZQ==?= <barnabas.pocze@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org, David Plowman\n\t<david.plowman@raspberrypi.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Date":"Mon, 07 Jul 2025 12:00:00 +0100","Message-ID":"<175188600016.2340557.3899420045258412365@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":34803,"web_url":"https://patchwork.libcamera.org/comment/34803/","msgid":"<CAEmqJPp0CYw03-vzXCaGx37ufyo8-YZ36MUfk=otPELM1G3Yew@mail.gmail.com>","date":"2025-07-07T11:36:35","subject":"Re: [PATCH v1] libcamera: controls: Clarify units of\n\t`FrameWallClock`","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"On Mon, 7 Jul 2025 at 12:00, Kieran Bingham\n<kieran.bingham@ideasonboard.com> wrote:\n>\n> Quoting Naushir Patuck (2025-07-07 09:25:04)\n> > On Mon, 23 Jun 2025 at 15:58, Kieran Bingham\n> > <kieran.bingham@ideasonboard.com> wrote:\n> > >\n> > > Quoting Laurent Pinchart (2025-06-23 13:38:36)\n> > > > On Mon, Jun 23, 2025 at 12:59:49PM +0100, Kieran Bingham wrote:\n> > > > > Quoting Naushir Patuck (2025-06-23 11:44:54)\n> > > > > > On Mon, 23 Jun 2025 at 09:19, Barnabás Pőcze wrote:\n> > > > > > >\n> > > > > > > The description of the control mentions SensorTimestamp multiple\n> > > > > > > times, but it omits that the two do not have the same units.\n> > > > > > > Clarify that.\n> > > > > > >\n> > > > > > > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> > > > > >\n> > > > > > Reviewed-by: Naushir Patuck <naush@raspberrypi.com>\n> > > > > >\n> > > > > > > ---\n> > > > > > >\n> > > > > > > Or could it easily be converted to nanoseconds? Is there an overflow issue\n> > > > > > > in the ClockRecovery class in that case? What was the motivation for making\n> > > > > > > it μs? (I suppose nanosecond resolution is not that useful when synchronizing\n> > > > > > > across a network, etc?)\n> > > > >\n> > > > > Would this be more beneficial for the accuracy of the sync algorithm?\n> > > > > (And also keep both timestamps 'aligned' for units usage?)\n> > > >\n> > > > I would really like to standardize on the same unit for all timestamps,\n> > > > unless there's a compeling reason not to do so.\n> > >\n> > > I'd probably be on this side of the fence too ... it seems confusing to\n> > > me to have timestamps in different units in different places...\n> > >\n> > > I wish I'd noticed that before I merged the control ;-(\n> >\n> > So what's the plan here?  I think ns might be a bit overkill, but if\n> > we prefer to use the same units throughout this can be changed.\n>\n> I think https://github.com/raspberrypi/libcamera/issues/283 probably\n> indicates users expect the units to be the same too.\n\nIndeed, that's what made me come back to this.\n\n>\n> So ideally we need a patch to both the control documentation and the\n> implementation, before the next release...\n\nSure, shall I post a patch?\n\n\n>\n> --\n> Kieran\n>\n>\n>\n> >\n> > Regards,\n> > Naush\n> >\n> >\n> > >\n> > > --\n> > > Kieran\n> > >\n> > >\n> > > >\n> > > > > > >\n> > > > > > > ---\n> > > > > > >  src/libcamera/control_ids_core.yaml | 3 ++-\n> > > > > > >  1 file changed, 2 insertions(+), 1 deletion(-)\n> > > > > > >\n> > > > > > > diff --git a/src/libcamera/control_ids_core.yaml b/src/libcamera/control_ids_core.yaml\n> > > > > > > index 028919ef3..0708ec7cc 100644\n> > > > > > > --- a/src/libcamera/control_ids_core.yaml\n> > > > > > > +++ b/src/libcamera/control_ids_core.yaml\n> > > > > > > @@ -1272,7 +1272,8 @@ controls:\n> > > > > > >        description: |\n> > > > >\n> > > > > Should we maybe have some sort of explicit units field on controls when\n> > > > > it makes sense?\n> > > >\n> > > > That could be an interesting addition, but I'm not sure yet how useful\n> > > > it would be in practice.\n> > > >\n> > > > > > >          This timestamp corresponds to the same moment in time as the\n> > > > > > >          SensorTimestamp, but is represented as a wall clock time as measured by\n> > > > > > > -        the CLOCK_REALTIME clock.\n> > > > > > > +        the CLOCK_REALTIME clock. Note that this control measures time in units\n> > > > > > > +        of microseconds as opposed to nanoseconds in case of SensorTimestamp.\n> > > > > > >\n> > > > > > >          Being a wall clock measurement, it can be used to synchronise timing\n> > > > > > >          across different devices.\n> > > >\n> > > > --\n> > > > Regards,\n> > > >\n> > > > Laurent Pinchart","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id BD060C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  7 Jul 2025 11:37:11 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A0B6568EAC;\n\tMon,  7 Jul 2025 13:37:10 +0200 (CEST)","from mail-ua1-x933.google.com (mail-ua1-x933.google.com\n\t[IPv6:2607:f8b0:4864:20::933])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C569968E92\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  7 Jul 2025 13:37:08 +0200 (CEST)","by mail-ua1-x933.google.com with SMTP id\n\ta1e0cc1a2514c-886ba728c79so75983241.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 07 Jul 2025 04:37:08 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"RnPiBtZc\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1751888227; x=1752493027;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:cc:to:subject:message-id:date:from\n\t:in-reply-to:references:mime-version:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=BfkG/n6O/p6LpgSjaCqNQ67r7zbUMInh2AerhcDLLfk=;\n\tb=RnPiBtZcpfy+aK+z4iA7y1TkK82UqnClUQROdseqxQG5j07B2DqRI2lAitBTdGSCZU\n\t+dgKnxKDTp5G7mp9DI4ZTGCEiMIrE8ADJqaZmmfITVONokCqyiv7M3Z8rdittU/gesG6\n\tK/pBjpHxLIMOQ52DJdfgyIxI+aGp1e3Ns65GDXaI7RFtn2zOd1HDiFQSUZ75XIrOUX6D\n\tmm8QZpnnLMbRHgKIuH5uY1gtfJIvx7zP3naHkHRJclveLWinCCPBenglzIFEDrxhCVkO\n\tXFEgk3rZtcgzEDvrwBYEAaYngBaFY82jBeLm6bGjyqnarHK2xvFY2vsWfcFsZZE/mnQD\n\tzMtw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1751888227; x=1752493027;\n\th=content-transfer-encoding:cc:to:subject:message-id:date:from\n\t:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=BfkG/n6O/p6LpgSjaCqNQ67r7zbUMInh2AerhcDLLfk=;\n\tb=eIUUy1vvSbZ0lr26+o7rTkbFIWEwtY6J43FeI98EhzHcE3zF1WiOqSOzGaKBooeRoh\n\tqdaRRRnDjY8+zmsVC5iQGTT5e4hK+yMosjK6qsfZPsNOJsojBVysbnYGr7frEZoTHYXx\n\tD3s+rnTbrgr1JwRBThMUZY60t2Tkil9BJxyOuf1rj+yNpuODDMN6pco37ju6jVkvmxhr\n\tTAhxlbweXZbSjdA5MQ/QwEDCnLz0w0sfCotGorugIbdQ7x2TsR9LTAHXZqwqbN38BjmC\n\t7xOC+Mazek3hAwjJuaJ60vCMuEvEEXUYmtB6Jwg+JbBXzrXdArGrxjURwULWAwJz3Egy\n\tlirg==","X-Forwarded-Encrypted":"i=1;\n\tAJvYcCXI6dow028QslgSCHILcboOPY2ZlhcFYlVBOiHTgemqEJJ3/XSzr9nk4uqs+JqR3uMb290TyV3xXwByF+9nNX0=@lists.libcamera.org","X-Gm-Message-State":"AOJu0YyFHwZRLhNAKBHGoBrWCLERQNT8CtbfxN64UmsZq9zrIwGP1Y35\n\tsBwQsO8fKe4o88qP2hAQQebtBo2DUjrXBALOxtQuy7dTmclHnXhBnkkBHRpPPTGXoEoWTYFHiE+\n\tmBzHI3J7k7SQmqgECkTZEWV78zfu6wHgpJHkZZ6ltcw==","X-Gm-Gg":"ASbGncvMuG6enjJMNGc8IWglqBsbcUeUK1U9MYL+E5ztm+JqxjQZo5TGFHSaCkb8viV\n\tMV+412UNVfFmRGCuNtkKxRu6qP5c8vTFYG/eRTxWR6ht5JGle7sI2NQf3Qm/tlTZMKSFO2x8u1y\n\tu9btwhE44ZiOr9t3r49k1nAYEzi0rTUQhc5I0D5qGSArkgGW3f+pF/2Z2adP4PF8+ndxHVJ8eRc\n\tw4=","X-Google-Smtp-Source":"AGHT+IGOhxp2oW+/H7wrZ3d6wJ98dljQK7qexFPWKm2MPQ+3Pa0F+f8SS9kOp69DGPlHQ4Uh4QnB6uyWAm29SWdX1CU=","X-Received":"by 2002:a05:6102:fa0:b0:4de:e4b3:7d with SMTP id\n\tada2fe7eead31-4f2f1d6635emr2237669137.9.1751888227502;\n\tMon, 07 Jul 2025 04:37:07 -0700 (PDT)","MIME-Version":"1.0","References":"<20250623081922.96900-1-barnabas.pocze@ideasonboard.com>\n\t<CAEmqJPosa7wUChHCw0p6Zk2Mg4VfM81yn7Xs2kUBqYkUszxg4A@mail.gmail.com>\n\t<175067998917.3871677.16365233218504380614@ping.linuxembedded.co.uk>\n\t<20250623123836.GC19319@pendragon.ideasonboard.com>\n\t<175069073335.3871677.7073126963146361504@ping.linuxembedded.co.uk>\n\t<CAEmqJPpQDj7wNTMpwBaFkqToE4ShZ_qa4st=wHcC=3Oxb8S1_Q@mail.gmail.com>\n\t<175188600016.2340557.3899420045258412365@ping.linuxembedded.co.uk>","In-Reply-To":"<175188600016.2340557.3899420045258412365@ping.linuxembedded.co.uk>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Mon, 7 Jul 2025 12:36:35 +0100","X-Gm-Features":"Ac12FXy3lawm8dIRe3wh13uEfg7rE3vOTT4KlAzERTOkNGpxzoK5Wtcc_ScJf8c","Message-ID":"<CAEmqJPp0CYw03-vzXCaGx37ufyo8-YZ36MUfk=otPELM1G3Yew@mail.gmail.com>","Subject":"Re: [PATCH v1] libcamera: controls: Clarify units of\n\t`FrameWallClock`","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>, =?utf-8?q?Barna?=\n\t=?utf-8?b?YsOhcyBQxZFjemU=?= <barnabas.pocze@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org, David Plowman\n\t<david.plowman@raspberrypi.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":34804,"web_url":"https://patchwork.libcamera.org/comment/34804/","msgid":"<175188861999.2340557.534448658068320858@ping.linuxembedded.co.uk>","date":"2025-07-07T11:43:39","subject":"Re: [PATCH v1] libcamera: controls: Clarify units of\n\t`FrameWallClock`","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Naushir Patuck (2025-07-07 12:36:35)\n> On Mon, 7 Jul 2025 at 12:00, Kieran Bingham\n> <kieran.bingham@ideasonboard.com> wrote:\n> >\n> > Quoting Naushir Patuck (2025-07-07 09:25:04)\n> > > On Mon, 23 Jun 2025 at 15:58, Kieran Bingham\n> > > <kieran.bingham@ideasonboard.com> wrote:\n> > > >\n> > > > Quoting Laurent Pinchart (2025-06-23 13:38:36)\n> > > > > On Mon, Jun 23, 2025 at 12:59:49PM +0100, Kieran Bingham wrote:\n> > > > > > Quoting Naushir Patuck (2025-06-23 11:44:54)\n> > > > > > > On Mon, 23 Jun 2025 at 09:19, Barnabás Pőcze wrote:\n> > > > > > > >\n> > > > > > > > The description of the control mentions SensorTimestamp multiple\n> > > > > > > > times, but it omits that the two do not have the same units.\n> > > > > > > > Clarify that.\n> > > > > > > >\n> > > > > > > > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> > > > > > >\n> > > > > > > Reviewed-by: Naushir Patuck <naush@raspberrypi.com>\n> > > > > > >\n> > > > > > > > ---\n> > > > > > > >\n> > > > > > > > Or could it easily be converted to nanoseconds? Is there an overflow issue\n> > > > > > > > in the ClockRecovery class in that case? What was the motivation for making\n> > > > > > > > it μs? (I suppose nanosecond resolution is not that useful when synchronizing\n> > > > > > > > across a network, etc?)\n> > > > > >\n> > > > > > Would this be more beneficial for the accuracy of the sync algorithm?\n> > > > > > (And also keep both timestamps 'aligned' for units usage?)\n> > > > >\n> > > > > I would really like to standardize on the same unit for all timestamps,\n> > > > > unless there's a compeling reason not to do so.\n> > > >\n> > > > I'd probably be on this side of the fence too ... it seems confusing to\n> > > > me to have timestamps in different units in different places...\n> > > >\n> > > > I wish I'd noticed that before I merged the control ;-(\n> > >\n> > > So what's the plan here?  I think ns might be a bit overkill, but if\n> > > we prefer to use the same units throughout this can be changed.\n> >\n> > I think https://github.com/raspberrypi/libcamera/issues/283 probably\n> > indicates users expect the units to be the same too.\n> \n> Indeed, that's what made me come back to this.\n> \n> >\n> > So ideally we need a patch to both the control documentation and the\n> > implementation, before the next release...\n> \n> Sure, shall I post a patch?\n\nYes please!\n\nMy hesitation on my side is that we now need to coordinate with\nRaspberry Pi usages! So if you can handle it then I know everything is\naligned.\n\nThanks\n--\nKieran\n\n> \n> \n> >\n> > --\n> > Kieran\n> >\n> >\n> >\n> > >\n> > > Regards,\n> > > Naush\n> > >\n> > >\n> > > >\n> > > > --\n> > > > Kieran\n> > > >\n> > > >\n> > > > >\n> > > > > > > >\n> > > > > > > > ---\n> > > > > > > >  src/libcamera/control_ids_core.yaml | 3 ++-\n> > > > > > > >  1 file changed, 2 insertions(+), 1 deletion(-)\n> > > > > > > >\n> > > > > > > > diff --git a/src/libcamera/control_ids_core.yaml b/src/libcamera/control_ids_core.yaml\n> > > > > > > > index 028919ef3..0708ec7cc 100644\n> > > > > > > > --- a/src/libcamera/control_ids_core.yaml\n> > > > > > > > +++ b/src/libcamera/control_ids_core.yaml\n> > > > > > > > @@ -1272,7 +1272,8 @@ controls:\n> > > > > > > >        description: |\n> > > > > >\n> > > > > > Should we maybe have some sort of explicit units field on controls when\n> > > > > > it makes sense?\n> > > > >\n> > > > > That could be an interesting addition, but I'm not sure yet how useful\n> > > > > it would be in practice.\n> > > > >\n> > > > > > > >          This timestamp corresponds to the same moment in time as the\n> > > > > > > >          SensorTimestamp, but is represented as a wall clock time as measured by\n> > > > > > > > -        the CLOCK_REALTIME clock.\n> > > > > > > > +        the CLOCK_REALTIME clock. Note that this control measures time in units\n> > > > > > > > +        of microseconds as opposed to nanoseconds in case of SensorTimestamp.\n> > > > > > > >\n> > > > > > > >          Being a wall clock measurement, it can be used to synchronise timing\n> > > > > > > >          across different devices.\n> > > > >\n> > > > > --\n> > > > > Regards,\n> > > > >\n> > > > > Laurent Pinchart","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 4793BC0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  7 Jul 2025 11:43:44 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0094568EB5;\n\tMon,  7 Jul 2025 13:43:44 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0080668E92\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  7 Jul 2025 13:43:43 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4A0BF664;\n\tMon,  7 Jul 2025 13:43:16 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"TN21pqPW\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1751888596;\n\tbh=ZB99c9Kzd8S/C3bMqIRIoV8AuI90g6pN/rd6rTnWPhU=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=TN21pqPW9FBN6e4S5uk/rk1lGknch6e+1KZ+hNgD495p4gXkBeC/nCPp4T2ZPRsVP\n\teap1VHMDdM2m+dVwPqlCpWpwfciHnmt/17NjgM4H5PW7d+MpiQvwVg2fN/bbSBOeE6\n\toiUPkiRWsx9f7hedQnLXpcWxqARohyvbDImHkjx0=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<CAEmqJPp0CYw03-vzXCaGx37ufyo8-YZ36MUfk=otPELM1G3Yew@mail.gmail.com>","References":"<20250623081922.96900-1-barnabas.pocze@ideasonboard.com>\n\t<CAEmqJPosa7wUChHCw0p6Zk2Mg4VfM81yn7Xs2kUBqYkUszxg4A@mail.gmail.com>\n\t<175067998917.3871677.16365233218504380614@ping.linuxembedded.co.uk>\n\t<20250623123836.GC19319@pendragon.ideasonboard.com>\n\t<175069073335.3871677.7073126963146361504@ping.linuxembedded.co.uk>\n\t<CAEmqJPpQDj7wNTMpwBaFkqToE4ShZ_qa4st=wHcC=3Oxb8S1_Q@mail.gmail.com>\n\t<175188600016.2340557.3899420045258412365@ping.linuxembedded.co.uk>\n\t<CAEmqJPp0CYw03-vzXCaGx37ufyo8-YZ36MUfk=otPELM1G3Yew@mail.gmail.com>","Subject":"Re: [PATCH v1] libcamera: controls: Clarify units of\n\t`FrameWallClock`","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>, =?utf-8?q?Barnab?=\n\t=?utf-8?b?w6FzIFDFkWN6ZQ==?= <barnabas.pocze@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org, David Plowman\n\t<david.plowman@raspberrypi.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Date":"Mon, 07 Jul 2025 12:43:39 +0100","Message-ID":"<175188861999.2340557.534448658068320858@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]