[{"id":20561,"web_url":"https://patchwork.libcamera.org/comment/20561/","msgid":"<163533738013.1184428.4092111299533921444@Monstersaurus>","date":"2021-10-27T12:23:00","subject":"Re: [libcamera-devel] [PATCH v3 8/9] pipeline: raspberrypi: Account\n\tfor a missing Unicam embedded data node","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Naushir Patuck (2021-10-27 10:28:02)\n> The unicam driver no longer registers an embedded data node if the sensor does\n> not provide this stream. Account for this in the pipeline handler match routine\n> by not assuming it is always present.\n> \n> Add a warning if Unicam and the CamHelper do not agree on the presense of sensor\n> embedded data, and disable its usage in these cases.\n> \n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> Reviewed-by: David Plowman <david.plowman@raspberrypi.com>\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  .../pipeline/raspberrypi/raspberrypi.cpp         | 16 +++++++++++++---\n>  1 file changed, 13 insertions(+), 3 deletions(-)\n> \n> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> index e01359b20fd9..52521857b61c 100644\n> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> @@ -1015,7 +1015,6 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator)\n>         DeviceMatch unicam(\"unicam\");\n>         DeviceMatch isp(\"bcm2835-isp\");\n>  \n> -       unicam.add(\"unicam-embedded\");\n>         unicam.add(\"unicam-image\");\n>  \n>         isp.add(\"bcm2835-isp0-output0\"); /* Input */\n> @@ -1036,9 +1035,16 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator)\n>                 return false;\n>  \n>         /* Locate and open the unicam video streams. */\n> -       data->unicam_[Unicam::Embedded] = RPi::Stream(\"Unicam Embedded\", unicam_->getEntityByName(\"unicam-embedded\"));\n>         data->unicam_[Unicam::Image] = RPi::Stream(\"Unicam Image\", unicam_->getEntityByName(\"unicam-image\"));\n>  \n> +       /* An embedded data node will not be present if the sensor does not support it. */\n> +       MediaEntity *embeddedEntity = unicam_->getEntityByName(\"unicam-embedded\");\n> +       if (embeddedEntity) {\n> +               data->unicam_[Unicam::Embedded] = RPi::Stream(\"Unicam Embedded\", embeddedEntity);\n> +               data->unicam_[Unicam::Embedded].dev()->bufferReady.connect(data.get(),\n> +                                                                          &RPiCameraData::unicamBufferDequeue);\n> +       }\n> +\n>         /* Tag the ISP input stream as an import stream. */\n>         data->isp_[Isp::Input] = RPi::Stream(\"ISP Input\", isp_->getEntityByName(\"bcm2835-isp0-output0\"), true);\n>         data->isp_[Isp::Output0] = RPi::Stream(\"ISP Output0\", isp_->getEntityByName(\"bcm2835-isp0-capture1\"));\n> @@ -1048,7 +1054,6 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator)\n>         /* Wire up all the buffer connections. */\n>         data->unicam_[Unicam::Image].dev()->frameStart.connect(data.get(), &RPiCameraData::frameStarted);\n>         data->unicam_[Unicam::Image].dev()->bufferReady.connect(data.get(), &RPiCameraData::unicamBufferDequeue);\n> -       data->unicam_[Unicam::Embedded].dev()->bufferReady.connect(data.get(), &RPiCameraData::unicamBufferDequeue);\n>         data->isp_[Isp::Input].dev()->bufferReady.connect(data.get(), &RPiCameraData::ispInputDequeue);\n>         data->isp_[Isp::Output0].dev()->bufferReady.connect(data.get(), &RPiCameraData::ispOutputDequeue);\n>         data->isp_[Isp::Output1].dev()->bufferReady.connect(data.get(), &RPiCameraData::ispOutputDequeue);\n> @@ -1076,6 +1081,11 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator)\n>                 return false;\n>         }\n>  \n> +       if (sensorConfig.sensorMetadata ^ !!embeddedEntity) {\n> +               LOG(RPI, Warning) << \"Mismatch between Unicam and CamHelper for embedded data usage!\";\n> +               sensorConfig.sensorMetadata = false;\n\nShould the data->unicam_[Unicam::Embedded] stream/ signal be\ndisconnected here? (if they were created) or will they just be fine\nsitting idle?\n\nI presume they'll be fine and keep otherwise quiet on the pipeline, and\nget cleaned up at the end anyway.\n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> +       }\n> +\n>         /*\n>          * Open all Unicam and ISP streams. The exception is the embedded data\n>          * stream, which only gets opened below if the IPA reports that the sensor\n> -- \n> 2.25.1\n>","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 75933BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 27 Oct 2021 12:23:05 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CCD986487F;\n\tWed, 27 Oct 2021 14:23:04 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6993460123\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 27 Oct 2021 14:23:03 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 02360596;\n\tWed, 27 Oct 2021 14:23:02 +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=\"qZbboJ1o\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1635337383;\n\tbh=sUvg9NHytAC2S77JNK+c2qLhRdya1YBSgiPZglG2p6Q=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=qZbboJ1oboCQH9YN5e7QbP5LEzIWpmK7vTHuSypYTps2J7gptJwAxxqUeLxLFew0i\n\t82KOA5HSoBaaevfl0SqyRpy+c57A0t9/4L49gAqtv0hp+GzawHKlHW++p4gdntxsIP\n\txT3maniXwGJhz/2mGdVo3FexFU0hm3zjxWxNrRDc=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20211027092803.3671096-9-naush@raspberrypi.com>","References":"<20211027092803.3671096-1-naush@raspberrypi.com>\n\t<20211027092803.3671096-9-naush@raspberrypi.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Naushir Patuck <naush@raspberrypi.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Wed, 27 Oct 2021 13:23:00 +0100","Message-ID":"<163533738013.1184428.4092111299533921444@Monstersaurus>","User-Agent":"alot/0.9.1","Subject":"Re: [libcamera-devel] [PATCH v3 8/9] pipeline: raspberrypi: Account\n\tfor a missing Unicam embedded data node","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":20572,"web_url":"https://patchwork.libcamera.org/comment/20572/","msgid":"<CAEmqJPpFaRxeGy7kc5VW08PZEqyDXxTakM1FX2=X04NrH6_-Sw@mail.gmail.com>","date":"2021-10-27T12:40:53","subject":"Re: [libcamera-devel] [PATCH v3 8/9] pipeline: raspberrypi: Account\n\tfor a missing Unicam embedded data node","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi Kieran,\n\nThank you for your feedback,\n\nOn Wed, 27 Oct 2021 at 13:23, Kieran Bingham <\nkieran.bingham@ideasonboard.com> wrote:\n\n> Quoting Naushir Patuck (2021-10-27 10:28:02)\n> > The unicam driver no longer registers an embedded data node if the\n> sensor does\n> > not provide this stream. Account for this in the pipeline handler match\n> routine\n> > by not assuming it is always present.\n> >\n> > Add a warning if Unicam and the CamHelper do not agree on the presense\n> of sensor\n> > embedded data, and disable its usage in these cases.\n> >\n> > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > Reviewed-by: David Plowman <david.plowman@raspberrypi.com>\n> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > ---\n> >  .../pipeline/raspberrypi/raspberrypi.cpp         | 16 +++++++++++++---\n> >  1 file changed, 13 insertions(+), 3 deletions(-)\n> >\n> > diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > index e01359b20fd9..52521857b61c 100644\n> > --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > @@ -1015,7 +1015,6 @@ bool PipelineHandlerRPi::match(DeviceEnumerator\n> *enumerator)\n> >         DeviceMatch unicam(\"unicam\");\n> >         DeviceMatch isp(\"bcm2835-isp\");\n> >\n> > -       unicam.add(\"unicam-embedded\");\n> >         unicam.add(\"unicam-image\");\n> >\n> >         isp.add(\"bcm2835-isp0-output0\"); /* Input */\n> > @@ -1036,9 +1035,16 @@ bool PipelineHandlerRPi::match(DeviceEnumerator\n> *enumerator)\n> >                 return false;\n> >\n> >         /* Locate and open the unicam video streams. */\n> > -       data->unicam_[Unicam::Embedded] = RPi::Stream(\"Unicam Embedded\",\n> unicam_->getEntityByName(\"unicam-embedded\"));\n> >         data->unicam_[Unicam::Image] = RPi::Stream(\"Unicam Image\",\n> unicam_->getEntityByName(\"unicam-image\"));\n> >\n> > +       /* An embedded data node will not be present if the sensor does\n> not support it. */\n> > +       MediaEntity *embeddedEntity =\n> unicam_->getEntityByName(\"unicam-embedded\");\n> > +       if (embeddedEntity) {\n> > +               data->unicam_[Unicam::Embedded] = RPi::Stream(\"Unicam\n> Embedded\", embeddedEntity);\n> > +\n>  data->unicam_[Unicam::Embedded].dev()->bufferReady.connect(data.get(),\n> > +\n>   &RPiCameraData::unicamBufferDequeue);\n> > +       }\n> > +\n> >         /* Tag the ISP input stream as an import stream. */\n> >         data->isp_[Isp::Input] = RPi::Stream(\"ISP Input\",\n> isp_->getEntityByName(\"bcm2835-isp0-output0\"), true);\n> >         data->isp_[Isp::Output0] = RPi::Stream(\"ISP Output0\",\n> isp_->getEntityByName(\"bcm2835-isp0-capture1\"));\n> > @@ -1048,7 +1054,6 @@ bool PipelineHandlerRPi::match(DeviceEnumerator\n> *enumerator)\n> >         /* Wire up all the buffer connections. */\n> >\n>  data->unicam_[Unicam::Image].dev()->frameStart.connect(data.get(),\n> &RPiCameraData::frameStarted);\n> >\n>  data->unicam_[Unicam::Image].dev()->bufferReady.connect(data.get(),\n> &RPiCameraData::unicamBufferDequeue);\n> > -\n>  data->unicam_[Unicam::Embedded].dev()->bufferReady.connect(data.get(),\n> &RPiCameraData::unicamBufferDequeue);\n> >         data->isp_[Isp::Input].dev()->bufferReady.connect(data.get(),\n> &RPiCameraData::ispInputDequeue);\n> >         data->isp_[Isp::Output0].dev()->bufferReady.connect(data.get(),\n> &RPiCameraData::ispOutputDequeue);\n> >         data->isp_[Isp::Output1].dev()->bufferReady.connect(data.get(),\n> &RPiCameraData::ispOutputDequeue);\n> > @@ -1076,6 +1081,11 @@ bool PipelineHandlerRPi::match(DeviceEnumerator\n> *enumerator)\n> >                 return false;\n> >         }\n> >\n> > +       if (sensorConfig.sensorMetadata ^ !!embeddedEntity) {\n> > +               LOG(RPI, Warning) << \"Mismatch between Unicam and\n> CamHelper for embedded data usage!\";\n> > +               sensorConfig.sensorMetadata = false;\n>\n> Should the data->unicam_[Unicam::Embedded] stream/ signal be\n> disconnected here? (if they were created) or will they just be fine\n> sitting idle?\n>\n> I presume they'll be fine and keep otherwise quiet on the pipeline, and\n> get cleaned up at the end anyway.\n>\n\nIt shouldn't matter as it will never be triggered, but I will add a\ndisconnect() call\nin these cases.\n\nRegards,\nNaush\n\n\n>\n>\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>\n> > +       }\n> > +\n> >         /*\n> >          * Open all Unicam and ISP streams. The exception is the\n> embedded data\n> >          * stream, which only gets opened below if the IPA reports that\n> the sensor\n> > --\n> > 2.25.1\n> >\n>","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 98126BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 27 Oct 2021 12:41:11 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 57B996487F;\n\tWed, 27 Oct 2021 14:41:11 +0200 (CEST)","from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com\n\t[IPv6:2a00:1450:4864:20::22a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1A87360123\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 27 Oct 2021 14:41:10 +0200 (CEST)","by mail-lj1-x22a.google.com with SMTP id s19so4424165ljj.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 27 Oct 2021 05:41:10 -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=\"HlvN4kv1\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=jpLDDkpgAFgUP9adc7nnyvzWWGA04FMhFd+SCTiFcjw=;\n\tb=HlvN4kv1CCUo9yEjMqvX52xWVk+NpsoJSpmt9/PrW89Piia4t1JBKyh/ZQ1ot5GxzA\n\t2P4+UKgKWUTinhWUucQ0LQWdJ8eHr0oj15NskGFRGYkufiY7ErXVSLis42SXaocidl9j\n\t6tMUbISg1yS40/tddtZBrUkbxrBJAhR7N2Dnv2MhyAWbgabYlh4yUpI4roiwwr8tazt0\n\t2xTyuc27U2lB/rWvxNOhFYTo4Qaa1n9oI0UT3KscCq5GMq5KkEBH+vpnciUo/NL6d+4X\n\tWNOLbExMhlPqgQ+/UhLT0koPyGCq+OkpsW8+VvYj/oa6CVmFXcaTMYNIszHY/HopAPXA\n\tvRqg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=jpLDDkpgAFgUP9adc7nnyvzWWGA04FMhFd+SCTiFcjw=;\n\tb=VK2cTkVPmxeNF1spvounI3nV9uc9I7Q90kgLTXqbngYsOlBGrUZmuwywIrFGoDo6Ad\n\tw25hQiRGuMM3gEiZgkoDrhckggol7176KQBRcfdkn/ZZ/79Oz9cXMm6OWYCMbIzKx9O1\n\tysUZUg7Ss3hxO8C6BYioCORUeXX2E8HHGfIEbtkvfu6rSukYcCHkwDjrLWSW2TaBoUKR\n\t49rk0DVJvVDkyTtBzUIZvYURne1NFaHyhcysaIPUripn7ND2pPw+gepHQ8ftXzb2swrT\n\t0dCY+nuJvCDTjzwAcB/GhS9fnRh1XlABY2jhLrOEpr7EiHUeYs1k/NcHoK58Vdm5HJzk\n\tgrtA==","X-Gm-Message-State":"AOAM533jBnGkcnEy+BaBxo3ohTOVB5CHtFU7Wh3Lc7n/jwshSjkuOcnF\n\tu9qJNDbQ2oF7VNOiKyUlF17UzbDJ+ylVET7bwKhj9Q==","X-Google-Smtp-Source":"ABdhPJzjfqFK+FHJgU/efVSzeeMXntnP61k4kSVujQ/33gSvVlSZIlQDaJscFzIEIc9oYzJ7fj15gUSDRr014B7eYlc=","X-Received":"by 2002:a05:651c:1505:: with SMTP id\n\te5mr33769278ljf.520.1635338469552; \n\tWed, 27 Oct 2021 05:41:09 -0700 (PDT)","MIME-Version":"1.0","References":"<20211027092803.3671096-1-naush@raspberrypi.com>\n\t<20211027092803.3671096-9-naush@raspberrypi.com>\n\t<163533738013.1184428.4092111299533921444@Monstersaurus>","In-Reply-To":"<163533738013.1184428.4092111299533921444@Monstersaurus>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Wed, 27 Oct 2021 13:40:53 +0100","Message-ID":"<CAEmqJPpFaRxeGy7kc5VW08PZEqyDXxTakM1FX2=X04NrH6_-Sw@mail.gmail.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Content-Type":"multipart/alternative; boundary=\"00000000000090c43d05cf54e88b\"","Subject":"Re: [libcamera-devel] [PATCH v3 8/9] pipeline: raspberrypi: Account\n\tfor a missing Unicam embedded data node","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":20589,"web_url":"https://patchwork.libcamera.org/comment/20589/","msgid":"<YXlg/GJLTMR5JfSK@pendragon.ideasonboard.com>","date":"2021-10-27T14:23:56","subject":"Re: [libcamera-devel] [PATCH v3 8/9] pipeline: raspberrypi: Account\n\tfor a missing Unicam embedded data node","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Wed, Oct 27, 2021 at 01:40:53PM +0100, Naushir Patuck wrote:\n> On Wed, 27 Oct 2021 at 13:23, Kieran Bingham  wrote:\n> \n> > Quoting Naushir Patuck (2021-10-27 10:28:02)\n> > > The unicam driver no longer registers an embedded data node if the sensor does\n> > > not provide this stream. Account for this in the pipeline handler match routine\n> > > by not assuming it is always present.\n> > >\n> > > Add a warning if Unicam and the CamHelper do not agree on the presense of sensor\n> > > embedded data, and disable its usage in these cases.\n> > >\n> > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > > Reviewed-by: David Plowman <david.plowman@raspberrypi.com>\n> > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > > ---\n> > >  .../pipeline/raspberrypi/raspberrypi.cpp         | 16 +++++++++++++---\n> > >  1 file changed, 13 insertions(+), 3 deletions(-)\n> > >\n> > > diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > > index e01359b20fd9..52521857b61c 100644\n> > > --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > > +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > > @@ -1015,7 +1015,6 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator)\n> > >         DeviceMatch unicam(\"unicam\");\n> > >         DeviceMatch isp(\"bcm2835-isp\");\n> > >\n> > > -       unicam.add(\"unicam-embedded\");\n> > >         unicam.add(\"unicam-image\");\n> > >\n> > >         isp.add(\"bcm2835-isp0-output0\"); /* Input */\n> > > @@ -1036,9 +1035,16 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator)\n> > >                 return false;\n> > >\n> > >         /* Locate and open the unicam video streams. */\n> > > -       data->unicam_[Unicam::Embedded] = RPi::Stream(\"Unicam Embedded\", unicam_->getEntityByName(\"unicam-embedded\"));\n> > >         data->unicam_[Unicam::Image] = RPi::Stream(\"Unicam Image\", unicam_->getEntityByName(\"unicam-image\"));\n> > >\n> > > +       /* An embedded data node will not be present if the sensor does not support it. */\n> > > +       MediaEntity *embeddedEntity = unicam_->getEntityByName(\"unicam-embedded\");\n> > > +       if (embeddedEntity) {\n> > > +               data->unicam_[Unicam::Embedded] = RPi::Stream(\"Unicam Embedded\", embeddedEntity);\n> > > +  data->unicam_[Unicam::Embedded].dev()->bufferReady.connect(data.get(),\n> > > +   &RPiCameraData::unicamBufferDequeue);\n> > > +       }\n> > > +\n> > >         /* Tag the ISP input stream as an import stream. */\n> > >         data->isp_[Isp::Input] = RPi::Stream(\"ISP Input\", isp_->getEntityByName(\"bcm2835-isp0-output0\"), true);\n> > >         data->isp_[Isp::Output0] = RPi::Stream(\"ISP Output0\", isp_->getEntityByName(\"bcm2835-isp0-capture1\"));\n> > > @@ -1048,7 +1054,6 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator)\n> > >         /* Wire up all the buffer connections. */\n> > >  data->unicam_[Unicam::Image].dev()->frameStart.connect(data.get(), &RPiCameraData::frameStarted);\n> > >  data->unicam_[Unicam::Image].dev()->bufferReady.connect(data.get(), &RPiCameraData::unicamBufferDequeue);\n> > > -  data->unicam_[Unicam::Embedded].dev()->bufferReady.connect(data.get(), &RPiCameraData::unicamBufferDequeue);\n> > >         data->isp_[Isp::Input].dev()->bufferReady.connect(data.get(), &RPiCameraData::ispInputDequeue);\n> > >         data->isp_[Isp::Output0].dev()->bufferReady.connect(data.get(), &RPiCameraData::ispOutputDequeue);\n> > >         data->isp_[Isp::Output1].dev()->bufferReady.connect(data.get(), &RPiCameraData::ispOutputDequeue);\n> > > @@ -1076,6 +1081,11 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator)\n> > >                 return false;\n> > >         }\n> > >\n> > > +       if (sensorConfig.sensorMetadata ^ !!embeddedEntity) {\n> > > +               LOG(RPI, Warning) << \"Mismatch between Unicam and CamHelper for embedded data usage!\";\n> > > +               sensorConfig.sensorMetadata = false;\n> >\n> > Should the data->unicam_[Unicam::Embedded] stream/ signal be\n> > disconnected here? (if they were created) or will they just be fine\n> > sitting idle?\n> >\n> > I presume they'll be fine and keep otherwise quiet on the pipeline, and\n> > get cleaned up at the end anyway.\n> \n> It shouldn't matter as it will never be triggered, but I will add a disconnect() call\n> in these cases.\n\nIf it's never triggered we can keep it connected. If it happens to get\ntriggered anyway, the event will never be handled, and the event loop\nwill always wake up immediately, so we'll be in trouble.\n\n> > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> >\n> > > +       }\n> > > +\n> > >         /*\n> > >          * Open all Unicam and ISP streams. The exception is the embedded data\n> > >          * stream, which only gets opened below if the IPA reports that the sensor","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 10B85BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 27 Oct 2021 14:24:22 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 884E86487F;\n\tWed, 27 Oct 2021 16:24:21 +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 265DB60123\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 27 Oct 2021 16:24:20 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8FEBC292;\n\tWed, 27 Oct 2021 16:24:19 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"WqeT5PdF\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1635344659;\n\tbh=AA2OzYbBXIW/JM0W+tB/AWusqBQGZr5WEauYI8Ojxx8=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=WqeT5PdFUj7kan8VcezCM1AKdt59o1QV/WRahrgs2fT5Wc4HaCu3wMuJVYBhp4P4+\n\tKvXsxv6XCvYfz0yxUsBuvZIPO1X3DSw2BMdeOwVI21Hq5+FRVbVDn4ivAHMzTn+2Cf\n\toL7IUU2lqyJQBtV0bUoRCy5ghD4O0/F+irWodecw=","Date":"Wed, 27 Oct 2021 17:23:56 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<YXlg/GJLTMR5JfSK@pendragon.ideasonboard.com>","References":"<20211027092803.3671096-1-naush@raspberrypi.com>\n\t<20211027092803.3671096-9-naush@raspberrypi.com>\n\t<163533738013.1184428.4092111299533921444@Monstersaurus>\n\t<CAEmqJPpFaRxeGy7kc5VW08PZEqyDXxTakM1FX2=X04NrH6_-Sw@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<CAEmqJPpFaRxeGy7kc5VW08PZEqyDXxTakM1FX2=X04NrH6_-Sw@mail.gmail.com>","Subject":"Re: [libcamera-devel] [PATCH v3 8/9] pipeline: raspberrypi: Account\n\tfor a missing Unicam embedded data node","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]