sudo apt install flex bison libssl-dev libncurses5-dev bc
clone kernel sources
cd
mkdir kernel
cd kernel/
git clone --depty=1 --branch raspberrypi-kernel_1.20190819-1 https://github.com/raspberrypi/linux.git
# branch number needs to match installed version of raspberrypi-kernel
config & prepare
cd ~/kernel/linux
KERNEL=kernel7
make bcm2709_defconfig
# default for RPi3+
# for other models, see https://www.raspberrypi.org/documentation/linux/kernel/configuring.md
vi .config
# find the CONFIG_SND_USB section
# add a line: CONFIG_SND_USB_DIGITAKT=m
make prepare
make scripts
get and copy things from snd-digitakt repo
cd
git clone https://github.com/droelfdroelf/snd-digitakt.git
cd ~/kernel/linux/sound/usb/
cp ~/snd-digitakt/sound/usb/Kconfig .
cd misc
cp ~/snd-digitakt/sound/usb/misc/Makefile .
cp ~/snd-digitakt/sound/usb/misc/digitakt.c .
build
cd ~/kernel/linus/sound/usb/misc
make -C ~/kernel/linux M=$(pwd) modules
# after this there should be a snd-digitakt.ko file in this directory
install
sudo make -C ~/kernel/linux M=$(pwd) modules_install
sudo depmod
load into Kernel
sudo modprobe snd-digitakt
test
# connect Digitakt
# put it in Overbridge mode
# Settings (gear button) > System > USB Config
# select Overbridge, press Yes
# select Int to Main, set to Off
aplay -l
arecord -l
# both commands should list the Digitakt as a card
# start jack
/usr/bin/jackd -R -P 75 -d alsa -d hw:Digitakt -r 48000 -n 2 -p 256 -s &
play through Supercollider
sclang
# following commands are to sclang, not the shell
s.options.numInputBusChannels = 12
s.boot
{ SoundIn.ar([0, 1]); }.play
I had some issues with make -C ~/kernel/linux M=$(pwd) modules because the header files "usbaudio.h" and "midi.h" couldn't be found.
Solution: I just copied these two header files from /kernel/linux/sound/usb/usbaudio.h and /kernel/linux/sound/usb/midi.h to the folder /kernel/linux/sound/usb/misc/.
This comment has been minimized.
typos:
git clone --depth=1 --branch raspberrypi-kernel_1.20190819-1 https://github.com/raspberrypi/linux.gitcd ~/kernel/linux/sound/usb/misc