Skip to content

Instantly share code, notes, and snippets.

@torgeir
Last active April 10, 2020 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save torgeir/c960da8b261aea5e94b5e583444ba3fc to your computer and use it in GitHub Desktop.
Save torgeir/c960da8b261aea5e94b5e583444ba3fc to your computer and use it in GitHub Desktop.
Making the helix floor guitar unit work for reamping on ubuntu studio eoan 19.10 with jack

Making the Helix floor guitar unit work for reamping on ubuntu studio eoan 19.10 with jack

KVERSION = $(shell uname -r)

snd-usb-audio-objs := 	card.o \
			clock.o \
			endpoint.o \
			format.o \
			helper.o \
			mixer.o \
			mixer_quirks.o \
			mixer_scarlett.o \
			mixer_us16x08.o \
			pcm.o \
			power.o \
			proc.o \
			quirks.o \
			stream.o \
			validate.o

# this is different on eoan from jens' file
snd-usb-audio-m += media.o

obj-m += snd-usb-audio.o snd-usbmidi-lib.o

snd-usbmidi-lib-objs := midi.o

all:
	make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules

clean:
	make -C /lib/modules/$(KVERSION)/build M=$(PWD) clean
  • run make -j8
  • backup the files snd-usb-audio.ko and snd-usbmidi-lib.ko
KVERSION=`uname -r`
sudo mv /lib/modules/$KVERSION/kernel/sound/usb/snd-usb-audio.ko /lib/modules/$KVERSION/kernel/sound/usb/snd-usb-audio.ko.orig
sudo mv /lib/modules/$KVERSION/kernel/sound/usb/snd-usbmidi-lib.ko /lib/modules/$KVERSION/kernel/sound/usb/snd-usbmidi-lib.ko.orig
  • copy the newly created files snd-usb-audio.ko and snd-usbmidi-lib.ko into place
KVERSION=`uname -r`
sudo cp snd-usb-audio.ko /lib/modules/$KVERSION/kernel/sound/usb/
sudo cp snd-usbmidi-lib.ko /lib/modules/$KVERSION/kernel/sound/usb/
  • reboot
  • the helix should appear as an audio interface when running ubuntustudio-controls
  • select the HELIX as the USB device that should be master and set the sample rate to 48000
  • with jack, connect the "system" (i.e. the helix) ports 1 and 2 to your daw for your processed guitar sound, and ports 7 and 8 to your daw for your unprocessed guitar sound. Make sure you also send the output from 7 and 8 from your daw out to your helix, so you can use USB7/8 as an input in your patch when reamping

jens's helix_patch_and_module_replace.sh

https://line6.com/support/topic/4426-line-6-with-linux/?do=findComment&comment=310804

This script was used for inspiration, adapted to work with ubuntu eoan 19.10, e.g. I could not make sudo rmmod work

#!/bin/bash


KVERSION=`uname -r`
MAKEOPTS="-j"$(( `grep processor /proc/cpuinfo | wc -l`))
SCRIPTDIR=$PWD
SOURCEDIR=$SCRIPTDIR/..

PAUSE=2

echo "Active Kernel: $KVERSION"

echo "Do you want apply the helix patch ?"
echo Proceed ? \(y/n\) \( + return \)
read helix

if [ "$helix" != "y" ]
then echo aborting
else echo Applying patch ...
cp $PWD/helix_clock_patch.txt $PWD/../
cd $SOURCEDIR
if ! patch -p1 < helix_clock_patch.txt ; then
echo " !!! Patching failed !!! "
else
echo " * Patching successfully"
fi
cd $SCRIPTDIR
fi

echo "Do you want apply the scarlett6i6 patch ?"
echo Proceed ? \(y/n\) \( + return \)
read scarlett

if [ "$scarlett" != "y" ]
then echo aborting
else echo Applying patch ...
cp $PWD/scarlett6i6rev1_gain.txt $PWD/../
cd $SOURCEDIR
if ! patch -p1 < scarlett6i6rev1_gain.txt ; then
echo " !!! Patching failed !!! "
else
echo " * Patching successfully"
fi
cd $SCRIPTDIR
fi

echo "Do you want to compile snd_usb_audio module ?"
echo Proceed ? \(y/n\) \( + return \)
read module

if [ "$module" != "y" ]
then echo aborting
else echo Renaming and replacing makefile ...
# make sure orig never gets lost.
if ! find $PWD/../sound/usb/Makefile.orig ; then
mv $PWD/../sound/usb/Makefile $PWD/../sound/usb/Makefile.orig
fi
sleep $PAUSE
cp Makefile.usb_audio $PWD/../sound/usb/Makefile
sleep $PAUSE
cd $SOURCEDIR
#	echo Setting up config ...
#	cp /boot/config-$KVERSION .config
#	sleep $PAUSE
#	make oldconfig
sleep $PAUSE
echo "Compiling with $MAKEOPTS threads"
cd $SOURCEDIR/sound/usb
make $MAKEOPTS
fi

echo "Do you want to replace the active module now ?"
echo Proceed ? \(y/n\) \( + return \)
read modulerpl

if [ "$modulerpl" != "y" ]
then echo aborting
else echo Unloading module ...
sudo rmmod snd-usb-audio
sleep $PAUSE
echo Renaming and replacing module ...
cd $SOURCEDIR/sound/usb
# make sure orig never gets lost.
if ! find /lib/modules/$KVERSION/kernel/sound/usb/snd-usb-audio.ko.orig ; then
sudo mv /lib/modules/$KVERSION/kernel/sound/usb/snd-usb-audio.ko /lib/modules/$KVERSION/kernel/sound/usb/snd-usb-audio.ko.orig
sudo mv /lib/modules/$KVERSION/kernel/sound/usb/snd-usbmidi-lib.ko /lib/modules/$KVERSION/kernel/sound/usb/snd-usbmidi-lib.ko.orig
fi
sleep $PAUSE
sudo cp $PWD/snd-usb-audio.ko /lib/modules/$KVERSION/kernel/sound/usb/
sudo cp $PWD/snd-usbmidi-lib.ko /lib/modules/$KVERSION/kernel/sound/usb/
sleep $PAUSE
echo Loading module ...
sudo modprobe snd-usb-audio
sleep $PAUSE
dmesg|tail
fi

exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment