[{"id":27361,"web_url":"https://patchwork.libcamera.org/comment/27361/","msgid":"<qBr8SqwurZf_jJRAEPTu_fLbzZ1LplLtAa0tVtHgaVUlZop459Vhhxinv41fdpu9JZEhKMoo4o11cl3-Aw0TCKzEiifgT7scXKU5DN8PX6M=@protonmail.com>","date":"2023-06-15T21:21:12","subject":"Re: [libcamera-devel] [PATCH v4 4/5] libcamera: properties: Provide\n\ta Devices camera property","submitter":{"id":133,"url":"https://patchwork.libcamera.org/api/people/133/","name":"Pőcze Barnabás","email":"pobrn@protonmail.com"},"content":"Hi\n\n\n2023. június 15., csütörtök 19:26 keltezéssel, Kieran Bingham via libcamera-devel <libcamera-devel@lists.libcamera.org> írta:\n\n> Provide a new Camera property that allows pipeline handlers to list any\n> kernel device used to operate the camera. This allows other frameworks\n> and daemons such as PipeWire to better understand the resources consumed\n> by a Camera and consider ignoring those resources when enumerating\n> camera devices on a system.\n> \n> Tested-by: Ashok Sidipotu <ashok.sidipotu@collabora.com>\n> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> \n> ---\n> v4:\n>  - Report that different cameras may report identical devices\n>  - Rename to SystemDevices\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>  src/libcamera/property_ids.yaml | 9 +++++++++\n>  1 file changed, 9 insertions(+)\n> \n> diff --git a/src/libcamera/property_ids.yaml b/src/libcamera/property_ids.yaml\n> index cb55e0ed2283..ef1dfd322db1 100644\n> --- a/src/libcamera/property_ids.yaml\n> +++ b/src/libcamera/property_ids.yaml\n> @@ -690,6 +690,15 @@ controls:\n>          that is twice that of the full resolution mode. This value will be valid\n>          after the configure method has returned successfully.\n> \n> +  - SystemDevices:\n> +      type: int64_t\n> +      size: [n]\n> +      description: |\n> +        A list of integer values of type dev_t denoting major and minor device\n> +        number of the underlying devices used in the operation of this camera.\n\nI am no native speaker of English, but to me any of\n\n - ... denoting [the] major and minor device number of the underlying ...\n - ... denoting major and minor device number[s] of the underlying ...\n\nsounds a bit better.\n\n\n> +\n> +        Different cameras may report identical devices.\n\nI am wondering how this statement is reconciled with the fact that `camerasByDevnum_`\nis just a simple map, and not a multimap; and that `CameraManager::get(dev_t)`\nreturns a single camera. I know this is not really relevant for this patch, sorry,\nbut maybe it's worth looking into.\n\n\n> +\n>    # ----------------------------------------------------------------------------\n>    # Draft properties section\n> \n> --\n> 2.34.1\n\n\nRegards,\nBarnabás Pőcze","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 E9DABC322E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 15 Jun 2023 21:21:18 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 67D59628B5;\n\tThu, 15 Jun 2023 23:21:18 +0200 (CEST)","from mail-40134.protonmail.ch (mail-40134.protonmail.ch\n\t[185.70.40.134])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3E63B614FE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 15 Jun 2023 23:21:17 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1686864078;\n\tbh=fef85XIDW1fjnkQGHz2ufdGQ0NImV3csbBr1Tu/7mtc=;\n\th=Date:To:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=fZrcREMfdhMedd4lONXmXa9wYTI4QIybeGaUn9u2lbBsAHf3827/NZ0WyvclI7K8y\n\tkL8AF7pfKgup0/0gqFKTJQ5M+O1USWl8gJ0UG/uJm+HtxUV/hlGtcDP3XdWg9+ppfc\n\tvs6PQzibiZIQ+ItSkJyxUUvT+uCTdYzhhjYSm6dpskp18wlIzTqGs1HFMaf939wja+\n\tc5bJ16ggDDKf9qgs5zlmHYT8Tlw9eWsk4mKEd5dlSFZbJw+HGtWz1XHIk+rO47b84k\n\tZceMaDOiFZnKYnopOpMcU0d30bJDWQZAycbw/s/zSgcIWDWb4QXqldn4V71mw8gg7u\n\tj2ofchJbHYbqg==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;\n\ts=protonmail3; t=1686864076; x=1687123276;\n\tbh=9Q6WfnNhGPzfENMEbZBbIyMbI94Q4jooInvXQulcmjc=;\n\th=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:\n\tFeedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:\n\tMessage-ID:BIMI-Selector;\n\tb=nQ2vTmmYzIB1Z84obakCsPxzUgpdnx5ibJPw2dFYpTw8IY6uzp/LG4bx5DEyoXrlf\n\trbM8Y6CfJNKAsg9j2R76uwZsDFxzBAqiF9t2iBoPpMnYR7xP55PuyvOt3VUVVxKTAi\n\tKCt3Wu0C5w8apKWf0Kpxw7AypBuEGoo8hMISRwkqj7ZUSG9UdmTMcVi5eLA+TdeURM\n\t7L47tvc47kvyAr+JaFwKFnD/h/N+FEvzV582O12X5ai6rWgYliVFkqy+P0l1kO7G6K\n\tnu9B831uzpGEvW9Cv+C4yChZOePOhKUO1HWgAePog8wwq+7DTDGN9vGCNFcaT7WTxO\n\tMW/OKBbYpSjGA=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=protonmail.com\n\theader.i=@protonmail.com\n\theader.b=\"nQ2vTmmY\"; dkim-atps=neutral","Date":"Thu, 15 Jun 2023 21:21:12 +0000","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<qBr8SqwurZf_jJRAEPTu_fLbzZ1LplLtAa0tVtHgaVUlZop459Vhhxinv41fdpu9JZEhKMoo4o11cl3-Aw0TCKzEiifgT7scXKU5DN8PX6M=@protonmail.com>","In-Reply-To":"<20230615172608.378258-5-kieran.bingham@ideasonboard.com>","References":"<20230615172608.378258-1-kieran.bingham@ideasonboard.com>\n\t<20230615172608.378258-5-kieran.bingham@ideasonboard.com>","Feedback-ID":"20568564:user:proton","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"quoted-printable","Subject":"Re: [libcamera-devel] [PATCH v4 4/5] libcamera: properties: Provide\n\ta Devices camera property","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>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze_via_libcamera-devel?=\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <pobrn@protonmail.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tAshok Sidipotu <ashok.sidipotu@collabora.com>,\n\tlibcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":27363,"web_url":"https://patchwork.libcamera.org/comment/27363/","msgid":"<168687004664.594298.4836509917378259144@Monstersaurus>","date":"2023-06-15T23:00:46","subject":"Re: [libcamera-devel] [PATCH v4 4/5] libcamera: properties: Provide\n\ta Devices camera property","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Barnabás Pőcze (2023-06-15 22:21:12)\n> Hi\n> \n> \n> 2023. június 15., csütörtök 19:26 keltezéssel, Kieran Bingham via libcamera-devel <libcamera-devel@lists.libcamera.org> írta:\n> \n> > Provide a new Camera property that allows pipeline handlers to list any\n> > kernel device used to operate the camera. This allows other frameworks\n> > and daemons such as PipeWire to better understand the resources consumed\n> > by a Camera and consider ignoring those resources when enumerating\n> > camera devices on a system.\n> > \n> > Tested-by: Ashok Sidipotu <ashok.sidipotu@collabora.com>\n> > Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > \n> > ---\n> > v4:\n> >  - Report that different cameras may report identical devices\n> >  - Rename to SystemDevices\n> > \n> > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > ---\n> >  src/libcamera/property_ids.yaml | 9 +++++++++\n> >  1 file changed, 9 insertions(+)\n> > \n> > diff --git a/src/libcamera/property_ids.yaml b/src/libcamera/property_ids.yaml\n> > index cb55e0ed2283..ef1dfd322db1 100644\n> > --- a/src/libcamera/property_ids.yaml\n> > +++ b/src/libcamera/property_ids.yaml\n> > @@ -690,6 +690,15 @@ controls:\n> >          that is twice that of the full resolution mode. This value will be valid\n> >          after the configure method has returned successfully.\n> > \n> > +  - SystemDevices:\n> > +      type: int64_t\n> > +      size: [n]\n> > +      description: |\n> > +        A list of integer values of type dev_t denoting major and minor device\n> > +        number of the underlying devices used in the operation of this camera.\n> \n> I am no native speaker of English, but to me any of\n> \n>  - ... denoting [the] major and minor device number of the underlying ...\n>  - ... denoting major and minor device number[s] of the underlying ...\n> \n> sounds a bit better.\n\nYes, I'll add those.\n\n> \n> \n> > +\n> > +        Different cameras may report identical devices.\n> \n> I am wondering how this statement is reconciled with the fact that `camerasByDevnum_`\n> is just a simple map, and not a multimap; and that `CameraManager::get(dev_t)`\n> returns a single camera. I know this is not really relevant for this patch, sorry,\n> but maybe it's worth looking into.\n\nHopefully [0] will remove all concerns about camerasByDevnum_ by\nremoving it and CameraManager::get(dev_t) entirely.\n\n[0] https://patchwork.libcamera.org/project/libcamera/list/?series=3927\n\nThanks\n\nKieran\n\n\n> \n> \n> > +\n> >    # ----------------------------------------------------------------------------\n> >    # Draft properties section\n> > \n> > --\n> > 2.34.1\n> \n> \n> Regards,\n> Barnabás Pőcze","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 365A3BD78E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 15 Jun 2023 23:00:52 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9C8ED628AC;\n\tFri, 16 Jun 2023 01:00:51 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0A1E461E4A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 16 Jun 2023 01:00:50 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net\n\t[82.37.23.78])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1BB0EBEB;\n\tFri, 16 Jun 2023 01:00:18 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1686870051;\n\tbh=MNwPzh3w0niuJuNlGI3rNj+9MZAYLqyWo0LEYrBheDo=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=EXVe0r9lFOVWoGgjVt2Y+V8pksza4yWmVM6YBoT5yh7uM6Nf3HMemAt4ZPOwzLwcm\n\tMt3UMOV21MBqLWkY1Y9vhFHd/y1OQJz1TOBdV8f9uUebXrFEOGs4W+lUT5+MJw/cGj\n\tua1YzhBP7vOqg0dotLavOaIqjEO6Yr3LL0KS2e1cL7s8R0DHuZEgd7PhqO/Wnlar6Q\n\tC7Z7cVMg02VBuhEFSy4/cPqDfysIYZFJsCs1906Fl19JvPXT2gzrnN4Ewe+gD5Gwtm\n\tvoNGreX+qzE0Djw7y3+mozN6cxkgL06BiNzuayQC/RJA/QLMGo9KoxL+iIIiSKN4nK\n\tGl1xBsAzm3i0Q==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1686870018;\n\tbh=MNwPzh3w0niuJuNlGI3rNj+9MZAYLqyWo0LEYrBheDo=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=ODK291gOdyUOqrJZnCplRZ4//ZorEuH69r0yemkdkWF/y88zMLR+PCNdUaQQONSMq\n\tMYc1qWDHLyw/OoYA9m/Z0TkHAK8mt1hmN/s3kPgPz9OO3EZ6xx3jUSa42YbBJfqo9M\n\t+Gw+x2pOJEnEjoXMo9fjdnKqqszqVPVoISGf0mfs="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"ODK291gO\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<qBr8SqwurZf_jJRAEPTu_fLbzZ1LplLtAa0tVtHgaVUlZop459Vhhxinv41fdpu9JZEhKMoo4o11cl3-Aw0TCKzEiifgT7scXKU5DN8PX6M=@protonmail.com>","References":"<20230615172608.378258-1-kieran.bingham@ideasonboard.com>\n\t<20230615172608.378258-5-kieran.bingham@ideasonboard.com>\n\t<qBr8SqwurZf_jJRAEPTu_fLbzZ1LplLtAa0tVtHgaVUlZop459Vhhxinv41fdpu9JZEhKMoo4o11cl3-Aw0TCKzEiifgT7scXKU5DN8PX6M=@protonmail.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <pobrn@protonmail.com>","Date":"Fri, 16 Jun 2023 00:00:46 +0100","Message-ID":"<168687004664.594298.4836509917378259144@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH v4 4/5] libcamera: properties: Provide\n\ta Devices camera property","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>","From":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tAshok Sidipotu <ashok.sidipotu@collabora.com>,\n\tlibcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]