Patch for kernel 5.15, which deprecated alloc_tty_driver and put_tty_driver:
--- package.orig/Blackmagic_Desktop_Video_Linux_12.2/other/x86_64/desktopvideo-12.2a12-x86_64/usr/src/blackmagic-12.2a12/blackmagic_serial.c 2021-11-04 17:18:37.053086911 +0100
+++ package.new/Blackmagic_Desktop_Video_Linux_12.2/other/x86_64/desktopvideo-12.2a12-x86_64/usr/src/blackmagic-12.2a12/blackmagic_serial.c 2021-11-04 17:30:49.791835250 +0100
@@ -613,7 +613,7 @@
int ret;
struct tty_driver *driver;
- driver = alloc_tty_driver(BLACKMAGIC_SERIAL_MINORS);
+ driver = tty_alloc_driver(BLACKMAGIC_SERIAL_MINORS, 0);
if (!driver)
return -ENOMEM;
@@ -639,7 +639,7 @@
abort:
printk(KERN_ERR "failed to register blackmagic serial driver");
- put_tty_driver(driver);
+ tty_driver_kref_put(driver);
return ret;
}
@@ -648,6 +648,6 @@
if (blackmagic_tty_driver)
{
tty_unregister_driver(blackmagic_tty_driver);
- put_tty_driver(blackmagic_tty_driver);
+ tty_driver_kref_put(blackmagic_tty_driver);
}
}
diff --unified --recursive --text --color package.orig/Blackmagic_Desktop_Video_Linux_12.2/other/x86_64/desktopvideo-12.2a12-x86_64/usr/src/blackmagic-io-12.2a12/bmio_serial.c package.new/Blackmagic_Desktop_Video_Linux_12.2/other/x86_64/desktopvideo-12.2a12-x86_64/usr/src/blackmagic-io-12.2a12/bmio_serial.c
--- package.orig/Blackmagic_Desktop_Video_Linux_12.2/other/x86_64/desktopvideo-12.2a12-x86_64/usr/src/blackmagic-io-12.2a12/bmio_serial.c 2021-11-04 17:18:37.053086911 +0100
+++ package.new/Blackmagic_Desktop_Video_Linux_12.2/other/x86_64/desktopvideo-12.2a12-x86_64/usr/src/blackmagic-io-12.2a12/bmio_serial.c 2021-11-04 17:29:38.749443820 +0100
@@ -304,7 +304,7 @@
{
int ret;
- struct tty_driver* serial = alloc_tty_driver(MAX_SERIAL_LINES);
+ struct tty_driver* serial = tty_alloc_driver(MAX_SERIAL_LINES, 0);
if (!serial)
return -ENOMEM;
@@ -324,7 +324,7 @@
ret = tty_register_driver(serial);
if (ret)
{
- put_tty_driver(serial);
+ tty_driver_kref_put(serial);
return ret;
}
@@ -340,7 +340,7 @@
if (serial_driver)
{
tty_unregister_driver(serial_driver);
- put_tty_driver(serial_driver);
+ tty_driver_kref_put(serial_driver);
serial_driver = NULL;
}
}
Pinned Comments
goldensuneur commented on 2020-03-02 19:00 (UTC)
I finally had time to investigate the issue. It looks like that as of 11.5, the
DesktopVideoHelper.service
has to be running for the capture card to work properly.