Hello, I'm trying to make pulseaudio work as HFP HF role, wich means using HandsfreeGateway interface. So I have made these changes to enable the HFPHS endpoint and managed to make an audio card appear on my setup with profile hfgw. The issue I had in v1 (card disappeared when SCO is disconnected even if RFCOMM is still alive) is fixed in patch 2 by removing module-bluetooth-device unloading. Opinions welcome! There are also some patches on BlueZ side. Best regards, Fr?d?ric Fr?d?ric Dalleau (2): bluetooth: Fix Media Endpoint for HandsfreeGateway bluetooth: Do not unload module-bluetooth-device on ERR or HUP src/modules/bluetooth/bluetooth-util.c | 9 +++++++-- src/modules/bluetooth/module-bluetooth-device.c | 3 +-- src/modules/bluetooth/module-bluetooth-discover.c | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-)