From 00a8ce8db6d8268afddeccb964a1af4a8663d50e Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 6 Aug 2024 15:14:27 +0200 Subject: [PATCH] spa: libcamera: Increase devices_str[] buffer size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some complex camera pipelines, like the IPU6 can involve many /dev/video# nodes (32 in the IPU6 case) and the current size of 128 chars is not enough to hold all /dev/video# nodes in this cases causing SPA_KEY_DEVICE_DEVIDS to get truncated, which in turn breaks the filtering of V4L2 devices which are used by a libcamera driven camera in wireplumber. Fix this by increasing the size of devices_str[] to 256. This fixes wireplumber adding a bunch of non-function V4L2 video sources, e.g. before this "wpctl status" outputs the following video sources: Video ├─ Devices: ... ├─ Sources: │ 90. ov2740 │ * 115. ipu6 (V4L2) ... │ 135. ipu6 (V4L2) │ ├─ Filters: After this fix the output is: Video ├─ Devices: ... ├─ Sources: │ * 92. ov2740 │ ├─ Filters: Signed-off-by: Hans de Goede --- spa/plugins/libcamera/libcamera-device.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spa/plugins/libcamera/libcamera-device.cpp b/spa/plugins/libcamera/libcamera-device.cpp index 52b6a70ee..25a9e2fa9 100644 --- a/spa/plugins/libcamera/libcamera-device.cpp +++ b/spa/plugins/libcamera/libcamera-device.cpp @@ -119,7 +119,7 @@ static int emit_info(struct impl *impl, bool full) uint32_t n_items = 0; struct spa_device_info info; struct spa_param_info params[2]; - char path[256], name[256], devices_str[128]; + char path[256], name[256], devices_str[256]; struct spa_strbuf buf; info = SPA_DEVICE_INFO_INIT();