Package: release.debian.org Severity: normal X-Debbugs-Cc: v4l2loopb...@packages.debian.org Control: affects -1 + src:v4l2loopback User: release.debian....@packages.debian.org Usertags: unblock
Please unblock package v4l2loopback v4l2loopback provides a kernel-module. As of linux-6.15, the kernel has dropped the "del_timer_sync()" symbol, which was used by v4l2loopback<=0.14.x (which is what we currently have in testing). [ Reason ] I thought that trixie was going to ship with linux-6.12 (hence i did not take prior action in soft freeze). however, in the meantime it turns out that chances are, that linux-6.15 will indeed be shipped instead (and if not for Debian/13.0, i guess that some later point release will ship a newer version of the kernel). At least this is what #1106246 suggests. In the meantime, upstream has released v4l2loopback-0.15 which contains a fix for newer kernels (and little else). The overall diff betweeen (upstream) v0.14 and v0.15 is pretty small (apart from the symbol rename), so I would like to include the new upstream rather than backporting the fix. [ Impact ] `v4l2loopback` will not be usable with linux>=6.12 [ Tests ] upstream does test-builds against a variety of kernels, at the time of writing the newest kernel it was built against was 6.16.0-rc0 (on fedora). i manually built against linux-6.15 as currently found in experimental. i personally use and tested v4l2loopback-0.15 on my Debian/sid machine. [ Risks ] 'v4l2loopback' itself is a leaf package. the changes are rather simple. however, upstream did change some ioctl numbers to interact with the device. luckily they still support the original ioctls for legacy applications. the 'v4l2loopback-ctl' utility that is built from this package will only use the newer ioctls (that's why the v4l2loopback-dkms binary package has now a "Breaks" relation against older v4l2loopback-utils (providing the utilitiy). It's a "Breaks" rather than a versioned "Depends", as currently there are no hard dependencies between the packages. [ Checklist ] [x] all changes are documented in the d/changelog [x] I reviewed all changes and I approve them [x] attach debdiff against the package in testing (see below) [ Other info ] The debdiff is obviously against the package in 'unstable' rather than 'testing'. unblock v4l2loopback/0.15.0-2
diffstat for v4l2loopback-0.14.0 v4l2loopback-0.15.0 ChangeLog | 25 ++++++++++++++++++++++++ NEWS | 23 ++++++++++++++++++++++ README.md | 2 - debian/changelog | 15 ++++++++++++++ debian/control | 2 + debian/patches/dkms.conf.patch | 25 ------------------------ debian/patches/series | 1 dkms.conf | 7 ++++-- utils/v4l2loopback-ctl.c | 14 ++++++++++++- v4l2loopback.c | 31 +++++++++++++++++++++++++----- v4l2loopback.h | 42 +++++++++++++++++++++++++---------------- 11 files changed, 136 insertions(+), 51 deletions(-) diff -Nru v4l2loopback-0.14.0/ChangeLog v4l2loopback-0.15.0/ChangeLog --- v4l2loopback-0.14.0/ChangeLog 2025-02-28 10:40:50.000000000 +0100 +++ v4l2loopback-0.15.0/ChangeLog 2025-05-27 23:11:33.000000000 +0200 @@ -1,3 +1,28 @@ +v4l2loopback (0.15.0) unstable; urgency=medium + + [ IOhannes m zmölnig ] + * change public ioctl numbers! + * add V4L2LOOPBACK_CTL_VERSION ioctl + + * use fixed-size types in public API + * order ioctl's by value + * v4l2loopback-ctl: (also) query the module version via ioctl + * [meta] pre-commit config to automatically run clang-format before committing + * only use `timer_delete_sync` compat macro for linux<6.2.0 + * [github] build on ArchLinux, Fedora, openSUSE + * [github] Create a badge with all kernels tested in the CI + * [github] note on "exact" v4l2loopback version in issue template + * README Replace 'Skype' with 'Zoom' + * DKMS: dummy 'clean' rule + + [ Theodore Chiu ] + * added functionality for linux 6.15+ (#626) + + [ Andreas Beckmann ] + * dkms.conf updates + + -- IOhannes m zmölnig (Debian/GNU) <umlae...@debian.org> Tue, 27 May 2025 22:46:46 +0200 + v4l2loopback (0.14.0) unstable; urgency=medium [ IOhannes m zmölnig ] diff -Nru v4l2loopback-0.14.0/NEWS v4l2loopback-0.15.0/NEWS --- v4l2loopback-0.14.0/NEWS 2025-02-28 10:40:50.000000000 +0100 +++ v4l2loopback-0.15.0/NEWS 2025-05-27 23:11:33.000000000 +0200 @@ -1,3 +1,26 @@ +v4l2loopback (0.15.0) unstable; urgency=medium + + * Change public ioctl numbers! + + But retain compatibility + * Add V4L2LOOPBACK_CTL_VERSION ioctl + * Only use `timer_delete_sync` compat macro for linux<6.2.0 + * Added functionality for linux 6.15+ + * dkms.conf updates + + -- IOhannes m zmölnig (Debian/GNU) <umlae...@debian.org> Tue, 27 May 2025 22:46:46 +0200 + +v4l2loopback (0.14.0) unstable; urgency=medium + + * Refactor poll() + * Fix FIFO management + * V4L2 UAPI compliance in format negotation and stream activation + * Do not discard return value of vm_alloc_page + * Use atomic operations to count vm_open/close + * Simplify loop preparation cases in mmap() + * Code cleanup + + -- IOhannes m zmölnig (Debian/GNU) <umlae...@debian.org> Fri, 28 Feb 2025 09:48:06 +0100 + v4l2loopback-0.13.2 * V4L2 UAPI compliance in format negotation and stream activation diff -Nru v4l2loopback-0.14.0/README.md v4l2loopback-0.15.0/README.md --- v4l2loopback-0.14.0/README.md 2025-02-28 10:40:50.000000000 +0100 +++ v4l2loopback-0.15.0/README.md 2025-05-27 23:11:33.000000000 +0200 @@ -6,7 +6,7 @@ video devices, but the video will not be read from e.g. a capture card but instead it is generated by another application. This allows you for instance to apply some nifty video effects on your -Skype video... +Zoom video call... It also allows some more serious things (e.g. I've been using it to add streaming capabilities to an application by the means of hooking GStreamer into the loopback devices). diff -Nru v4l2loopback-0.14.0/debian/changelog v4l2loopback-0.15.0/debian/changelog --- v4l2loopback-0.14.0/debian/changelog 2025-03-14 20:54:00.000000000 +0100 +++ v4l2loopback-0.15.0/debian/changelog 2025-06-05 10:06:46.000000000 +0200 @@ -1,3 +1,18 @@ +v4l2loopback (0.15.0-2) unstable; urgency=medium + + * v4l2loopback-utils requires a newer version of v4l2loopback-dkms + (not the other way round) + + -- IOhannes m zmölnig (Debian/GNU) <umlae...@debian.org> Thu, 05 Jun 2025 10:06:46 +0200 + +v4l2loopback (0.15.0-1) unstable; urgency=medium + + * New upstream version 0.15.0 (Closes: #1106246, #1100860) + * Drop patches applied upstream + * dkms: Ensure a recent enough version of v4l2loopback-utils + + -- IOhannes m zmölnig (Debian/GNU) <umlae...@debian.org> Thu, 05 Jun 2025 09:55:40 +0200 + v4l2loopback (0.14.0-1) unstable; urgency=medium * New upstream version 0.14.0 diff -Nru v4l2loopback-0.14.0/debian/control v4l2loopback-0.15.0/debian/control --- v4l2loopback-0.14.0/debian/control 2025-03-14 20:54:00.000000000 +0100 +++ v4l2loopback-0.15.0/debian/control 2025-06-05 10:06:46.000000000 +0200 @@ -57,6 +57,8 @@ sudo, v4l-utils, v4l2loopback-dkms | v4l2loopback-modules, +Breaks: + v4l2loopback-dkms (<< 0.15~), Description: Commandline utilities for the for the v4l2-loopback module This package contains applications to interact with v4l2-loopback devices ("virtual video devices"). diff -Nru v4l2loopback-0.14.0/debian/patches/dkms.conf.patch v4l2loopback-0.15.0/debian/patches/dkms.conf.patch --- v4l2loopback-0.14.0/debian/patches/dkms.conf.patch 2025-03-14 20:54:00.000000000 +0100 +++ v4l2loopback-0.15.0/debian/patches/dkms.conf.patch 1970-01-01 01:00:00.000000000 +0100 @@ -1,25 +0,0 @@ -Author: Andreas Beckmann <a...@debian.org> -Description: dkms.conf updates -Forwarded: yes -Applied-Upstream: 2ae34dbd9f1ecb19de3e43d4b75008a078330e4b ---- v4l2loopback.orig/dkms.conf -+++ v4l2loopback/dkms.conf -@@ -1,6 +1,9 @@ - PACKAGE_NAME="v4l2loopback" - PACKAGE_VERSION="0.14.0" - -+# V4L2_COLORSPACE_DCI_P3 -+BUILD_EXCLUSIVE_KERNEL_MIN="4.4" -+ - if [ -f $kernel_source_dir/.config ]; then - . $kernel_source_dir/.config - if ! { echo "$kernelver"; echo 5.18; } | sort -V -C; then -@@ -17,7 +20,7 @@ - - # Items below here should not have to change with each driver version - MAKE[0]="make KERNEL_DIR=${kernel_source_dir} v4l2loopback" --CLEAN="make clean" -+CLEAN="make KERNEL_DIR=${kernel_source_dir} clean" - - BUILT_MODULE_NAME[0]="$PACKAGE_NAME" - DEST_MODULE_LOCATION[0]="/extra" diff -Nru v4l2loopback-0.14.0/debian/patches/series v4l2loopback-0.15.0/debian/patches/series --- v4l2loopback-0.14.0/debian/patches/series 2025-03-14 20:54:00.000000000 +0100 +++ v4l2loopback-0.15.0/debian/patches/series 2025-06-05 10:06:46.000000000 +0200 @@ -1 +0,0 @@ -dkms.conf.patch diff -Nru v4l2loopback-0.14.0/dkms.conf v4l2loopback-0.15.0/dkms.conf --- v4l2loopback-0.14.0/dkms.conf 2025-02-28 10:40:50.000000000 +0100 +++ v4l2loopback-0.15.0/dkms.conf 2025-05-27 23:11:33.000000000 +0200 @@ -1,5 +1,8 @@ PACKAGE_NAME="v4l2loopback" -PACKAGE_VERSION="0.14.0" +PACKAGE_VERSION="0.15.0" + +# V4L2_COLORSPACE_DCI_P3 +BUILD_EXCLUSIVE_KERNEL_MIN="4.4" if [ -f $kernel_source_dir/.config ]; then . $kernel_source_dir/.config @@ -17,7 +20,7 @@ # Items below here should not have to change with each driver version MAKE[0]="make KERNEL_DIR=${kernel_source_dir} v4l2loopback" -CLEAN="make clean" +CLEAN=true BUILT_MODULE_NAME[0]="$PACKAGE_NAME" DEST_MODULE_LOCATION[0]="/extra" diff -Nru v4l2loopback-0.14.0/utils/v4l2loopback-ctl.c v4l2loopback-0.15.0/utils/v4l2loopback-ctl.c --- v4l2loopback-0.14.0/utils/v4l2loopback-ctl.c 2025-02-28 10:40:50.000000000 +0100 +++ v4l2loopback-0.15.0/utils/v4l2loopback-ctl.c 2025-05-27 23:11:33.000000000 +0200 @@ -1551,7 +1551,19 @@ if (len > 0) { if (len < sizeof(buf)) buf[len] = 0; - printf("v4l2loopback module v%s", buf); + printf("v4l2loopback sysfs v%s", buf); + } + close(fd); + } + fd = open_controldevice(); + if (fd >= 0) { + __u32 version = 0; + if (ioctl(fd, V4L2LOOPBACK_CTL_VERSION, &version) == + 0) { + printf("v4l2loopback module v%d.%d.%d\n", + (version >> 16) & 0xff, + (version >> 8) & 0xff, + (version >> 0) & 0xff); } } break; diff -Nru v4l2loopback-0.14.0/v4l2loopback.c v4l2loopback-0.15.0/v4l2loopback.c --- v4l2loopback-0.14.0/v4l2loopback.c 2025-02-28 10:40:50.000000000 +0100 +++ v4l2loopback-0.15.0/v4l2loopback.c 2025-05-27 23:11:33.000000000 +0200 @@ -33,6 +33,10 @@ #include <linux/miscdevice.h> #include "v4l2loopback.h" +#define V4L2LOOPBACK_CTL_ADD_legacy 0x4C80 +#define V4L2LOOPBACK_CTL_REMOVE_legacy 0x4C81 +#define V4L2LOOPBACK_CTL_QUERY_legacy 0x4C82 + #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0) #error This module is not supported on kernels before 4.0.0. #endif @@ -49,6 +53,10 @@ #define VFL_TYPE_VIDEO VFL_TYPE_GRABBER #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 2, 0) +#define timer_delete_sync del_timer_sync +#endif + #define V4L2LOOPBACK_VERSION_CODE \ KERNEL_VERSION(V4L2LOOPBACK_VERSION_MAJOR, V4L2LOOPBACK_VERSION_MINOR, \ V4L2LOOPBACK_VERSION_BUGFIX) @@ -1788,8 +1796,8 @@ static void buffer_written(struct v4l2_loopback_device *dev, struct v4l2l_buffer *buf) { - del_timer_sync(&dev->sustain_timer); - del_timer_sync(&dev->timeout_timer); + timer_delete_sync(&dev->sustain_timer); + timer_delete_sync(&dev->timeout_timer); spin_lock_bh(&dev->list_lock); list_move_tail(&buf->list_head, &dev->outbufs_list); @@ -2366,8 +2374,8 @@ } if (atomic_dec_and_test(&dev->open_count)) { - del_timer_sync(&dev->sustain_timer); - del_timer_sync(&dev->timeout_timer); + timer_delete_sync(&dev->sustain_timer); + timer_delete_sync(&dev->timeout_timer); if (!dev->keep_format) { mutex_lock(&dev->image_mutex); free_buffers(dev); @@ -2972,6 +2980,7 @@ struct v4l2_loopback_config *confptr = &conf; int device_nr, capture_nr, output_nr; int ret; + const __u32 version = V4L2LOOPBACK_VERSION_CODE; ret = mutex_lock_killable(&v4l2loopback_ctl_mutex); if (ret) @@ -2984,6 +2993,7 @@ break; /* add a v4l2loopback device (pair), based on the user-provided specs */ case V4L2LOOPBACK_CTL_ADD: + case V4L2LOOPBACK_CTL_ADD_legacy: if (parm) { if ((ret = copy_from_user(&conf, (void *)parm, sizeof(conf))) < 0) @@ -2996,7 +3006,8 @@ break; /* remove a v4l2loopback device (both capture and output) */ case V4L2LOOPBACK_CTL_REMOVE: - ret = v4l2loopback_lookup((int)parm, &dev); + case V4L2LOOPBACK_CTL_REMOVE_legacy: + ret = v4l2loopback_lookup((__u32)parm, &dev); if (ret >= 0 && dev) { ret = -EBUSY; if (dev->open_count.counter > 0) @@ -3009,6 +3020,7 @@ * this is mostly about limits (which cannot be queried directly with VIDIOC_G_FMT and friends */ case V4L2LOOPBACK_CTL_QUERY: + case V4L2LOOPBACK_CTL_QUERY_legacy: if (!parm) break; if ((ret = copy_from_user(&conf, (void *)parm, sizeof(conf))) < @@ -3059,6 +3071,15 @@ ret = -EFAULT; break; } + ret = 0; + break; + case V4L2LOOPBACK_CTL_VERSION: + if (!parm) + break; + if (copy_to_user((void *)parm, &version, sizeof(version))) { + ret = -EFAULT; + break; + } ret = 0; break; } diff -Nru v4l2loopback-0.14.0/v4l2loopback.h v4l2loopback-0.15.0/v4l2loopback.h --- v4l2loopback-0.14.0/v4l2loopback.h 2025-02-28 10:40:50.000000000 +0100 +++ v4l2loopback-0.15.0/v4l2loopback.h 2025-05-27 23:11:33.000000000 +0200 @@ -11,7 +11,7 @@ #define _V4L2LOOPBACK_H #define V4L2LOOPBACK_VERSION_MAJOR 0 -#define V4L2LOOPBACK_VERSION_MINOR 14 +#define V4L2LOOPBACK_VERSION_MINOR 15 #define V4L2LOOPBACK_VERSION_BUGFIX 0 /* /dev/v4l2loopback interface */ @@ -32,8 +32,8 @@ * or one (and only one) of them must be -1 * */ - int output_nr; - int unused; /*capture_nr;*/ + __s32 output_nr; + __s32 unused; /*capture_nr;*/ /** * a nice name for your device @@ -45,27 +45,27 @@ * allowed frame size * if too low, default values are used */ - unsigned int min_width; - unsigned int max_width; - unsigned int min_height; - unsigned int max_height; + __u32 min_width; + __u32 max_width; + __u32 min_height; + __u32 max_height; /** * number of buffers to allocate for the queue * if set to <=0, default values are used */ - int max_buffers; + __s32 max_buffers; /** * how many consumers are allowed to open this device concurrently * if set to <=0, default values are used */ - int max_openers; + __s32 max_openers; /** * set the debugging level for this device */ - int debug; + __s32 debug; /** * whether to announce OUTPUT/CAPTURE capabilities exclusively @@ -74,9 +74,17 @@ * NOTE: this is going to be removed once separate output/capture * devices are implemented */ - int announce_all_caps; + __s32 announce_all_caps; }; +#define V4L2LOOPBACK_CTL_IOCTLMAGIC '~' + +/* a pointer to an (unsigned int) that - on success - will hold + * the version code of the v4l2loopback module + * as returned by KERNEL_VERSION(MAJOR, MINOR, BUGFIX) + */ +#define V4L2LOOPBACK_CTL_VERSION _IOR(V4L2LOOPBACK_CTL_IOCTLMAGIC, 0, __u32) + /* a pointer to a (struct v4l2_loopback_config) that has all values you wish to impose on the * to-be-created device set. * if the ptr is NULL, a new device is created with default values at the driver's discretion. @@ -84,15 +92,17 @@ * returns the device_nr of the OUTPUT device (which can be used with V4L2LOOPBACK_CTL_QUERY, * to get more information on the device) */ -#define V4L2LOOPBACK_CTL_ADD 0x4C80 +#define V4L2LOOPBACK_CTL_ADD \ + _IOW(V4L2LOOPBACK_CTL_IOCTLMAGIC, 1, struct v4l2_loopback_config) + +/* the device-number (either CAPTURE or OUTPUT) associated with the loopback-device */ +#define V4L2LOOPBACK_CTL_REMOVE _IOW(V4L2LOOPBACK_CTL_IOCTLMAGIC, 2, __u32) /* a pointer to a (struct v4l2_loopback_config) that has output_nr and/or capture_nr set * (the two values must either refer to video-devices associated with the same loopback device * or exactly one of them must be <0 */ -#define V4L2LOOPBACK_CTL_QUERY 0x4C82 - -/* the device-number (either CAPTURE or OUTPUT) associated with the loopback-device */ -#define V4L2LOOPBACK_CTL_REMOVE 0x4C81 +#define V4L2LOOPBACK_CTL_QUERY \ + _IOWR(V4L2LOOPBACK_CTL_IOCTLMAGIC, 3, struct v4l2_loopback_config) #endif /* _V4L2LOOPBACK_H */