• pali's avatar
    bluetooth: Add support for automatic connection of disconnected profiles · eecfb743
    pali authored
    Sometimes only bluetooth profile is connected (A2DP, HSP, HFP) for particular device. In this case pulseaudio refused to use disconnected profile. This change implements connecting of disconnected profiles and change implementation of A2DP codec switching from callback to hook method via a new PA_BLUETOOTH_HOOK_PROFILE_CONNECTION_CHANGED hook.
    Some bluetooth device do not allow connection of both HSP and HFP profiles at the same time. This change also handles this situation and try to first disconnect other profile if requested profile cannot be connected.
    Now when all bluetooth code is asynchronous (problematic non-asynchronous was dropped), this automatic connection of disconnected profiles is also non-blocking and asynchronous.
bluez5-util.c 100 KB