Disclaimer: Since you are modifying your kernel, things can go wrong and you might end up with a system that is not bootable. Make a backup of your important data. You have been warned.
So you got this great amp, you hooked it up to your Linux machine, and then… silence. Well, it’s about time to change that.
In this guide, I will walk you through the process of making your Katana and Linux like each other. In order to do that, you will have to tweak the included USB audio driver in your kernel. It sounds complicated, but it actually is not.
I won’t go into much detail of what we are changing and why, there is an ongoing discussion here, if you want to read more.
I’ve tested this workaround on a few different kernel versions, and it seems to be working. I am also assuming that you’re using an Ubuntu-derivative.
Here is the gist of what you will have to do
- Install the tools and dependencies required for building the kernel from source
- Download the kernel sources
- Prepare the kernel sources for building
- Patch the USB audio module
- Build the new USB audio module
- Install the new USB audio module
Installing the tools and dependencies
Open a terminal and run these commands:
sudo apt install build-essential -y sudo apt build-dep linux -y
Getting the kernel sources
I created a folder called
katana in my home directory and downloaded the sources there.
mkdir ~/katana cd ~/katana apt source linux
After running the commands above, you should see several archive files and one folder that begins with
linux and ends with a version number. You don’t have to worry about the version number, the command above will always download the source code of the latest available kernel for your distribution, which you should be running if you do updates regularly.
Preparing the kernel sources
Navigate to the single directory created in your
You want to use the same configuration as the currently running kernel, which you can do by copying these files over to the root of the source directory.
cp /lib/modules/`uname -r`/build/.config . -v cp /lib/modules/`uname -r`/build/Module.symvers . -v
Then you need to update the
Makefile according to the currently running kernel.
For that, you need to find the version of the kernel you are currently using:
On my system, this command gives the following output:
If I were to dissect the output, I would get the following parts:
Patch level: 0
Sub level: 0
Extra version: -16-lowlatency
You will find similar variables in your
Makefile. In my case the sub level was always different in the
Makefile than the output of
uname -r, and if the numbers don’t match, you will get errors.
Makefile in any text editor and you should see lines similar to these at the beginning of the file:
VERSION = 5 PATCHLEVEL = 0 SUBLEVEL = 18 EXTRAVERSION =
Make sure that the variables reflect the output of
Makefile looked like this after the changes:
VERSION = 5 PATCHLEVEL = 0 SUBLEVEL = 0 EXTRAVERSION = -16-lowlatency
Save the file and run the following command:
If nothing threw an error, you are ready for the next step.
Patching the USB audio module
For this, you will need to connect your Katana to your machine and find out the USB identifiers:
lsusb | grep Roland
This will list the connected USB devices, and filter the output to entries that contain the word Roland, which is the company behind Boss and therefore your amp.
You should get one line, something like this:
Bus 001 Device 004: ID 0582:01d8 Roland Corp.
You are interested in the 0582:01d8 part. That is the USB Vendor and Product identifier. You will have to use those numbers when patching the USB audio driver.
If you get no input, check your USB cable, or try a different USB port.
Now you are going to patch the USB audio driver.
This part will be different for each kernel version, but stick with me. Open the
pcm.c file in the
sound/usb folder with a text editor. The changes that you will have to make will be around line 355.
This is the part of the code that you are looking for:
case USB_ID(0x1397, 0x0002): /* Behringer UFX1204 */ ep = 0x81; ifnum = 1; goto add_sync_ep_from_ifnum; } if (attr == USB_ENDPOINT_SYNC_ASYNC &&
You will have to add some extra code right after
goto add_sync_ep_from_ifnum;. The affected part of the file should look something like this:
case USB_ID(0x1397, 0x0002): /* Behringer UFX1204 */ ep = 0x81; ifnum = 1; goto add_sync_ep_from_ifnum; case USB_ID(0x0582, 0x01d8): /* Boss Katana 100 */ return 0; } if (attr == USB_ENDPOINT_SYNC_ASYNC &&
Save the file.
Building the USB audio module
If everything goes executes without an error, you have successfully built a patched version of the USB audio module.
Installing the patched module
It’s a good idea to make a backup before you make any changes to your current kernel.
sudo cp /lib/modules/`uname -r`/kernel/sound/usb/snd-usb-audio.ko /lib/modules/`uname -r`/kernel/sound/usb/snd-usb-audio.ko.old -v
You have to make sure that the module is not in use before installing our own.
sudo rmmod snd-usb-audio
Then overwrite current module with the patched one:
sudo cp ./sound/usb/snd-usb-audio.ko /lib/modules/`uname -r`/kernel/sound/usb/snd-usb-audio.ko -v
Then you need to refresh the modules:
sudo depmod -a
And finally load the module
sudo modprobe snd-usb-audio
You should be able to record your Katana on Linux now.
Since you are patching the currently running kernel, it means that every time there is a new kernel update, you will have to do the same on that new kernel or your Katana will stop working.
One day this workaround might make its way into the Linux kernel, in which case this guide will become obsolete.