Cover Letter Detail
Show a cover letter.
GET /api/covers/18927/?format=api
{ "id": 18927, "url": "https://patchwork.libcamera.org/api/covers/18927/?format=api", "web_url": "https://patchwork.libcamera.org/cover/18927/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20230808125228.29043-1-jacopo.mondi@ideasonboard.com>", "date": "2023-08-08T12:52:19", "name": "[libcamera-devel,RFC,0/9] libcamera: Generalize device match and support USB devices", "submitter": { "id": 143, "url": "https://patchwork.libcamera.org/api/people/143/?format=api", "name": "Jacopo Mondi", "email": "jacopo.mondi@ideasonboard.com" }, "mbox": "https://patchwork.libcamera.org/cover/18927/mbox/", "series": [ { "id": 4002, "url": "https://patchwork.libcamera.org/api/series/4002/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4002", "date": "2023-08-08T12:52:19", "name": "libcamera: Generalize device match and support USB devices", "version": 1, "mbox": "https://patchwork.libcamera.org/series/4002/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/covers/18927/comments/", "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 60E2ABDB13\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 8 Aug 2023 12:52:48 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 54EEC60562;\n\tTue, 8 Aug 2023 14:52:47 +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 88EAB60562\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 8 Aug 2023 14:52:46 +0200 (CEST)", "from uno.localdomain (mob-5-90-60-22.net.vodafone.it [5.90.60.22])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6AD9B331B; \n\tTue, 8 Aug 2023 14:51:38 +0200 (CEST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1691499167;\n\tbh=/cfcffXyVaewfOa0V1shewCtneEJgfjgIWVqv6bWltk=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:Cc:From;\n\tb=106i8zZ+qqds9+WkvZjwW+ar+GAkPrKvGaOdbrxEEixrAl+obdjIS527tn/SAZ7/m\n\tqWhnv7kZYzdIp0+wZ5JVzrnYrEQotu4TV0FO2CxKisroRgnXQamU40Rg4D6wY48eua\n\tiSUotwLUY4RQsMBWSeoPwnIrbompShG/MY+5fZhG+45r24oRdE+dugNgshihUsgWs1\n\tykd30LdxAD5+xWhEUpbBz/1vhGTJepFT3FpsDCBjP+G5DVp57p4YU/w9SJHHnLZVVu\n\t9KUeEh8CAKVQMm9woKjE+xKNH2DW/C/FvXfS3/lw8u0OWP8zh2QT4/SFKC1xIjYa9N\n\tJ7TOSw0tOigPA==", "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1691499098;\n\tbh=/cfcffXyVaewfOa0V1shewCtneEJgfjgIWVqv6bWltk=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=KniEc5RF2n7ceyJ9fGv2mL1GDm8XFpFnL/I9u9CzlmZcNT0VgoPNQolsJie+RNwZZ\n\tIpj6beGUedrIOQ6rwbQmrKWhCOVLdPr23Qm4kP0bxW5PUlZcFMm+FmRyaBh2CSCaPn\n\tM9w2cuMsFk8A9I13w5l/tQ7x1C3lsZPpG1PpzUdI=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"KniEc5RF\"; dkim-atps=neutral", "To": "libcamera-devel@lists.libcamera.org, Sophie Friedrich <dev@flowerpot.me>", "Date": "Tue, 8 Aug 2023 14:52:19 +0200", "Message-Id": "<20230808125228.29043-1-jacopo.mondi@ideasonboard.com>", "X-Mailer": "git-send-email 2.40.1", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [RFC 0/9] libcamera: Generalize device match and\n\tsupport USB devices", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "<libcamera-devel.lists.libcamera.org>", "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>", "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>", "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>", "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>", "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>", "From": "Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>", "Reply-To": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>", "Cc": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Hello list,\nHello Sophie\n\nAs promised a long time ago, I would have liked to help you with your\nUSB-but-not-UVC camera devices, by providing support in core libcamera for\ngeneralizing camera device enumeration and matching.\n\nThis RFC series does that by generalizing the usage of MediaDevice and\nDeviceMatch and by extending the device enumerator (only the udev-based one for\nnow) to enumerate and create USB devices on which pipeline handlers can match\non.\n\nThe series starts by moving all existing references to \"device\" and \"device\nmatch\" in the enumerator and device_match files to use the term \"MediaDevice\"\nas this is what libcamera currently supports.\n\nIt then introduces a 'CameraDevice' base class from which 'MediaDevice' and a\nnew 'USBDevice' class inherit from.\n\nSimilarly, it introduces a 'DeviceMatch' base class from which\n'MediaDeviceMatch' and 'USBDeviceMatch' are derived.\n\nThe (udev) enumerator is augmented to support enumerating USB devices (the USB\nsubsystem will have to be changed as I'm currently using \"input\" for my\ntestings). Once USB devices are enumerated, the enumerator will keep them in a\ndedicated list of USBDevice instances.\n\nThe enumerator is then expanded to support searching a USB device by providing\na USBDeviceMatch, and the PipelineHandler base class is expanded similarly with\na dedicated method to \"acquire\" a USB device.\n\nFinally, as an experiment a \"usb-test\" pipeline handler is added, and made to\nmatch on my mouse VID/PID, so don't expect this to work out of the box on your\nsystem (unless we have the same mouse ofc :)\n\nTested by using the newly introduced usb-test pipeline along with the VIMC and\nUVC pipeline handlers. With these, 3 cameras are correctly listed on my system\n(even if one of the three is a mouse).\n\n\tAvailable cameras:\n\t1: 'Sensor B' (platform/vimc.0 Sensor B)\n\t2: Internal front camera (\\_SB_.PCI0.XHC_.RHUB.HS08-8:1.0-5986:2115)\n\t3: (046d/c52b) <-- This is my mouse!\n\nSophie, it would be nice if you could test if what I have here works as a base\nfor you.\n\nI do expect you will have to play a little with the udev-based enumerator to\nhave it enumerate on a different USB class, as I don't expect your camera to be\npart of the 'input' subsystem.\n\nFrom a design point of view, I tried to avoid RTTI everywhere I could,\nspecifically conditional code execution based on RTTI. So far only in the\npipeline handler base class it has been necessary to test based on the result of\na dynamic_cast<>, but as commented in the code, I do expect this to go away when\nUSBDevice will be fully implemented.\n\nHope this helps your developments\nThanks\n j\n\nJacopo Mondi (9):\n libcamera: Break-out DeviceMatch\n libcamera: Define and use MediaDeviceMatch\n libcamera: device_enumerator: Prepare for more device types\n libcamera: Introduce CameraDevice and USBDevice\n libcamera: device_enumerator_udev: Enumerate USB devices\n libcamera: device_match: Introduce USBDeviceMatch\n libcamera: device_enumerator: Search for USB devices\n libcamera: pipeline_handler: Add function to acquire a USB device\n [HACK] libcamera: pipeline: Add usb-test pipeline\n\n Documentation/guides/pipeline-handler.rst | 10 +-\n include/libcamera/internal/camera_device.h | 31 +++\n .../libcamera/internal/device_enumerator.h | 32 ++--\n .../internal/device_enumerator_udev.h | 1 +\n include/libcamera/internal/device_match.h | 51 +++++\n include/libcamera/internal/media_device.h | 13 +-\n include/libcamera/internal/meson.build | 3 +\n include/libcamera/internal/pipeline_handler.h | 13 +-\n include/libcamera/internal/usb_device.h | 52 +++++\n meson_options.txt | 1 +\n src/libcamera/camera_device.cpp | 22 +++\n src/libcamera/device_enumerator.cpp | 180 +++++++-----------\n src/libcamera/device_enumerator_sysfs.cpp | 4 +-\n src/libcamera/device_enumerator_udev.cpp | 40 +++-\n src/libcamera/device_match.cpp | 128 +++++++++++++\n src/libcamera/media_device.cpp | 2 +-\n src/libcamera/meson.build | 2 +\n src/libcamera/pipeline/imx8-isi/imx8-isi.cpp | 2 +-\n src/libcamera/pipeline/ipu3/ipu3.cpp | 4 +-\n src/libcamera/pipeline/rkisp1/rkisp1.cpp | 2 +-\n src/libcamera/pipeline/rpi/vc4/vc4.cpp | 4 +-\n src/libcamera/pipeline/simple/simple.cpp | 4 +-\n src/libcamera/pipeline/usb-test/meson.build | 5 +\n src/libcamera/pipeline/usb-test/usb_test.cpp | 93 +++++++++\n src/libcamera/pipeline/uvcvideo/uvcvideo.cpp | 2 +-\n src/libcamera/pipeline/vimc/vimc.cpp | 2 +-\n src/libcamera/pipeline_handler.cpp | 72 +++++--\n test/camera-sensor.cpp | 2 +-\n test/delayed_controls.cpp | 2 +-\n test/libtest/buffer_source.cpp | 2 +-\n test/media_device/media_device_test.cpp | 2 +-\n test/v4l2_subdevice/v4l2_subdevice_test.cpp | 2 +-\n test/v4l2_videodevice/v4l2_m2mdevice.cpp | 2 +-\n .../v4l2_videodevice_test.cpp | 2 +-\n 34 files changed, 610 insertions(+), 179 deletions(-)\n create mode 100644 include/libcamera/internal/camera_device.h\n create mode 100644 include/libcamera/internal/device_match.h\n create mode 100644 include/libcamera/internal/usb_device.h\n create mode 100644 src/libcamera/camera_device.cpp\n create mode 100644 src/libcamera/device_match.cpp\n create mode 100644 src/libcamera/pipeline/usb-test/meson.build\n create mode 100644 src/libcamera/pipeline/usb-test/usb_test.cpp\n\n--\n2.40.1" }