Bluetooth HFP, headset, etc. audio outputs
Current situation
Currently, the user can switch between the earpiece and the external speaker using the speaker button. However, we also have a headset available (jack or USB-C audio) and Bluetooth HFP which cannot be chosen at all.
Proposal
Allow selecting other audio outputs as well during a call so we can route audio to Bluetooth HFP headsets/cars or to a headset connect to a jack or USB Audio. Microphones should be handled as well since both can route audio in also. I think we shouldn't offer a way to select the microphone, it should switch together with the output device, for example:
- Internal speaker selected? internal phone microphone
- Earpiece selected? internal phone microphone
- External headset connected over USB audio or jack selected? headset microphone
- External headphones connected over USB audio or jack selected? internal phone microphone
- Bluetooth HFP selected? Bluetooth HFP microphone.
While the internal speaker and earpiece are (almost) always available, the headset and Bluetooth HFP options are not. Headsets are only available if the jack is plugged in or the USB audio cable is plugged in. Jack detection is handled by ALSA UCM just fine, the headset only shows up when plugged in if configured correctly. USB Audio based headsets only show up when the USB audio card is plugged in, ALSA UCM support is unknown (which is necessary for modem audio routing in a lot of devices) Bluetooth HFP devices are a bit of a myth yet, not much work was put into it yet as it requires kernel drivers, ALSA UCM configurations which are not used elsewhere yet, etc. However, there's some work for it on the PinePhone: https://gitlab.com/mobian1/issues/-/issues/345 and https://gitlab.com/mobian1/issues/-/issues/160
Branched of #17 (closed)