forked from monome/norns-image
-
Notifications
You must be signed in to change notification settings - Fork 1
3. USB Audio Setup
Steven Noreyko edited this page Dec 28, 2018
·
1 revision
Boot up your pi and connect your USB Audio device. Get some info from dmesg to check the device
dmesg | grep usb
look for something like usbcore: registered new interface driver snd-usb-audio to see if the device is loading.
check your audio setup (these are all very handy to check things later)
aplay -l (list all soundcards and digital audio devices)
aplay -L (list device names)
amixer (command-line mixer for ALSA soundcard driver)
amixer controls
alsamixer (gui version of mixer controls)
sudo apt-get install -y i2c-tools
sudo apt-get install libi2c-dev
sudo apt-get install libasound-dev
sudo apt-get install alsa-utils
sudo nano /boot/config.txt
dtparam=audio=off
dtparam=i2c_arm=on
dtparam=spi=on
dtparam=i2s=on
dtoverlay=i2s-mmap
dtoverlay=rpi-proto
edit raspi-blacklist.conf
sudo nano /etc/modprobe.d/raspi-blacklist.conf
add
blacklist snd_bcm2835
sudo nano /etc/asound.conf
add
pcm.!default {
type hw card 0
}
ctl.!default {
type hw card 0
}
Comment out options snd-usb-audio so usb can load first (or set it to zero)
sudo nano /lib/modprobe.d/aliases.conf
# options snd-usb-audio index=-2
sudo nano /usr/share/alsa/alsa.conf
comment out
#pcm.front cards.pcm.front
#pcm.rear cards.pcm.rear
#pcm.center_lfe cards.pcm.center_lfe
#pcm.side cards.pcm.side
#pcm.surround21 cards.pcm.surround21
#pcm.surround40 cards.pcm.surround40
#pcm.surround41 cards.pcm.surround41
#pcm.surround50 cards.pcm.surround50
#pcm.surround51 cards.pcm.surround51
#pcm.surround71 cards.pcm.surround71
#pcm.iec958 cards.pcm.iec958
#pcm.hdmi cards.pcm.hdmi
#pcm.modem cards.pcm.modem
#pcm.phoneline cards.pcm.phoneline
sudo /etc/init.d/alsa-utils restart
aplay -l
amixer cset numid=13 on #Output Mixer HiFi
amixer cset numid=4 on #line in
sudo alsactl store
amixer cset numid=3 0%
speaker-test -c2 (noise)
speaker-test -t sine -f 440 -c 2 -Dplug:sysdefault (440hz sine wave)
aplay -l
Look for CARD=(card name) and use that with hw:(card name) below (in the example, the card name is "PLAY")
export JACK_NO_AUDIO_RESERVATION=1
jackd -R -P 95 -d alsa -d hw:PLAY -r 48000 -n 3 -p 128 -S -s
settings note from shreeswifty:
you should have it @ 256 with 3 periods (-p flag) / try 2 periods if it makes noise
sudo nano ~/norns-image/config/jackdrc
sudo nano ~/norns-image/config/norns-jack.service
jack_lsp -help