From patchwork Mon Sep 16 14:02:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 21280 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 66DA7C3257 for ; Mon, 16 Sep 2024 14:02:51 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DD32363500; Mon, 16 Sep 2024 16:02:49 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="PvCoG+2c"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 45E93634F5 for ; Mon, 16 Sep 2024 16:02:48 +0200 (CEST) Received: from charm.lan (unknown [IPv6:2001:4bc9:a45:b0af:726e:a88f:9f07:34be]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C90AB480; Mon, 16 Sep 2024 16:01:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1726495287; bh=1H3S9b1/4HRk3D8jIjMW2JIcbdiHPXxaYc0p+5zj51g=; h=From:To:Cc:Subject:Date:From; b=PvCoG+2cwTwLOaArONj7fxLJp3mQ2hW2KRqA4i6R35nA7vIc9LfoDAkjJXgIpRfEJ MTqmBaWpFTqdxtmJYELtzOVotn+CdfRTn7pj6uzocgNoNmRXfUuROjExRt9+Iko16h 9WsM/nINx4kkCzfD+Yf/43FPedp8NI1LJaC8w+e0= From: Kieran Bingham To: libcamera devel Cc: Kieran Bingham Subject: [PATCH 0/4] MediaPipeline: Complex input device support Date: Mon, 16 Sep 2024 16:02:37 +0200 Message-ID: <20240916140241.47845-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.46.0 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 multiplexors 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 adds 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 converts only the RkISP1 for now, but I could anticipate either an additional series, or a later iteration of this series would also convert the Simple Pipeline Handler to make use of this new helper class. 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 | 60 ++++ include/libcamera/internal/meson.build | 1 + src/libcamera/media_device.cpp | 24 +- src/libcamera/media_pipeline.cpp | 301 ++++++++++++++++++++ src/libcamera/meson.build | 1 + src/libcamera/pipeline/rkisp1/rkisp1.cpp | 67 +++-- 7 files changed, 421 insertions(+), 35 deletions(-) create mode 100644 include/libcamera/internal/media_pipeline.h create mode 100644 src/libcamera/media_pipeline.cpp