From patchwork Wed Oct 2 21:26:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 21481 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id F3D19C3257 for ; Wed, 2 Oct 2024 21:26:41 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A7BF16352C; Wed, 2 Oct 2024 23:26:40 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="LcUXzxXM"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9C9CD63510 for ; Wed, 2 Oct 2024 23:26:37 +0200 (CEST) Received: from Monstersaurus.tail69b4.ts.net (cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id CDE70581; Wed, 2 Oct 2024 23:25:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1727904304; bh=99N6TPOOLplMFVyh16fCSCtNSxaDaXg9rdu2zd5ZBtU=; h=From:To:Cc:Subject:Date:From; b=LcUXzxXMxHndL9NRoLwe9ZLjxHTATVQx5HulXf2is2HJY0FX11+t/vL+e76pzweFA JOsplCdFDbgI24Di69879TSVJciYdCph5przCjJ1NOIxjT9JQ4ZY0eYmfQTkaDkY6L OV2YhPo5iyDZw9DHOwL5iiuwUZVJuxyqTyx7EBqI= From: Kieran Bingham To: libcamera devel Cc: Kieran Bingham Subject: [PATCH v2 0/4] MediaPipeline: Complex input device support Date: Wed, 2 Oct 2024 22:26:28 +0100 Message-Id: <20241002212632.2463458-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The input pipelines for cameras on small board platforms can be widely varied and may incorporate video multiplexers feeding multiple cameras into a single CSI2 receiver. Such devices are already supported in the Simple Pipeline handler with it's graph management code. This series proposes a new class 'MediaPipeline' which takes the implementation details of handling multiple cameras and the routing involved in selecting and configuring the links and pads of those routes. The series then ads this helper to the RKISP1 pipeline handler to facilitate multiple cameras connected to a single CSI2 receiver. One example of this could be making use of the Arducam 4 camera multiplexor [0] connected to the Debix Model A which we have used for testing this. [0] https://www.arducam.com/product/multi-camera-v2-1-adapter-raspberry-pi/ This series convers only the RkISP1 for now, but I could anticipate an additional series will also convert the Simple Pipeline handler to make use of this new helper class. The Mali-C55 and other pipeline handlers which antipate user configurable input paths would also be able to make use of this implementation. Kieran Bingham (4): libcamera: media_device: Add helper to return matching entities libcamera: pipeline: rkisp1: Fix typo in todo task libcamera: internal: Add MediaPipeline helper libcamera: pipeline: rkisp1: Convert to use MediaPipeline include/libcamera/internal/media_device.h | 2 + include/libcamera/internal/media_pipeline.h | 59 ++++ include/libcamera/internal/meson.build | 1 + src/libcamera/media_device.cpp | 25 +- src/libcamera/media_pipeline.cpp | 307 ++++++++++++++++++++ src/libcamera/meson.build | 1 + src/libcamera/pipeline/rkisp1/rkisp1.cpp | 88 +++--- 7 files changed, 427 insertions(+), 56 deletions(-) create mode 100644 include/libcamera/internal/media_pipeline.h create mode 100644 src/libcamera/media_pipeline.cpp