[pulseaudio-discuss] Bi-directional Bluetooth A2DP
Luiz Augusto von Dentz
luiz.dentz at gmail.com
Fri Aug 10 07:28:11 UTC 2018
Hi Pali,
On Thu, Aug 9, 2018 at 3:01 PM Pali Rohár <pali.rohar at gmail.com> wrote:
>
> 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.
If it is working with A2DP then leave as A2DP as profile, the only
difference perhaps it to add that is bi-directional and any case you
should be able to create a source A2DP to the same device so Im not
sure what a new profile would add here? Except perhaps if you want
different policies when using FastStream? We could perhaps add some
field to the sink/source to tell exactly what codec is in use, that
perhaps would be required if we add support for switching them so
there would be multiple options to A2DP, one for each matching codec.
> --
> Pali Rohár
> pali.rohar at gmail.com
> _______________________________________________
> pulseaudio-discuss mailing list
> pulseaudio-discuss at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
--
Luiz Augusto von Dentz
More information about the pulseaudio-discuss
mailing list