Commit 3f3d3a0f authored by pali's avatar pali
Browse files

bluetooth: Add A2DP FastStream codec support

This patch provides support for FastStream codec in bluetooth A2DP profile.
FastStream codec is bi-directional, which means that it supports both music
playback and microphone voice at the same time.

FastStream codec is just SBC codec with fixed parameters. For playback are
used following parameters: 48.0kHz or 44.1kHz, Blocks 16, Sub-bands 8,
Joint Stereo, Loudness, Bitpool = 29 (data rate = 212kbps, packet size =
(71+1)*3 <= DM5 = 220, with 3 SBC frames). SBC frame size is 71 bytes, but
FastStream is zero-padded to the even size (72). For microphone are used
following SBC parameters: 16kHz, Mono, Blocks 16, Sub-bands 8, Loudness,
Bitpool = 32 (data rate = 72kbps, packet size = 72*3 <= DM5 = 220, with
3 SBC frames).

So FastStream codec is equivalent to SBC in Low Quality settings. But the
main benefit of FastStream codec is support for microphone voice channel
for audio calls. Compared to bluetooth HSP profile (with CVSD codec), it
provides better audio quality for both playback and recording.
parent 09e87210
......@@ -2172,6 +2172,8 @@ libbluez5_util_la_SOURCES += modules/bluetooth/a2dp-codec-sbc.c
libbluez5_util_la_LIBADD += $(SBC_LIBS)
libbluez5_util_la_CFLAGS += $(SBC_CFLAGS)
libbluez5_util_la_SOURCES += modules/bluetooth/a2dp-codec-faststream.c
libbluez5_util_la_SOURCES += modules/bluetooth/a2dp-codec-aptx.c
libbluez5_util_la_CPPFLAGS += $(OPENAPTX_CPPFLAGS)
This diff is collapsed.
......@@ -26,6 +26,8 @@
#include "a2dp-codec-util.h"
extern const pa_a2dp_codec pa_a2dp_codec_faststream;
extern const pa_a2dp_codec pa_a2dp_codec_faststream_mic;
extern const pa_a2dp_codec pa_a2dp_codec_sbc;
extern const pa_a2dp_codec pa_a2dp_codec_aptx;
......@@ -35,6 +37,8 @@ extern const pa_a2dp_codec pa_a2dp_codec_aptx_hd;
/* This is list of supported codecs. Their order is important.
* Codec with higher index has higher priority. */
static const pa_a2dp_codec *pa_a2dp_codecs[] = {
libbluez5_util_sources = [
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment