bluez5: Add mSBC support to sco-sink

This has been tested with a UART Bluetoth chipset, on a Raspberry Pi 3.
It doesn't seem to work with USB Bluetooth chipset/dongle.
This commit is contained in:
Frédéric Danis 2020-08-25 12:03:59 +02:00
parent 5849bd7c60
commit 1759aa834f
2 changed files with 103 additions and 14 deletions

View file

@ -141,6 +141,11 @@ extern "C" {
#define A2DP_SINK_ENDPOINT A2DP_OBJECT_MANAGER_PATH "/A2DPSink"
#define A2DP_SOURCE_ENDPOINT A2DP_OBJECT_MANAGER_PATH "/A2DPSource"
/* HFP uses SBC encoding with precisely defined parameters. Hence, the size
* of the input (number of PCM samples) and output is known up front. */
#define MSBC_DECODED_SIZE 240
#define MSBC_ENCODED_SIZE 60 /* 2 bytes header + 57 mSBC payload + 1 byte padding */
enum spa_bt_profile {
SPA_BT_PROFILE_NULL = 0,
SPA_BT_PROFILE_A2DP_SINK = (1 << 0),