How to make A2DP and HSP work at the same time

I have a bluetooth headset. When connected to Windows 10, it installs two profiles in the list of playback devices:

  • Hands-free (HSP Profile)

  • Stereo

    . (Profile A2DP)

The second (Stereo) is configured as “Default Device” and “Default Communication Device” in the system.

When I launch any program that uses a microphone (recorder, chat, VoIP calls, games, etc.), the sound suddenly stops. And I can only use the microphone until I stop the recorder or the bell.

To turn the sound back on, I need the Hands-Free Profile (HSP) to process both input and output (sound and microphone). Unfortunately, HSP gives very poor sound quality.

I want to know. If there is a way using the code, I can change the behavior of Bluetooth so that both profiles work simultaneously. One processes the sound, and one processes the microphone, so I can have high quality sound and use the microphone at the same time.

+6
source share
1 answer

You will probably never find a solution. I had the same problem (I tried to create a walkie-talkie with two headsets connected to the same smartphone). On Windows (but also on Android), you cannot directly connect to a BT microphone or BT speaker, since it is automatically detected as a BT headset, and the OS controls the device. Then your application can access the OS device, and not directly to the hardware devices. The only OS capable of doing this was Symbian, which, it seems to me, had most of the BT protocols. On Windows, you probably can never do this, and on Android you must write your own A2DP protocol if you want to directly access the device without interference from the OS.

So sad...

+1
source

Source: https://habr.com/ru/post/1012862/


All Articles