[{"id":17258,"web_url":"https://patchwork.libcamera.org/comment/17258/","msgid":"<20210526080528.o2ymzf6qhj56i4x3@uno.localdomain>","date":"2021-05-26T08:05:28","subject":"Re: [libcamera-devel] [PATCH] android: nautilus: Add camera HAL\n\tconfiguration","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Umang,\n\nOn Wed, May 26, 2021 at 12:45:42PM +0530, Umang Jain wrote:\n> nautilus has two internal cameras, one UVC and one for the IPU3.\n> However, libcamera assumes all UVC cameras as 'external' hence, mark\n> the location of UVC camera in HAL configuration as 'external' too.\n>\n> Note that the presence of UVC camera in camera HAL will complain:\n>\n> > ERROR HAL camera_device.cpp:701 '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647':\n>   Failed to map mandatory Android format IMPLEMENTATION_DEFINED (0x00000022): aborting\n> > ERROR HAL camera_hal_manager.cpp:153 Failed to initialize camera:\n>   \\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\n>\n> This is related to a known issue of UVC cameras on HAL which do not\n> provide NV12 by default.\n\nDoes it work without configuration file support ?\n\nThanks\n   j\n\n>\n> Also, if we don't mention the UVC camera in the config:\n>\n> > ERROR HALConfig camera_hal_config.cpp:393 Camera\n>   '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647' not described in the HAL\n>   configuration file\n> > ERROR HAL camera_device.cpp:701 '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647':\n>   Failed to map mandatory Android format IMPLEMENTATION_DEFINED (0x00000022): aborting\n> > ERROR HAL camera_hal_manager.cpp:153 Failed to initialize camera:\n>   \\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\n>\n> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n> ---\n>  src/android/data/nautilus/camera_hal.yaml | 8 ++++++++\n>  1 file changed, 8 insertions(+)\n>  create mode 100644 src/android/data/nautilus/camera_hal.yaml\n>\n> diff --git a/src/android/data/nautilus/camera_hal.yaml b/src/android/data/nautilus/camera_hal.yaml\n> new file mode 100644\n> index 00000000..f2d31e1c\n> --- /dev/null\n> +++ b/src/android/data/nautilus/camera_hal.yaml\n> @@ -0,0 +1,8 @@\n> +cameras:\n> +  \"\\\\_SB_.PCI0.I2C2.CAM0\":\n> +    location: back\n> +    rotation: 0\n> +\n> +  \"\\\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\":\n> +    location: external\n> +    rotation: 0\n> --\n> 2.26.2\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 AC4C9C3203\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 26 May 2021 08:04:44 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0F1AE68922;\n\tWed, 26 May 2021 10:04:44 +0200 (CEST)","from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net\n\t[217.70.183.201])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0EA976891E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 May 2021 10:04:43 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 77DFB1BF212;\n\tWed, 26 May 2021 08:04:42 +0000 (UTC)"],"Date":"Wed, 26 May 2021 10:05:28 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Umang Jain <umang.jain@ideasonboard.com>","Message-ID":"<20210526080528.o2ymzf6qhj56i4x3@uno.localdomain>","References":"<20210526071542.586096-1-umang.jain@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210526071542.586096-1-umang.jain@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] android: nautilus: Add camera HAL\n\tconfiguration","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@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17266,"web_url":"https://patchwork.libcamera.org/comment/17266/","msgid":"<1248c5f6-2487-8114-81eb-b4ed3db261c2@ideasonboard.com>","date":"2021-05-26T09:21:19","subject":"Re: [libcamera-devel] [PATCH] android: nautilus: Add camera HAL\n\tconfiguration","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi Jacopo\n\nOn 5/26/21 1:35 PM, Jacopo Mondi wrote:\n> Hi Umang,\n>\n> On Wed, May 26, 2021 at 12:45:42PM +0530, Umang Jain wrote:\n>> nautilus has two internal cameras, one UVC and one for the IPU3.\n>> However, libcamera assumes all UVC cameras as 'external' hence, mark\n>> the location of UVC camera in HAL configuration as 'external' too.\n>>\n>> Note that the presence of UVC camera in camera HAL will complain:\n>>\n>>> ERROR HAL camera_device.cpp:701 '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647':\n>>    Failed to map mandatory Android format IMPLEMENTATION_DEFINED (0x00000022): aborting\n>>> ERROR HAL camera_hal_manager.cpp:153 Failed to initialize camera:\n>>    \\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\n>>\n>> This is related to a known issue of UVC cameras on HAL which do not\n>> provide NV12 by default.\n> Does it work without configuration file support ?\nNo, it won't, since it's UVC. And cannot work until there's a \nformat-convertor in place that can convert the stream to NV12 provided \nby that camera, I suppose.\n>\n> Thanks\n>     j\n>\n>> Also, if we don't mention the UVC camera in the config:\n>>\n>>> ERROR HALConfig camera_hal_config.cpp:393 Camera\n>>    '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647' not described in the HAL\n>>    configuration file\n>>> ERROR HAL camera_device.cpp:701 '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647':\n>>    Failed to map mandatory Android format IMPLEMENTATION_DEFINED (0x00000022): aborting\n>>> ERROR HAL camera_hal_manager.cpp:153 Failed to initialize camera:\n>>    \\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\n>>\n>> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n>> ---\n>>   src/android/data/nautilus/camera_hal.yaml | 8 ++++++++\n>>   1 file changed, 8 insertions(+)\n>>   create mode 100644 src/android/data/nautilus/camera_hal.yaml\n>>\n>> diff --git a/src/android/data/nautilus/camera_hal.yaml b/src/android/data/nautilus/camera_hal.yaml\n>> new file mode 100644\n>> index 00000000..f2d31e1c\n>> --- /dev/null\n>> +++ b/src/android/data/nautilus/camera_hal.yaml\n>> @@ -0,0 +1,8 @@\n>> +cameras:\n>> +  \"\\\\_SB_.PCI0.I2C2.CAM0\":\n>> +    location: back\n>> +    rotation: 0\n>> +\n>> +  \"\\\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\":\n>> +    location: external\n>> +    rotation: 0\n>> --\n>> 2.26.2\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 92EC3C3203\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 26 May 2021 09:21:43 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D6E3D68922;\n\tWed, 26 May 2021 11:21:42 +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 7AF656891E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 May 2021 11:21:41 +0200 (CEST)","from localhost.localdomain (unknown [103.251.226.203])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id CB757332;\n\tWed, 26 May 2021 11:21: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=\"PFlk5Zbb\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1622020901;\n\tbh=QHosI83vkTZNKBMhKZUY/OW7hMJF2ohb9fvDVNpAxEE=;\n\th=Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=PFlk5Zbbw6mJLz3Fwr/kQIoWHCH43g+uHqfj3zTgnyNyJxcFcjC6doXqfl8IiREZQ\n\trpNwCpUzhmJxgKdcKXD1yJZQux+znwX1fPJLptnJG13t6/GDQXFqYbNs3YRwUJaymR\n\tp4hhopfxUP4ySeXd4YCARDtf8M/ykCfCDUtIqVSw=","To":"Jacopo Mondi <jacopo@jmondi.org>","References":"<20210526071542.586096-1-umang.jain@ideasonboard.com>\n\t<20210526080528.o2ymzf6qhj56i4x3@uno.localdomain>","From":"Umang Jain <umang.jain@ideasonboard.com>","Message-ID":"<1248c5f6-2487-8114-81eb-b4ed3db261c2@ideasonboard.com>","Date":"Wed, 26 May 2021 14:51:19 +0530","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101\n\tThunderbird/68.11.0","MIME-Version":"1.0","In-Reply-To":"<20210526080528.o2ymzf6qhj56i4x3@uno.localdomain>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Transfer-Encoding":"7bit","Content-Language":"en-US","Subject":"Re: [libcamera-devel] [PATCH] android: nautilus: Add camera HAL\n\tconfiguration","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@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17267,"web_url":"https://patchwork.libcamera.org/comment/17267/","msgid":"<CAO5uPHPHW5_pn3by=GuyYYSrK0tpGe8nEWGMMwKp5V-g_dN__Q@mail.gmail.com>","date":"2021-05-26T09:36:34","subject":"Re: [libcamera-devel] [PATCH] android: nautilus: Add camera HAL\n\tconfiguration","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"content":"Hi Umang,\n\nOn Wed, May 26, 2021 at 6:21 PM Umang Jain <umang.jain@ideasonboard.com>\nwrote:\n\n> Hi Jacopo\n>\n> On 5/26/21 1:35 PM, Jacopo Mondi wrote:\n> > Hi Umang,\n> >\n> > On Wed, May 26, 2021 at 12:45:42PM +0530, Umang Jain wrote:\n> >> nautilus has two internal cameras, one UVC and one for the IPU3.\n> >> However, libcamera assumes all UVC cameras as 'external' hence, mark\n> >> the location of UVC camera in HAL configuration as 'external' too.\n> >>\n> >> Note that the presence of UVC camera in camera HAL will complain:\n> >>\n> >>> ERROR HAL camera_device.cpp:701\n> '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647':\n> >>    Failed to map mandatory Android format IMPLEMENTATION_DEFINED\n> (0x00000022): aborting\n> >>> ERROR HAL camera_hal_manager.cpp:153 Failed to initialize camera:\n> >>    \\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\n> >>\n> >> This is related to a known issue of UVC cameras on HAL which do not\n> >> provide NV12 by default.\n> > Does it work without configuration file support ?\n> No, it won't, since it's UVC. And cannot work until there's a\n> format-convertor in place that can convert the stream to NV12 provided\n> by that camera, I suppose.\n>\n\nIt is time that we need a JPEG decoder in a post processing pipeline like a\nJPEG encoder.\n-Hiro\n\n>\n> > Thanks\n> >     j\n> >\n> >> Also, if we don't mention the UVC camera in the config:\n> >>\n> >>> ERROR HALConfig camera_hal_config.cpp:393 Camera\n> >>    '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647' not described in the HAL\n> >>    configuration file\n> >>> ERROR HAL camera_device.cpp:701\n> '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647':\n> >>    Failed to map mandatory Android format IMPLEMENTATION_DEFINED\n> (0x00000022): aborting\n> >>> ERROR HAL camera_hal_manager.cpp:153 Failed to initialize camera:\n> >>    \\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\n> >>\n> >> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n> >> ---\n> >>   src/android/data/nautilus/camera_hal.yaml | 8 ++++++++\n> >>   1 file changed, 8 insertions(+)\n> >>   create mode 100644 src/android/data/nautilus/camera_hal.yaml\n> >>\n> >> diff --git a/src/android/data/nautilus/camera_hal.yaml\n> b/src/android/data/nautilus/camera_hal.yaml\n> >> new file mode 100644\n> >> index 00000000..f2d31e1c\n> >> --- /dev/null\n> >> +++ b/src/android/data/nautilus/camera_hal.yaml\n> >> @@ -0,0 +1,8 @@\n> >> +cameras:\n> >> +  \"\\\\_SB_.PCI0.I2C2.CAM0\":\n> >> +    location: back\n> >> +    rotation: 0\n> >> +\n> >> +  \"\\\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\":\n> >> +    location: external\n> >> +    rotation: 0\n> >> --\n> >> 2.26.2\n> >>\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 1CE83BDB80\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 26 May 2021 09:36:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8E6006891F;\n\tWed, 26 May 2021 11:36:47 +0200 (CEST)","from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com\n\t[IPv6:2a00:1450:4864:20::52e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 19B496891E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 May 2021 11:36:46 +0200 (CEST)","by mail-ed1-x52e.google.com with SMTP id t15so531327edr.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 May 2021 02:36:46 -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=\"KIdKxBrr\"; 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=w6bMtI+gSqYAUF+45vCjfpjTw7ILlwI2sXWaIUNv3QY=;\n\tb=KIdKxBrrObLieaWGybkSR2V5jsHNNffadNZ8o/kSExUDpfwP5ct7DUDP6Z0JYRMtH+\n\txCKtcC06UpZXw4HOtxHphJNGlj80kNb50EYbQ/5oeE1kVsGp93hc+wIrq25m83v65gci\n\taZs0oLsXGjPhziQnp0+93Q4DdDRdx92+Yia68=","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=w6bMtI+gSqYAUF+45vCjfpjTw7ILlwI2sXWaIUNv3QY=;\n\tb=Q92nPt6hbIWprcp2rMQ+haRG8SMDkbcXdgw+1D8nZIr48wts8KJ2rJg9KxTbB81DcL\n\tj6NsKTecaLEYurRhF34VLlOihwrA9yk7KUMDHUzUgWnSYzg72Ejjc9ecaHUEyOF6R+XF\n\t+bL5B51fF9FEClntKurr3aV6W9IWn4GQnZZ3W+4rPzCNxy5chnbjEb/TPL69qlOHvA+m\n\t1K0dfM59g5zdm5AuCSYfQKQWXxL6AhRuZhDKAd5uSo4P0vKZ5+Q53JdP5fguPLEl+Oet\n\tKOd++UaGgcQUyO6gL2qnV1mwYNQT7NNdgdeOoYkNTyQusHeesTMD8x1TGieA0IoRdq0O\n\tmiJg==","X-Gm-Message-State":"AOAM531UtsD43TXd5RUYPpBYQYShkXSTGAuQYWfhen9/YbbKCTRo19Q3\n\tCFn4Ack+4yi0vD0W8ycAgQmcLgAwIQGp1AqtN7GxFw==","X-Google-Smtp-Source":"ABdhPJyD6GLghJucgCfiYGbMb+9oznAgXRymf0plMELkGh9Nuqsvy8CLLz68lsFnJlJQfWBXm7oPsEuHzNPIEsG2BPY=","X-Received":"by 2002:a05:6402:cb8:: with SMTP id\n\tcn24mr36051619edb.325.1622021805726; \n\tWed, 26 May 2021 02:36:45 -0700 (PDT)","MIME-Version":"1.0","References":"<20210526071542.586096-1-umang.jain@ideasonboard.com>\n\t<20210526080528.o2ymzf6qhj56i4x3@uno.localdomain>\n\t<1248c5f6-2487-8114-81eb-b4ed3db261c2@ideasonboard.com>","In-Reply-To":"<1248c5f6-2487-8114-81eb-b4ed3db261c2@ideasonboard.com>","From":"Hirokazu Honda <hiroh@chromium.org>","Date":"Wed, 26 May 2021 18:36:34 +0900","Message-ID":"<CAO5uPHPHW5_pn3by=GuyYYSrK0tpGe8nEWGMMwKp5V-g_dN__Q@mail.gmail.com>","To":"Umang Jain <umang.jain@ideasonboard.com>","Content-Type":"multipart/alternative; boundary=\"0000000000008c706f05c33861a0\"","Subject":"Re: [libcamera-devel] [PATCH] android: nautilus: Add camera HAL\n\tconfiguration","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":17268,"web_url":"https://patchwork.libcamera.org/comment/17268/","msgid":"<20210526095747.lkv5hvygfbxwktpj@uno.localdomain>","date":"2021-05-26T09:57:47","subject":"Re: [libcamera-devel] [PATCH] android: nautilus: Add camera HAL\n\tconfiguration","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Umang,\n\nOn Wed, May 26, 2021 at 02:51:19PM +0530, Umang Jain wrote:\n> Hi Jacopo\n>\n> On 5/26/21 1:35 PM, Jacopo Mondi wrote:\n> > Hi Umang,\n> >\n> > On Wed, May 26, 2021 at 12:45:42PM +0530, Umang Jain wrote:\n> > > nautilus has two internal cameras, one UVC and one for the IPU3.\n> > > However, libcamera assumes all UVC cameras as 'external' hence, mark\n> > > the location of UVC camera in HAL configuration as 'external' too.\n> > >\n> > > Note that the presence of UVC camera in camera HAL will complain:\n> > >\n> > > > ERROR HAL camera_device.cpp:701 '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647':\n> > >    Failed to map mandatory Android format IMPLEMENTATION_DEFINED (0x00000022): aborting\n> > > > ERROR HAL camera_hal_manager.cpp:153 Failed to initialize camera:\n> > >    \\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\n> > >\n> > > This is related to a known issue of UVC cameras on HAL which do not\n> > > provide NV12 by default.\n> > Does it work without configuration file support ?\n> No, it won't, since it's UVC. And cannot work until there's a\n> format-convertor in place that can convert the stream to NV12 provided by\n> that camera, I suppose.\n\nRight, it was not working before the configuration file series went\nin, right ? What I'm interested about is that there's no regression\ndue to the series :)\n\n\n> > > Also, if we don't mention the UVC camera in the config:\n> > >\n> > > > ERROR HALConfig camera_hal_config.cpp:393 Camera\n> > >    '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647' not described in the HAL\n> > >    configuration file\n\nThis is \"fine\".. If you look at the caller of\nCameraHalConfig::cameraConfigData() in camera_hal_manager.cpp\n\n\tconst CameraConfigData *cameraConfigData = halConfig_.cameraConfigData(cam->id());\n\tif (!isCameraExternal && !cameraConfigData) {\n\t\tLOG(HAL, Error)\n\t\t\t<< \"HAL configuration entry for internal camera \"\n\t\t\t<< cam->id() << \" is missing\";\n\t\treturn;\n\t}\n\nYou'll see that the configuration entry for external cameras is not\nmandatory, and the UVC camera should be correctly identified as\nEXTERNAL.\n\nWe spam the log enough with worrying errors which are not really\nerrors, so we might want to suppress this one for external cameras ?\n\nThanks\n   j\n\n\n> > > > ERROR HAL camera_device.cpp:701 '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647':\n> > >    Failed to map mandatory Android format IMPLEMENTATION_DEFINED (0x00000022): aborting\n> > > > ERROR HAL camera_hal_manager.cpp:153 Failed to initialize camera:\n> > >    \\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\n> > >\n> > > Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n> > > ---\n> > >   src/android/data/nautilus/camera_hal.yaml | 8 ++++++++\n> > >   1 file changed, 8 insertions(+)\n> > >   create mode 100644 src/android/data/nautilus/camera_hal.yaml\n> > >\n> > > diff --git a/src/android/data/nautilus/camera_hal.yaml b/src/android/data/nautilus/camera_hal.yaml\n> > > new file mode 100644\n> > > index 00000000..f2d31e1c\n> > > --- /dev/null\n> > > +++ b/src/android/data/nautilus/camera_hal.yaml\n> > > @@ -0,0 +1,8 @@\n> > > +cameras:\n> > > +  \"\\\\_SB_.PCI0.I2C2.CAM0\":\n> > > +    location: back\n> > > +    rotation: 0\n> > > +\n> > > +  \"\\\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\":\n> > > +    location: external\n> > > +    rotation: 0\n> > > --\n> > > 2.26.2\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 E7C9FBDB80\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 26 May 2021 09:57:03 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5775368922;\n\tWed, 26 May 2021 11:57:03 +0200 (CEST)","from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net\n\t[217.70.183.196])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4776F6891E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 May 2021 11:57:02 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby relay4-d.mail.gandi.net (Postfix) with ESMTPSA id A16B9E0006;\n\tWed, 26 May 2021 09:57:01 +0000 (UTC)"],"Date":"Wed, 26 May 2021 11:57:47 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Umang Jain <umang.jain@ideasonboard.com>","Message-ID":"<20210526095747.lkv5hvygfbxwktpj@uno.localdomain>","References":"<20210526071542.586096-1-umang.jain@ideasonboard.com>\n\t<20210526080528.o2ymzf6qhj56i4x3@uno.localdomain>\n\t<1248c5f6-2487-8114-81eb-b4ed3db261c2@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<1248c5f6-2487-8114-81eb-b4ed3db261c2@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] android: nautilus: Add camera HAL\n\tconfiguration","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@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17269,"web_url":"https://patchwork.libcamera.org/comment/17269/","msgid":"<fe90188c-3ee7-d7f7-9a6b-42bf69061d3d@ideasonboard.com>","date":"2021-05-26T10:12:53","subject":"Re: [libcamera-devel] [PATCH] android: nautilus: Add camera HAL\n\tconfiguration","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi Jacopo\n\nOn 5/26/21 3:27 PM, Jacopo Mondi wrote:\n> Hi Umang,\n>\n> On Wed, May 26, 2021 at 02:51:19PM +0530, Umang Jain wrote:\n>> Hi Jacopo\n>>\n>> On 5/26/21 1:35 PM, Jacopo Mondi wrote:\n>>> Hi Umang,\n>>>\n>>> On Wed, May 26, 2021 at 12:45:42PM +0530, Umang Jain wrote:\n>>>> nautilus has two internal cameras, one UVC and one for the IPU3.\n>>>> However, libcamera assumes all UVC cameras as 'external' hence, mark\n>>>> the location of UVC camera in HAL configuration as 'external' too.\n>>>>\n>>>> Note that the presence of UVC camera in camera HAL will complain:\n>>>>\n>>>>> ERROR HAL camera_device.cpp:701 '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647':\n>>>>     Failed to map mandatory Android format IMPLEMENTATION_DEFINED (0x00000022): aborting\n>>>>> ERROR HAL camera_hal_manager.cpp:153 Failed to initialize camera:\n>>>>     \\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\n>>>>\n>>>> This is related to a known issue of UVC cameras on HAL which do not\n>>>> provide NV12 by default.\n>>> Does it work without configuration file support ?\n>> No, it won't, since it's UVC. And cannot work until there's a\n>> format-convertor in place that can convert the stream to NV12 provided by\n>> that camera, I suppose.\n> Right, it was not working before the configuration file series went\n> in, right ? What I'm interested about is that there's no regression\n> due to the series :)\nOh yea, no regression. I just went and wrote a verbose commit message \nabout what's \"fine\"\n\n>\n>\n>>>> Also, if we don't mention the UVC camera in the config:\n>>>>\n>>>>> ERROR HALConfig camera_hal_config.cpp:393 Camera\n>>>>     '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647' not described in the HAL\n>>>>     configuration file\n> This is \"fine\".. If you look at the caller of\n> CameraHalConfig::cameraConfigData() in camera_hal_manager.cpp\n>\n> \tconst CameraConfigData *cameraConfigData = halConfig_.cameraConfigData(cam->id());\n> \tif (!isCameraExternal && !cameraConfigData) {\n> \t\tLOG(HAL, Error)\n> \t\t\t<< \"HAL configuration entry for internal camera \"\n> \t\t\t<< cam->id() << \" is missing\";\n> \t\treturn;\n> \t}\n>\n> You'll see that the configuration entry for external cameras is not\n> mandatory, and the UVC camera should be correctly identified as\n> EXTERNAL.\n>\n> We spam the log enough with worrying errors which are not really\n> errors, so we might want to suppress this one for external cameras ?\nWon't supress it entirely, but maybe not keep it as ERROR. WARN or DEBUG \nmaybe?\n\nThanks!\n>\n> Thanks\n>     j\n>\n>\n>>>>> ERROR HAL camera_device.cpp:701 '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647':\n>>>>     Failed to map mandatory Android format IMPLEMENTATION_DEFINED (0x00000022): aborting\n>>>>> ERROR HAL camera_hal_manager.cpp:153 Failed to initialize camera:\n>>>>     \\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\n>>>>\n>>>> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n>>>> ---\n>>>>    src/android/data/nautilus/camera_hal.yaml | 8 ++++++++\n>>>>    1 file changed, 8 insertions(+)\n>>>>    create mode 100644 src/android/data/nautilus/camera_hal.yaml\n>>>>\n>>>> diff --git a/src/android/data/nautilus/camera_hal.yaml b/src/android/data/nautilus/camera_hal.yaml\n>>>> new file mode 100644\n>>>> index 00000000..f2d31e1c\n>>>> --- /dev/null\n>>>> +++ b/src/android/data/nautilus/camera_hal.yaml\n>>>> @@ -0,0 +1,8 @@\n>>>> +cameras:\n>>>> +  \"\\\\_SB_.PCI0.I2C2.CAM0\":\n>>>> +    location: back\n>>>> +    rotation: 0\n>>>> +\n>>>> +  \"\\\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\":\n>>>> +    location: external\n>>>> +    rotation: 0\n>>>> --\n>>>> 2.26.2\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 BCB59C3203\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 26 May 2021 10:13:02 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1309D6891D;\n\tWed, 26 May 2021 12:13:02 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 043E3602AB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 May 2021 12:12:59 +0200 (CEST)","from localhost.localdomain (unknown [103.251.226.203])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B7A1E332;\n\tWed, 26 May 2021 12:12:58 +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=\"WRNi6d42\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1622023979;\n\tbh=oPzwozxUFfWlZD3dCJUVZOyCwXSxq/hNuOjx7X/ICE8=;\n\th=Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=WRNi6d42PuRG1tRShffOyV0JDeMhH/VYmyIXP8PDr6A+bsYzDVFNQpmLpu+1Xc83W\n\tZ/zXKMWmqOshLd/sRSiR9cYLHSIVtAajac8aJdL8SGWQ0ljXkrvy3DlHny4F+e8UoU\n\t7w/arO5GHnYVjvZm82mXChdvJaAk6YSn1B0xZq9A=","To":"Jacopo Mondi <jacopo@jmondi.org>","References":"<20210526071542.586096-1-umang.jain@ideasonboard.com>\n\t<20210526080528.o2ymzf6qhj56i4x3@uno.localdomain>\n\t<1248c5f6-2487-8114-81eb-b4ed3db261c2@ideasonboard.com>\n\t<20210526095747.lkv5hvygfbxwktpj@uno.localdomain>","From":"Umang Jain <umang.jain@ideasonboard.com>","Message-ID":"<fe90188c-3ee7-d7f7-9a6b-42bf69061d3d@ideasonboard.com>","Date":"Wed, 26 May 2021 15:42:53 +0530","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101\n\tThunderbird/68.11.0","MIME-Version":"1.0","In-Reply-To":"<20210526095747.lkv5hvygfbxwktpj@uno.localdomain>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Transfer-Encoding":"7bit","Content-Language":"en-US","Subject":"Re: [libcamera-devel] [PATCH] android: nautilus: Add camera HAL\n\tconfiguration","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@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17270,"web_url":"https://patchwork.libcamera.org/comment/17270/","msgid":"<20210526101642.xjykhzitj3t5fgjt@uno.localdomain>","date":"2021-05-26T10:16:42","subject":"Re: [libcamera-devel] [PATCH] android: nautilus: Add camera HAL\n\tconfiguration","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Umang,\n\nOn Wed, May 26, 2021 at 03:42:53PM +0530, Umang Jain wrote:\n> > > > > Also, if we don't mention the UVC camera in the config:\n> > > > >\n> > > > > > ERROR HALConfig camera_hal_config.cpp:393 Camera\n> > > > >     '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647' not described in the HAL\n> > > > >     configuration file\n> > This is \"fine\".. If you look at the caller of\n> > CameraHalConfig::cameraConfigData() in camera_hal_manager.cpp\n> >\n> > \tconst CameraConfigData *cameraConfigData = halConfig_.cameraConfigData(cam->id());\n> > \tif (!isCameraExternal && !cameraConfigData) {\n> > \t\tLOG(HAL, Error)\n> > \t\t\t<< \"HAL configuration entry for internal camera \"\n> > \t\t\t<< cam->id() << \" is missing\";\n> > \t\treturn;\n> > \t}\n> >\n> > You'll see that the configuration entry for external cameras is not\n> > mandatory, and the UVC camera should be correctly identified as\n> > EXTERNAL.\n> >\n> > We spam the log enough with worrying errors which are not really\n> > errors, so we might want to suppress this one for external cameras ?\n> Won't supress it entirely, but maybe not keep it as ERROR. WARN or DEBUG\n> maybe?\n\nWell, for internal cameras it's actually an error, even if the caller\nalready print one out.\n\nI'm fine demoting it to WARN\n\n>\n> Thanks!\n> >\n> > Thanks\n> >     j\n> >\n> >\n> > > > > > ERROR HAL camera_device.cpp:701 '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647':\n> > > > >     Failed to map mandatory Android format IMPLEMENTATION_DEFINED (0x00000022): aborting\n> > > > > > ERROR HAL camera_hal_manager.cpp:153 Failed to initialize camera:\n> > > > >     \\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\n> > > > >\n> > > > > Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n> > > > > ---\n> > > > >    src/android/data/nautilus/camera_hal.yaml | 8 ++++++++\n> > > > >    1 file changed, 8 insertions(+)\n> > > > >    create mode 100644 src/android/data/nautilus/camera_hal.yaml\n> > > > >\n> > > > > diff --git a/src/android/data/nautilus/camera_hal.yaml b/src/android/data/nautilus/camera_hal.yaml\n> > > > > new file mode 100644\n> > > > > index 00000000..f2d31e1c\n> > > > > --- /dev/null\n> > > > > +++ b/src/android/data/nautilus/camera_hal.yaml\n> > > > > @@ -0,0 +1,8 @@\n> > > > > +cameras:\n> > > > > +  \"\\\\_SB_.PCI0.I2C2.CAM0\":\n> > > > > +    location: back\n> > > > > +    rotation: 0\n> > > > > +\n> > > > > +  \"\\\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\":\n> > > > > +    location: external\n> > > > > +    rotation: 0\n> > > > > --\n> > > > > 2.26.2\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 79505BDB80\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 26 May 2021 10:15:59 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E7E7E6891D;\n\tWed, 26 May 2021 12:15:58 +0200 (CEST)","from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net\n\t[217.70.183.197])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8FC15602AB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 May 2021 12:15:57 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby relay5-d.mail.gandi.net (Postfix) with ESMTPSA id DD42A1C0009;\n\tWed, 26 May 2021 10:15:56 +0000 (UTC)"],"Date":"Wed, 26 May 2021 12:16:42 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Umang Jain <umang.jain@ideasonboard.com>","Message-ID":"<20210526101642.xjykhzitj3t5fgjt@uno.localdomain>","References":"<20210526071542.586096-1-umang.jain@ideasonboard.com>\n\t<20210526080528.o2ymzf6qhj56i4x3@uno.localdomain>\n\t<1248c5f6-2487-8114-81eb-b4ed3db261c2@ideasonboard.com>\n\t<20210526095747.lkv5hvygfbxwktpj@uno.localdomain>\n\t<fe90188c-3ee7-d7f7-9a6b-42bf69061d3d@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<fe90188c-3ee7-d7f7-9a6b-42bf69061d3d@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] android: nautilus: Add camera HAL\n\tconfiguration","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@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17284,"web_url":"https://patchwork.libcamera.org/comment/17284/","msgid":"<YK5hy2a/14Z9lh7Q@pendragon.ideasonboard.com>","date":"2021-05-26T14:57:15","subject":"Re: [libcamera-devel] [PATCH] android: nautilus: Add camera HAL\n\tconfiguration","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Hiro,\n\nOn Wed, May 26, 2021 at 06:36:34PM +0900, Hirokazu Honda wrote:\n> On Wed, May 26, 2021 at 6:21 PM Umang Jain wrote:\n> > On 5/26/21 1:35 PM, Jacopo Mondi wrote:\n> > > On Wed, May 26, 2021 at 12:45:42PM +0530, Umang Jain wrote:\n> > >> nautilus has two internal cameras, one UVC and one for the IPU3.\n> > >> However, libcamera assumes all UVC cameras as 'external' hence, mark\n> > >> the location of UVC camera in HAL configuration as 'external' too.\n> > >>\n> > >> Note that the presence of UVC camera in camera HAL will complain:\n> > >>\n> > >>> ERROR HAL camera_device.cpp:701\n> > '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647':\n> > >>    Failed to map mandatory Android format IMPLEMENTATION_DEFINED\n> > (0x00000022): aborting\n> > >>> ERROR HAL camera_hal_manager.cpp:153 Failed to initialize camera:\n> > >>    \\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\n> > >>\n> > >> This is related to a known issue of UVC cameras on HAL which do not\n> > >> provide NV12 by default.\n> > > Does it work without configuration file support ?\n> > No, it won't, since it's UVC. And cannot work until there's a\n> > format-convertor in place that can convert the stream to NV12 provided\n> > by that camera, I suppose.\n> \n> It is time that we need a JPEG decoder in a post processing pipeline like a\n> JPEG encoder.\n\nOr a YUYV to NV12 converter, as the camera can also produce YUYV ?\n\n> > >> Also, if we don't mention the UVC camera in the config:\n> > >>\n> > >>> ERROR HALConfig camera_hal_config.cpp:393 Camera\n> > >>    '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647' not described in the HAL\n> > >>    configuration file\n> > >>> ERROR HAL camera_device.cpp:701\n> > '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647':\n> > >>    Failed to map mandatory Android format IMPLEMENTATION_DEFINED\n> > (0x00000022): aborting\n> > >>> ERROR HAL camera_hal_manager.cpp:153 Failed to initialize camera:\n> > >>    \\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\n> > >>\n> > >> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n> > >> ---\n> > >>   src/android/data/nautilus/camera_hal.yaml | 8 ++++++++\n> > >>   1 file changed, 8 insertions(+)\n> > >>   create mode 100644 src/android/data/nautilus/camera_hal.yaml\n> > >>\n> > >> diff --git a/src/android/data/nautilus/camera_hal.yaml b/src/android/data/nautilus/camera_hal.yaml\n> > >> new file mode 100644\n> > >> index 00000000..f2d31e1c\n> > >> --- /dev/null\n> > >> +++ b/src/android/data/nautilus/camera_hal.yaml\n> > >> @@ -0,0 +1,8 @@\n> > >> +cameras:\n> > >> +  \"\\\\_SB_.PCI0.I2C2.CAM0\":\n> > >> +    location: back\n> > >> +    rotation: 0\n> > >> +\n> > >> +  \"\\\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\":\n> > >> +    location: external\n> > >> +    rotation: 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 72843C3203\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 26 May 2021 14:57:23 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D74FA6891D;\n\tWed, 26 May 2021 16:57:22 +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 1E5AB602AB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 May 2021 16:57:21 +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 73DC03F1;\n\tWed, 26 May 2021 16:57:20 +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=\"I7KL+G9S\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1622041040;\n\tbh=wL7r05mxSuULID+mAQQzLWO/Y70IssKGX/UW6jdh9D8=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=I7KL+G9SrfzcVM6aaQsmArljeaAW0hdnzCiy+Bo65TQFbtFTByR9jH8Zx5nMzLLTY\n\tt3jzCd/FlpzajcvnMykxehgw81uy5dV5neLCzn5JzHLKXtachx4fD7A/DPFUf8vkW9\n\tkqvdCDwhjEYPzHlD1yrmY7shaJKYclbVKCizBtWE=","Date":"Wed, 26 May 2021 17:57:15 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Hirokazu Honda <hiroh@chromium.org>","Message-ID":"<YK5hy2a/14Z9lh7Q@pendragon.ideasonboard.com>","References":"<20210526071542.586096-1-umang.jain@ideasonboard.com>\n\t<20210526080528.o2ymzf6qhj56i4x3@uno.localdomain>\n\t<1248c5f6-2487-8114-81eb-b4ed3db261c2@ideasonboard.com>\n\t<CAO5uPHPHW5_pn3by=GuyYYSrK0tpGe8nEWGMMwKp5V-g_dN__Q@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<CAO5uPHPHW5_pn3by=GuyYYSrK0tpGe8nEWGMMwKp5V-g_dN__Q@mail.gmail.com>","Subject":"Re: [libcamera-devel] [PATCH] android: nautilus: Add camera HAL\n\tconfiguration","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":17285,"web_url":"https://patchwork.libcamera.org/comment/17285/","msgid":"<YK5iPVqRY8asK3QS@pendragon.ideasonboard.com>","date":"2021-05-26T14:59:09","subject":"Re: [libcamera-devel] [PATCH] android: nautilus: Add camera HAL\n\tconfiguration","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Umang,\n\nOn Wed, May 26, 2021 at 03:42:53PM +0530, Umang Jain wrote:\n> On 5/26/21 3:27 PM, Jacopo Mondi wrote:\n> > On Wed, May 26, 2021 at 02:51:19PM +0530, Umang Jain wrote:\n> >> On 5/26/21 1:35 PM, Jacopo Mondi wrote:\n> >>> On Wed, May 26, 2021 at 12:45:42PM +0530, Umang Jain wrote:\n> >>>> nautilus has two internal cameras, one UVC and one for the IPU3.\n> >>>> However, libcamera assumes all UVC cameras as 'external' hence, mark\n> >>>> the location of UVC camera in HAL configuration as 'external' too.\n> >>>>\n> >>>> Note that the presence of UVC camera in camera HAL will complain:\n> >>>>\n> >>>>> ERROR HAL camera_device.cpp:701 '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647':\n> >>>>     Failed to map mandatory Android format IMPLEMENTATION_DEFINED (0x00000022): aborting\n> >>>>> ERROR HAL camera_hal_manager.cpp:153 Failed to initialize camera:\n> >>>>     \\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\n> >>>>\n> >>>> This is related to a known issue of UVC cameras on HAL which do not\n> >>>> provide NV12 by default.\n> >>>\n> >>> Does it work without configuration file support ?\n> >>\n> >> No, it won't, since it's UVC. And cannot work until there's a\n> >> format-convertor in place that can convert the stream to NV12 provided by\n> >> that camera, I suppose.\n> >\n> > Right, it was not working before the configuration file series went\n> > in, right ? What I'm interested about is that there's no regression\n> > due to the series :)\n>\n> Oh yea, no regression. I just went and wrote a verbose commit message \n> about what's \"fine\"\n> \n> >>>> Also, if we don't mention the UVC camera in the config:\n> >>>>\n> >>>>> ERROR HALConfig camera_hal_config.cpp:393 Camera\n> >>>>     '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647' not described in the HAL\n> >>>>     configuration file\n> >\n> > This is \"fine\".. If you look at the caller of\n> > CameraHalConfig::cameraConfigData() in camera_hal_manager.cpp\n> >\n> > \tconst CameraConfigData *cameraConfigData = halConfig_.cameraConfigData(cam->id());\n> > \tif (!isCameraExternal && !cameraConfigData) {\n> > \t\tLOG(HAL, Error)\n> > \t\t\t<< \"HAL configuration entry for internal camera \"\n> > \t\t\t<< cam->id() << \" is missing\";\n> > \t\treturn;\n> > \t}\n> >\n> > You'll see that the configuration entry for external cameras is not\n> > mandatory, and the UVC camera should be correctly identified as\n> > EXTERNAL.\n> >\n> > We spam the log enough with worrying errors which are not really\n> > errors, so we might want to suppress this one for external cameras ?\n>\n> Won't supress it entirely, but maybe not keep it as ERROR. WARN or DEBUG \n> maybe?\n\nGiven that the UVC camera is internal, what happens if you set its\nlocation to front in the configuration file ?\n\n> >>>>> ERROR HAL camera_device.cpp:701 '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647':\n> >>>>     Failed to map mandatory Android format IMPLEMENTATION_DEFINED (0x00000022): aborting\n> >>>>> ERROR HAL camera_hal_manager.cpp:153 Failed to initialize camera:\n> >>>>     \\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\n> >>>>\n> >>>> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n> >>>> ---\n> >>>>    src/android/data/nautilus/camera_hal.yaml | 8 ++++++++\n> >>>>    1 file changed, 8 insertions(+)\n> >>>>    create mode 100644 src/android/data/nautilus/camera_hal.yaml\n> >>>>\n> >>>> diff --git a/src/android/data/nautilus/camera_hal.yaml b/src/android/data/nautilus/camera_hal.yaml\n> >>>> new file mode 100644\n> >>>> index 00000000..f2d31e1c\n> >>>> --- /dev/null\n> >>>> +++ b/src/android/data/nautilus/camera_hal.yaml\n> >>>> @@ -0,0 +1,8 @@\n> >>>> +cameras:\n> >>>> +  \"\\\\_SB_.PCI0.I2C2.CAM0\":\n> >>>> +    location: back\n> >>>> +    rotation: 0\n> >>>> +\n> >>>> +  \"\\\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\":\n> >>>> +    location: external\n> >>>> +    rotation: 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 6BBACBDB80\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 26 May 2021 14:59:17 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BF0CD68922;\n\tWed, 26 May 2021 16:59:16 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 29BF8602AB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 May 2021 16:59:15 +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 9B8163F1;\n\tWed, 26 May 2021 16:59:14 +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=\"Lr4IIgxG\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1622041154;\n\tbh=LTdfjaxZuJAyIpojRDe/Xx/K0Z+LLKxxqnbSCfzMr2E=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Lr4IIgxGmwdpDzD5GSEt4MnkZFY+rQmHD4nfSQAKWUFXV4qXZY1VFOexJFa0NWLvN\n\tM+wx/KhhXxb44rZqZb7U7NnyQITx6TDzj9PHv/92+IXTbessDWq9tr2bd6ZDajBbWi\n\t1tzMuxzivXtwL7m2D4/VfpMNp58oyiYxOS557gIA=","Date":"Wed, 26 May 2021 17:59:09 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Umang Jain <umang.jain@ideasonboard.com>","Message-ID":"<YK5iPVqRY8asK3QS@pendragon.ideasonboard.com>","References":"<20210526071542.586096-1-umang.jain@ideasonboard.com>\n\t<20210526080528.o2ymzf6qhj56i4x3@uno.localdomain>\n\t<1248c5f6-2487-8114-81eb-b4ed3db261c2@ideasonboard.com>\n\t<20210526095747.lkv5hvygfbxwktpj@uno.localdomain>\n\t<fe90188c-3ee7-d7f7-9a6b-42bf69061d3d@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<fe90188c-3ee7-d7f7-9a6b-42bf69061d3d@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] android: nautilus: Add camera HAL\n\tconfiguration","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@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17286,"web_url":"https://patchwork.libcamera.org/comment/17286/","msgid":"<CAO5uPHNdr18HonERFuTUmMaJG6bk=LM_5NZZdKU3aEMOcTQ-Qw@mail.gmail.com>","date":"2021-05-26T15:20:13","subject":"Re: [libcamera-devel] [PATCH] android: nautilus: Add camera HAL\n\tconfiguration","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"content":"HI Laurent,\n\nOn Wed, May 26, 2021 at 11:57 PM Laurent Pinchart <\nlaurent.pinchart@ideasonboard.com> wrote:\n\n> Hi Hiro,\n>\n> On Wed, May 26, 2021 at 06:36:34PM +0900, Hirokazu Honda wrote:\n> > On Wed, May 26, 2021 at 6:21 PM Umang Jain wrote:\n> > > On 5/26/21 1:35 PM, Jacopo Mondi wrote:\n> > > > On Wed, May 26, 2021 at 12:45:42PM +0530, Umang Jain wrote:\n> > > >> nautilus has two internal cameras, one UVC and one for the IPU3.\n> > > >> However, libcamera assumes all UVC cameras as 'external' hence, mark\n> > > >> the location of UVC camera in HAL configuration as 'external' too.\n> > > >>\n> > > >> Note that the presence of UVC camera in camera HAL will complain:\n> > > >>\n> > > >>> ERROR HAL camera_device.cpp:701\n> > > '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647':\n> > > >>    Failed to map mandatory Android format IMPLEMENTATION_DEFINED\n> > > (0x00000022): aborting\n> > > >>> ERROR HAL camera_hal_manager.cpp:153 Failed to initialize camera:\n> > > >>    \\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\n> > > >>\n> > > >> This is related to a known issue of UVC cameras on HAL which do not\n> > > >> provide NV12 by default.\n> > > > Does it work without configuration file support ?\n> > > No, it won't, since it's UVC. And cannot work until there's a\n> > > format-convertor in place that can convert the stream to NV12 provided\n> > > by that camera, I suppose.\n> >\n> > It is time that we need a JPEG decoder in a post processing pipeline\n> like a\n> > JPEG encoder.\n>\n> Or a YUYV to NV12 converter, as the camera can also produce YUYV ?\n>\n>\nI guess the camera is capable to produce YUYV only for lower resolutions\nand produce JPEG for higher resolutions?\n\n-Hiro\n\n> > >> Also, if we don't mention the UVC camera in the config:\n> > > >>\n> > > >>> ERROR HALConfig camera_hal_config.cpp:393 Camera\n> > > >>    '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647' not described in the\n> HAL\n> > > >>    configuration file\n> > > >>> ERROR HAL camera_device.cpp:701\n> > > '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647':\n> > > >>    Failed to map mandatory Android format IMPLEMENTATION_DEFINED\n> > > (0x00000022): aborting\n> > > >>> ERROR HAL camera_hal_manager.cpp:153 Failed to initialize camera:\n> > > >>    \\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\n> > > >>\n> > > >> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n> > > >> ---\n> > > >>   src/android/data/nautilus/camera_hal.yaml | 8 ++++++++\n> > > >>   1 file changed, 8 insertions(+)\n> > > >>   create mode 100644 src/android/data/nautilus/camera_hal.yaml\n> > > >>\n> > > >> diff --git a/src/android/data/nautilus/camera_hal.yaml\n> b/src/android/data/nautilus/camera_hal.yaml\n> > > >> new file mode 100644\n> > > >> index 00000000..f2d31e1c\n> > > >> --- /dev/null\n> > > >> +++ b/src/android/data/nautilus/camera_hal.yaml\n> > > >> @@ -0,0 +1,8 @@\n> > > >> +cameras:\n> > > >> +  \"\\\\_SB_.PCI0.I2C2.CAM0\":\n> > > >> +    location: back\n> > > >> +    rotation: 0\n> > > >> +\n> > > >> +  \"\\\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\":\n> > > >> +    location: external\n> > > >> +    rotation: 0\n>\n> --\n> Regards,\n>\n> Laurent Pinchart\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 42757C3203\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 26 May 2021 15:20:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 680736891D;\n\tWed, 26 May 2021 17:20:27 +0200 (CEST)","from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com\n\t[IPv6:2a00:1450:4864:20::52e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8D6F9602AB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 May 2021 17:20:25 +0200 (CEST)","by mail-ed1-x52e.google.com with SMTP id df21so2013047edb.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 May 2021 08:20:25 -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=\"Gq2LFL33\"; 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=Y6TwwTU4A8DZ/Sig8dJNzjn/q2ChPFbhGsU4rca/Yiw=;\n\tb=Gq2LFL33p828jOSuXc5DpW24xgO3fh9KGdm04JPf9r6jBiCyFUN7nYql4UAcTTvkew\n\t+Q+9xFuFOAw8xN5/PJkOHbKvIxZRrRoUefnmAK5U6yHmPY7OCaKegEFvIBUUn36mhHeq\n\t8gRb7Xawk+dgFd0hd/k/UFeL1UqMyuE7Xl89c=","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=Y6TwwTU4A8DZ/Sig8dJNzjn/q2ChPFbhGsU4rca/Yiw=;\n\tb=rVYOqfEK9rnr7pUBvsAyo3FVNaSKIqkz1FIA1qJcZJhpzrFffLnd+YsP1gmIe4FvMF\n\tn6r4F3zAWTyFfF959V5r4PP+dq6lYieutOZaM49X7Xk76oFeNDi+Omu/r79qHoovX3GZ\n\ta4W0HVpbhm56uJsV2RTeTlMja16IwwE0DDmhVU1k852dC+VZLz2YEwxi6HetGwTwlN8j\n\tM4Gk8Ciu/8p5cbZ6YoyrKwYXGRfdqYG19+ZPHJCLV+nbgoH8xKgAqzRTuPqQFP52LTZY\n\tttnkOkDEjOx52+5F641MmMBaNtI6bJ17FbGeGaDCQlr4WAY6LmjeAkRwNDi4ZfDm5WWQ\n\tmuzQ==","X-Gm-Message-State":"AOAM531fYVdEbuHhkLModtfR2NKuOUAd1xBtwAe66NFyrbCh4rp6pxha\n\tfB73qYrp5QYXLb2YEsp4tNCPCzU+Sxe7MWT9NKGX0gHiFV0=","X-Google-Smtp-Source":"ABdhPJwfjEulVbGu6McW86/ujJ5RAJifdv0oqG8RIfZ8V3d/qoBHDFCS5/Eik4z16sWA+jC4hhsFdtVrFSLscXzJ7YU=","X-Received":"by 2002:a05:6402:cb8:: with SMTP id\n\tcn24mr37708419edb.325.1622042424482; \n\tWed, 26 May 2021 08:20:24 -0700 (PDT)","MIME-Version":"1.0","References":"<20210526071542.586096-1-umang.jain@ideasonboard.com>\n\t<20210526080528.o2ymzf6qhj56i4x3@uno.localdomain>\n\t<1248c5f6-2487-8114-81eb-b4ed3db261c2@ideasonboard.com>\n\t<CAO5uPHPHW5_pn3by=GuyYYSrK0tpGe8nEWGMMwKp5V-g_dN__Q@mail.gmail.com>\n\t<YK5hy2a/14Z9lh7Q@pendragon.ideasonboard.com>","In-Reply-To":"<YK5hy2a/14Z9lh7Q@pendragon.ideasonboard.com>","From":"Hirokazu Honda <hiroh@chromium.org>","Date":"Thu, 27 May 2021 00:20:13 +0900","Message-ID":"<CAO5uPHNdr18HonERFuTUmMaJG6bk=LM_5NZZdKU3aEMOcTQ-Qw@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"multipart/alternative; boundary=\"00000000000085fe8a05c33d2e4b\"","Subject":"Re: [libcamera-devel] [PATCH] android: nautilus: Add camera HAL\n\tconfiguration","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":17287,"web_url":"https://patchwork.libcamera.org/comment/17287/","msgid":"<YK5zxEAKWH3uiGZa@pendragon.ideasonboard.com>","date":"2021-05-26T16:13:56","subject":"Re: [libcamera-devel] [PATCH] android: nautilus: Add camera HAL\n\tconfiguration","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Hiro,\n\nOn Thu, May 27, 2021 at 12:20:13AM +0900, Hirokazu Honda wrote:\n> On Wed, May 26, 2021 at 11:57 PM Laurent Pinchart wrote:\n> > On Wed, May 26, 2021 at 06:36:34PM +0900, Hirokazu Honda wrote:\n> >> On Wed, May 26, 2021 at 6:21 PM Umang Jain wrote:\n> >>> On 5/26/21 1:35 PM, Jacopo Mondi wrote:\n> >>>> On Wed, May 26, 2021 at 12:45:42PM +0530, Umang Jain wrote:\n> >>>>> nautilus has two internal cameras, one UVC and one for the IPU3.\n> >>>>> However, libcamera assumes all UVC cameras as 'external' hence, mark\n> >>>>> the location of UVC camera in HAL configuration as 'external' too.\n> >>>>>\n> >>>>> Note that the presence of UVC camera in camera HAL will complain:\n> >>>>>\n> >>>>>> ERROR HAL camera_device.cpp:701 '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647':\n> >>>>>    Failed to map mandatory Android format IMPLEMENTATION_DEFINED (0x00000022): aborting\n> >>>>>> ERROR HAL camera_hal_manager.cpp:153 Failed to initialize camera:\n> >>>>>    \\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\n> >>>>>\n> >>>>> This is related to a known issue of UVC cameras on HAL which do not\n> >>>>> provide NV12 by default.\n> >>>> Does it work without configuration file support ?\n> >>>\n> >>> No, it won't, since it's UVC. And cannot work until there's a\n> >>> format-convertor in place that can convert the stream to NV12 provided\n> >>> by that camera, I suppose.\n> >>\n> >> It is time that we need a JPEG decoder in a post processing pipeline like a\n> >> JPEG encoder.\n> >\n> > Or a YUYV to NV12 converter, as the camera can also produce YUYV ?\n>\n> I guess the camera is capable to produce YUYV only for lower resolutions\n> and produce JPEG for higher resolutions?\n\nIt's up to the camera, but generally speaking, yes, the highest\nresolutions and frame rates are only available in MJPEG. Wouldn't a\nsoftware decoder likely be too slow in those cases though ?\n\n> >>>> Also, if we don't mention the UVC camera in the config:\n> >>>>>\n> >>>>>> ERROR HALConfig camera_hal_config.cpp:393 Camera\n> >>>>>    '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647' not described in the HAL\n> >>>>>    configuration file\n> >>>>>> ERROR HAL camera_device.cpp:701 '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647':\n> >>>>>    Failed to map mandatory Android format IMPLEMENTATION_DEFINED (0x00000022): aborting\n> >>>>>> ERROR HAL camera_hal_manager.cpp:153 Failed to initialize camera:\n> >>>>>    \\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\n> >>>>>\n> >>>>> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n> >>>>> ---\n> >>>>>   src/android/data/nautilus/camera_hal.yaml | 8 ++++++++\n> >>>>>   1 file changed, 8 insertions(+)\n> >>>>>   create mode 100644 src/android/data/nautilus/camera_hal.yaml\n> >>>>>\n> >>>>> diff --git a/src/android/data/nautilus/camera_hal.yaml b/src/android/data/nautilus/camera_hal.yaml\n> >>>>> new file mode 100644\n> >>>>> index 00000000..f2d31e1c\n> >>>>> --- /dev/null\n> >>>>> +++ b/src/android/data/nautilus/camera_hal.yaml\n> >>>>> @@ -0,0 +1,8 @@\n> >>>>> +cameras:\n> >>>>> +  \"\\\\_SB_.PCI0.I2C2.CAM0\":\n> >>>>> +    location: back\n> >>>>> +    rotation: 0\n> >>>>> +\n> >>>>> +  \"\\\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\":\n> >>>>> +    location: external\n> >>>>> +    rotation: 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 1424BBDB80\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 26 May 2021 16:14:05 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3F3806891D;\n\tWed, 26 May 2021 18:14: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 6BA1E602AB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 May 2021 18:14:02 +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 AC9D53F1;\n\tWed, 26 May 2021 18:14:01 +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=\"mb57dzJs\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1622045641;\n\tbh=fhOeFJxALYgJxOBYhrOQB8QUprynh43AjM2dyZaOhz4=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=mb57dzJsLo05+EmBpd9o0G0CXgzb7LaulskchG3/EhXjSkHlryUVPbD31FCzOuBjk\n\tGDauYK0vP+KbutPZ/JzeHY3Y5v2GPMweKjE7LCUDgOXT0jyt8+N+5RRS0gO2s+Um92\n\tWtU8QNquDCPkYGLrxv1ZTs1fHHbMcOvNqwefaUc0=","Date":"Wed, 26 May 2021 19:13:56 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Hirokazu Honda <hiroh@chromium.org>","Message-ID":"<YK5zxEAKWH3uiGZa@pendragon.ideasonboard.com>","References":"<20210526071542.586096-1-umang.jain@ideasonboard.com>\n\t<20210526080528.o2ymzf6qhj56i4x3@uno.localdomain>\n\t<1248c5f6-2487-8114-81eb-b4ed3db261c2@ideasonboard.com>\n\t<CAO5uPHPHW5_pn3by=GuyYYSrK0tpGe8nEWGMMwKp5V-g_dN__Q@mail.gmail.com>\n\t<YK5hy2a/14Z9lh7Q@pendragon.ideasonboard.com>\n\t<CAO5uPHNdr18HonERFuTUmMaJG6bk=LM_5NZZdKU3aEMOcTQ-Qw@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<CAO5uPHNdr18HonERFuTUmMaJG6bk=LM_5NZZdKU3aEMOcTQ-Qw@mail.gmail.com>","Subject":"Re: [libcamera-devel] [PATCH] android: nautilus: Add camera HAL\n\tconfiguration","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":17288,"web_url":"https://patchwork.libcamera.org/comment/17288/","msgid":"<CAO5uPHNUSKePKYpJbJSxZN5H5gyJszffx5cYjYEJooAU_=uD1A@mail.gmail.com>","date":"2021-05-26T16:18:44","subject":"Re: [libcamera-devel] [PATCH] android: nautilus: Add camera HAL\n\tconfiguration","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"content":"Hi Laurent,\n\nOn Thu, May 27, 2021 at 1:14 AM Laurent Pinchart <\nlaurent.pinchart@ideasonboard.com> wrote:\n\n> Hi Hiro,\n>\n> On Thu, May 27, 2021 at 12:20:13AM +0900, Hirokazu Honda wrote:\n> > On Wed, May 26, 2021 at 11:57 PM Laurent Pinchart wrote:\n> > > On Wed, May 26, 2021 at 06:36:34PM +0900, Hirokazu Honda wrote:\n> > >> On Wed, May 26, 2021 at 6:21 PM Umang Jain wrote:\n> > >>> On 5/26/21 1:35 PM, Jacopo Mondi wrote:\n> > >>>> On Wed, May 26, 2021 at 12:45:42PM +0530, Umang Jain wrote:\n> > >>>>> nautilus has two internal cameras, one UVC and one for the IPU3.\n> > >>>>> However, libcamera assumes all UVC cameras as 'external' hence,\n> mark\n> > >>>>> the location of UVC camera in HAL configuration as 'external' too.\n> > >>>>>\n> > >>>>> Note that the presence of UVC camera in camera HAL will complain:\n> > >>>>>\n> > >>>>>> ERROR HAL camera_device.cpp:701\n> '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647':\n> > >>>>>    Failed to map mandatory Android format IMPLEMENTATION_DEFINED\n> (0x00000022): aborting\n> > >>>>>> ERROR HAL camera_hal_manager.cpp:153 Failed to initialize camera:\n> > >>>>>    \\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\n> > >>>>>\n> > >>>>> This is related to a known issue of UVC cameras on HAL which do not\n> > >>>>> provide NV12 by default.\n> > >>>> Does it work without configuration file support ?\n> > >>>\n> > >>> No, it won't, since it's UVC. And cannot work until there's a\n> > >>> format-convertor in place that can convert the stream to NV12\n> provided\n> > >>> by that camera, I suppose.\n> > >>\n> > >> It is time that we need a JPEG decoder in a post processing pipeline\n> like a\n> > >> JPEG encoder.\n> > >\n> > > Or a YUYV to NV12 converter, as the camera can also produce YUYV ?\n> >\n> > I guess the camera is capable to produce YUYV only for lower resolutions\n> > and produce JPEG for higher resolutions?\n>\n> It's up to the camera, but generally speaking, yes, the highest\n> resolutions and frame rates are only available in MJPEG. Wouldn't a\n> software decoder likely be too slow in those cases though ?\n>\n>\nRight, on ChromeOS, if an app asks YUV and a camera is capable of producing\nMJPEG for the resolution, cros camera services requests HAL MJPEG and\ndecodes it to YUV by jpeg decoder (with hw acceleration if there is,\nwithout if there isn't).\nSo we don't need a JPEG decoder for ChromeOS. I don't know if it's nice to\nhave a jpeg decoder in libcamera for other platforms.\n-Hiro\n\n> > >>>> Also, if we don't mention the UVC camera in the config:\n> > >>>>>\n> > >>>>>> ERROR HALConfig camera_hal_config.cpp:393 Camera\n> > >>>>>    '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647' not described in\n> the HAL\n> > >>>>>    configuration file\n> > >>>>>> ERROR HAL camera_device.cpp:701\n> '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647':\n> > >>>>>    Failed to map mandatory Android format IMPLEMENTATION_DEFINED\n> (0x00000022): aborting\n> > >>>>>> ERROR HAL camera_hal_manager.cpp:153 Failed to initialize camera:\n> > >>>>>    \\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\n> > >>>>>\n> > >>>>> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n> > >>>>> ---\n> > >>>>>   src/android/data/nautilus/camera_hal.yaml | 8 ++++++++\n> > >>>>>   1 file changed, 8 insertions(+)\n> > >>>>>   create mode 100644 src/android/data/nautilus/camera_hal.yaml\n> > >>>>>\n> > >>>>> diff --git a/src/android/data/nautilus/camera_hal.yaml\n> b/src/android/data/nautilus/camera_hal.yaml\n> > >>>>> new file mode 100644\n> > >>>>> index 00000000..f2d31e1c\n> > >>>>> --- /dev/null\n> > >>>>> +++ b/src/android/data/nautilus/camera_hal.yaml\n> > >>>>> @@ -0,0 +1,8 @@\n> > >>>>> +cameras:\n> > >>>>> +  \"\\\\_SB_.PCI0.I2C2.CAM0\":\n> > >>>>> +    location: back\n> > >>>>> +    rotation: 0\n> > >>>>> +\n> > >>>>> +  \"\\\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\":\n> > >>>>> +    location: external\n> > >>>>> +    rotation: 0\n>\n> --\n> Regards,\n>\n> Laurent Pinchart\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 284F0C3203\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 26 May 2021 16:18:58 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7E51A68922;\n\tWed, 26 May 2021 18:18:57 +0200 (CEST)","from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com\n\t[IPv6:2a00:1450:4864:20::62d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CC2C6602AB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 May 2021 18:18:55 +0200 (CEST)","by mail-ej1-x62d.google.com with SMTP id f18so3329746ejq.10\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 May 2021 09:18:55 -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=\"Qij+bHTE\"; 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=Pwz3ZqU2klhdAIg5sHqIAuWo0tV8za42rI1qnH4OpF4=;\n\tb=Qij+bHTEcnzAV4UHvvDFITh8/glKRu2eO/9errgm8PEDCug4P45owgiSuiFid2FLZj\n\tjCRohpTax+dcc8ZOY7HcUp7VlX+kZyRGGoQ6Qd9wnl+7XrkX6wQQmownmQXFhmcDph8c\n\tSCeSA/TEeIqdX4WJ3Hdr8QGWTsNY4h/2r4Hws=","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=Pwz3ZqU2klhdAIg5sHqIAuWo0tV8za42rI1qnH4OpF4=;\n\tb=WGKrhytvJ2uzC2Yu70svo5xp9FT2oSfeC2Y82y2nm6fMyqpNxWPjSHuG/Y1XjglOTS\n\ttO6ZDhltzXBgO1dYqDmOFm/dcegcNT/jRHC/2UWQAABwSfyc/psg9QfcyHnBuABYy5lf\n\twYst2mVehLzbNGEt3mkBvdBhxVn64M6DtOaDisK1h9ZRxzDAjWu9D4SYpsNa+nw1Dy7q\n\tyHVQRquWYCujwEt3Of5P6TgKlKvJxaTYpDCi/YvqCLJzGS5N6uT/u8PYlVUOLKMbUA4W\n\tEmRQkqwbio7TOu4t5vB4eQaSgJfLq6zjyL6Sn96c3sphmbLfe22uEbWdSZZqW7HvZbmh\n\tiOXQ==","X-Gm-Message-State":"AOAM5317lN9spY7dUs0C5sLPcmuHcJBCzzo1LSHTWnOAclj5Ge7HP5F4\n\tI3HepVrO2Qio6wZazUrv7zWZZnGP1/jx1VdnWYK5J80lJA0=","X-Google-Smtp-Source":"ABdhPJzaKHj9PO5GqvMkGcTwto33LZKIlZAO5W15WXwl35f6MDN/S5dkgPZcGJt6nLqb0Oovq+nzu8Jw6gLeJbp5KSw=","X-Received":"by 2002:a17:906:949a:: with SMTP id\n\tt26mr1381080ejx.475.1622045935437; \n\tWed, 26 May 2021 09:18:55 -0700 (PDT)","MIME-Version":"1.0","References":"<20210526071542.586096-1-umang.jain@ideasonboard.com>\n\t<20210526080528.o2ymzf6qhj56i4x3@uno.localdomain>\n\t<1248c5f6-2487-8114-81eb-b4ed3db261c2@ideasonboard.com>\n\t<CAO5uPHPHW5_pn3by=GuyYYSrK0tpGe8nEWGMMwKp5V-g_dN__Q@mail.gmail.com>\n\t<YK5hy2a/14Z9lh7Q@pendragon.ideasonboard.com>\n\t<CAO5uPHNdr18HonERFuTUmMaJG6bk=LM_5NZZdKU3aEMOcTQ-Qw@mail.gmail.com>\n\t<YK5zxEAKWH3uiGZa@pendragon.ideasonboard.com>","In-Reply-To":"<YK5zxEAKWH3uiGZa@pendragon.ideasonboard.com>","From":"Hirokazu Honda <hiroh@chromium.org>","Date":"Thu, 27 May 2021 01:18:44 +0900","Message-ID":"<CAO5uPHNUSKePKYpJbJSxZN5H5gyJszffx5cYjYEJooAU_=uD1A@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"multipart/alternative; boundary=\"000000000000ca9c6505c33dffc8\"","Subject":"Re: [libcamera-devel] [PATCH] android: nautilus: Add camera HAL\n\tconfiguration","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":17289,"web_url":"https://patchwork.libcamera.org/comment/17289/","msgid":"<749ebd5e-b3bf-8df3-345b-5a2ccc674c37@ideasonboard.com>","date":"2021-05-26T17:28:45","subject":"Re: [libcamera-devel] [PATCH] android: nautilus: Add camera HAL\n\tconfiguration","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi Laurent,\n\nOn 5/26/21 8:29 PM, Laurent Pinchart wrote:\n> Hi Umang,\n>\n> On Wed, May 26, 2021 at 03:42:53PM +0530, Umang Jain wrote:\n>> On 5/26/21 3:27 PM, Jacopo Mondi wrote:\n>>> On Wed, May 26, 2021 at 02:51:19PM +0530, Umang Jain wrote:\n>>>> On 5/26/21 1:35 PM, Jacopo Mondi wrote:\n>>>>> On Wed, May 26, 2021 at 12:45:42PM +0530, Umang Jain wrote:\n>>>>>> nautilus has two internal cameras, one UVC and one for the IPU3.\n>>>>>> However, libcamera assumes all UVC cameras as 'external' hence, mark\n>>>>>> the location of UVC camera in HAL configuration as 'external' too.\n>>>>>>\n>>>>>> Note that the presence of UVC camera in camera HAL will complain:\n>>>>>>\n>>>>>>> ERROR HAL camera_device.cpp:701 '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647':\n>>>>>>      Failed to map mandatory Android format IMPLEMENTATION_DEFINED (0x00000022): aborting\n>>>>>>> ERROR HAL camera_hal_manager.cpp:153 Failed to initialize camera:\n>>>>>>      \\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\n>>>>>>\n>>>>>> This is related to a known issue of UVC cameras on HAL which do not\n>>>>>> provide NV12 by default.\n>>>>> Does it work without configuration file support ?\n>>>> No, it won't, since it's UVC. And cannot work until there's a\n>>>> format-convertor in place that can convert the stream to NV12 provided by\n>>>> that camera, I suppose.\n>>> Right, it was not working before the configuration file series went\n>>> in, right ? What I'm interested about is that there's no regression\n>>> due to the series :)\n>> Oh yea, no regression. I just went and wrote a verbose commit message\n>> about what's \"fine\"\n>>\n>>>>>> Also, if we don't mention the UVC camera in the config:\n>>>>>>\n>>>>>>> ERROR HALConfig camera_hal_config.cpp:393 Camera\n>>>>>>      '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647' not described in the HAL\n>>>>>>      configuration file\n>>> This is \"fine\".. If you look at the caller of\n>>> CameraHalConfig::cameraConfigData() in camera_hal_manager.cpp\n>>>\n>>> \tconst CameraConfigData *cameraConfigData = halConfig_.cameraConfigData(cam->id());\n>>> \tif (!isCameraExternal && !cameraConfigData) {\n>>> \t\tLOG(HAL, Error)\n>>> \t\t\t<< \"HAL configuration entry for internal camera \"\n>>> \t\t\t<< cam->id() << \" is missing\";\n>>> \t\treturn;\n>>> \t}\n>>>\n>>> You'll see that the configuration entry for external cameras is not\n>>> mandatory, and the UVC camera should be correctly identified as\n>>> EXTERNAL.\n>>>\n>>> We spam the log enough with worrying errors which are not really\n>>> errors, so we might want to suppress this one for external cameras ?\n>> Won't supress it entirely, but maybe not keep it as ERROR. WARN or DEBUG\n>> maybe?\n> Given that the UVC camera is internal, what happens if you set its\n> location to front in the configuration file ?\nIt complains :-)\n\nThere is a location check of what libcamera reports vs what's provided \nin camera hal.\n\n[0:16:15.090460200] [4680]  WARN HAL camera_device.cpp:481 \n'\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647': Camera location does not \nmatch configuration file. Using 2\n\nOh, I can't un-see \"2\" now ;-)\n>\n>>>>>>> ERROR HAL camera_device.cpp:701 '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647':\n>>>>>>      Failed to map mandatory Android format IMPLEMENTATION_DEFINED (0x00000022): aborting\n>>>>>>> ERROR HAL camera_hal_manager.cpp:153 Failed to initialize camera:\n>>>>>>      \\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\n>>>>>>\n>>>>>> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n>>>>>> ---\n>>>>>>     src/android/data/nautilus/camera_hal.yaml | 8 ++++++++\n>>>>>>     1 file changed, 8 insertions(+)\n>>>>>>     create mode 100644 src/android/data/nautilus/camera_hal.yaml\n>>>>>>\n>>>>>> diff --git a/src/android/data/nautilus/camera_hal.yaml b/src/android/data/nautilus/camera_hal.yaml\n>>>>>> new file mode 100644\n>>>>>> index 00000000..f2d31e1c\n>>>>>> --- /dev/null\n>>>>>> +++ b/src/android/data/nautilus/camera_hal.yaml\n>>>>>> @@ -0,0 +1,8 @@\n>>>>>> +cameras:\n>>>>>> +  \"\\\\_SB_.PCI0.I2C2.CAM0\":\n>>>>>> +    location: back\n>>>>>> +    rotation: 0\n>>>>>> +\n>>>>>> +  \"\\\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\":\n>>>>>> +    location: external\n>>>>>> +    rotation: 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 4B4C7BDB80\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 26 May 2021 17:28:53 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 907CE6891D;\n\tWed, 26 May 2021 19:28:52 +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 DB053602AE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 May 2021 19:28:51 +0200 (CEST)","from localhost.localdomain (unknown [103.251.226.203])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id AE7053F1;\n\tWed, 26 May 2021 19:28:50 +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=\"udoJlW0T\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1622050131;\n\tbh=FwAzcpyd57sAY56xMZKXaJwxn2gz6vJMSSsdcPhff9g=;\n\th=Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=udoJlW0T7bHMhN0dVaNP+cP66YNIFTZJT4l/faVFs3KJB7+DGQPCrX8OZo5puy6ML\n\tgc1u/K9fqkw6Hbno2jU2u3JST44FcO3fqWUdFdRPIvVWEx7mxdQSV50HYUtkVsY9CC\n\tAY58Wmf4+t7j6XjCWSAxPvQnQjxXsImyVEcmxaU0=","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","References":"<20210526071542.586096-1-umang.jain@ideasonboard.com>\n\t<20210526080528.o2ymzf6qhj56i4x3@uno.localdomain>\n\t<1248c5f6-2487-8114-81eb-b4ed3db261c2@ideasonboard.com>\n\t<20210526095747.lkv5hvygfbxwktpj@uno.localdomain>\n\t<fe90188c-3ee7-d7f7-9a6b-42bf69061d3d@ideasonboard.com>\n\t<YK5iPVqRY8asK3QS@pendragon.ideasonboard.com>","From":"Umang Jain <umang.jain@ideasonboard.com>","Message-ID":"<749ebd5e-b3bf-8df3-345b-5a2ccc674c37@ideasonboard.com>","Date":"Wed, 26 May 2021 22:58:45 +0530","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101\n\tThunderbird/68.11.0","MIME-Version":"1.0","In-Reply-To":"<YK5iPVqRY8asK3QS@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Transfer-Encoding":"8bit","Content-Language":"en-US","Subject":"Re: [libcamera-devel] [PATCH] android: nautilus: Add camera HAL\n\tconfiguration","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@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17302,"web_url":"https://patchwork.libcamera.org/comment/17302/","msgid":"<YK8MYbowAq1lZz9c@pendragon.ideasonboard.com>","date":"2021-05-27T03:05:05","subject":"Re: [libcamera-devel] [PATCH] android: nautilus: Add camera HAL\n\tconfiguration","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Hiro,\n\nOn Thu, May 27, 2021 at 01:18:44AM +0900, Hirokazu Honda wrote:\n> On Thu, May 27, 2021 at 1:14 AM Laurent Pinchart wrote:\n> > On Thu, May 27, 2021 at 12:20:13AM +0900, Hirokazu Honda wrote:\n> > > On Wed, May 26, 2021 at 11:57 PM Laurent Pinchart wrote:\n> > > > On Wed, May 26, 2021 at 06:36:34PM +0900, Hirokazu Honda wrote:\n> > > >> On Wed, May 26, 2021 at 6:21 PM Umang Jain wrote:\n> > > >>> On 5/26/21 1:35 PM, Jacopo Mondi wrote:\n> > > >>>> On Wed, May 26, 2021 at 12:45:42PM +0530, Umang Jain wrote:\n> > > >>>>> nautilus has two internal cameras, one UVC and one for the IPU3.\n> > > >>>>> However, libcamera assumes all UVC cameras as 'external' hence, mark\n> > > >>>>> the location of UVC camera in HAL configuration as 'external' too.\n> > > >>>>>\n> > > >>>>> Note that the presence of UVC camera in camera HAL will complain:\n> > > >>>>>\n> > > >>>>>> ERROR HAL camera_device.cpp:701 '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647':\n> > > >>>>>    Failed to map mandatory Android format IMPLEMENTATION_DEFINED (0x00000022): aborting\n> > > >>>>>> ERROR HAL camera_hal_manager.cpp:153 Failed to initialize camera:\n> > > >>>>>    \\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\n> > > >>>>>\n> > > >>>>> This is related to a known issue of UVC cameras on HAL which do not\n> > > >>>>> provide NV12 by default.\n> > > >>>> Does it work without configuration file support ?\n> > > >>>\n> > > >>> No, it won't, since it's UVC. And cannot work until there's a\n> > > >>> format-convertor in place that can convert the stream to NV12 provided\n> > > >>> by that camera, I suppose.\n> > > >>\n> > > >> It is time that we need a JPEG decoder in a post processing pipeline like a\n> > > >> JPEG encoder.\n> > > >\n> > > > Or a YUYV to NV12 converter, as the camera can also produce YUYV ?\n> > >\n> > > I guess the camera is capable to produce YUYV only for lower resolutions\n> > > and produce JPEG for higher resolutions?\n> >\n> > It's up to the camera, but generally speaking, yes, the highest\n> > resolutions and frame rates are only available in MJPEG. Wouldn't a\n> > software decoder likely be too slow in those cases though ?\n>\n> Right, on ChromeOS, if an app asks YUV and a camera is capable of producing\n> MJPEG for the resolution, cros camera services requests HAL MJPEG and\n> decodes it to YUV by jpeg decoder (with hw acceleration if there is,\n> without if there isn't).\n> So we don't need a JPEG decoder for ChromeOS. I don't know if it's nice to\n> have a jpeg decoder in libcamera for other platforms.\n\nOh, nice :-) That certainly makes it easier for us.\n\nWe have generally considered JPEG out-of-scope for the libcamera core so\nfar, with the annoying exception of UVC. Maybe we'll need a JPEG decoder\nfor Android in the future, for UVC devices, but that will be for later.\n\n> > > >>>> Also, if we don't mention the UVC camera in the config:\n> > > >>>>>\n> > > >>>>>> ERROR HALConfig camera_hal_config.cpp:393 Camera\n> > > >>>>>    '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647' not described in the HAL\n> > > >>>>>    configuration file\n> > > >>>>>> ERROR HAL camera_device.cpp:701 '\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647':\n> > > >>>>>    Failed to map mandatory Android format IMPLEMENTATION_DEFINED (0x00000022): aborting\n> > > >>>>>> ERROR HAL camera_hal_manager.cpp:153 Failed to initialize camera:\n> > > >>>>>    \\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\n> > > >>>>>\n> > > >>>>> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n> > > >>>>> ---\n> > > >>>>>   src/android/data/nautilus/camera_hal.yaml | 8 ++++++++\n> > > >>>>>   1 file changed, 8 insertions(+)\n> > > >>>>>   create mode 100644 src/android/data/nautilus/camera_hal.yaml\n> > > >>>>>\n> > > >>>>> diff --git a/src/android/data/nautilus/camera_hal.yaml b/src/android/data/nautilus/camera_hal.yaml\n> > > >>>>> new file mode 100644\n> > > >>>>> index 00000000..f2d31e1c\n> > > >>>>> --- /dev/null\n> > > >>>>> +++ b/src/android/data/nautilus/camera_hal.yaml\n> > > >>>>> @@ -0,0 +1,8 @@\n> > > >>>>> +cameras:\n> > > >>>>> +  \"\\\\_SB_.PCI0.I2C2.CAM0\":\n> > > >>>>> +    location: back\n> > > >>>>> +    rotation: 0\n> > > >>>>> +\n> > > >>>>> +  \"\\\\_SB_.PCI0.XHCI.RHUB.HS09-9:1.0-04f2:b647\":\n> > > >>>>> +    location: external\n> > > >>>>> +    rotation: 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 480BEC3203\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 May 2021 03:05:15 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6A16C68925;\n\tThu, 27 May 2021 05:05:14 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6A488602AA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 May 2021 05:05:12 +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 D0C708DE;\n\tThu, 27 May 2021 05:05:11 +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=\"tc3j0KsJ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1622084712;\n\tbh=qqXZ9+xfSpYforZiuCuUipXTEHF6+LMUB+bAHUDaKkM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=tc3j0KsJVeEADdhDakFCdxswHwTsSJYIDRle0cSI57e13AF2lpt0jT6os4YjU0pde\n\tPZjR3aI13LD8Ny/3x4lvB+8nQVntntYZNprqDJWlP2GhR0Y19+HXzX9Y+11jdkbeCZ\n\t9X1BdJyLfYPF7l7P6ac622kOhOBAc+g9laz85yyQ=","Date":"Thu, 27 May 2021 06:05:05 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Hirokazu Honda <hiroh@chromium.org>","Message-ID":"<YK8MYbowAq1lZz9c@pendragon.ideasonboard.com>","References":"<20210526071542.586096-1-umang.jain@ideasonboard.com>\n\t<20210526080528.o2ymzf6qhj56i4x3@uno.localdomain>\n\t<1248c5f6-2487-8114-81eb-b4ed3db261c2@ideasonboard.com>\n\t<CAO5uPHPHW5_pn3by=GuyYYSrK0tpGe8nEWGMMwKp5V-g_dN__Q@mail.gmail.com>\n\t<YK5hy2a/14Z9lh7Q@pendragon.ideasonboard.com>\n\t<CAO5uPHNdr18HonERFuTUmMaJG6bk=LM_5NZZdKU3aEMOcTQ-Qw@mail.gmail.com>\n\t<YK5zxEAKWH3uiGZa@pendragon.ideasonboard.com>\n\t<CAO5uPHNUSKePKYpJbJSxZN5H5gyJszffx5cYjYEJooAU_=uD1A@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<CAO5uPHNUSKePKYpJbJSxZN5H5gyJszffx5cYjYEJooAU_=uD1A@mail.gmail.com>","Subject":"Re: [libcamera-devel] [PATCH] android: nautilus: Add camera HAL\n\tconfiguration","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>"}}]