Hi Pali, On Mon, Apr 22, 2019 at 4:40 PM Pali Rohár <pali.rohar@xxxxxxxxx> wrote: > > In this patch series was dropped all patches which are already applied > in git master branch. > > There are 2 new patches: "Fix A2DP codec API to provide information about > data buffer" and "policy: Set initial A2DP profile which bluez already > activated". > > So with profile/codec switching we can relay on bluez functionality of > remembering the last used codec. > > Changes in v9: > * Fix parsing uuids of remote SEP endpoints > * Remove wrong assert in FastStream codec > * Fix logic in SBC codec for checking if two config/capabilities are > compatible > * Split SBC UHQ into two sub-codecs - it is needed to ensure that > remote endpoint does not choose bitpool for dualchannel configuration > (38) and channel mode for stereo configuration -- which is SBC middle > quality configuration > * Simplify encode and decode functions for aptX codec > * Change FastStream codec code which handles bugs in firmware > * Fix A2DP codec API to provide information about data buffer > * Ensure that module-bluez5-discover does not unload > module-bluez5-device when codec switching operation is in progress > * Set initial A2DP profile which bluez already activated > > Pali Rohár (8): > bluetooth: Fix A2DP codec API to provide information about data buffer > bluetooth: Add A2DP aptX and aptX HD codecs support > bluetooth: Add A2DP FastStream codec support > bluetooth: Add more variants of SBC codec > bluetooth: policy: Reflect a2dp profile names > bluetooth: Implement A2DP codec switching and backchannel support > bluetooth: policy: Treat bi-directional A2DP profiles as suitable for > VOIP > bluetooth: policy: Set initial A2DP profile which bluez already > activated > > configure.ac | 36 ++ > src/Makefile.am | 8 + > src/modules/bluetooth/a2dp-codec-api.h | 17 +- > src/modules/bluetooth/a2dp-codec-aptx.c | 400 +++++++++++++ > src/modules/bluetooth/a2dp-codec-faststream.c | 453 ++++++++++++++ > src/modules/bluetooth/a2dp-codec-sbc.c | 751 +++++++++++++++++++----- > src/modules/bluetooth/a2dp-codec-util.c | 26 +- > src/modules/bluetooth/bluez5-util.c | 476 ++++++++++++++- > src/modules/bluetooth/bluez5-util.h | 39 +- > src/modules/bluetooth/module-bluetooth-policy.c | 152 +++-- > src/modules/bluetooth/module-bluez5-device.c | 440 +++++++++----- > src/modules/bluetooth/module-bluez5-discover.c | 3 +- > 12 files changed, 2416 insertions(+), 385 deletions(-) > create mode 100644 src/modules/bluetooth/a2dp-codec-aptx.c > create mode 100644 src/modules/bluetooth/a2dp-codec-faststream.c > > -- > 2.11.0 These seems to work great, I can even switch on the fly the profiles and after a short delay it switches without a problem, there is one issue related to reconnecting though: https://gist.github.com/Vudentz/40f10e85fb860083958edae67093f016 With BlueZ remembering the last used endpoint (aptX) it seems the policy ignores that and reverts to highest priority (SBC UHQ), I recommend to leave the last used endpoint when reconnecting and not try to revert it to back to the highest priority, well in fact I don't think we need to evaluate priorities anymore since the policy in BlueZ will be to always connect to the last endpoint (in case of being the initiator), except perhaps for the very first time we had connected in which case there is no last used in which case BlueZ will use the registration order as priority. -- Luiz Augusto von Dentz _______________________________________________ pulseaudio-discuss mailing list pulseaudio-discuss@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss