[pulseaudio-discuss] Extra A2DP codecs support in bluetooth module

Pali Rohár pali.rohar at gmail.com
Mon Jul 30 07:17:56 UTC 2018

On Monday 30 July 2018 06:30:14 valdikss wrote:
> On 22.07.2018 14:37, Pali Rohár wrote:
> > 
> > Information which I have about FastStream: It is just SBC codec with
> > following parameters: frequency rate 44.1 kHz or 48.0 kHz, Blocks 16,
> > Sub-bands 8, Joint Stereo, Loudness and Bitpool = 29. So data rate = 212
> > kbps, packet size = 72*3+4 = 220 = DM5 and that DSP decoders round 71
> > bytes frames to 72 bytes. So I'm not sure how "low latency" it is.
> > Normal SBC codec allows you to specify all those parameters. But
> > FastStream has one additional feature: it supports backchannel for
> > voice, so you do not have to switch between HFP/HSP and A2DP once you
> > have incoming voice call. You can always use just A2DP with FastStream.
> > 
> > Pulseaudio for SBC codec choose those parameters: Joint Stereo, Block
> > 16, Sub-bands 8, Loudness. Frequency and bitpool depends on pulseaudio
> > source. If bluetooth device does not support those parameters,
> > pulseaudio lower values. So for me it looks like that FastStream matches
> > default SBC pulseaudio configuration.
> > 
> > Backchannel in FastStream for microphone voice again uses SBC codec with
> > parameters: 16 KHz frequency rate, Blocks 16, Sub-bands 8, Loudness,
> > Bitpool 32. So data rate = 72 kbps, packet size = 3*72 + 4 = 220 <= DM5.
> > Which should be much better then CVSD codec at 8 kHz used in HFP/HSP.
> > But is there really difference for voice data which comes from
> > (probably poor) microphone integrated in headsets?
> > 
> >> handful of Creative headsets that don't seem to support any other codecs. I
> >> would put it between SBC and AAC. If someone prefers SBC over it, they know
> >> enough about Bluetooth operation to qualify as a power user capable of using
> >> the config file to disable FastStream.
> > 
> > Based on above details I would say it must be similar (or same?) as SBC
> > for streaming. But who knows how is receiver implemented? I would not be
> > surprised if some bluetooth headset have degraded SBC A2DP codec just
> > for marketing purposed to show that other vendor codec is "better".
> > 
> > As I said, I need to play with FastStream and see what my headset would
> > do with it. For me interesting part is that backchannel support to avoid
> > all problems with switching between A2DP and HSP/HFP profiles (to
> > activate HSP/HFP only in case I have incoming call and after hangup
> > switch back to AD2P...).
> It would be great if FastStream support could be implemented. I have a headset with CSR (now Qualcomm) chip which supports SBC, AptX, AAC and FastStream. The headset is rather unknown and not expensive (but surprisingly good), so I assume FastStream support is not that rare.
> If high-quality duplex audio is possible with Bluetooth, that would be very handy for conferences.

Now I have working sink support (sending audio from host to headset) for
FastStream codec in pulseaudio. Voice backchannel support would be
rather challenge as I do not know if bluez provides API for such thing.

Anyway good news is that at least my Creative headset automatically
starts sending voice data after FastStream codec is negotiated and via
"btmon" I was able to capture voice data and via "sbcdec" decode them to
check that it is correct and usable.

May I ask which headset it is? I was told that FastStream is supported
only by Creative headsets.

Pali Rohár
pali.rohar at gmail.com

More information about the pulseaudio-discuss mailing list