- Posts: 4
- Joined: Wed Aug 12, 2020 3:03 pm
- Real Name: Piotr Wrzeciono
In the 6.1 Kernel, the developers finally removed:
macro: snd_dma_continuous_data(GFP_KERNEL)
function: prandom_u32()
Therefore, the compilation of blackmagic-io -v 12.4.1a15 fails.
To correct this, edit from /var/lib/dkms/blackmagic-io/12.4.1a15/source directory the following files:
bm_util.c
bmio_audio.c
You need to edit as super user (su) or root. Before changing the contents of the files, copy them with the changed name.
Changes to the bm_util.c file:
Looking for line 902:
It should be replaced with:
Changes to the bmio_audio.c file:
From lines 433 to 437, there is code (function static int bmio_audio_init_pcm(bmio_audio_t* aud)):
It should be replaced with the code:
Note: Regardless of the change, we must wait for an official update of Desktop Video. I tested the code on a PC: AMD Ryzen 7 3700 , 32 GB RAM, NVIDIA RTX 3050Ti, 2 TB SSD, DeckLink Mini Recorder and Intensity Pro 4K. OS: openSUSE Tumbleweed.
macro: snd_dma_continuous_data(GFP_KERNEL)
function: prandom_u32()
Therefore, the compilation of blackmagic-io -v 12.4.1a15 fails.
To correct this, edit from /var/lib/dkms/blackmagic-io/12.4.1a15/source directory the following files:
bm_util.c
bmio_audio.c
You need to edit as super user (su) or root. Before changing the contents of the files, copy them with the changed name.
Changes to the bm_util.c file:
Looking for line 902:
- Code: Select all
//Random
uint32_t bm_random32(void)
From lines 905 to 913, there is a code:
#if KERNEL_VERSION_OR_LATER(3, 8, 0)
return prandom_u32();
#elif KERNEL_VERSION_OR_LATER(2, 6, 19)
return random32();
#else
uint32_t num;
get_random_bytes(&num, sizeof(uint32_t));
return num;
#endif
It should be replaced with:
- Code: Select all
#if KERNEL_VERSION_OR_LATER(6, 0, 0).
return get_random_u32();
#elif KERNEL_VERSION_OR_LATER(3, 8, 0).
return prandom_u32();
#elif KERNEL_VERSION_OR_LATER(2, 6, 19)
return random32();
#else
uint32_t num;
get_random_bytes(&num, sizeof(uint32_t));
return num;
#endif
Changes to the bmio_audio.c file:
From lines 433 to 437, there is code (function static int bmio_audio_init_pcm(bmio_audio_t* aud)):
- Code: Select all
snd_pcm_lib_preallocate_pages_for_all(pcm,
SNDRV_DMA_TYPE_CONTINUOUS,
snd_dma_continuous_data(GFP_KERNEL),
bmio_audio_hardware.buffer_size,
bmio_audio_hardware.buffer_size);
It should be replaced with the code:
- Code: Select all
#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 0))
snd_pcm_lib_preallocate_pages_for_all(pcm,
SNDRV_DMA_TYPE_CONTINUOUS,
snd_dma_continuous_data(GFP_KERNEL,)
bmio_audio_hardware.buffer_size,
bmio_audio_hardware.buffer_size);
#else
snd_pcm_lib_preallocate_pages_for_all(pcm,
SNDRV_DMA_TYPE_CONTINUOUS,
NULL,
bmio_audio_hardware.buffer_size,
bmio_audio_hardware.buffer_size);
#endif
Note: Regardless of the change, we must wait for an official update of Desktop Video. I tested the code on a PC: AMD Ryzen 7 3700 , 32 GB RAM, NVIDIA RTX 3050Ti, 2 TB SSD, DeckLink Mini Recorder and Intensity Pro 4K. OS: openSUSE Tumbleweed.
openSUSE Tumbleweed, Ryzen 7 3700, Intensity Pro 4K, OBS Studio, Moodle, BigBlueButton, Ardour, Kdenlive