Bluetooth: hfp requires one profile switch before recording works
Bluetooth Radio, Bluetooth Headset, Desktop Environment, Distribution, Version (Bluez, Kernel, and PipeWire):
Aftershokz Opencomm headset
bluez 5.55
kernel 5.10.40
pipewire 0.3.30
Description of Problem:
On this headset, on the first connection I have the a2dp-sink profile.
When I switch to any "HSP/HFP" profile (CVSD or mSBC) for the first time, the microphone doesn't seem to work. You can see it even in the volume monitor in pavucontrol, the level is flat. If I switch to another profile (from CVSD to mSBC or viceversa), I hear from the headset a click from the profile switch, and the mic starts to work. So after the headset is connected, I'm always switching to CVSD first, then mSBC to get it working.
There are definitely issues with profile selection. I enabled mSCB on this headset. In order to reliably get all profiles (see #1045) I also have to use multiprofile=off in bluez's main.conf. The first profile I get on this headset is also always a2dp-sink despite my choice of headset (see #1321 (closed)).
I exhumed the debian's package for pipewire 0.3.24, and I somehow this version doesn't have any of the above issues (or, they're more rare so I couldn't reproduce them). All profiles are always detected on start even with this old version of bluez, even with multiprofile=multiple. Switching to headset works on the first try.
Attaching my bluez-monitor.conf, just in case I'm doing something odd with the config: