[pulseaudio-discuss] Bi-directional Bluetooth A2DP

Pali Rohár pali.rohar at gmail.com
Thu Aug 9 11:59:41 UTC 2018


On Wednesday 08 August 2018 10:00:28 Luiz Augusto von Dentz wrote:
> Hi Pali,
> 
> On Sat, Jul 28, 2018 at 10:34 PM, Pali Rohár <pali.rohar at gmail.com> wrote:
> > Hi!
> >
> > Some Bluetooth A2DP codecs like aptX Low Latency or FastStream provides
> > "backchannel" support for voice data. And it really in A2DP profile.
> >
> > It can be very useful as there is no need to switch between A2DP and HSP
> > modes.
> >
> > Now I was able to get FastStream codec (rebranded SBC) working in
> > PulseAudio. And in "btmon" I see that my headset started sending
> > backchannel voice data in SBC codec. I decoded that dump and it is
> > really SBC codec, voice is in very good quality, better then in
> > HSP profile. I hope that bluez can send them to pulseaudio via file
> > descriptor.
> 
> The fd sent to PA is a socket which is already bi-directional.

Ok.

> > Question is, how to handle this configuration in pulseaudio? Should it
> > be a new profile for bluetooth devices which would provides both sink
> > and source? Because now A2DP is one-direction profile, not
> > bi-directional.
> 
> While A2DP only configures a single direction we can assume
> bi-directional depending on the endpoint, so in theory all you have to
> do is register an endpoint for FastStream and create both sink and
> source when it is connected. That said note that A2DP uses L2CAP on
> top of ACL link which is asynchronous so it may not be as low latency
> as SCO, but I guess being able to chat while listening to stereo audio
> is quite convenient in some situations (e.g. when gaming).

I mean how to export this configuration from pulseaudio. If it should be
a new profile on pulseaudio card, or something different.

After correct bluez endpoint registration I was able to send data to
headset which correctly played it -- this is working.

-- 
Pali Rohár
pali.rohar at gmail.com


More information about the pulseaudio-discuss mailing list