From patchwork Tue Oct 8 23:13:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 21546 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 AF21EC32DE for ; Tue, 8 Oct 2024 23:13:35 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CC68065373; Wed, 9 Oct 2024 01:13:34 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="YlCogCvm"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 666186351F for ; Wed, 9 Oct 2024 01:13:22 +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 4C1154D4; Wed, 9 Oct 2024 01:11:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1728429105; bh=VGjhEDEzzFVzX6P2lU8iqzJjLDiFeet8pJ/Ja09PBQE=; h=From:To:Cc:Subject:Date:From; b=YlCogCvmTDGnKBQBDIsT7+TVAz7JF9dgn/0XqsQaX5nxEjLpprW07jF+dbO9tHLUa eDTfijF4lxNyxNs3CP964Gs0mSB8gA9UjBKcLGkJsUcKAn6vwDwTRzhefyVW16Q2Gh b6TPd8MSv3SNQ3c4uJ7qVSWiaOzpGkvMm6pD7vbI= From: Kieran Bingham To: libcamera devel Cc: Kieran Bingham Subject: [PATCH v3 0/4] MediaPipeline: Complex input device support Date: Wed, 9 Oct 2024 00:13:10 +0100 Message-Id: <20241008231314.744556-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. v3 - Fixes documentation and parameter description in patch 3/4. 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 | 311 ++++++++++++++++++++ src/libcamera/meson.build | 1 + src/libcamera/pipeline/rkisp1/rkisp1.cpp | 88 +++--- 7 files changed, 431 insertions(+), 56 deletions(-) create mode 100644 include/libcamera/internal/media_pipeline.h create mode 100644 src/libcamera/media_pipeline.cpp