My end goal is to do headless remote audio streaming with jacktrip on some older Pi 2 boards using the built-in headphone jack (I know the quality of it is lacking but I don't really care).
To narrow the scope of my issue, I am trying to get jackd (jack2/jack2-dbus) working with alsa on a Pi to just play through the headphone jack. Here is the issue that I am currently running into and I have not been able to find the solution online.
When I do a jackd -dalsa -r44100 -p512 -n2 -P
, it fails to connect to alsa. Specifcally this line is what I suspect is the issue
ALSA: poll time out, polled for 17413109 usecs
Here is the full log
> jackd -dalsa -r44100 -p512 -n2 -P
jackdmp 1.9.12
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
Copyright 2016-2017 Filipe Coelho.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
audio_reservation_init
Acquire audio card Audio0
creating alsa driver ... hw:0|-|512|2|44100|0|0|nomon|swmeter|-|32bit
configuring for 44100Hz, period = 512 frames (11.6 ms), buffer = 2 periods
ALSA: final selected sample format for playback: 16bit little-endian
ALSA: use 2 periods for playback
jackd -dalsa -r44100 -p512 -n2 -P
ALSA: poll time out, polled for 17413109 usecs
JackAudioDriver::ProcessAsync: read error, stopping...
^CJack main caught signal 2
Released audio card Audio0
audio_reservation_finish
Here is a list of my hardware devices
> aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
OS Version (Raspberry Pi OS with desktop)
> cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
Alsa config file
> cat /etc/asound.conf
pcm.!default {
type hw
card 0
}
ctl.!default {
type hw
card 0
}
In trying to do some additional troubleshooting, I have tried jackd with a dummy interface and everything works
> jackd -ddummy -r44100 -p512 -P
jackdmp 1.9.12
...
self-connect-mode is "Don't restrict self connect requests"
A decent number of articles online say that jack and pulseaudio cause issues if running together. I have uninstalled pulseaudio for the above
sudo apt-get remove pulseaudio
sudo apt-get autoremove
I have tried configuring it through qjackctl and jack_control (jack2-dbus) and run into similar errors with alsa timing out.
Does anyone know how to get jackd and alsa to work correctly on the Pi 2?