My bluetooth headphones work well with pulseaudio, but I also want them to work with JACK.
From my research, Jack bypasses pa and connects directly to ALSA - it is possible to feed pa into JACK but not the other way round.
So it seems there are two stages to achieving what I want:
- Get the BT headphones recognised as an ALSA device
- Use alsa_out to make that device recognised as a writable client by JACK
So first, I created a file /.asoundrc with the following contents:
pcm.btheadset { type plug
slave {
pcm {
type bluetooth
device 30:23:24:54:8C:CE
profile "auto"
}
}
hint {
show on
description "BT Headset"
}
}
ctl.btheadset {
type bluetooth
}
aplay -L in the terminal shows that much has worked:
null
Discard all samples (playback) or generate zero samples (capture)
default
Default ALSA Output (currently PulseAudio Sound Server)
btheadset
BT Headset
...
However, when I try to use alsa_out:
/usr/bin/alsa_out -j "Headphones" -d "btheadset" -q1 2>&1 1> /dev/null
the response is:
Cannot lock down 86605722 byte memory area (Cannot allocate memory)
ALSA lib dlmisc.c:254:(snd1_dlobj_cache_get) Cannot open shared library /usr/lib64/alsa-lib/libasound_module_pcm_bluetooth.so
Further research suggest that the first line is pretty common and should not prevent alsa_out from working; the second line might have been because pa is using that module exclusively.
So I tried stopping pa using YAST (checked that it had indeed stopped using pavucontrol) and tried alsa_out again … with the same result.
Now I’m stumped.
Can anyone suggest either where to proceed from here, or an alternative solution. I do remember getting this working a couple of years ago, but I can’t remember exactly what I did, and that was with OpenSuse 13.X, so perhaps things have changed.
Any suggestions would be much appreciated.