Skip to content

bluez5: enable duplex for aptx-ll

P V requested to merge pvir/pipewire:aptx-ll-duplex into master

aptX-LL sink devices may send back mSBC encoded data corresponding to microphone input. It appears to be enabled when the bidirectional link is set in the caps, and the device also supports this.

Implement mSBC decoding in the duplex channel.

Tested to be working on Avantree Aria Pro.

Add support for duplex channels, accounting for the fact that the two directions may be encoded with different actual codecs, and that the availability can depend on endpoint caps.

For unknown reason the BT socket when working with A2DP "duplex" stream, sometimes stops waking up poll when data arrives. Regardless, recv() can read data packets from it. Added a workaround for this (poll on timer), but no idea what causes this...

Fixes #972 (closed)


XXX: maybe the strange "wakeup from poll" is due to a2dp-sink flush polling interfering with a2dp-source read polling? Can two spa_sources have the same fd?

XXX: mic volume is a bit low on this device, especially with the boom mic detached. It's still usable if you ramp the SW volume to 150%, but I don't know if it's possible to control the HW volume (HFP does not send VGM commands). However, mic volume in HFP mode is OK.

Edited by P V

Merge request reports