[pulseaudio-discuss] Bluetooth HSP and HFP support in pulseaudio

Pali Rohár pali.rohar at gmail.com
Sun Apr 26 23:44:18 UTC 2020

On Tuesday 31 March 2020 09:36:21 Georg Chini wrote:
> One comment here: The hsphfpd should be able to co-exist with
> ofono. ofono + PA currently is the only way you can use your mobile
> on Linux and we should not break this (unless the hsphfpd supplies
> the same functionality). So - similar to ofono - it should at least be
> possible to switch off the corresponding role, so that ofono can be
> used for one role and hsphfpd for the other.

If you can disable HFP support in ofono, then hsphfpd and ofono can
coexist in system.

But coexistence of two HSP AG or HFP AG applications in system is
impossible due to master listening SCO socket. It is same problem as
coexistence of two TCP applications which both want to listen on same
TCP port bound to wildcard address.

Coexistence of two "fully and correctly written" HSP AG or HFP AG
applications is possible only in the case these two applications know
about themselves and they properly register and unregister from bluez at
correct time and also they drop active connections, shutdown and close
all sockets at correct time.

After long debugging I was able to fix pulseaudio's internal HSP AG
implementation to correctly unregister when hsphfpd appear in the system
and register when hsphfpd disappear in the system.

So at least internal HSP AG implementation with lot of my patches could
be compatible with hsphfpd.

Pali Rohár
pali.rohar at gmail.com

More information about the pulseaudio-discuss mailing list