From: Mikel Astiz <mikel.astiz@xxxxxxxxxxxx> This patchset revisits the mapping between Bluetooth (BT) and PulseAudio (PA) states, as well as how the PA infrastructure and APIs fit the BT use-cases, including desktop and IVI use-cases. The topic has already been discussed several times in the mailing-list and IRC. This second proposal integrates the feedback from David, Luis, Frederic and Tanu. Most significantly: 1. Integration with module-switch-on-port-available is discarded: therefore dropping patches v0 07/20, 13/20 and 19/20. 2. Argument "profile" is not removed in module-bluetooth-device: patch v0 16/20 also dropped. 3. module-bluetooth-policy not refactored: hooks not merged into one as suggested by Frederic (patch v0 05/20 dropped). This means there are 5 patches less. However, 3 new patches have been added: 1. Patch v1 05/18 fixes an issue that has been detected recently, affecting the audio routing for HFGW. 2. Patch v1 12/18 is also new and addresses the Playing->Connected transition. In this case the sink and source need to be marked as suspended. 3. Given module-switch-on-port-available is not integrated with the Bluetooth modules, similar policies have been added to module-bluetooth-policy. This is proposed in patch v1 17/18. Therefore, the updated grouping of the patches would be as follows: - Patches 1..4 propose minor changes and refactoring for later patches (grouped in the beginning for readability). - Patches 5..6 propose some controversial changes that the following patches rely on. - Patches 7..12 implement the new proposal for module-bluetooth-device. This is the main contribution of the patchset. - Patches 13..17 focus on the integration with other modules. - Patch 18 is experimental and should not be applied yet. Looking forward for your comments. Mikel Astiz (18): bluetooth: Remove return value of bt_transport_config() bluetooth: Refactor code to helper function bluetooth: Always config transport after acquire bluetooth: Refactor parsing of signal PropertyChanged bluetooth: Fix wrongly set "phone" role for HFGW sink,source: Support creating suspended sinks and sources bluetooth: Set profile even if transport not acquired bluetooth: Provide dummy set_port callbacks bluetooth: Support port availability flag bluetooth: Do not acquire transport during profile change bluetooth: Acquire transport when becomes available bluetooth: Release transport when not available bluetooth: Do not switch to HFGW automatically bluetooth: Do not set profile in bluetooth-discover bluetooth: Avoid suspend-on-idle for HFGW bluetooth: Handle suspend in module-bluetooth-policy bluetooth: Add port availability transition policies bluetooth-experimental: Fix race condition using accesstype "?" src/modules/bluetooth/bluetooth-util.c | 1 - src/modules/bluetooth/module-bluetooth-device.c | 365 ++++++++++++++++----- src/modules/bluetooth/module-bluetooth-discover.c | 14 - src/modules/bluetooth/module-bluetooth-policy.c | 157 +++++++++- src/pulsecore/sink.c | 7 +- src/pulsecore/sink.h | 2 + src/pulsecore/source.c | 7 +- src/pulsecore/source.h | 2 + 8 files changed, 451 insertions(+), 104 deletions(-) -- 1.7.7.6