[{"id":12789,"web_url":"https://patchwork.libcamera.org/comment/12789/","msgid":"<CAAFQd5A=xd6rAs7hf2mJ3k-1NizooXx_CguhHTui4Pb=rZ3oCg@mail.gmail.com>","date":"2020-09-26T12:24:20","subject":"Re: [libcamera-devel] [PATCH v5 0/7] libcamera: Allow for\n\tuser-friendly names in applications","submitter":{"id":9,"url":"https://patchwork.libcamera.org/api/people/9/","name":"Tomasz Figa","email":"tfiga@chromium.org"},"content":"Hi Niklas,\n\nOn Fri, Sep 25, 2020 at 5:08 PM Niklas Söderlund\n<niklas.soderlund@ragnatech.se> wrote:\n>\n> Hello,\n>\n> This series trues to advance the topic of user-friendly names in\n> applications.\n>\n> Patch 1/7 adds a new camera property 'Model' that may be used to record\n> a cameras model. Patch 2/7, 3/7, 4/7 and 5/7 then implements this new\n> property for all pipeline handlers.\n>\n> Patch 6/7 introduce user-friendly names to the cam utility.\n>\n> The final patch 7/7 records the model information in the DNG files\n> created by qcam. More work is needed on top of this series to create\n> user-friendly names for qcam. My intention is to do this in a follow up\n> series once this is merged as I fear some bikeshedding on the style of\n> the user-friendly name so lets battle that out in cam first :-)\n>\n> Example of listing cameras with and without this series,\n>\n> Without:\n>     $ cam -l\n>     Available cameras:\n>     1: \\_SB_.PCI0.RP05.PXSX-2.4:1.0-046d:0843\n>     2: platform/vimc.0 Sensor B\n>\n>     $ cam -l\n>     Available cameras:\n>     1: /base/i2c@ff160000/camera@36\n>     2: /base/i2c@ff160000/camera@3c\n>\n>     $ cam -l\n>     Available cameras:\n>     1: /base/soc/i2c0mux/i2c@1/imx219@10\n>\n>     $ cam -l\n>     Available cameras:\n>     1: \\_SB_.PCI0.I2C2.CAM0\n>     2: \\_SB_.PCI0.I2C4.CAM1\n>\n>\n> With:\n>     $ cam -l\n>     Available cameras:\n>     1: External camera Logitech Webcam C930e (\\_SB_.PCI0.RP05.PXSX-2.4:1.0-046d:0843)\n>     2: Internal front camera Sensor B (platform/vimc.0 Sensor B)\n>\n>     $ cam -l\n>     Available cameras:\n>     1: Internal front camera ov5695 (/base/i2c@ff160000/camera@36)\n>     2: Internal front camera ov2685 (/base/i2c@ff160000/camera@3c)\n\nFirst of all, thanks for working on this. The new names are indeed\nmuch more friendly. I still wonder, though, if for the user the exact\nsensor model of an internal camera has any meaning. Perhaps something\nlike \"Internal 5 megapixel front camera\" and \"Internal 2 megapixel\nfront camera\" would be even friendlier? What do you think?\n\nBest regards,\nTomasz\n\n>\n>     $ cam -l\n>     Available cameras:\n>     1: Internal front camera imx219 (/base/soc/i2c0mux/i2c@1/imx219@10)\n>\n>     $ cam -l\n>     Available cameras:\n>     1: Internal front camera ov13858 (\\_SB_.PCI0.I2C2.CAM0)\n>     2: Internal front camera ov5670 (\\_SB_.PCI0.I2C4.CAM1)\n>\n> It can be observed above that all Cameras that report the Location\n> property do so by stating they face the front. We know this is not true\n> for some devices. This is however not a fault of this series as it only\n> prints what is reported by the Camera. Once we teach the Camera to\n> report true values for these properties cam will print the correct\n> information.\n>\n> Niklas Söderlund (7):\n>   libcamera: properties: Add model property\n>   libcamera: utils: Add method to remove non-ASCII characters\n>   libcamera: camera_sensor: Set sensor model property\n>   libcamera: pipeline: uvcvideo: Initialize CameraData from MediaDevice\n>   libcamera: pipeline: uvcvideo: Set sensor model property\n>   cam: Print user-friendly camera names\n>   qcam: dng_writer: Record camera model\n>\n>  include/libcamera/internal/utils.h           |  2 ++\n>  src/cam/main.cpp                             | 31 +++++++++++++++++++-\n>  src/libcamera/camera_sensor.cpp              |  2 ++\n>  src/libcamera/pipeline/uvcvideo/uvcvideo.cpp | 31 ++++++++++----------\n>  src/libcamera/property_ids.yaml              | 20 +++++++++++++\n>  src/libcamera/utils.cpp                      | 17 +++++++++++\n>  src/qcam/dng_writer.cpp                      | 13 ++++++--\n>  7 files changed, 97 insertions(+), 19 deletions(-)\n>\n> --\n> 2.28.0\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 8A52AC3B5B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 26 Sep 2020 12:24:35 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0112062FD2;\n\tSat, 26 Sep 2020 14:24:35 +0200 (CEST)","from mail-ed1-x544.google.com (mail-ed1-x544.google.com\n\t[IPv6:2a00:1450:4864:20::544])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id AD2D860364\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 26 Sep 2020 14:24:33 +0200 (CEST)","by mail-ed1-x544.google.com with SMTP id n13so5210548edo.10\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 26 Sep 2020 05:24:33 -0700 (PDT)","from mail-wm1-f52.google.com (mail-wm1-f52.google.com.\n\t[209.85.128.52]) by smtp.gmail.com with ESMTPSA id\n\tbv8sm4028210ejb.3.2020.09.26.05.24.31\n\tfor <libcamera-devel@lists.libcamera.org>\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tSat, 26 Sep 2020 05:24:32 -0700 (PDT)","by mail-wm1-f52.google.com with SMTP id b79so2045785wmb.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 26 Sep 2020 05:24:31 -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=\"e8BAAnYA\"; 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:content-transfer-encoding;\n\tbh=sVQMYhKV+qm4T8qZpnct48JQZShnE8mTnrHGdRseUa8=;\n\tb=e8BAAnYAKCzXW/SqHNmJMfxwipQIxyy5ziqvHqgLG8Jkt2QqZ/xG9FH6nJ1rPq2yXd\n\t2Oypgq+sMtoZRsBkzGGyExNC9tvru82aW+RkgdnQXgCrfYfuTY+QQwExsaePReopQRaR\n\t+XNSFdRqtwppJAdvqvLYctUMGlDyTeQ6r3gAY=","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:content-transfer-encoding;\n\tbh=sVQMYhKV+qm4T8qZpnct48JQZShnE8mTnrHGdRseUa8=;\n\tb=r0CMWV87F6vQ2FaZOHJLcQ65j2nx7hXRGT4tjE1kfl4DytCGnYK7nJVk3qdzPNxOAN\n\tbkSYxBxnxdu+5jnuqHojE2ilPr/vdhH9e1vKE0hFmYhZ181b0viJaOyOwWq6NM8Y9NCh\n\t1lSkGn98b+SkCqq0KM4M7PQW9qmKYn9W3GQvY3nSxojhvMCxx7kdJA8b33UhzXMftjmq\n\tMdBU7Rk/0g5QMsYhxCzksZag26d1/4Kbp/2zqz7yrQR4vd4SjfHrOhQXf9puzynWlVPD\n\tKZcvW889A09DhNibn+ttjq9OysYKJg9hFV7FQ+UOQlDPV5ctDeTj8toa0czymVC26tnI\n\t90vQ==","X-Gm-Message-State":"AOAM530niDmlLXbRvxtYwDepnjc/TW7RhtYAGsscRYIDigwIR/+ZI2XK\n\t2qaq+vzm+4XM9yIbyw4yVR3AOzGRJ++nnQ==","X-Google-Smtp-Source":"ABdhPJxOZuqWUjECLaIvQTjJYITBczCjmMUdPS7A4D4twQcZYv9P3jAZ1Y0mXWTxj2q4KkGn6gjanw==","X-Received":["by 2002:a50:fe0a:: with SMTP id\n\tf10mr6497336edt.133.1601123072842; \n\tSat, 26 Sep 2020 05:24:32 -0700 (PDT)","by 2002:a1c:2d85:: with SMTP id\n\tt127mr2416453wmt.22.1601123071351; \n\tSat, 26 Sep 2020 05:24:31 -0700 (PDT)"],"MIME-Version":"1.0","References":"<20200925150743.1822226-1-niklas.soderlund@ragnatech.se>","In-Reply-To":"<20200925150743.1822226-1-niklas.soderlund@ragnatech.se>","From":"Tomasz Figa <tfiga@chromium.org>","Date":"Sat, 26 Sep 2020 14:24:20 +0200","X-Gmail-Original-Message-ID":"<CAAFQd5A=xd6rAs7hf2mJ3k-1NizooXx_CguhHTui4Pb=rZ3oCg@mail.gmail.com>","Message-ID":"<CAAFQd5A=xd6rAs7hf2mJ3k-1NizooXx_CguhHTui4Pb=rZ3oCg@mail.gmail.com>","To":"=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Subject":"Re: [libcamera-devel] [PATCH v5 0/7] libcamera: Allow for\n\tuser-friendly names in applications","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>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":12790,"web_url":"https://patchwork.libcamera.org/comment/12790/","msgid":"<20200926134730.GB2219@oden.dyn.berto.se>","date":"2020-09-26T13:47:30","subject":"Re: [libcamera-devel] [PATCH v5 0/7] libcamera: Allow for\n\tuser-friendly names in applications","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Tomasz,\n\nThanks for your feedback.\n\nOn 2020-09-26 14:24:20 +0200, Tomasz Figa wrote:\n> Hi Niklas,\n> \n> On Fri, Sep 25, 2020 at 5:08 PM Niklas Söderlund\n> <niklas.soderlund@ragnatech.se> wrote:\n> >\n> > Hello,\n> >\n> > This series trues to advance the topic of user-friendly names in\n> > applications.\n> >\n> > Patch 1/7 adds a new camera property 'Model' that may be used to record\n> > a cameras model. Patch 2/7, 3/7, 4/7 and 5/7 then implements this new\n> > property for all pipeline handlers.\n> >\n> > Patch 6/7 introduce user-friendly names to the cam utility.\n> >\n> > The final patch 7/7 records the model information in the DNG files\n> > created by qcam. More work is needed on top of this series to create\n> > user-friendly names for qcam. My intention is to do this in a follow up\n> > series once this is merged as I fear some bikeshedding on the style of\n> > the user-friendly name so lets battle that out in cam first :-)\n> >\n> > Example of listing cameras with and without this series,\n> >\n> > Without:\n> >     $ cam -l\n> >     Available cameras:\n> >     1: \\_SB_.PCI0.RP05.PXSX-2.4:1.0-046d:0843\n> >     2: platform/vimc.0 Sensor B\n> >\n> >     $ cam -l\n> >     Available cameras:\n> >     1: /base/i2c@ff160000/camera@36\n> >     2: /base/i2c@ff160000/camera@3c\n> >\n> >     $ cam -l\n> >     Available cameras:\n> >     1: /base/soc/i2c0mux/i2c@1/imx219@10\n> >\n> >     $ cam -l\n> >     Available cameras:\n> >     1: \\_SB_.PCI0.I2C2.CAM0\n> >     2: \\_SB_.PCI0.I2C4.CAM1\n> >\n> >\n> > With:\n> >     $ cam -l\n> >     Available cameras:\n> >     1: External camera Logitech Webcam C930e (\\_SB_.PCI0.RP05.PXSX-2.4:1.0-046d:0843)\n> >     2: Internal front camera Sensor B (platform/vimc.0 Sensor B)\n> >\n> >     $ cam -l\n> >     Available cameras:\n> >     1: Internal front camera ov5695 (/base/i2c@ff160000/camera@36)\n> >     2: Internal front camera ov2685 (/base/i2c@ff160000/camera@3c)\n> \n> First of all, thanks for working on this. The new names are indeed\n> much more friendly. I still wonder, though, if for the user the exact\n> sensor model of an internal camera has any meaning. Perhaps something\n> like \"Internal 5 megapixel front camera\" and \"Internal 2 megapixel\n> front camera\" would be even friendlier? What do you think?\n\nI agree with you that user-friendly names can be enhanced even further \nto make them more useful for humans. On the devices I have access to the \nlocation property is not set in firmware (yet), and I expect this to be \nthe case for most firmware as the property is a rather new. Until we \nhave that sorted and common place in most firmware I think the sensor \nmodel adds value. But as you point out going forward a true location \nbrings much more value.\n\nDo you think keeping the sensor model in the name for now is a good idea \nor should we drop it and try to add pressure to get the location \nreporting correct?\n\n> \n> Best regards,\n> Tomasz\n> \n> >\n> >     $ cam -l\n> >     Available cameras:\n> >     1: Internal front camera imx219 (/base/soc/i2c0mux/i2c@1/imx219@10)\n> >\n> >     $ cam -l\n> >     Available cameras:\n> >     1: Internal front camera ov13858 (\\_SB_.PCI0.I2C2.CAM0)\n> >     2: Internal front camera ov5670 (\\_SB_.PCI0.I2C4.CAM1)\n> >\n> > It can be observed above that all Cameras that report the Location\n> > property do so by stating they face the front. We know this is not true\n> > for some devices. This is however not a fault of this series as it only\n> > prints what is reported by the Camera. Once we teach the Camera to\n> > report true values for these properties cam will print the correct\n> > information.\n> >\n> > Niklas Söderlund (7):\n> >   libcamera: properties: Add model property\n> >   libcamera: utils: Add method to remove non-ASCII characters\n> >   libcamera: camera_sensor: Set sensor model property\n> >   libcamera: pipeline: uvcvideo: Initialize CameraData from MediaDevice\n> >   libcamera: pipeline: uvcvideo: Set sensor model property\n> >   cam: Print user-friendly camera names\n> >   qcam: dng_writer: Record camera model\n> >\n> >  include/libcamera/internal/utils.h           |  2 ++\n> >  src/cam/main.cpp                             | 31 +++++++++++++++++++-\n> >  src/libcamera/camera_sensor.cpp              |  2 ++\n> >  src/libcamera/pipeline/uvcvideo/uvcvideo.cpp | 31 ++++++++++----------\n> >  src/libcamera/property_ids.yaml              | 20 +++++++++++++\n> >  src/libcamera/utils.cpp                      | 17 +++++++++++\n> >  src/qcam/dng_writer.cpp                      | 13 ++++++--\n> >  7 files changed, 97 insertions(+), 19 deletions(-)\n> >\n> > --\n> > 2.28.0\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 E4953C3B5C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 26 Sep 2020 13:47:33 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 676E16303C;\n\tSat, 26 Sep 2020 15:47:33 +0200 (CEST)","from mail-lf1-x141.google.com (mail-lf1-x141.google.com\n\t[IPv6:2a00:1450:4864:20::141])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 60F2160364\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 26 Sep 2020 15:47:32 +0200 (CEST)","by mail-lf1-x141.google.com with SMTP id b12so5947292lfp.9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 26 Sep 2020 06:47:32 -0700 (PDT)","from localhost (h-209-203.A463.priv.bahnhof.se. [155.4.209.203])\n\tby smtp.gmail.com with ESMTPSA id\n\tz6sm1683916lfq.297.2020.09.26.06.47.30\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tSat, 26 Sep 2020 06:47:30 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=ragnatech-se.20150623.gappssmtp.com\n\theader.i=@ragnatech-se.20150623.gappssmtp.com\n\theader.b=\"oNViFWXm\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to;\n\tbh=4J2FbvmUn6CCs8ECZYrlZ7gLdIj9XwLqzLh0mTfRu/I=;\n\tb=oNViFWXmL+DJp/VahPx6cYsKPN1rOZpB7gXZ5jN9OborwBvwS5Ek1rI+pvLIoIK0qp\n\tzIbw8EH1ndYOWtvXbq15aP9atKI7Zh8MfrwpgSEzgrEk2ZiRXA9D1qKW2YYMHdf2VfFP\n\tyd14TJZXM3vxfQX2iWMSbmI1OhnJ0/9CoVv6lSHTwnMMUlp31qYDqHd4j0qbykoQQEKg\n\t5uKpTPVxAZUpUCXhCmdjvw8K/sOUvBdEwPXcJQ54d8RY+eN8226sG6xqkMNJVXxi72Oy\n\tsKaHO4hChFDVXSvaJoAlbiE1hLRDZX/7vlT06Rwf+g07JkLU4VsFxr4y3mBMWxmfGzYf\n\tM30A==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to;\n\tbh=4J2FbvmUn6CCs8ECZYrlZ7gLdIj9XwLqzLh0mTfRu/I=;\n\tb=lAl2RffwtYrVhRHHjjbVQhX9HtogWUHSTc/bswTbkbMvr6S03MlCMTsJsC/Ra4sYAI\n\tn7Sl/SYLSZCOBh4ShDDbqboCIjUAi/ttWF19ciroYo/jknKKsounCd+t2LLH9nbC4wqL\n\t5XZbS6VXvE7PcA8Oy6eTIaqnI2Uhnm8zI04xqsS471Bpz7t3BTzewafARcCXlHYQ3KAV\n\tcC2drApURg7+D7CHFAF2J7GyIZ8E02KyO/dB/XDb3lflUUbsqoj+bXFv5zaURDPuWror\n\tdZKliwpREMfEXYg1rQz+kJAxUpavW803rPYGY5hFGXUNI/fsi3IbNVKTbrbXVv0qJxll\n\t7K/Q==","X-Gm-Message-State":"AOAM530/RRr1LLEidLV3ILMhD7HxsHC41LC7eox3IusTB0aM2PT6DYrN\n\tjjJz5XYod4Wmv/A4S/91I4qyDg==","X-Google-Smtp-Source":"ABdhPJzRTBw2xkB86ElL3qDoTRZ/JCkGWRDhun6+Xw3HVm17CIWNWzC1aigmQuLuz+AVRtXCvTP4fg==","X-Received":"by 2002:a05:6512:534:: with SMTP id\n\to20mr1092452lfc.397.1601128051381; \n\tSat, 26 Sep 2020 06:47:31 -0700 (PDT)","Date":"Sat, 26 Sep 2020 15:47:30 +0200","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Tomasz Figa <tfiga@chromium.org>","Message-ID":"<20200926134730.GB2219@oden.dyn.berto.se>","References":"<20200925150743.1822226-1-niklas.soderlund@ragnatech.se>\n\t<CAAFQd5A=xd6rAs7hf2mJ3k-1NizooXx_CguhHTui4Pb=rZ3oCg@mail.gmail.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<CAAFQd5A=xd6rAs7hf2mJ3k-1NizooXx_CguhHTui4Pb=rZ3oCg@mail.gmail.com>","Subject":"Re: [libcamera-devel] [PATCH v5 0/7] libcamera: Allow for\n\tuser-friendly names in applications","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>","Content-Type":"text/plain; charset=\"iso-8859-1\"","Content-Transfer-Encoding":"quoted-printable","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":12791,"web_url":"https://patchwork.libcamera.org/comment/12791/","msgid":"<CAAFQd5Bn3c9-0A_dvH+Citf-z9BMV3WPDPOzHtfBBZwFAQtJpw@mail.gmail.com>","date":"2020-09-26T13:53:26","subject":"Re: [libcamera-devel] [PATCH v5 0/7] libcamera: Allow for\n\tuser-friendly names in applications","submitter":{"id":9,"url":"https://patchwork.libcamera.org/api/people/9/","name":"Tomasz Figa","email":"tfiga@chromium.org"},"content":"On Sat, Sep 26, 2020 at 3:47 PM Niklas Söderlund\n<niklas.soderlund@ragnatech.se> wrote:\n>\n> Hi Tomasz,\n>\n> Thanks for your feedback.\n>\n> On 2020-09-26 14:24:20 +0200, Tomasz Figa wrote:\n> > Hi Niklas,\n> >\n> > On Fri, Sep 25, 2020 at 5:08 PM Niklas Söderlund\n> > <niklas.soderlund@ragnatech.se> wrote:\n> > >\n> > > Hello,\n> > >\n> > > This series trues to advance the topic of user-friendly names in\n> > > applications.\n> > >\n> > > Patch 1/7 adds a new camera property 'Model' that may be used to record\n> > > a cameras model. Patch 2/7, 3/7, 4/7 and 5/7 then implements this new\n> > > property for all pipeline handlers.\n> > >\n> > > Patch 6/7 introduce user-friendly names to the cam utility.\n> > >\n> > > The final patch 7/7 records the model information in the DNG files\n> > > created by qcam. More work is needed on top of this series to create\n> > > user-friendly names for qcam. My intention is to do this in a follow up\n> > > series once this is merged as I fear some bikeshedding on the style of\n> > > the user-friendly name so lets battle that out in cam first :-)\n> > >\n> > > Example of listing cameras with and without this series,\n> > >\n> > > Without:\n> > >     $ cam -l\n> > >     Available cameras:\n> > >     1: \\_SB_.PCI0.RP05.PXSX-2.4:1.0-046d:0843\n> > >     2: platform/vimc.0 Sensor B\n> > >\n> > >     $ cam -l\n> > >     Available cameras:\n> > >     1: /base/i2c@ff160000/camera@36\n> > >     2: /base/i2c@ff160000/camera@3c\n> > >\n> > >     $ cam -l\n> > >     Available cameras:\n> > >     1: /base/soc/i2c0mux/i2c@1/imx219@10\n> > >\n> > >     $ cam -l\n> > >     Available cameras:\n> > >     1: \\_SB_.PCI0.I2C2.CAM0\n> > >     2: \\_SB_.PCI0.I2C4.CAM1\n> > >\n> > >\n> > > With:\n> > >     $ cam -l\n> > >     Available cameras:\n> > >     1: External camera Logitech Webcam C930e (\\_SB_.PCI0.RP05.PXSX-2.4:1.0-046d:0843)\n> > >     2: Internal front camera Sensor B (platform/vimc.0 Sensor B)\n> > >\n> > >     $ cam -l\n> > >     Available cameras:\n> > >     1: Internal front camera ov5695 (/base/i2c@ff160000/camera@36)\n> > >     2: Internal front camera ov2685 (/base/i2c@ff160000/camera@3c)\n> >\n> > First of all, thanks for working on this. The new names are indeed\n> > much more friendly. I still wonder, though, if for the user the exact\n> > sensor model of an internal camera has any meaning. Perhaps something\n> > like \"Internal 5 megapixel front camera\" and \"Internal 2 megapixel\n> > front camera\" would be even friendlier? What do you think?\n>\n> I agree with you that user-friendly names can be enhanced even further\n> to make them more useful for humans. On the devices I have access to the\n> location property is not set in firmware (yet), and I expect this to be\n> the case for most firmware as the property is a rather new. Until we\n> have that sorted and common place in most firmware I think the sensor\n> model adds value. But as you point out going forward a true location\n> brings much more value.\n>\n> Do you think keeping the sensor model in the name for now is a good idea\n> or should we drop it and try to add pressure to get the location\n> reporting correct?\n>\n\nHow about the sensor resolutions, as in the examples I listed? I think\nit's really hard to tell which camera is which for the user by looking\nat the sensor model, but in most of the cases, the resolutions are\nvery well specified and understood.\n\nOf course the location is critical too, but it doesn't solve the\nproblem fully either - we may have multiple sensors at the same\nlocation. Actually, one could imagine something like \"Internal front\nwide-angle camera\" and \"Internal front telephoto camera\". Maybe these\nuser-friendly names should be configurable somehow?\n\n> >\n> > Best regards,\n> > Tomasz\n> >\n> > >\n> > >     $ cam -l\n> > >     Available cameras:\n> > >     1: Internal front camera imx219 (/base/soc/i2c0mux/i2c@1/imx219@10)\n> > >\n> > >     $ cam -l\n> > >     Available cameras:\n> > >     1: Internal front camera ov13858 (\\_SB_.PCI0.I2C2.CAM0)\n> > >     2: Internal front camera ov5670 (\\_SB_.PCI0.I2C4.CAM1)\n> > >\n> > > It can be observed above that all Cameras that report the Location\n> > > property do so by stating they face the front. We know this is not true\n> > > for some devices. This is however not a fault of this series as it only\n> > > prints what is reported by the Camera. Once we teach the Camera to\n> > > report true values for these properties cam will print the correct\n> > > information.\n> > >\n> > > Niklas Söderlund (7):\n> > >   libcamera: properties: Add model property\n> > >   libcamera: utils: Add method to remove non-ASCII characters\n> > >   libcamera: camera_sensor: Set sensor model property\n> > >   libcamera: pipeline: uvcvideo: Initialize CameraData from MediaDevice\n> > >   libcamera: pipeline: uvcvideo: Set sensor model property\n> > >   cam: Print user-friendly camera names\n> > >   qcam: dng_writer: Record camera model\n> > >\n> > >  include/libcamera/internal/utils.h           |  2 ++\n> > >  src/cam/main.cpp                             | 31 +++++++++++++++++++-\n> > >  src/libcamera/camera_sensor.cpp              |  2 ++\n> > >  src/libcamera/pipeline/uvcvideo/uvcvideo.cpp | 31 ++++++++++----------\n> > >  src/libcamera/property_ids.yaml              | 20 +++++++++++++\n> > >  src/libcamera/utils.cpp                      | 17 +++++++++++\n> > >  src/qcam/dng_writer.cpp                      | 13 ++++++--\n> > >  7 files changed, 97 insertions(+), 19 deletions(-)\n> > >\n> > > --\n> > > 2.28.0\n> > >\n> > > _______________________________________________\n> > > libcamera-devel mailing list\n> > > libcamera-devel@lists.libcamera.org\n> > > https://lists.libcamera.org/listinfo/libcamera-devel\n>\n> --\n> Regards,\n> Niklas Söderlund","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 C1AF8C3B5B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 26 Sep 2020 13:53:41 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 38D3C6303C;\n\tSat, 26 Sep 2020 15:53:41 +0200 (CEST)","from mail-ej1-x644.google.com (mail-ej1-x644.google.com\n\t[IPv6:2a00:1450:4864:20::644])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id F2B4360364\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 26 Sep 2020 15:53:39 +0200 (CEST)","by mail-ej1-x644.google.com with SMTP id u21so2425416eja.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 26 Sep 2020 06:53:39 -0700 (PDT)","from mail-wm1-f51.google.com (mail-wm1-f51.google.com.\n\t[209.85.128.51]) by smtp.gmail.com with ESMTPSA id\n\tx12sm4293715edq.77.2020.09.26.06.53.38\n\tfor <libcamera-devel@lists.libcamera.org>\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tSat, 26 Sep 2020 06:53:38 -0700 (PDT)","by mail-wm1-f51.google.com with SMTP id b79so2184919wmb.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 26 Sep 2020 06:53:38 -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=\"FM3kU0Nj\"; 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:content-transfer-encoding;\n\tbh=inu0h90SWgRPhJusC0i/46PAoGWQHpEIKIufN8A6YT0=;\n\tb=FM3kU0NjQZoooyOrnPnA7qdkcRrJzhoFBJyzf4fxDPskjCeS9S3degWvHNUaTREWVH\n\tzbNN68w5UvFcUbFyMrEzOOU/cca+YATjZQ0/3D3k16FpOq/1vDUNvW46e9iimshP13x/\n\tCoHjOIC4lKFGbJJceqpibhn8SXF93gbtOSBgg=","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:content-transfer-encoding;\n\tbh=inu0h90SWgRPhJusC0i/46PAoGWQHpEIKIufN8A6YT0=;\n\tb=mIis6DJb92HQKLA+kC+KSAO0Sbog2V9ynT2K2M8y5kCZd0+1fq8UzXw7WcBkCzdV5l\n\tNUfPXesdf6zLInc5D5x7eXHS+C5Jck4BxHeQG0y22+BySgOJd1B/+uNSiEhTbvHQ0py/\n\tBgba/zuXvbYYVe6IMBk1h+2JaxUO5cV77ItBc7pToE/C7Rd2Ofq60M02DpmVvQnz/lBI\n\tUXGraiyZFliw0wQrSNJHVpLBTeOjTO0nu9oPfN04TrkY4dieetKd31CW8Y90Uxjg7X5L\n\tmYyPUNbei1Zwqt0FpOlQn1fyPWXuk99U/WGYz8vmoxlWMK+qdmwkQRCE+SJSJ39qx83v\n\tmSpQ==","X-Gm-Message-State":"AOAM532SPwdM3C4gcKqWqwG4fd1z1BtIWY1pbr9m08YIkz87UXPIFWTP\n\toLP1hucWoWwxODSsMDTAUa5PzLAftx2wNA==","X-Google-Smtp-Source":"ABdhPJxI02vgQthQgiGOXWNOr6qyrHKctkgv57ru2aeU2rTgexde+Ohlc+VHVo2yz9MNWs8zPJNHJg==","X-Received":["by 2002:a17:906:82d1:: with SMTP id\n\ta17mr7468056ejy.385.1601128419197; \n\tSat, 26 Sep 2020 06:53:39 -0700 (PDT)","by 2002:a7b:c925:: with SMTP id h5mr2678333wml.28.1601128417971; \n\tSat, 26 Sep 2020 06:53:37 -0700 (PDT)"],"MIME-Version":"1.0","References":"<20200925150743.1822226-1-niklas.soderlund@ragnatech.se>\n\t<CAAFQd5A=xd6rAs7hf2mJ3k-1NizooXx_CguhHTui4Pb=rZ3oCg@mail.gmail.com>\n\t<20200926134730.GB2219@oden.dyn.berto.se>","In-Reply-To":"<20200926134730.GB2219@oden.dyn.berto.se>","From":"Tomasz Figa <tfiga@chromium.org>","Date":"Sat, 26 Sep 2020 15:53:26 +0200","X-Gmail-Original-Message-ID":"<CAAFQd5Bn3c9-0A_dvH+Citf-z9BMV3WPDPOzHtfBBZwFAQtJpw@mail.gmail.com>","Message-ID":"<CAAFQd5Bn3c9-0A_dvH+Citf-z9BMV3WPDPOzHtfBBZwFAQtJpw@mail.gmail.com>","To":"=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Subject":"Re: [libcamera-devel] [PATCH v5 0/7] libcamera: Allow for\n\tuser-friendly names in applications","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>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":12816,"web_url":"https://patchwork.libcamera.org/comment/12816/","msgid":"<20200928171953.GI23539@pendragon.ideasonboard.com>","date":"2020-09-28T17:19:53","subject":"Re: [libcamera-devel] [PATCH v5 0/7] libcamera: Allow for\n\tuser-friendly names in applications","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Tomasz,\n\nOn Sat, Sep 26, 2020 at 03:53:26PM +0200, Tomasz Figa wrote:\n> On Sat, Sep 26, 2020 at 3:47 PM Niklas Söderlund wrote:\n> > On 2020-09-26 14:24:20 +0200, Tomasz Figa wrote:\n> > > On Fri, Sep 25, 2020 at 5:08 PM Niklas Söderlund wrote:\n> > > >\n> > > > Hello,\n> > > >\n> > > > This series trues to advance the topic of user-friendly names in\n> > > > applications.\n> > > >\n> > > > Patch 1/7 adds a new camera property 'Model' that may be used to record\n> > > > a cameras model. Patch 2/7, 3/7, 4/7 and 5/7 then implements this new\n> > > > property for all pipeline handlers.\n> > > >\n> > > > Patch 6/7 introduce user-friendly names to the cam utility.\n> > > >\n> > > > The final patch 7/7 records the model information in the DNG files\n> > > > created by qcam. More work is needed on top of this series to create\n> > > > user-friendly names for qcam. My intention is to do this in a follow up\n> > > > series once this is merged as I fear some bikeshedding on the style of\n> > > > the user-friendly name so lets battle that out in cam first :-)\n> > > >\n> > > > Example of listing cameras with and without this series,\n> > > >\n> > > > Without:\n> > > >     $ cam -l\n> > > >     Available cameras:\n> > > >     1: \\_SB_.PCI0.RP05.PXSX-2.4:1.0-046d:0843\n> > > >     2: platform/vimc.0 Sensor B\n> > > >\n> > > >     $ cam -l\n> > > >     Available cameras:\n> > > >     1: /base/i2c@ff160000/camera@36\n> > > >     2: /base/i2c@ff160000/camera@3c\n> > > >\n> > > >     $ cam -l\n> > > >     Available cameras:\n> > > >     1: /base/soc/i2c0mux/i2c@1/imx219@10\n> > > >\n> > > >     $ cam -l\n> > > >     Available cameras:\n> > > >     1: \\_SB_.PCI0.I2C2.CAM0\n> > > >     2: \\_SB_.PCI0.I2C4.CAM1\n> > > >\n> > > >\n> > > > With:\n> > > >     $ cam -l\n> > > >     Available cameras:\n> > > >     1: External camera Logitech Webcam C930e (\\_SB_.PCI0.RP05.PXSX-2.4:1.0-046d:0843)\n> > > >     2: Internal front camera Sensor B (platform/vimc.0 Sensor B)\n> > > >\n> > > >     $ cam -l\n> > > >     Available cameras:\n> > > >     1: Internal front camera ov5695 (/base/i2c@ff160000/camera@36)\n> > > >     2: Internal front camera ov2685 (/base/i2c@ff160000/camera@3c)\n> > >\n> > > First of all, thanks for working on this. The new names are indeed\n> > > much more friendly. I still wonder, though, if for the user the exact\n> > > sensor model of an internal camera has any meaning. Perhaps something\n> > > like \"Internal 5 megapixel front camera\" and \"Internal 2 megapixel\n> > > front camera\" would be even friendlier? What do you think?\n> >\n> > I agree with you that user-friendly names can be enhanced even further\n> > to make them more useful for humans. On the devices I have access to the\n> > location property is not set in firmware (yet), and I expect this to be\n> > the case for most firmware as the property is a rather new. Until we\n> > have that sorted and common place in most firmware I think the sensor\n> > model adds value. But as you point out going forward a true location\n> > brings much more value.\n> >\n> > Do you think keeping the sensor model in the name for now is a good idea\n> > or should we drop it and try to add pressure to get the location\n> > reporting correct?\n> \n> How about the sensor resolutions, as in the examples I listed? I think\n> it's really hard to tell which camera is which for the user by looking\n> at the sensor model, but in most of the cases, the resolutions are\n> very well specified and understood.\n> \n> Of course the location is critical too, but it doesn't solve the\n> problem fully either - we may have multiple sensors at the same\n> location. Actually, one could imagine something like \"Internal front\n> wide-angle camera\" and \"Internal front telephoto camera\". Maybe these\n> user-friendly names should be configurable somehow?\n\nThe design idea here (and it should really be documented somewhere, like\nin the Camera class documentation) is that libcamera should provide\nenough information to applications to construct meaningful names for\nend-users, with the option to localize them. This patch series\ndemonstrates how this can be done in cam and qcam. The exact scheme to\nconstruct camera names is left to applications (or frameworks), as\ndifferent applications have different types of end-users.\n\nThe examples you gave above, with wide-angle and telephoto are very\ngood, and that's what I would expect the camera service in a phone or\ntablet to create. libcamera needs to provide the location of the camera\nand its resolution (we do so already, although it's not plumbed to the\nfirmware on all devices we support). Lens information is also needed,\nand that's currently missing. We will add it, but I don't think it\nshould be a blocker for this series :-)\n\nNow the real question is what cam should output. cam is both a sample\napplication (it's thus important to showcase how to create a camera\nname), but also a developer-oriented swiss army knife tool for\nlibcamera. Its expected audience is thus developers, and the sensor\nnames can thus be more relevant than for end-users of a phone. Maybe we\ncould go for something like \"Internal front 5MP camera (ov5693)\", to\nboth showcase how to create a camera name from different components, but\nalso keep the sensor name given the tool's audience ?\n\n> > > >\n> > > >     $ cam -l\n> > > >     Available cameras:\n> > > >     1: Internal front camera imx219 (/base/soc/i2c0mux/i2c@1/imx219@10)\n> > > >\n> > > >     $ cam -l\n> > > >     Available cameras:\n> > > >     1: Internal front camera ov13858 (\\_SB_.PCI0.I2C2.CAM0)\n> > > >     2: Internal front camera ov5670 (\\_SB_.PCI0.I2C4.CAM1)\n> > > >\n> > > > It can be observed above that all Cameras that report the Location\n> > > > property do so by stating they face the front. We know this is not true\n> > > > for some devices. This is however not a fault of this series as it only\n> > > > prints what is reported by the Camera. Once we teach the Camera to\n> > > > report true values for these properties cam will print the correct\n> > > > information.\n> > > >\n> > > > Niklas Söderlund (7):\n> > > >   libcamera: properties: Add model property\n> > > >   libcamera: utils: Add method to remove non-ASCII characters\n> > > >   libcamera: camera_sensor: Set sensor model property\n> > > >   libcamera: pipeline: uvcvideo: Initialize CameraData from MediaDevice\n> > > >   libcamera: pipeline: uvcvideo: Set sensor model property\n> > > >   cam: Print user-friendly camera names\n> > > >   qcam: dng_writer: Record camera model\n> > > >\n> > > >  include/libcamera/internal/utils.h           |  2 ++\n> > > >  src/cam/main.cpp                             | 31 +++++++++++++++++++-\n> > > >  src/libcamera/camera_sensor.cpp              |  2 ++\n> > > >  src/libcamera/pipeline/uvcvideo/uvcvideo.cpp | 31 ++++++++++----------\n> > > >  src/libcamera/property_ids.yaml              | 20 +++++++++++++\n> > > >  src/libcamera/utils.cpp                      | 17 +++++++++++\n> > > >  src/qcam/dng_writer.cpp                      | 13 ++++++--\n> > > >  7 files changed, 97 insertions(+), 19 deletions(-)","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 D08D0C3B5C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 28 Sep 2020 17:20:30 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3573660BF7;\n\tMon, 28 Sep 2020 19:20:30 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9D3E960366\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Sep 2020 19:20:28 +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 1425454E;\n\tMon, 28 Sep 2020 19:20:28 +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=\"I44i7SiF\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1601313628;\n\tbh=yWvTr+F84SfagplFSEhkslhdYgKYxnU2/vLHWQb217A=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=I44i7SiFDIsAZlWM29bfyPt9v53PUH3vsT0XoE0DrOm+/l9iXtAKv+xzJPVKLRyCZ\n\tX1q1/ZVs54vg210SFmMot8oIcndHxDlEIDiLtoyoYMGfkHunjto6J0HAIGEGTP2foe\n\tb3oNuTcTQrHn3K/s+kJ/H05JrKyn3sDuR9HLrPSM=","Date":"Mon, 28 Sep 2020 20:19:53 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Tomasz Figa <tfiga@chromium.org>","Message-ID":"<20200928171953.GI23539@pendragon.ideasonboard.com>","References":"<20200925150743.1822226-1-niklas.soderlund@ragnatech.se>\n\t<CAAFQd5A=xd6rAs7hf2mJ3k-1NizooXx_CguhHTui4Pb=rZ3oCg@mail.gmail.com>\n\t<20200926134730.GB2219@oden.dyn.berto.se>\n\t<CAAFQd5Bn3c9-0A_dvH+Citf-z9BMV3WPDPOzHtfBBZwFAQtJpw@mail.gmail.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<CAAFQd5Bn3c9-0A_dvH+Citf-z9BMV3WPDPOzHtfBBZwFAQtJpw@mail.gmail.com>","Subject":"Re: [libcamera-devel] [PATCH v5 0/7] libcamera: Allow for\n\tuser-friendly names in applications","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>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":12818,"web_url":"https://patchwork.libcamera.org/comment/12818/","msgid":"<CAAFQd5AgsmmGfF0-154t7m-YMP-o3s6ZGxK93FhdeDKVLbf=Mg@mail.gmail.com>","date":"2020-09-28T17:36:56","subject":"Re: [libcamera-devel] [PATCH v5 0/7] libcamera: Allow for\n\tuser-friendly names in applications","submitter":{"id":9,"url":"https://patchwork.libcamera.org/api/people/9/","name":"Tomasz Figa","email":"tfiga@chromium.org"},"content":"On Mon, Sep 28, 2020 at 7:20 PM Laurent Pinchart\n<laurent.pinchart@ideasonboard.com> wrote:\n>\n> Hi Tomasz,\n>\n> On Sat, Sep 26, 2020 at 03:53:26PM +0200, Tomasz Figa wrote:\n> > On Sat, Sep 26, 2020 at 3:47 PM Niklas Söderlund wrote:\n> > > On 2020-09-26 14:24:20 +0200, Tomasz Figa wrote:\n> > > > On Fri, Sep 25, 2020 at 5:08 PM Niklas Söderlund wrote:\n> > > > >\n> > > > > Hello,\n> > > > >\n> > > > > This series trues to advance the topic of user-friendly names in\n> > > > > applications.\n> > > > >\n> > > > > Patch 1/7 adds a new camera property 'Model' that may be used to record\n> > > > > a cameras model. Patch 2/7, 3/7, 4/7 and 5/7 then implements this new\n> > > > > property for all pipeline handlers.\n> > > > >\n> > > > > Patch 6/7 introduce user-friendly names to the cam utility.\n> > > > >\n> > > > > The final patch 7/7 records the model information in the DNG files\n> > > > > created by qcam. More work is needed on top of this series to create\n> > > > > user-friendly names for qcam. My intention is to do this in a follow up\n> > > > > series once this is merged as I fear some bikeshedding on the style of\n> > > > > the user-friendly name so lets battle that out in cam first :-)\n> > > > >\n> > > > > Example of listing cameras with and without this series,\n> > > > >\n> > > > > Without:\n> > > > >     $ cam -l\n> > > > >     Available cameras:\n> > > > >     1: \\_SB_.PCI0.RP05.PXSX-2.4:1.0-046d:0843\n> > > > >     2: platform/vimc.0 Sensor B\n> > > > >\n> > > > >     $ cam -l\n> > > > >     Available cameras:\n> > > > >     1: /base/i2c@ff160000/camera@36\n> > > > >     2: /base/i2c@ff160000/camera@3c\n> > > > >\n> > > > >     $ cam -l\n> > > > >     Available cameras:\n> > > > >     1: /base/soc/i2c0mux/i2c@1/imx219@10\n> > > > >\n> > > > >     $ cam -l\n> > > > >     Available cameras:\n> > > > >     1: \\_SB_.PCI0.I2C2.CAM0\n> > > > >     2: \\_SB_.PCI0.I2C4.CAM1\n> > > > >\n> > > > >\n> > > > > With:\n> > > > >     $ cam -l\n> > > > >     Available cameras:\n> > > > >     1: External camera Logitech Webcam C930e (\\_SB_.PCI0.RP05.PXSX-2.4:1.0-046d:0843)\n> > > > >     2: Internal front camera Sensor B (platform/vimc.0 Sensor B)\n> > > > >\n> > > > >     $ cam -l\n> > > > >     Available cameras:\n> > > > >     1: Internal front camera ov5695 (/base/i2c@ff160000/camera@36)\n> > > > >     2: Internal front camera ov2685 (/base/i2c@ff160000/camera@3c)\n> > > >\n> > > > First of all, thanks for working on this. The new names are indeed\n> > > > much more friendly. I still wonder, though, if for the user the exact\n> > > > sensor model of an internal camera has any meaning. Perhaps something\n> > > > like \"Internal 5 megapixel front camera\" and \"Internal 2 megapixel\n> > > > front camera\" would be even friendlier? What do you think?\n> > >\n> > > I agree with you that user-friendly names can be enhanced even further\n> > > to make them more useful for humans. On the devices I have access to the\n> > > location property is not set in firmware (yet), and I expect this to be\n> > > the case for most firmware as the property is a rather new. Until we\n> > > have that sorted and common place in most firmware I think the sensor\n> > > model adds value. But as you point out going forward a true location\n> > > brings much more value.\n> > >\n> > > Do you think keeping the sensor model in the name for now is a good idea\n> > > or should we drop it and try to add pressure to get the location\n> > > reporting correct?\n> >\n> > How about the sensor resolutions, as in the examples I listed? I think\n> > it's really hard to tell which camera is which for the user by looking\n> > at the sensor model, but in most of the cases, the resolutions are\n> > very well specified and understood.\n> >\n> > Of course the location is critical too, but it doesn't solve the\n> > problem fully either - we may have multiple sensors at the same\n> > location. Actually, one could imagine something like \"Internal front\n> > wide-angle camera\" and \"Internal front telephoto camera\". Maybe these\n> > user-friendly names should be configurable somehow?\n>\n> The design idea here (and it should really be documented somewhere, like\n> in the Camera class documentation) is that libcamera should provide\n> enough information to applications to construct meaningful names for\n> end-users, with the option to localize them. This patch series\n> demonstrates how this can be done in cam and qcam. The exact scheme to\n> construct camera names is left to applications (or frameworks), as\n> different applications have different types of end-users.\n>\n> The examples you gave above, with wide-angle and telephoto are very\n> good, and that's what I would expect the camera service in a phone or\n> tablet to create. libcamera needs to provide the location of the camera\n> and its resolution (we do so already, although it's not plumbed to the\n> firmware on all devices we support). Lens information is also needed,\n> and that's currently missing. We will add it, but I don't think it\n> should be a blocker for this series :-)\n\nAh, okay, somehow I was convinced that it was an already formatted\nname returned by libcamera. Yes, if we could expose the information\nabout the max. resolution and lens type, we should be able to\nconstruct really helpful names from the user point of view.\n\n>\n> Now the real question is what cam should output. cam is both a sample\n> application (it's thus important to showcase how to create a camera\n> name), but also a developer-oriented swiss army knife tool for\n> libcamera. Its expected audience is thus developers, and the sensor\n> names can thus be more relevant than for end-users of a phone. Maybe we\n> could go for something like \"Internal front 5MP camera (ov5693)\", to\n> both showcase how to create a camera name from different components, but\n> also keep the sensor name given the tool's audience ?\n>\n\nSince cam is a simple application, perhaps only for testing purposes,\nI guess what Niklas already implemented could be good enough?\n\nBest regards,\nTomasz\n\n> > > > >\n> > > > >     $ cam -l\n> > > > >     Available cameras:\n> > > > >     1: Internal front camera imx219 (/base/soc/i2c0mux/i2c@1/imx219@10)\n> > > > >\n> > > > >     $ cam -l\n> > > > >     Available cameras:\n> > > > >     1: Internal front camera ov13858 (\\_SB_.PCI0.I2C2.CAM0)\n> > > > >     2: Internal front camera ov5670 (\\_SB_.PCI0.I2C4.CAM1)\n> > > > >\n> > > > > It can be observed above that all Cameras that report the Location\n> > > > > property do so by stating they face the front. We know this is not true\n> > > > > for some devices. This is however not a fault of this series as it only\n> > > > > prints what is reported by the Camera. Once we teach the Camera to\n> > > > > report true values for these properties cam will print the correct\n> > > > > information.\n> > > > >\n> > > > > Niklas Söderlund (7):\n> > > > >   libcamera: properties: Add model property\n> > > > >   libcamera: utils: Add method to remove non-ASCII characters\n> > > > >   libcamera: camera_sensor: Set sensor model property\n> > > > >   libcamera: pipeline: uvcvideo: Initialize CameraData from MediaDevice\n> > > > >   libcamera: pipeline: uvcvideo: Set sensor model property\n> > > > >   cam: Print user-friendly camera names\n> > > > >   qcam: dng_writer: Record camera model\n> > > > >\n> > > > >  include/libcamera/internal/utils.h           |  2 ++\n> > > > >  src/cam/main.cpp                             | 31 +++++++++++++++++++-\n> > > > >  src/libcamera/camera_sensor.cpp              |  2 ++\n> > > > >  src/libcamera/pipeline/uvcvideo/uvcvideo.cpp | 31 ++++++++++----------\n> > > > >  src/libcamera/property_ids.yaml              | 20 +++++++++++++\n> > > > >  src/libcamera/utils.cpp                      | 17 +++++++++++\n> > > > >  src/qcam/dng_writer.cpp                      | 13 ++++++--\n> > > > >  7 files changed, 97 insertions(+), 19 deletions(-)\n>\n> --\n> Regards,\n>\n> Laurent Pinchart","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 125FEC3B5C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 28 Sep 2020 17:37:19 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9B35160BF7;\n\tMon, 28 Sep 2020 19:37:18 +0200 (CEST)","from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com\n\t[IPv6:2a00:1450:4864:20::52b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9CEBE60366\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Sep 2020 19:37:17 +0200 (CEST)","by mail-ed1-x52b.google.com with SMTP id k14so2352158edo.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Sep 2020 10:37:17 -0700 (PDT)","from mail-wm1-f41.google.com (mail-wm1-f41.google.com.\n\t[209.85.128.41]) by smtp.gmail.com with ESMTPSA id\n\tw1sm2618365eds.18.2020.09.28.10.37.15\n\tfor <libcamera-devel@lists.libcamera.org>\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tMon, 28 Sep 2020 10:37:16 -0700 (PDT)","by mail-wm1-f41.google.com with SMTP id b79so1990513wmb.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Sep 2020 10:37:15 -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=\"F7oBw1nt\"; 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:content-transfer-encoding;\n\tbh=vZak3B+/0g06+odMG7l9c5bLlC+E4rLIPsAB4AGT1xg=;\n\tb=F7oBw1ntxBaJaBBys5J26PKtmkrZDphlr11VzXrUA8CF6yruomRIYMPFSPvuKvQo9x\n\taJwmy7sT6EJ/rKUY7cb4WKKD5u8iZoTyBPK0g3GVJPsLtV2zWM3DECClg5a3oMJIyXo2\n\tb1RMAhj976ze/QkARzMjKQrol2WSERdyAUALU=","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:content-transfer-encoding;\n\tbh=vZak3B+/0g06+odMG7l9c5bLlC+E4rLIPsAB4AGT1xg=;\n\tb=L6y72mIe8cdV29jVyPOKtm1pKflsfUXlOill4rcLht3IvBMQPyo4c1woBuRjHMRkcz\n\t/TZDjXtsdpTcZVTCsfzFVje2alqJoK554UcRqvrVNTvpK/6P7pSVl6hiPbTpOrjyAmM4\n\t+/Rg6a5RYckRbLBFnTJgXtcFJn/fDf119zqgJmawzg0Wc0d7c2YCtJQmrPLAXOOexwqG\n\t/XPtefCL70hWtJnjeV4Xp8cWIzpAwlCyLT1gD3E11ZgAgf1bbp8TSEsz36PMYp1/2buG\n\twMiI7uT8GmjwvH/OkmdcxU9IhFcklwJPbZrPD46Xh+1B+1GAUL8VlOWMGFC8RLYQ7Mo1\n\tJkWA==","X-Gm-Message-State":"AOAM533XjyOfGrSIDXzC7ib55Tqan0yvihAAXUjM91i3OVZryitYYckp\n\twKovToSEwfLPSt0IZXB2PQzn+8/zfX13tg==","X-Google-Smtp-Source":"ABdhPJy336Fma8tFXcZ4z714RaP2jkAStoXLlYX3m+HkUFvMrX3M6Ooy4d460ynHLwqsQVlTbRW7fA==","X-Received":["by 2002:aa7:d34b:: with SMTP id\n\tm11mr3103751edr.178.1601314636813; \n\tMon, 28 Sep 2020 10:37:16 -0700 (PDT)","by 2002:a7b:cd05:: with SMTP id f5mr298343wmj.116.1601314635410; \n\tMon, 28 Sep 2020 10:37:15 -0700 (PDT)"],"MIME-Version":"1.0","References":"<20200925150743.1822226-1-niklas.soderlund@ragnatech.se>\n\t<CAAFQd5A=xd6rAs7hf2mJ3k-1NizooXx_CguhHTui4Pb=rZ3oCg@mail.gmail.com>\n\t<20200926134730.GB2219@oden.dyn.berto.se>\n\t<CAAFQd5Bn3c9-0A_dvH+Citf-z9BMV3WPDPOzHtfBBZwFAQtJpw@mail.gmail.com>\n\t<20200928171953.GI23539@pendragon.ideasonboard.com>","In-Reply-To":"<20200928171953.GI23539@pendragon.ideasonboard.com>","From":"Tomasz Figa <tfiga@chromium.org>","Date":"Mon, 28 Sep 2020 19:36:56 +0200","X-Gmail-Original-Message-ID":"<CAAFQd5AgsmmGfF0-154t7m-YMP-o3s6ZGxK93FhdeDKVLbf=Mg@mail.gmail.com>","Message-ID":"<CAAFQd5AgsmmGfF0-154t7m-YMP-o3s6ZGxK93FhdeDKVLbf=Mg@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v5 0/7] libcamera: Allow for\n\tuser-friendly names in applications","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>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":12819,"web_url":"https://patchwork.libcamera.org/comment/12819/","msgid":"<20200928175707.GK23539@pendragon.ideasonboard.com>","date":"2020-09-28T17:57:07","subject":"Re: [libcamera-devel] [PATCH v5 0/7] libcamera: Allow for\n\tuser-friendly names in applications","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Mon, Sep 28, 2020 at 07:36:56PM +0200, Tomasz Figa wrote:\n> On Mon, Sep 28, 2020 at 7:20 PM Laurent Pinchart wrote:\n> > On Sat, Sep 26, 2020 at 03:53:26PM +0200, Tomasz Figa wrote:\n> > > On Sat, Sep 26, 2020 at 3:47 PM Niklas Söderlund wrote:\n> > > > On 2020-09-26 14:24:20 +0200, Tomasz Figa wrote:\n> > > > > On Fri, Sep 25, 2020 at 5:08 PM Niklas Söderlund wrote:\n> > > > > >\n> > > > > > Hello,\n> > > > > >\n> > > > > > This series trues to advance the topic of user-friendly names in\n> > > > > > applications.\n> > > > > >\n> > > > > > Patch 1/7 adds a new camera property 'Model' that may be used to record\n> > > > > > a cameras model. Patch 2/7, 3/7, 4/7 and 5/7 then implements this new\n> > > > > > property for all pipeline handlers.\n> > > > > >\n> > > > > > Patch 6/7 introduce user-friendly names to the cam utility.\n> > > > > >\n> > > > > > The final patch 7/7 records the model information in the DNG files\n> > > > > > created by qcam. More work is needed on top of this series to create\n> > > > > > user-friendly names for qcam. My intention is to do this in a follow up\n> > > > > > series once this is merged as I fear some bikeshedding on the style of\n> > > > > > the user-friendly name so lets battle that out in cam first :-)\n> > > > > >\n> > > > > > Example of listing cameras with and without this series,\n> > > > > >\n> > > > > > Without:\n> > > > > >     $ cam -l\n> > > > > >     Available cameras:\n> > > > > >     1: \\_SB_.PCI0.RP05.PXSX-2.4:1.0-046d:0843\n> > > > > >     2: platform/vimc.0 Sensor B\n> > > > > >\n> > > > > >     $ cam -l\n> > > > > >     Available cameras:\n> > > > > >     1: /base/i2c@ff160000/camera@36\n> > > > > >     2: /base/i2c@ff160000/camera@3c\n> > > > > >\n> > > > > >     $ cam -l\n> > > > > >     Available cameras:\n> > > > > >     1: /base/soc/i2c0mux/i2c@1/imx219@10\n> > > > > >\n> > > > > >     $ cam -l\n> > > > > >     Available cameras:\n> > > > > >     1: \\_SB_.PCI0.I2C2.CAM0\n> > > > > >     2: \\_SB_.PCI0.I2C4.CAM1\n> > > > > >\n> > > > > >\n> > > > > > With:\n> > > > > >     $ cam -l\n> > > > > >     Available cameras:\n> > > > > >     1: External camera Logitech Webcam C930e (\\_SB_.PCI0.RP05.PXSX-2.4:1.0-046d:0843)\n> > > > > >     2: Internal front camera Sensor B (platform/vimc.0 Sensor B)\n> > > > > >\n> > > > > >     $ cam -l\n> > > > > >     Available cameras:\n> > > > > >     1: Internal front camera ov5695 (/base/i2c@ff160000/camera@36)\n> > > > > >     2: Internal front camera ov2685 (/base/i2c@ff160000/camera@3c)\n> > > > >\n> > > > > First of all, thanks for working on this. The new names are indeed\n> > > > > much more friendly. I still wonder, though, if for the user the exact\n> > > > > sensor model of an internal camera has any meaning. Perhaps something\n> > > > > like \"Internal 5 megapixel front camera\" and \"Internal 2 megapixel\n> > > > > front camera\" would be even friendlier? What do you think?\n> > > >\n> > > > I agree with you that user-friendly names can be enhanced even further\n> > > > to make them more useful for humans. On the devices I have access to the\n> > > > location property is not set in firmware (yet), and I expect this to be\n> > > > the case for most firmware as the property is a rather new. Until we\n> > > > have that sorted and common place in most firmware I think the sensor\n> > > > model adds value. But as you point out going forward a true location\n> > > > brings much more value.\n> > > >\n> > > > Do you think keeping the sensor model in the name for now is a good idea\n> > > > or should we drop it and try to add pressure to get the location\n> > > > reporting correct?\n> > >\n> > > How about the sensor resolutions, as in the examples I listed? I think\n> > > it's really hard to tell which camera is which for the user by looking\n> > > at the sensor model, but in most of the cases, the resolutions are\n> > > very well specified and understood.\n> > >\n> > > Of course the location is critical too, but it doesn't solve the\n> > > problem fully either - we may have multiple sensors at the same\n> > > location. Actually, one could imagine something like \"Internal front\n> > > wide-angle camera\" and \"Internal front telephoto camera\". Maybe these\n> > > user-friendly names should be configurable somehow?\n> >\n> > The design idea here (and it should really be documented somewhere, like\n> > in the Camera class documentation) is that libcamera should provide\n> > enough information to applications to construct meaningful names for\n> > end-users, with the option to localize them. This patch series\n> > demonstrates how this can be done in cam and qcam. The exact scheme to\n> > construct camera names is left to applications (or frameworks), as\n> > different applications have different types of end-users.\n> >\n> > The examples you gave above, with wide-angle and telephoto are very\n> > good, and that's what I would expect the camera service in a phone or\n> > tablet to create. libcamera needs to provide the location of the camera\n> > and its resolution (we do so already, although it's not plumbed to the\n> > firmware on all devices we support). Lens information is also needed,\n> > and that's currently missing. We will add it, but I don't think it\n> > should be a blocker for this series :-)\n> \n> Ah, okay, somehow I was convinced that it was an already formatted\n> name returned by libcamera. Yes, if we could expose the information\n> about the max. resolution and lens type, we should be able to\n> construct really helpful names from the user point of view.\n\nAnother hint that we need to document this better :-)\n\n> > Now the real question is what cam should output. cam is both a sample\n> > application (it's thus important to showcase how to create a camera\n> > name), but also a developer-oriented swiss army knife tool for\n> > libcamera. Its expected audience is thus developers, and the sensor\n> > names can thus be more relevant than for end-users of a phone. Maybe we\n> > could go for something like \"Internal front 5MP camera (ov5693)\", to\n> > both showcase how to create a camera name from different components, but\n> > also keep the sensor name given the tool's audience ?\n> \n> Since cam is a simple application, perhaps only for testing purposes,\n> I guess what Niklas already implemented could be good enough?\n\nI think adding the resolution would be a good exercise to showcase\ncamera name creation, but not a blocker for this series.\n\n> > > > > >\n> > > > > >     $ cam -l\n> > > > > >     Available cameras:\n> > > > > >     1: Internal front camera imx219 (/base/soc/i2c0mux/i2c@1/imx219@10)\n> > > > > >\n> > > > > >     $ cam -l\n> > > > > >     Available cameras:\n> > > > > >     1: Internal front camera ov13858 (\\_SB_.PCI0.I2C2.CAM0)\n> > > > > >     2: Internal front camera ov5670 (\\_SB_.PCI0.I2C4.CAM1)\n> > > > > >\n> > > > > > It can be observed above that all Cameras that report the Location\n> > > > > > property do so by stating they face the front. We know this is not true\n> > > > > > for some devices. This is however not a fault of this series as it only\n> > > > > > prints what is reported by the Camera. Once we teach the Camera to\n> > > > > > report true values for these properties cam will print the correct\n> > > > > > information.\n> > > > > >\n> > > > > > Niklas Söderlund (7):\n> > > > > >   libcamera: properties: Add model property\n> > > > > >   libcamera: utils: Add method to remove non-ASCII characters\n> > > > > >   libcamera: camera_sensor: Set sensor model property\n> > > > > >   libcamera: pipeline: uvcvideo: Initialize CameraData from MediaDevice\n> > > > > >   libcamera: pipeline: uvcvideo: Set sensor model property\n> > > > > >   cam: Print user-friendly camera names\n> > > > > >   qcam: dng_writer: Record camera model\n> > > > > >\n> > > > > >  include/libcamera/internal/utils.h           |  2 ++\n> > > > > >  src/cam/main.cpp                             | 31 +++++++++++++++++++-\n> > > > > >  src/libcamera/camera_sensor.cpp              |  2 ++\n> > > > > >  src/libcamera/pipeline/uvcvideo/uvcvideo.cpp | 31 ++++++++++----------\n> > > > > >  src/libcamera/property_ids.yaml              | 20 +++++++++++++\n> > > > > >  src/libcamera/utils.cpp                      | 17 +++++++++++\n> > > > > >  src/qcam/dng_writer.cpp                      | 13 ++++++--\n> > > > > >  7 files changed, 97 insertions(+), 19 deletions(-)","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 069CBC3B5B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 28 Sep 2020 17:57:45 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 736EF60BF7;\n\tMon, 28 Sep 2020 19:57:44 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D6A9260366\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Sep 2020 19:57:42 +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 4FD7A54E;\n\tMon, 28 Sep 2020 19:57:42 +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=\"dHIPiRMb\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1601315862;\n\tbh=YbjX6/Ys8m5nObRS1g0me4Jua176/jOsFITkCHE54jI=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=dHIPiRMbgsSGGdDCXBonmme3DTNj7vLNkgtTevOoMoGxQeuSF5XI2A1pTGrVAUbFu\n\tQJ+j9mcRQgf+aIhqWDHM1QpMvhONtqyD5QnoafllSoPRgfN6E5JlPpIOIVGKKpzIAP\n\tqwnaGh+qAhLhGV9PbTg3aYBViZOeIUF9Jg9STKJ0=","Date":"Mon, 28 Sep 2020 20:57:07 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Tomasz Figa <tfiga@chromium.org>","Message-ID":"<20200928175707.GK23539@pendragon.ideasonboard.com>","References":"<20200925150743.1822226-1-niklas.soderlund@ragnatech.se>\n\t<CAAFQd5A=xd6rAs7hf2mJ3k-1NizooXx_CguhHTui4Pb=rZ3oCg@mail.gmail.com>\n\t<20200926134730.GB2219@oden.dyn.berto.se>\n\t<CAAFQd5Bn3c9-0A_dvH+Citf-z9BMV3WPDPOzHtfBBZwFAQtJpw@mail.gmail.com>\n\t<20200928171953.GI23539@pendragon.ideasonboard.com>\n\t<CAAFQd5AgsmmGfF0-154t7m-YMP-o3s6ZGxK93FhdeDKVLbf=Mg@mail.gmail.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<CAAFQd5AgsmmGfF0-154t7m-YMP-o3s6ZGxK93FhdeDKVLbf=Mg@mail.gmail.com>","Subject":"Re: [libcamera-devel] [PATCH v5 0/7] libcamera: Allow for\n\tuser-friendly names in applications","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>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]