Bluetooth: Pipewire does not configure A2DP
Version:
hygiea ~ # pipewire --version
pipewire
Compiled with libpipewire 0.3.30
Linked with libpipewire 0.3.30
This might not be master
, but it appears to match the newest versioned tag. If you think master has diverged, let me know, and I can try it in earnest.
Bluetooth Radio, Bluetooth Headset, Desktop Environment, Distribution, Version (Bluez, Kernel, and PipeWire):
hygiea ~ # lsusb | grep Bluetooth
Bus 001 Device 004: ID 8087:0a2b Intel Corp. Bluetooth wireless interface # not sure what hardware version
hygiea ~ # cave show pipewire
* media/pipewire
::desktop 0.3.30(~)* (scm)R(~) {:0}
::installed 0.3.30 {:0}
media/pipewire-0.3.30:0::installed (world)
[snip]
Options
OPTIONS
(alsa) Build Pipewire's ALSA plugin and provide a default output
(aptx) Support the Bluetooth aptX codec
(-avahi) Add support for zero configuration networking through Avahi
(bluetooth) Build Pipewire's BlueZ plugin
(-doc) Adds extra documentation (API, Javadoc, etc)
(-echo-cancel-webrtc) Build Pipewire's WebRTC-based echo canceller module
(fdk-aac) Support the Bluetooth AAC codec
(ffmpeg) Build Pipewire's FFmpeg plugin
(gstreamer) Build Pipewire's GStreamer plugins
(jack) Build Pipewire's JACK plugin
(ldac) Support the Bluetooth LDAC codec
(pulseaudio) Module to tunnel audio to/from a (remote) PulseAudio server
(-systemd) Add support for integration with the systemd init daemon
providers
(eudev) Use eudev as the udev provider
(-systemd) Use systemd as the syslog/udev/logind provider
[snip]
hygiea ~ # uname -a
Linux hygiea 5.12.2 #4 SMP Sat May 15 10:03:38 EDT 2021 x86_64 GNU/Linux
Distribution is Exherbo, and the WM is Sway (which, to the best of my knowledge, isn't participating in this issue--I'm using bluetoothctl
from another terminal.
The headset... is an MPOW something-or-other. There's another device which calls itself "T10" that is an FM transmitter (audio sink only), but not here with me. Here are the HWIDs if it helps (or let me know how to get a more authoritative answer):
[bluetooth]# devices
[...]
Device EB:06:EF:98:CB:6B MPOW-059
Device 00:37:17:15:2A:16 T10
Description of Problem:
Pipewire only ever configures HSP/HFP for the devices it connects to; for example, from pavucontrol
:
pw-dump
confirms that these are the (only) configurations (via EnumProfile
/Profile
in the Pipewire:Interface:Device
object); the output is attached as requested below.
I know that these devices support A2DP; in particular, I have bluealsa
and the following in my .asoundrc
:
pcm.car {
type bluealsa
device "00:37:17:15:2A:16"
profile a2dp
}
pcm.headphones {
type bluealsa
device "EB:06:EF:98:CB:6B"
profile a2dp
}
Failing a direct fix, I was trying to use pw-jack alsa_out -d headphones
(for example), but the audio is unacceptably choppy (knowing full well that alsa_out
is not particularly robust software):
grissess@hygiea ~ $ pw-jack alsa_out -d headphones
selected sample format: 16bit
err = -32
err = -32
err = -32
err = -32
err = -32
err = -32
err = -32
delay = 1726
err = -32
err = -32
err = -32
err = -32
err = -32
err = -32
err = -32
err = -32
err = -32
delay = 1713
err = -32
err = -32
[etc.]
I'm a bit new to the ecosystem, so anyway to tell Pipewire to load an ALSA hw interface (for one of the aforementioned bluealsa
devices) would suffice, but I'm not otherwise sure where to start.
Pipewire should be the only audio daemon running on this device; to my surprise, I can acquire the ALSA hw interface (e.g., headphones
) from other ALSA clients (mpv --audio-device=alsa/...
, aplay -D ...
); the affected devices seem to prefer HSP to A2DP when both are streamed.
How Reproducible:
Always, in this configuration.
Steps to Reproduce:
- Run
pipewire
andpipewire-media-session
. - Connect headset/FM transmitter (via, e.g.,
bluetoothctl
, or allow an automatic connection). - Confirm lack of A2DP profile (e.g., in
pw-dump
orpavucontrol
).
Actual Results:
An A2DP profile should be present for these devices.
Expected Results:
An A2DP profile is not present.
pw-dump -N > file
(As Attachment Please):
Additional Info Eg. Additional Kernel Patches, For pw-dump -N
:
I've been playing with /etc/pipewire/media-session.d/
(local config) files, which are fresh copies from /usr/share/pipewire/...
with attempted fixed (ill-conceived or otherwise):