| Message ID | 20261005-v4l2-events-v2-0-e4883190489d@ideasonboard.com |
|---|---|
| Headers | show
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 [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id D713CC32F4 for <parsemail@patchwork.libcamera.org>; Mon, 5 Oct 2026 15:40:38 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 79F3B68A7A; Mon, 5 Oct 2026 17:40:38 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="c/Ruugha"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 290E2689D8 for <libcamera-devel@lists.libcamera.org>; Mon, 5 Oct 2026 17:40:36 +0200 (CEST) Received: from [127.0.1.1] (chfd-03-b2-v4wan-176392-cust229.vm15.cable.virginm.net [82.19.20.230]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 7757C5E; Mon, 5 Oct 2026 17:38:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1791214720; bh=/XACVKZcQ/st1TvlF5ONxd37TtaBMGDyjt05UDyzC/8=; h=From:Subject:Date:To:Cc:From; b=c/RuughaKYrcveNXcMxTPGDmB2qQlUEzF3/vrSbyYHAcwqp2Ao0zat0ZFKrsrEEgw yybX+7ISCevCjFXEw2JxoIT70zsOpi6v1xIEFORYYvzhFC59+6a3JOOXcmKZeXrLVc 1twhGvtwOhRj19gGdWsRhh4uuezeIZnDq87CHUWs= From: Daniel Scally <dan.scally@ideasonboard.com> Subject: [PATCH v2 0/3] Add generic V4L2 Events support Date: Mon, 05 Oct 2026 16:40:28 +0100 Message-Id: <20261005-v4l2-events-v2-0-e4883190489d@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAOzEw2oC/1XMywrCMBCF4VcpszaSjL3pyveQLnIZ7YAmkpSgl Ly7sbhx+R843wqJIlOCU7NCpMyJg6+BuwbsrP2NBLvagBJ7eVSjyO0dBWXySxIHGlo9aOrHHqE +npGu/Nq0y1R75rSE+N7wrL7rz8Huz8lKSGGQLCok0zl5Zkc6BW+Cjm5vwwOmUsoHfToNMq0AA AA= X-Change-ID: 20260918-v4l2-events-3e74a7ae6862 To: libcamera-devel@lists.libcamera.org Cc: Daniel Scally <dan.scally@ideasonboard.com> X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2616; i=dan.scally@ideasonboard.com; h=from:subject:message-id; bh=/XACVKZcQ/st1TvlF5ONxd37TtaBMGDyjt05UDyzC/8=; b=owEBbQKS/ZANAwAKAchJV3psRXUyAcsmYgBqw8TyM2YwVSTQ1f6iOpPHoAZW/SkRhjPQlf4Xd aQQh2W47D+JAjMEAAEKAB0WIQQqyuwyDnZdb+mxmm/ISVd6bEV1MgUCasPE8gAKCRDISVd6bEV1 Mt+dEACYo3ot90sL++HJ746+BYIhfURDEDv7jw2ts4hK3ONN8puqtYlEu6mEmiy2M1ykeayzJfw dsXKclzlOhHuuI387Oi/2gqWCJCiX0+FImEpGvbas97LmjbUTeyxxn1tygnfAlwG2UMeBMQSozd EplTrbQmhskcNfBlk4FPFwzFrLTCtte//QyrzhlLxlqzSY5KyROic6iQAPYrigXWxU9fDW1lstd t6RUPKSp1rRbrwjcxoZuqfbbt7PtqRGqM2bjJfTabE2iItl/FDzSn+UclgjvDv48nq9TPJGuk1T uhVNpruoiYac2gPDggbFjKjJXRXhatBnTfOHTqnhsQr8NP6aLYzzgerd0qrBkN/RgdC9JgbPBaW L01XKBcpp/XruIBNGsXHBSgrZ0y7bStKKd3mrbFIm1l2iS3lH3Sf0eWX/TFi+XvpWJf8cgJx6yB VDpCwEeV8cq3X2JmuE2PV/6SODZBMnhc5P3CnDuAW3UMrJnmdw+GHFARyP+rCOmd4OJbwurldSL J1AxRV93JXGhn1dLryRaPEajRR75+t1jWsyinyMy0mCjQsLjlcMNB3J/ZlZbjQ2wQ4Ds4w45uDx 8nnGpMYR3+sWXA2sM+XExMErYL9Us8/TPdM0FIvIU1KyJTzCLPmvElKZgxpYYn1IRro0tsaekVJ RDJdOahjcv+8mVw== X-Developer-Key: i=dan.scally@ideasonboard.com; a=openpgp; fpr=EEC699ACA1B7CB5D31330C0BBD501C2A3546CCF6 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>, <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>, <mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe> Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" <libcamera-devel-bounces@lists.libcamera.org> |
| Series |
|
| Related | show |
At present class V4L2Device allows subscriptions to V4L2 Events of type V4L2_EVENT_FRAME_SYNC through a very specific API; support is verified with "supportsFrameSyncEvents()" and subscription enabled with "setFrameStartEnabled()". The arrival of an event is signalled with a Signal<uint32_t> which passes the frame sequence number to the slot. This is adequate, but limited, and expansion to support other event types in a similar manner would be quite clunky. This series adapts the event support to be more generic with the aim of facilitating easy use of other event types. My plan was originally to just rename the functions and parametise them such that support for a given event type could be checked and enabled, however the fact that the existing frameStart Signal takes only a uint32_t as parameter means it cannot be renamed to apply to other events too, as the details of the other event types could not be conveyed through a single uint32_t. Having separate Signals for each event type seems ugly, and so this series instead uses a single Signal<const v4l2_event &> and lets the Slot deal with figuring out which type of event it is. Thanks Dan Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com> --- Changes in v2: - Drops the V4L2Event and V4L2EventSubscription classes and just uses the kernel uAPI types directly in the pipeline handlers - Link to v2: https://patchwork.libcamera.org/project/libcamera/list/?series=6209 --- Daniel Scally (3): libcamera: v4l2_device: Make supportsFrameStartEvent() generic libcamera: v4l2_device: Emit signals for V4L2Events generically libcamera: v4l2_device: Make setFrameStartEnabled() generic include/libcamera/internal/v4l2_device.h | 9 ++-- src/libcamera/pipeline/ipu3/cio2.cpp | 9 +++- src/libcamera/pipeline/ipu3/cio2.h | 4 +- src/libcamera/pipeline/ipu3/ipu3.cpp | 18 ++++--- src/libcamera/pipeline/mali-c55/mali-c55.cpp | 28 +++++++--- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 24 +++++++-- .../pipeline/rpi/common/pipeline_base.cpp | 21 +++++--- src/libcamera/pipeline/rpi/common/pipeline_base.h | 4 +- src/libcamera/pipeline/simple/simple.cpp | 34 +++++++++--- src/libcamera/v4l2_device.cpp | 61 ++++++++++------------ 10 files changed, 140 insertions(+), 72 deletions(-) --- base-commit: 279d355ef8f7a4f98bb0a3004c0f788387814506 change-id: 20260918-v4l2-events-3e74a7ae6862 Best regards,