bluez5: update a2dp-codecs.h from bluez with aptx-ll caps

This commit is contained in:
Pauli Virtanen 2021-08-15 18:17:40 +03:00 committed by Wim Taymans
parent f96fa1bf36
commit fc2fe12794

View file

@ -4,7 +4,7 @@
*
* Copyright (C) 2006-2010 Nokia Corporation
* Copyright (C) 2004-2010 Marcel Holtmann <marcel@holtmann.org>
*
* Copyright (C) 2018 Pali Rohár <pali.rohar@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -169,6 +169,19 @@
#define APTX_HD_SAMPLING_FREQ_44100 0x2
#define APTX_HD_SAMPLING_FREQ_48000 0x1
#define APTX_LL_VENDOR_ID 0x0000000a
#define APTX_LL_VENDOR_ID2 0x000000d7
#define APTX_LL_CODEC_ID 0x0002
/**
* Default parameters for aptX LL (Sprint) encoder
*/
#define APTX_LL_TARGET_CODEC_LEVEL 180 /* target codec buffer level */
#define APTX_LL_INITIAL_CODEC_LEVEL 360 /* initial codec buffer level */
#define APTX_LL_SRA_MAX_RATE 50 /* x/10000 = 0.005 SRA rate */
#define APTX_LL_SRA_AVG_TIME 1 /* SRA averaging time = 1s */
#define APTX_LL_GOOD_WORKING_LEVEL 180 /* good working buffer level */
#define LDAC_VENDOR_ID 0x0000012d
#define LDAC_CODEC_ID 0x00aa
@ -241,6 +254,13 @@ typedef struct {
uint32_t rfa;
} __attribute__ ((packed)) a2dp_aptx_hd_t;
typedef struct {
a2dp_aptx_t aptx;
uint8_t bidirect_link:1;
uint8_t has_new_caps:1;
uint8_t reserved:6;
} __attribute__ ((packed)) a2dp_aptx_ll_t;
#elif __BYTE_ORDER == __BIG_ENDIAN
typedef struct {
@ -288,11 +308,31 @@ typedef struct {
uint32_t rfa;
} __attribute__ ((packed)) a2dp_aptx_hd_t;
typedef struct {
a2dp_aptx_t aptx;
uint8_t reserved:6;
uint8_t has_new_caps:1;
uint8_t bidirect_link:1;
} __attribute__ ((packed)) a2dp_aptx_ll_t;
#else
#error "Unknown byte order"
#endif
typedef struct {
a2dp_aptx_ll_t base;
uint8_t reserved;
uint8_t target_level2;
uint8_t target_level1;
uint8_t initial_level2;
uint8_t initial_level1;
uint8_t sra_max_rate;
uint8_t sra_avg_time;
uint8_t good_working_level2;
uint8_t good_working_level1;
} __attribute__ ((packed)) a2dp_aptx_ll_ext_t;
#define A2DP_CODEC_DEFAULT_RATE 48000
#define A2DP_CODEC_DEFAULT_CHANNELS 2