yktoo / indicator-sound-switcher

Sound input/output selector indicator for Linux
https://yktoo.com/en/software/sound-switcher-indicator/
GNU General Public License v3.0
367 stars 29 forks source link

Bluetooth input and A2DP -- HSP/HFP switching #63

Closed Mihara closed 5 years ago

Mihara commented 6 years ago

I am not sure if this is a bug report or a feature request, however, cursory searching through the issues seems to indicate that profiles are supported, so it's probably a bug report.

  1. I have a laptop, with builtin audio, builtin microphone, and a bluetooth speaker with a microphone (JBL Flip 4 to be precise, but that is the case with other Bluetooth devices capable of two modes at once). By default, upon connection, it starts in A2DP profile, (I.e. HiFi audio) but it does present a microphone input for its own microphone.
  2. If I use the standard system sound settings window to switch PulseAudio to use this microphone, it automatically flips the output device profile to HSP/HFP, which is what it should be doing, and then the microphone works.
  3. If I do the same using the Sound Switcher input selection menu, the output device profile does not flip, and the input does not actually get switched, even though Sound Switcher thinks otherwise.

There are no similar issues with switching the output stream, if only because the output stream works regardless of which mode the device is in.

Ideally, I would like the device to be in A2DP mode if its microphone is not in use and in HSP/HFP mode if it is -- and would prefer to be able to configure for this behavior if autodetecting which is the right thing to do is too much work -- but in any case, switching the input should work, shouldn't it?

Mihara commented 6 years ago

Oh, and one more thing I noticed:

When a bluetooth device that is already paired connects, the output switches to this device, which is expected -- but Sound Switcher doesn't notice, and in the menu, neither output is shown as currently selected.

yktoo commented 5 years ago

Hi, could you check if this is issue is still relevant with the latest release (2.2.0)?

When a bluetooth device that is already paired connects, the output switches to this device, which is expected -- but Sound Switcher doesn't notice, and in the menu, neither output is shown as currently selected.

There's a difference between sound stream mapping (which is where the sound is directed, this is what you're referring to) and fallback or server default (which is what the SSI is monitoring and displaying). So if when plugging a new device the fallback doesn't change, the indicator's behaviour is correct. This can probably be verified by starting another app and checking whether it outputs sound via the port indicated by the indicator menu.

yktoo commented 5 years ago

Close for now, feel free to reopen should the problem reoccur.