Skip to content

Instantly share code, notes, and snippets.

Avatar

Christopher Snowhill kode54

View GitHub Profile
@kode54
kode54 / README.md
Last active Oct 21, 2020
Quick and dirty fix for Linux apps that don't natively support webcam formats other than raw pixels
View README.md

This is a simple setup. Basically, you just need to install v4l2loopback for your kernel, sometimes a DKMS module.

Run this to load it manually, if it isn't automatically loaded and configured in your /etc settings:

sudo modprobe v4l2loopback exclusive_caps=1 card_label=<camera label>

For camera label, I went with "camerafun" but any alphanumeric string will work. This will be the name of the video source.

@kode54
kode54 / pkgbuild.patch
Created Feb 17, 2020
OpenCL-AMD PKGBUILD patch
View pkgbuild.patch
diff --git a/PKGBUILD b/PKGBUILD
index aeb66ed..73f4e1d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=opencl-amd
pkgdesc="OpenCL userspace driver as provided in the amdgpu-pro driver stack. This package is intended to work along with the free amdgpu stack."
-pkgver=19.30.934563
+pkgver=19.50.967956
@kode54
kode54 / hesuvi_convert.c
Last active Jan 24, 2020
This fairly simple tool converts all HeSuVi 14 channel presets into 7.0 formatted _L/_R stereo pairs, for use with the soon to be updated PulseAudio module-virtual-surround-sink, which I've updated with a faster FFT overlap-save convolver, eliminated the sample length limits for impulses, and added support for asymmetrical/dual impulse mode.
View hesuvi_convert.c
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#define SPEAKER_FRONT_LEFT 0x1
#define SPEAKER_FRONT_RIGHT 0x2
#define SPEAKER_FRONT_CENTER 0x4
#define SPEAKER_LFE 0x8
#define SPEAKER_BACK_LEFT 0x10
View pulseaudio_virtual-surround_fftw.patch
diff -urN pulseaudio.orig/src/modules/meson.build pulseaudio/src/modules/meson.build
--- pulseaudio.orig/src/modules/meson.build 2020-01-18 00:13:15.288900614 -0800
+++ pulseaudio/src/modules/meson.build 2020-01-18 17:57:26.855466531 -0800
@@ -61,7 +61,6 @@
[ 'module-tunnel-source-new', 'module-tunnel-source-new.c' ],
[ 'module-virtual-sink', 'module-virtual-sink.c' ],
[ 'module-virtual-source', 'module-virtual-source.c' ],
- [ 'module-virtual-surround-sink', 'module-virtual-surround-sink.c' ],
[ 'module-volume-restore', 'module-volume-restore.c' ],
# [ 'module-waveout', 'module-waveout.c' ],
View gist:d3e729ec47cd5bdfba2f82790f91ec21
06:56 <%Mardeg> 0-pooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
06:56 <%Mardeg> p0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp000000000000000000000000000000000000000000000000000000000000000000000000000
06:56 <%Mardeg> 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
@kode54
kode54 / Cpu features.txt
Last active Nov 15, 2019
Conclusion: it’s probably not the processor feature bits, re: hackintosh drm working on Ryzen 3rd gen
View Cpu features.txt
machdep.cpu.feature_bits:
9140110466969500671
machdep.cpu.leaf7_feature_bits:
563909033
4194308
machdep.cpu.extfeature_bits:
8485406217078045695
machdep.cpu.features:
FPU
VME
View installed-packages.txt
ii samba 2:4.10.9+karoshi-1~linuxschools1+bionic1 amd64 SMB/CIFS file, print and login server for Unix
ii samba-common 2:4.10.9+karoshi-1~linuxschools1+bionic1 all common files used by both the Samba server and client
ii samba-common-bin 2:4.10.9+karoshi-1~linuxschools1+bionic1 amd64 Samba common files used by both the server and the client
ii samba-dbg 2:4.10.9+karoshi-1~linuxschools1+bionic1 amd64 Samba debugging symbols
ii samba-dsdb-modules 2:4.10.9+karoshi-1~linuxschools1+bionic1 amd64 Samba Directory Services Database
ii samba-libs:amd64 2:4.10.9+karoshi-1~linuxschools1+bionic1 amd64 Samba core libraries
ii samba-vfs-modules 2:4.10.9+karoshi-1~linuxschools1+bionic1 amd64 Samba Virtual FileSystem plugins
@kode54
kode54 / pci_dev_reset.patch
Last active Jul 26, 2020
Linux 5.x PCI device detach/attach reset fix for AMD, possibly others; mirrored from https://clbin.com/VCiYJ; see: https://forum.level1techs.com/t/encountering-the-amd-reset-bug-any-fixes-rx-590/143850 - note, I did not author this patch
View pci_dev_reset.patch
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 766f5779db92..dc19079dad1b 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -52,6 +52,9 @@ unsigned int pci_pm_d3_delay;
static void pci_pme_list_scan(struct work_struct *work);
+static void pci_dev_save_and_disable(struct pci_dev *dev);
+static void pci_dev_restore(struct pci_dev *dev);
@kode54
kode54 / config.log
Created Jul 25, 2019
ffmpeg-windows-build-helpers win32 freetype build error
View config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by FreeType configure 2.8, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --host=i686-w64-mingw32 --prefix=/home/chris/Source/Repos/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-i686/i686-w64-mingw32 --disable-shared --enable-static --with-bzip2 --without-harfbuzz
## --------- ##
## Platform. ##
@kode54
kode54 / ffmpeg-vgmstream.patch
Created Jul 25, 2019
ffmpeg-windows-build-helpers altered script for vgmstream
View ffmpeg-vgmstream.patch
diff --git a/cross_compile_ffmpeg.sh b/cross_compile_ffmpeg.sh
index 1109aa3..cddac5a 100755
--- a/cross_compile_ffmpeg.sh
+++ b/cross_compile_ffmpeg.sh
@@ -1934,38 +1934,13 @@ build_ffmpeg() {
init_options+=" --disable-schannel"
# Fix WinXP incompatibility by disabling Microsoft's Secure Channel, because Windows XP doesn't support TLS 1.1 and 1.2, but with GnuTLS or OpenSSL it does. XP compat!
fi
- config_options="$init_options --enable-libcaca --enable-gray --enable-libtesseract --enable-fontconfig --enable-gmp --enable-gnutls --enable-libass --enable-libbluray --enable-libbs2b --enable-libflite --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libzimg --enable-
You can’t perform that action at this time.