[{"id":12315,"web_url":"https://patchwork.libcamera.org/comment/12315/","msgid":"<20200905175459.GF6319@pendragon.ideasonboard.com>","date":"2020-09-05T17:54:59","subject":"Re: [libcamera-devel] [PATCH v2 03/12] android: camera_device: Add\n\tdebug to stream initialization","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nThank you for the patch.\n\nOn Wed, Sep 02, 2020 at 05:22:27PM +0200, Jacopo Mondi wrote:\n> Add debug printouts to the CameraDevice::initializeStreamConfigurations()\n> function that helps to follow the process of building the stream\n\ns/helps/help/\n\n> configurations map.\n> \n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> ---\n>  src/android/camera_device.cpp | 26 +++++++++++++++++++++++++-\n>  1 file changed, 25 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> index 8a8072123961..493d6cecde72 100644\n> --- a/src/android/camera_device.cpp\n> +++ b/src/android/camera_device.cpp\n> @@ -363,6 +363,9 @@ int CameraDevice::initializeStreamConfigurations()\n>  \t\tconst std::vector<PixelFormat> &libcameraFormats =\n>  \t\t\tcamera3Format.libcameraFormats;\n>  \n> +\t\tLOG(HAL, Debug) << \"Testing Android format: \"\n> +\t\t\t\t<< camera3Format.name;\n\ns/://\n\nMaybe s/Testing/Mapping/ ? Not sure this is a test.\n\nI think I'd move this below the JPEG case, to avoid two debug messages\nfor JPEG.\n\n> +\n>  \t\t/*\n>  \t\t * Fixed format mapping for JPEG.\n>  \t\t *\n> @@ -375,6 +378,10 @@ int CameraDevice::initializeStreamConfigurations()\n>  \t\t */\n>  \t\tif (androidFormat == HAL_PIXEL_FORMAT_BLOB) {\n>  \t\t\tformatsMap_[androidFormat] = formats::MJPEG;\n> +\t\t\tLOG(HAL, Debug) << \"Mapped Android format: \"\n\ns/://\n\n> +\t\t\t\t\t<< camera3Format.name << \" to: \"\n\ns/://\n\nSame in other messages below.\n\n> +\t\t\t\t\t<< formats::MJPEG.toString()\n> +\t\t\t\t\t<< \" (fixed mapping)\";\n\nAs this is always done, is there value in printing a message here ?\n\n>  \t\t\tcontinue;\n>  \t\t}\n>  \n> @@ -385,6 +392,10 @@ int CameraDevice::initializeStreamConfigurations()\n>  \t\tPixelFormat mappedFormat;\n>  \t\tfor (const PixelFormat &pixelFormat : libcameraFormats) {\n>  \n> +\t\t\tLOG(HAL, Debug) << \"Testing Android format: \"\n> +\t\t\t\t\t<< camera3Format.name << \" with: \"\n> +\t\t\t\t\t<< pixelFormat.toString();\n> +\n>  \t\t\t/*\n>  \t\t\t * The stream configuration size can be adjusted,\n>  \t\t\t * not the pixel format.\n> @@ -420,14 +431,27 @@ int CameraDevice::initializeStreamConfigurations()\n>  \t\t * stream configurations map, by testing the image resolutions.\n>  \t\t */\n>  \t\tformatsMap_[androidFormat] = mappedFormat;\n> +\t\tLOG(HAL, Debug) << \"Mapped Android format: \"\n> +\t\t\t\t<< camera3Format.name << \" to: \"\n> +\t\t\t\t<< mappedFormat.toString();\n>  \n>  \t\tfor (const Size &res : cameraResolutions) {\n>  \t\t\tcfg.pixelFormat = mappedFormat;\n>  \t\t\tcfg.size = res;\n>  \n> +\t\t\tstd::stringstream ss;\n> +\t\t\tss << \"Testing (\" << res.toString() << \")[\"\n> +\t\t\t   << mappedFormat.toString() << \"]: \";\n\nMaybe use cfg.toString() ?\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> +\n>  \t\t\tCameraConfiguration::Status status = cameraConfig->validate();\n> -\t\t\tif (status != CameraConfiguration::Valid)\n> +\t\t\tif (status != CameraConfiguration::Valid) {\n> +\t\t\t\tss << \" not supported\";\n> +\t\t\t\tLOG(HAL, Debug) << ss.str();\n>  \t\t\t\tcontinue;\n> +\t\t\t}\n> +\n> +\t\t\tss << \" supported\";\n> +\t\t\tLOG(HAL, Debug) << ss.str();\n>  \n>  \t\t\tstreamConfigurations_.push_back({ res, androidFormat });\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 F2DF9BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat,  5 Sep 2020 17:55:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8616562B5B;\n\tSat,  5 Sep 2020 19:55:28 +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 B86F562901\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  5 Sep 2020 19:55:26 +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 D320E335;\n\tSat,  5 Sep 2020 19:55:22 +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=\"cFqQIkLF\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1599328523;\n\tbh=Cvdrlv9FMnU9y7MOkwvso3h0VA9uhsRjQ8bwUSafC4s=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=cFqQIkLFcuHh9uCuXFs4SqxbfrJjr01rQU0V5d4ZBMF+k69B2hxYLbAGWRZQSsQbC\n\tWlZhO4/bJYZ2CsD+0BmqIGTTf1GYbZ5VGSd/DGFGMcxPQY4fgdgVpfLPsXaoX5SZ0A\n\tnnuXulPH2SeCCU7EEhku94aBX6gpDGXE7PjZXo2I=","Date":"Sat, 5 Sep 2020 20:54:59 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<20200905175459.GF6319@pendragon.ideasonboard.com>","References":"<20200902152236.69770-1-jacopo@jmondi.org>\n\t<20200902152236.69770-4-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200902152236.69770-4-jacopo@jmondi.org>","Subject":"Re: [libcamera-devel] [PATCH v2 03/12] android: camera_device: Add\n\tdebug to stream initialization","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":"tfiga@google.com, libcamera-devel@lists.libcamera.org, hiroh@google.com","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":12343,"web_url":"https://patchwork.libcamera.org/comment/12343/","msgid":"<CAO5uPHPUYOaZRap-ihJ6Usz0jv83SpWhrV6u3sSp6_h5yz5CAA@mail.gmail.com>","date":"2020-09-07T08:17:36","subject":"Re: [libcamera-devel] [PATCH v2 03/12] android: camera_device: Add\n\tdebug to stream initialization","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"content":"Hi,\nLGTM module a few nits.\n\nRe patch title, how about \"Add more debug log in stream initialization process\"?\n\nOn Sun, Sep 6, 2020 at 2:55 AM Laurent Pinchart\n<laurent.pinchart@ideasonboard.com> wrote:\n>\n> Hi Jacopo,\n>\n> Thank you for the patch.\n>\n> On Wed, Sep 02, 2020 at 05:22:27PM +0200, Jacopo Mondi wrote:\n> > Add debug printouts to the CameraDevice::initializeStreamConfigurations()\n> > function that helps to follow the process of building the stream\n>\n> s/helps/help/\n>\n> > configurations map.\n> >\n> > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> > ---\n> >  src/android/camera_device.cpp | 26 +++++++++++++++++++++++++-\n> >  1 file changed, 25 insertions(+), 1 deletion(-)\n> >\n> > diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> > index 8a8072123961..493d6cecde72 100644\n> > --- a/src/android/camera_device.cpp\n> > +++ b/src/android/camera_device.cpp\n> > @@ -363,6 +363,9 @@ int CameraDevice::initializeStreamConfigurations()\n> >               const std::vector<PixelFormat> &libcameraFormats =\n> >                       camera3Format.libcameraFormats;\n> >\n> > +             LOG(HAL, Debug) << \"Testing Android format: \"\n> > +                             << camera3Format.name;\n>\n> s/://\n>\n> Maybe s/Testing/Mapping/ ? Not sure this is a test.\n>\n\nHow about \"Trying to map\"?\n\n> I think I'd move this below the JPEG case, to avoid two debug messages\n> for JPEG.\n>\n\nI don't have a strong preference here, but I wonder if not moving is better?\nTherefore, we always pair debug log, Testing... - Mapped...\n\nReviewed-by: Hirokazu Honda <hiroh@chromium.org>\n\n> > +\n> >               /*\n> >                * Fixed format mapping for JPEG.\n> >                *\n> > @@ -375,6 +378,10 @@ int CameraDevice::initializeStreamConfigurations()\n> >                */\n> >               if (androidFormat == HAL_PIXEL_FORMAT_BLOB) {\n> >                       formatsMap_[androidFormat] = formats::MJPEG;\n> > +                     LOG(HAL, Debug) << \"Mapped Android format: \"\n>\n> s/://\n>\n> > +                                     << camera3Format.name << \" to: \"\n>\n> s/://\n>\n> Same in other messages below.\n>\n> > +                                     << formats::MJPEG.toString()\n> > +                                     << \" (fixed mapping)\";\n>\n> As this is always done, is there value in printing a message here ?\n>\n> >                       continue;\n> >               }\n> >\n> > @@ -385,6 +392,10 @@ int CameraDevice::initializeStreamConfigurations()\n> >               PixelFormat mappedFormat;\n> >               for (const PixelFormat &pixelFormat : libcameraFormats) {\n> >\n> > +                     LOG(HAL, Debug) << \"Testing Android format: \"\n> > +                                     << camera3Format.name << \" with: \"\n> > +                                     << pixelFormat.toString();\n> > +\n> >                       /*\n> >                        * The stream configuration size can be adjusted,\n> >                        * not the pixel format.\n> > @@ -420,14 +431,27 @@ int CameraDevice::initializeStreamConfigurations()\n> >                * stream configurations map, by testing the image resolutions.\n> >                */\n> >               formatsMap_[androidFormat] = mappedFormat;\n> > +             LOG(HAL, Debug) << \"Mapped Android format: \"\n> > +                             << camera3Format.name << \" to: \"\n> > +                             << mappedFormat.toString();\n> >\n> >               for (const Size &res : cameraResolutions) {\n> >                       cfg.pixelFormat = mappedFormat;\n> >                       cfg.size = res;\n> >\n> > +                     std::stringstream ss;\n> > +                     ss << \"Testing (\" << res.toString() << \")[\"\n> > +                        << mappedFormat.toString() << \"]: \";\n>\n> Maybe use cfg.toString() ?\n>\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n>\n> > +\n> >                       CameraConfiguration::Status status = cameraConfig->validate();\n> > -                     if (status != CameraConfiguration::Valid)\n> > +                     if (status != CameraConfiguration::Valid) {\n> > +                             ss << \" not supported\";\n> > +                             LOG(HAL, Debug) << ss.str();\n> >                               continue;\n> > +                     }\n> > +\n> > +                     ss << \" supported\";\n> > +                     LOG(HAL, Debug) << ss.str();\n> >\n> >                       streamConfigurations_.push_back({ res, androidFormat });\n> >\n>\n> --\n> Regards,\n>\n> Laurent Pinchart\n\nBest Regards,\n-Hiro\n\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","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 9C3B8BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  7 Sep 2020 08:17:51 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2264C62B58;\n\tMon,  7 Sep 2020 10:17:51 +0200 (CEST)","from mail-ed1-x541.google.com (mail-ed1-x541.google.com\n\t[IPv6:2a00:1450:4864:20::541])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1D17F629B6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  7 Sep 2020 10:17:49 +0200 (CEST)","by mail-ed1-x541.google.com with SMTP id n13so11871008edo.10\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 07 Sep 2020 01:17:49 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"mUcJ6IJa\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=YN7ReFJjYT+qL6E/AuNGp9O7cZXLuAmslE9Q/Nip+Rw=;\n\tb=mUcJ6IJaDBG6tUgES6Q69mUX1XWwt7tloaUlVCu1yoLoS6KXPBPmJCqahii24yWpXE\n\tBComl+xIt0X0FDnaCCY/+db2ENCNVSCdOc6EMqXTaDUPo+dnp/srXN7Q6lrNM0rpVj0s\n\t5vjiO0uOZbvm/cNJ/86Vsj5f4b50IEe1vh32k=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=YN7ReFJjYT+qL6E/AuNGp9O7cZXLuAmslE9Q/Nip+Rw=;\n\tb=ZWiVKEl4lIgQBzN4oPct/gtmCr8sew9nlKkSf8bShiGgOvonCd/N4dR+GJ4aFco8vQ\n\t5VviAZdvKYopyC81m6jgzNVusQc9ppEptk6facbjqtFkB4iCRMAadcCH7igcI4lJ5XLj\n\tIkn3IziDCF4bnUTSPjfLG0ABVOIFDOrX8Ir1yjWriUAUv35DUUApsi4er0xaYnjlfioW\n\tlUbNxrKqRb36g4o99GIrSavVUc+9yvfZNt99H9M14I26SFmnQoRaQBTfLTRO59kJirk/\n\tr+ofoGUWRfGQijybOwkV6apXBh6OZBsFt/sxwYbJiJoTzIE1H93h7xqz1Z6ZDlkIWO+T\n\tLQiw==","X-Gm-Message-State":"AOAM5310QqdB67AwEDHjh1pSZqpDEtrbvfHYV7IaytCHPCTI5YJvs3Z2\n\tMI+A2oGRpZ3g26DS7jTF70FgGuMaLeYv19So3dn+Tw==","X-Google-Smtp-Source":"ABdhPJzGuLnK0IXom8T3Ch4898+gCYPz6J2u5pPr9uxjrc9tE0hbl7pZl9+yYY+kPQy2BDzY65sDwvQeMwg7FhMraVA=","X-Received":"by 2002:a50:8f85:: with SMTP id\n\ty5mr20555535edy.233.1599466668717; \n\tMon, 07 Sep 2020 01:17:48 -0700 (PDT)","MIME-Version":"1.0","References":"<20200902152236.69770-1-jacopo@jmondi.org>\n\t<20200902152236.69770-4-jacopo@jmondi.org>\n\t<20200905175459.GF6319@pendragon.ideasonboard.com>","In-Reply-To":"<20200905175459.GF6319@pendragon.ideasonboard.com>","From":"Hirokazu Honda <hiroh@chromium.org>","Date":"Mon, 7 Sep 2020 17:17:36 +0900","Message-ID":"<CAO5uPHPUYOaZRap-ihJ6Usz0jv83SpWhrV6u3sSp6_h5yz5CAA@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v2 03/12] android: camera_device: Add\n\tdebug to stream initialization","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":"tfiga@google.com, libcamera-devel@lists.libcamera.org,\n\tHirokazu Honda <hiroh@google.com>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":12351,"web_url":"https://patchwork.libcamera.org/comment/12351/","msgid":"<20200907090451.szdhd2dazx64ecsv@uno.localdomain>","date":"2020-09-07T09:04:51","subject":"Re: [libcamera-devel] [PATCH v2 03/12] android: camera_device: Add\n\tdebug to stream initialization","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Hiro,\n\nOn Mon, Sep 07, 2020 at 05:17:36PM +0900, Hirokazu Honda wrote:\n> Hi,\n> LGTM module a few nits.\n>\n> Re patch title, how about \"Add more debug log in stream initialization process\"?\n\nIt would be nicer, but it breaks the 75-char rule on patch subjects,\nwhich is a pain to respect, but it's useful when displaying patches\nwith git log in oneline mode (or git bisect, ot git based tools like\ntig or gitk) which breaks lines at that columns limit. Also, we still\ndon't need to report fixes for backporting purposes, but when\nreferring to other patches in the history in one commit message,\nreporting them in the canonical patch naming scheme:\n\ne21d2170f366 (\"video: remove unnecessary platform_set_drvdata()\")\n\nrequires the subject of being of limited lenght to make it readable.\n\n>\n> On Sun, Sep 6, 2020 at 2:55 AM Laurent Pinchart\n> <laurent.pinchart@ideasonboard.com> wrote:\n> >\n> > Hi Jacopo,\n> >\n> > Thank you for the patch.\n> >\n> > On Wed, Sep 02, 2020 at 05:22:27PM +0200, Jacopo Mondi wrote:\n> > > Add debug printouts to the CameraDevice::initializeStreamConfigurations()\n> > > function that helps to follow the process of building the stream\n> >\n> > s/helps/help/\n> >\n> > > configurations map.\n> > >\n> > > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> > > ---\n> > >  src/android/camera_device.cpp | 26 +++++++++++++++++++++++++-\n> > >  1 file changed, 25 insertions(+), 1 deletion(-)\n> > >\n> > > diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> > > index 8a8072123961..493d6cecde72 100644\n> > > --- a/src/android/camera_device.cpp\n> > > +++ b/src/android/camera_device.cpp\n> > > @@ -363,6 +363,9 @@ int CameraDevice::initializeStreamConfigurations()\n> > >               const std::vector<PixelFormat> &libcameraFormats =\n> > >                       camera3Format.libcameraFormats;\n> > >\n> > > +             LOG(HAL, Debug) << \"Testing Android format: \"\n> > > +                             << camera3Format.name;\n> >\n> > s/://\n> >\n> > Maybe s/Testing/Mapping/ ? Not sure this is a test.\n> >\n>\n> How about \"Trying to map\"?\n>\n> > I think I'd move this below the JPEG case, to avoid two debug messages\n> > for JPEG.\n> >\n>\n> I don't have a strong preference here, but I wonder if not moving is better?\n> Therefore, we always pair debug log, Testing... - Mapped...\n>\n\nYes, I wanted this to be 'paired' like for other formats :)\n\n> Reviewed-by: Hirokazu Honda <hiroh@chromium.org>\n>\n\nThanks\n   j\n\n> > > +\n> > >               /*\n> > >                * Fixed format mapping for JPEG.\n> > >                *\n> > > @@ -375,6 +378,10 @@ int CameraDevice::initializeStreamConfigurations()\n> > >                */\n> > >               if (androidFormat == HAL_PIXEL_FORMAT_BLOB) {\n> > >                       formatsMap_[androidFormat] = formats::MJPEG;\n> > > +                     LOG(HAL, Debug) << \"Mapped Android format: \"\n> >\n> > s/://\n> >\n> > > +                                     << camera3Format.name << \" to: \"\n> >\n> > s/://\n> >\n> > Same in other messages below.\n> >\n> > > +                                     << formats::MJPEG.toString()\n> > > +                                     << \" (fixed mapping)\";\n> >\n> > As this is always done, is there value in printing a message here ?\n> >\n> > >                       continue;\n> > >               }\n> > >\n> > > @@ -385,6 +392,10 @@ int CameraDevice::initializeStreamConfigurations()\n> > >               PixelFormat mappedFormat;\n> > >               for (const PixelFormat &pixelFormat : libcameraFormats) {\n> > >\n> > > +                     LOG(HAL, Debug) << \"Testing Android format: \"\n> > > +                                     << camera3Format.name << \" with: \"\n> > > +                                     << pixelFormat.toString();\n> > > +\n> > >                       /*\n> > >                        * The stream configuration size can be adjusted,\n> > >                        * not the pixel format.\n> > > @@ -420,14 +431,27 @@ int CameraDevice::initializeStreamConfigurations()\n> > >                * stream configurations map, by testing the image resolutions.\n> > >                */\n> > >               formatsMap_[androidFormat] = mappedFormat;\n> > > +             LOG(HAL, Debug) << \"Mapped Android format: \"\n> > > +                             << camera3Format.name << \" to: \"\n> > > +                             << mappedFormat.toString();\n> > >\n> > >               for (const Size &res : cameraResolutions) {\n> > >                       cfg.pixelFormat = mappedFormat;\n> > >                       cfg.size = res;\n> > >\n> > > +                     std::stringstream ss;\n> > > +                     ss << \"Testing (\" << res.toString() << \")[\"\n> > > +                        << mappedFormat.toString() << \"]: \";\n> >\n> > Maybe use cfg.toString() ?\n> >\n> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> >\n> > > +\n> > >                       CameraConfiguration::Status status = cameraConfig->validate();\n> > > -                     if (status != CameraConfiguration::Valid)\n> > > +                     if (status != CameraConfiguration::Valid) {\n> > > +                             ss << \" not supported\";\n> > > +                             LOG(HAL, Debug) << ss.str();\n> > >                               continue;\n> > > +                     }\n> > > +\n> > > +                     ss << \" supported\";\n> > > +                     LOG(HAL, Debug) << ss.str();\n> > >\n> > >                       streamConfigurations_.push_back({ res, androidFormat });\n> > >\n> >\n> > --\n> > Regards,\n> >\n> > Laurent Pinchart\n>\n> Best Regards,\n> -Hiro\n>\n> > _______________________________________________\n> > libcamera-devel mailing list\n> > libcamera-devel@lists.libcamera.org\n> > https://lists.libcamera.org/listinfo/libcamera-devel","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 C0956BDB1D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  7 Sep 2020 09:01:06 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 34F4862BB6;\n\tMon,  7 Sep 2020 11:01:06 +0200 (CEST)","from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net\n\t[217.70.183.193])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B70E462B58\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  7 Sep 2020 11:01:04 +0200 (CEST)","from uno.localdomain (93-34-118-233.ip49.fastwebnet.it\n\t[93.34.118.233]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay1-d.mail.gandi.net (Postfix) with ESMTPSA id BED90240019;\n\tMon,  7 Sep 2020 09:01:03 +0000 (UTC)"],"X-Originating-IP":"93.34.118.233","Date":"Mon, 7 Sep 2020 11:04:51 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Hirokazu Honda <hiroh@chromium.org>","Message-ID":"<20200907090451.szdhd2dazx64ecsv@uno.localdomain>","References":"<20200902152236.69770-1-jacopo@jmondi.org>\n\t<20200902152236.69770-4-jacopo@jmondi.org>\n\t<20200905175459.GF6319@pendragon.ideasonboard.com>\n\t<CAO5uPHPUYOaZRap-ihJ6Usz0jv83SpWhrV6u3sSp6_h5yz5CAA@mail.gmail.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<CAO5uPHPUYOaZRap-ihJ6Usz0jv83SpWhrV6u3sSp6_h5yz5CAA@mail.gmail.com>","Subject":"Re: [libcamera-devel] [PATCH v2 03/12] android: camera_device: Add\n\tdebug to stream initialization","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":"tfiga@google.com, libcamera-devel@lists.libcamera.org,\n\tHirokazu Honda <hiroh@google.com>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]