Bluetooth: Audio: Add new bap_lc3_preset and move macros
Added a new header file bap_lc3_preset.h which contains the definitions of the LC3 (pre)sets defined by the BAP spec. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
parent
3326863267
commit
271ff1d1a3
|
@ -489,814 +489,6 @@ struct bt_codec_qos_pref {
|
|||
uint32_t pref_pd_max;
|
||||
};
|
||||
|
||||
/** Struct to hold a BAP defined LC3 preset */
|
||||
struct bt_audio_lc3_preset {
|
||||
/** The LC3 Codec */
|
||||
struct bt_codec codec;
|
||||
/** The BAP spec defined QoS values */
|
||||
struct bt_codec_qos qos;
|
||||
};
|
||||
|
||||
/** Helper to declare an LC3 preset structure */
|
||||
#define BT_AUDIO_LC3_PRESET(_codec, _qos) \
|
||||
{ \
|
||||
.codec = _codec, \
|
||||
.qos = _qos, \
|
||||
}
|
||||
|
||||
/* LC3 Unicast presets defined by table 5.2 in the BAP v1.0 specification */
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 8_1_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_UNICAST_PRESET_8_1_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_8_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(26u, 2u, 8u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 8_2_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_UNICAST_PRESET_8_2_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_8_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(30u, 2u, 10u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 16_1_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_UNICAST_PRESET_16_1_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_16_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(30u, 2u, 8u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 16_2_1 codec configuration
|
||||
*
|
||||
* Mandatory to support as both unicast client and server
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_UNICAST_PRESET_16_2_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_16_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(40u, 2u, 10u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 24_1_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_UNICAST_PRESET_24_1_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_24_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(45u, 2u, 8u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 24_2_1 codec configuration
|
||||
*
|
||||
* Mandatory to support as unicast server
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_UNICAST_PRESET_24_2_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_24_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(60u, 2u, 10u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 32_1_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_UNICAST_PRESET_32_1_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_32_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(60u, 2u, 8u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 32_2_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_UNICAST_PRESET_32_2_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_32_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(80u, 2u, 10u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 441_1_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_UNICAST_PRESET_441_1_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_441_1(_loc, _stream_context), \
|
||||
BT_CODEC_QOS(8163u, BT_CODEC_QOS_FRAMED, \
|
||||
BT_CODEC_QOS_2M, 97u, 5u, 24u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 441_2_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_UNICAST_PRESET_441_2_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_441_2(_loc, _stream_context), \
|
||||
BT_CODEC_QOS(10884u, BT_CODEC_QOS_FRAMED, \
|
||||
BT_CODEC_QOS_2M, 130u, 5u, 31u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_1_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_UNICAST_PRESET_48_1_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_48_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(75u, 5u, 15u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_2_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_UNICAST_PRESET_48_2_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_48_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(100u, 5u, 20u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_3_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_UNICAST_PRESET_48_3_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_48_3(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(90u, 5u, 15u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_4_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_UNICAST_PRESET_48_4_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_48_4(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(120u, 5u, 20u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 8_5_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_UNICAST_PRESET_48_5_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_48_5(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(117u, 5u, 15u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_6_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_UNICAST_PRESET_48_6_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_48_6(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(155u, 5u, 20u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 8_1_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
/* Following presets are for unicast high reliability audio data */
|
||||
#define BT_AUDIO_LC3_UNICAST_PRESET_8_1_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_8_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(26u, 13u, 75u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 8_2_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_UNICAST_PRESET_8_2_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_8_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(30u, 13u, 95u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 16_1_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_UNICAST_PRESET_16_1_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_16_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(30u, 13u, 75u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 16_2_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_UNICAST_PRESET_16_2_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_16_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(40u, 13u, 95u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 24_1_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_UNICAST_PRESET_24_1_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_24_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(45u, 13u, 75u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 24_2_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_UNICAST_PRESET_24_2_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_24_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(60u, 13u, 95u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 32_1_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_UNICAST_PRESET_32_1_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_32_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(60u, 13u, 75u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 32_2_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_UNICAST_PRESET_32_2_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_32_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(80u, 13u, 95u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 441_1_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_UNICAST_PRESET_441_1_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_441_1(_loc, _stream_context), \
|
||||
BT_CODEC_QOS(8163u, BT_CODEC_QOS_FRAMED, \
|
||||
BT_CODEC_QOS_2M, 97u, 13u, 80u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 441_2_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_UNICAST_PRESET_441_2_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_441_2(_loc, _stream_context), \
|
||||
BT_CODEC_QOS(10884u, BT_CODEC_QOS_FRAMED, \
|
||||
BT_CODEC_QOS_2M, 130u, 13u, 85u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_1_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_UNICAST_PRESET_48_1_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_48_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(75u, 13u, 75u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_2_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_UNICAST_PRESET_48_2_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_48_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(100u, 13u, 95u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_3_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_UNICAST_PRESET_48_3_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_48_3(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(90u, 13u, 75u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_4_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_UNICAST_PRESET_48_4_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_48_4(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(120u, 13u, 100u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_5_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_UNICAST_PRESET_48_5_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_48_5(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(117u, 13u, 75u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_6_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_UNICAST_PRESET_48_6_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_48_6(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(155u, 13u, 100u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 8_1_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
/* LC3 Broadcast presets defined by table 6.4 in the BAP v1.0 specification */
|
||||
#define BT_AUDIO_LC3_BROADCAST_PRESET_8_1_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_8_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(26u, 2u, 8u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 8_2_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_BROADCAST_PRESET_8_2_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_8_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(30u, 2u, 10u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 16_1_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_BROADCAST_PRESET_16_1_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_16_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(30u, 2u, 8u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 16_2_1 codec configuration
|
||||
*
|
||||
* Mandatory to support as both broadcast source and sink
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_BROADCAST_PRESET_16_2_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_16_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(40u, 2u, 10u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 24_1_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_BROADCAST_PRESET_24_1_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_24_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(45u, 2u, 8u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 24_2_1 codec configuration
|
||||
*
|
||||
* Mandatory to support as broadcast sink
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_BROADCAST_PRESET_24_2_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_24_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(60u, 2u, 10u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 32_1_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_BROADCAST_PRESET_32_1_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_32_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(60u, 2u, 8u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 32_2_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_BROADCAST_PRESET_32_2_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_32_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(80u, 2u, 10u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 441_1_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_BROADCAST_PRESET_441_1_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_441_1(_loc, _stream_context), \
|
||||
BT_CODEC_QOS(8163u, BT_CODEC_QOS_FRAMED, \
|
||||
BT_CODEC_QOS_2M, 97u, 4u, 24u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 441_2_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_BROADCAST_PRESET_441_2_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_441_2(_loc, _stream_context), \
|
||||
BT_CODEC_QOS(10884u, BT_CODEC_QOS_FRAMED, \
|
||||
BT_CODEC_QOS_2M, 130u, 4u, 31u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_1_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_1_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_48_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(75u, 4u, 15u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_2_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_2_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_48_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(100u, 4u, 20u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_3_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_3_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_48_3(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(90u, 4u, 15u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_4_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_4_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_48_4(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(120u, 4u, 20u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_5_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_5_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_48_5(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(117u, 4u, 15u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_6_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_6_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_48_6(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(155u, 4u, 20u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 8_1_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
/* Following presets are for broadcast high reliability audio data */
|
||||
#define BT_AUDIO_LC3_BROADCAST_PRESET_8_1_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_8_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(26u, 4u, 45u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 8_2_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_BROADCAST_PRESET_8_2_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_8_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(30u, 4u, 60u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 16_1_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_BROADCAST_PRESET_16_1_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_16_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(30u, 4u, 45u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 16_2_2 codec configuration
|
||||
*
|
||||
* Mandatory to support as both broadcast source and sink
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_BROADCAST_PRESET_16_2_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_16_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(40u, 4u, 60u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 24_1_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_BROADCAST_PRESET_24_1_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_24_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(45u, 4u, 45u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 24_2_2 codec configuration
|
||||
*
|
||||
* Mandatory to support as broadcast sink
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_BROADCAST_PRESET_24_2_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_24_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(60u, 4u, 60u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 32_1_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_BROADCAST_PRESET_32_1_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_32_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(60u, 4u, 45u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 32_2_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_BROADCAST_PRESET_32_2_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_32_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(80u, 4u, 60u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 441_1_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_BROADCAST_PRESET_441_1_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_441_1(_loc, _stream_context), \
|
||||
BT_CODEC_QOS(8163u, BT_CODEC_QOS_FRAMED, \
|
||||
BT_CODEC_QOS_2M, 97u, 4u, 54u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 441_2_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_BROADCAST_PRESET_441_2_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_441_2(_loc, _stream_context), \
|
||||
BT_CODEC_QOS(10884u, BT_CODEC_QOS_FRAMED, \
|
||||
BT_CODEC_QOS_2M, 130u, 4u, 60u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_1_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_1_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_48_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(75u, 4u, 50u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_2_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_2_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_48_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(100u, 4u, 65u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_3_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_3_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_48_3(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(90u, 4u, 50u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_4_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_4_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_48_4(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(120u, 4u, 65u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_5_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_5_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_48_5(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(117u, 4u, 50u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_6_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_6_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_48_6(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(155u, 4u, 65u, 40000u) \
|
||||
)
|
||||
|
||||
/**
|
||||
* @brief Audio codec Config APIs
|
||||
* @defgroup bt_audio_codec_cfg Codec config parsing APIs
|
||||
|
|
692
include/zephyr/bluetooth/audio/bap_lc3_preset.h
Normal file
692
include/zephyr/bluetooth/audio/bap_lc3_preset.h
Normal file
|
@ -0,0 +1,692 @@
|
|||
/** @file
|
||||
* @brief Header for Bluetooth BAP LC3 presets.
|
||||
*
|
||||
* Copyright (c) 2023 Nordic Semiconductor ASA
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_BAP_LC3_PRESET_
|
||||
#define ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_BAP_LC3_PRESET_
|
||||
#include <zephyr/bluetooth/audio/audio.h>
|
||||
|
||||
/** Struct to hold a BAP defined LC3 preset */
|
||||
struct bt_bap_lc3_preset {
|
||||
/** The LC3 Codec */
|
||||
struct bt_codec codec;
|
||||
/** The BAP spec defined QoS values */
|
||||
struct bt_codec_qos qos;
|
||||
};
|
||||
|
||||
/** Helper to declare an LC3 preset structure */
|
||||
#define BT_AUDIO_LC3_PRESET(_codec, _qos) \
|
||||
{ \
|
||||
.codec = _codec, .qos = _qos, \
|
||||
}
|
||||
|
||||
/* LC3 Unicast presets defined by table 5.2 in the BAP v1.0 specification */
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 8_1_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_UNICAST_PRESET_8_1_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_8_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(26u, 2u, 8u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 8_2_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_UNICAST_PRESET_8_2_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_8_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(30u, 2u, 10u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 16_1_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_UNICAST_PRESET_16_1_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_16_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(30u, 2u, 8u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 16_2_1 codec configuration
|
||||
*
|
||||
* Mandatory to support as both unicast client and server
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_UNICAST_PRESET_16_2_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_16_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(40u, 2u, 10u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 24_1_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_UNICAST_PRESET_24_1_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_24_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(45u, 2u, 8u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 24_2_1 codec configuration
|
||||
*
|
||||
* Mandatory to support as unicast server
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_UNICAST_PRESET_24_2_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_24_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(60u, 2u, 10u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 32_1_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_UNICAST_PRESET_32_1_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_32_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(60u, 2u, 8u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 32_2_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_UNICAST_PRESET_32_2_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_32_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(80u, 2u, 10u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 441_1_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_UNICAST_PRESET_441_1_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_441_1(_loc, _stream_context), \
|
||||
BT_CODEC_QOS(8163u, BT_CODEC_QOS_FRAMED, BT_CODEC_QOS_2M, 97u, 5u, 24u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 441_2_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_UNICAST_PRESET_441_2_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_441_2(_loc, _stream_context), \
|
||||
BT_CODEC_QOS(10884u, BT_CODEC_QOS_FRAMED, BT_CODEC_QOS_2M, 130u, 5u, 31u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_1_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_UNICAST_PRESET_48_1_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_48_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(75u, 5u, 15u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_2_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_UNICAST_PRESET_48_2_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_48_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(100u, 5u, 20u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_3_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_UNICAST_PRESET_48_3_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_48_3(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(90u, 5u, 15u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_4_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_UNICAST_PRESET_48_4_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_48_4(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(120u, 5u, 20u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 8_5_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_UNICAST_PRESET_48_5_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_48_5(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(117u, 5u, 15u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_6_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_UNICAST_PRESET_48_6_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_48_6(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(155u, 5u, 20u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 8_1_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
/* Following presets are for unicast high reliability audio data */
|
||||
#define BT_BAP_LC3_UNICAST_PRESET_8_1_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_8_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(26u, 13u, 75u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 8_2_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_UNICAST_PRESET_8_2_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_8_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(30u, 13u, 95u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 16_1_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_UNICAST_PRESET_16_1_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_16_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(30u, 13u, 75u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 16_2_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_UNICAST_PRESET_16_2_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_16_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(40u, 13u, 95u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 24_1_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_UNICAST_PRESET_24_1_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_24_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(45u, 13u, 75u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 24_2_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_UNICAST_PRESET_24_2_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_24_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(60u, 13u, 95u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 32_1_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_UNICAST_PRESET_32_1_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_32_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(60u, 13u, 75u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 32_2_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_UNICAST_PRESET_32_2_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_32_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(80u, 13u, 95u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 441_1_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_UNICAST_PRESET_441_1_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_441_1(_loc, _stream_context), \
|
||||
BT_CODEC_QOS(8163u, BT_CODEC_QOS_FRAMED, BT_CODEC_QOS_2M, 97u, 13u, 80u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 441_2_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_UNICAST_PRESET_441_2_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_441_2(_loc, _stream_context), \
|
||||
BT_CODEC_QOS(10884u, BT_CODEC_QOS_FRAMED, BT_CODEC_QOS_2M, 130u, 13u, \
|
||||
85u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_1_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_UNICAST_PRESET_48_1_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_48_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(75u, 13u, 75u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_2_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_UNICAST_PRESET_48_2_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_48_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(100u, 13u, 95u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_3_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_UNICAST_PRESET_48_3_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_48_3(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(90u, 13u, 75u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_4_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_UNICAST_PRESET_48_4_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_48_4(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(120u, 13u, 100u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_5_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_UNICAST_PRESET_48_5_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_48_5(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(117u, 13u, 75u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_6_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_UNICAST_PRESET_48_6_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_48_6(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(155u, 13u, 100u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 8_1_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
/* LC3 Broadcast presets defined by table 6.4 in the BAP v1.0 specification */
|
||||
#define BT_BAP_LC3_BROADCAST_PRESET_8_1_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_8_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(26u, 2u, 8u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 8_2_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_BROADCAST_PRESET_8_2_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_8_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(30u, 2u, 10u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 16_1_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_BROADCAST_PRESET_16_1_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_16_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(30u, 2u, 8u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 16_2_1 codec configuration
|
||||
*
|
||||
* Mandatory to support as both broadcast source and sink
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_BROADCAST_PRESET_16_2_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_16_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(40u, 2u, 10u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 24_1_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_BROADCAST_PRESET_24_1_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_24_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(45u, 2u, 8u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 24_2_1 codec configuration
|
||||
*
|
||||
* Mandatory to support as broadcast sink
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_BROADCAST_PRESET_24_2_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_24_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(60u, 2u, 10u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 32_1_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_BROADCAST_PRESET_32_1_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_32_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(60u, 2u, 8u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 32_2_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_BROADCAST_PRESET_32_2_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_32_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(80u, 2u, 10u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 441_1_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_BROADCAST_PRESET_441_1_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_441_1(_loc, _stream_context), \
|
||||
BT_CODEC_QOS(8163u, BT_CODEC_QOS_FRAMED, BT_CODEC_QOS_2M, 97u, 4u, 24u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 441_2_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_BROADCAST_PRESET_441_2_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_441_2(_loc, _stream_context), \
|
||||
BT_CODEC_QOS(10884u, BT_CODEC_QOS_FRAMED, BT_CODEC_QOS_2M, 130u, 4u, 31u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_1_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_BROADCAST_PRESET_48_1_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_48_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(75u, 4u, 15u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_2_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_BROADCAST_PRESET_48_2_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_48_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(100u, 4u, 20u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_3_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_BROADCAST_PRESET_48_3_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_48_3(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(90u, 4u, 15u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_4_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_BROADCAST_PRESET_48_4_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_48_4(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(120u, 4u, 20u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_5_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_BROADCAST_PRESET_48_5_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_48_5(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(117u, 4u, 15u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_6_1 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_BROADCAST_PRESET_48_6_1(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_48_6(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(155u, 4u, 20u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 8_1_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
/* Following presets are for broadcast high reliability audio data */
|
||||
#define BT_BAP_LC3_BROADCAST_PRESET_8_1_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_8_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(26u, 4u, 45u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 8_2_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_BROADCAST_PRESET_8_2_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_8_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(30u, 4u, 60u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 16_1_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_BROADCAST_PRESET_16_1_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_16_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(30u, 4u, 45u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 16_2_2 codec configuration
|
||||
*
|
||||
* Mandatory to support as both broadcast source and sink
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_BROADCAST_PRESET_16_2_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_16_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(40u, 4u, 60u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 24_1_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_BROADCAST_PRESET_24_1_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_24_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(45u, 4u, 45u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 24_2_2 codec configuration
|
||||
*
|
||||
* Mandatory to support as broadcast sink
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_BROADCAST_PRESET_24_2_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_24_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(60u, 4u, 60u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 32_1_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_BROADCAST_PRESET_32_1_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_32_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(60u, 4u, 45u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 32_2_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_BROADCAST_PRESET_32_2_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_32_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(80u, 4u, 60u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 441_1_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_BROADCAST_PRESET_441_1_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_441_1(_loc, _stream_context), \
|
||||
BT_CODEC_QOS(8163u, BT_CODEC_QOS_FRAMED, BT_CODEC_QOS_2M, 97u, 4u, 54u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 441_2_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_BROADCAST_PRESET_441_2_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET( \
|
||||
BT_CODEC_LC3_CONFIG_441_2(_loc, _stream_context), \
|
||||
BT_CODEC_QOS(10884u, BT_CODEC_QOS_FRAMED, BT_CODEC_QOS_2M, 130u, 4u, 60u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_1_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_BROADCAST_PRESET_48_1_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_48_1(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(75u, 4u, 50u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_2_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_BROADCAST_PRESET_48_2_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_48_2(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(100u, 4u, 65u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_3_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_BROADCAST_PRESET_48_3_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_48_3(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(90u, 4u, 50u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_4_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_BROADCAST_PRESET_48_4_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_48_4(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(120u, 4u, 65u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_5_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_BROADCAST_PRESET_48_5_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_48_5(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_7_5_UNFRAMED(117u, 4u, 50u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_6_2 codec configuration
|
||||
*
|
||||
* @param _loc Audio channel location bitfield (@ref bt_audio_location)
|
||||
* @param _stream_context Stream context (BT_AUDIO_CONTEXT_*)
|
||||
*/
|
||||
#define BT_BAP_LC3_BROADCAST_PRESET_48_6_2(_loc, _stream_context) \
|
||||
BT_AUDIO_LC3_PRESET(BT_CODEC_LC3_CONFIG_48_6(_loc, _stream_context), \
|
||||
BT_CODEC_LC3_QOS_10_UNFRAMED(155u, 4u, 65u, 40000u))
|
||||
|
||||
#endif /* ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_BAP_LC3_PRESET_ */
|
|
@ -7,6 +7,7 @@
|
|||
#include <zephyr/bluetooth/bluetooth.h>
|
||||
#include <zephyr/bluetooth/audio/audio.h>
|
||||
#include <zephyr/bluetooth/audio/bap.h>
|
||||
#include <zephyr/bluetooth/audio/bap_lc3_preset.h>
|
||||
|
||||
/* When BROADCAST_ENQUEUE_COUNT > 1 we can enqueue enough buffers to ensure that
|
||||
* the controller is never idle
|
||||
|
@ -18,9 +19,8 @@ BUILD_ASSERT(CONFIG_BT_ISO_TX_BUF_COUNT >= TOTAL_BUF_NEEDED,
|
|||
"CONFIG_BT_ISO_TX_BUF_COUNT should be at least "
|
||||
"BROADCAST_ENQUEUE_COUNT * CONFIG_BT_BAP_BROADCAST_SRC_STREAM_COUNT");
|
||||
|
||||
static struct bt_audio_lc3_preset preset_16_2_1 =
|
||||
BT_AUDIO_LC3_BROADCAST_PRESET_16_2_1(BT_AUDIO_LOCATION_FRONT_LEFT,
|
||||
BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED);
|
||||
static struct bt_bap_lc3_preset preset_16_2_1 = BT_BAP_LC3_BROADCAST_PRESET_16_2_1(
|
||||
BT_AUDIO_LOCATION_FRONT_LEFT, BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED);
|
||||
static struct bt_bap_stream streams[CONFIG_BT_BAP_BROADCAST_SRC_STREAM_COUNT];
|
||||
static struct bt_bap_broadcast_source *broadcast_source;
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include <zephyr/bluetooth/conn.h>
|
||||
#include <zephyr/bluetooth/audio/audio.h>
|
||||
#include <zephyr/bluetooth/audio/bap.h>
|
||||
#include <zephyr/bluetooth/audio/bap_lc3_preset.h>
|
||||
#include <zephyr/sys/byteorder.h>
|
||||
|
||||
static void start_scan(void);
|
||||
|
@ -41,9 +42,8 @@ static size_t configured_source_stream_count;
|
|||
* Allows this sample application to work without logic to parse the codec capabilities of the
|
||||
* server and selection of an appropriate codec configuration.
|
||||
*/
|
||||
static struct bt_audio_lc3_preset codec_configuration =
|
||||
BT_AUDIO_LC3_UNICAST_PRESET_16_2_1(BT_AUDIO_LOCATION_FRONT_LEFT,
|
||||
BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED);
|
||||
static struct bt_bap_lc3_preset codec_configuration = BT_BAP_LC3_UNICAST_PRESET_16_2_1(
|
||||
BT_AUDIO_LOCATION_FRONT_LEFT, BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED);
|
||||
|
||||
static K_SEM_DEFINE(sem_connected, 0, 1);
|
||||
static K_SEM_DEFINE(sem_disconnected, 0, 1);
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include <zephyr/bluetooth/gatt.h>
|
||||
#include <zephyr/bluetooth/audio/audio.h>
|
||||
#include <zephyr/bluetooth/audio/bap.h>
|
||||
#include <zephyr/bluetooth/audio/bap_lc3_preset.h>
|
||||
#include <zephyr/bluetooth/audio/pacs.h>
|
||||
|
||||
#include "bt.h"
|
||||
|
@ -70,79 +71,79 @@ static size_t rx_cnt;
|
|||
|
||||
struct named_lc3_preset {
|
||||
const char *name;
|
||||
struct bt_audio_lc3_preset preset;
|
||||
struct bt_bap_lc3_preset preset;
|
||||
};
|
||||
|
||||
static struct named_lc3_preset lc3_unicast_presets[] = {
|
||||
{"8_1_1", BT_AUDIO_LC3_UNICAST_PRESET_8_1_1(LOCATION, CONTEXT)},
|
||||
{"8_2_1", BT_AUDIO_LC3_UNICAST_PRESET_8_2_1(LOCATION, CONTEXT)},
|
||||
{"16_1_1", BT_AUDIO_LC3_UNICAST_PRESET_16_1_1(LOCATION, CONTEXT)},
|
||||
{"16_2_1", BT_AUDIO_LC3_UNICAST_PRESET_16_2_1(LOCATION, CONTEXT)},
|
||||
{"24_1_1", BT_AUDIO_LC3_UNICAST_PRESET_24_1_1(LOCATION, CONTEXT)},
|
||||
{"24_2_1", BT_AUDIO_LC3_UNICAST_PRESET_24_2_1(LOCATION, CONTEXT)},
|
||||
{"32_1_1", BT_AUDIO_LC3_UNICAST_PRESET_32_1_1(LOCATION, CONTEXT)},
|
||||
{"32_2_1", BT_AUDIO_LC3_UNICAST_PRESET_32_2_1(LOCATION, CONTEXT)},
|
||||
{"441_1_1", BT_AUDIO_LC3_UNICAST_PRESET_441_1_1(LOCATION, CONTEXT)},
|
||||
{"441_2_1", BT_AUDIO_LC3_UNICAST_PRESET_441_2_1(LOCATION, CONTEXT)},
|
||||
{"48_1_1", BT_AUDIO_LC3_UNICAST_PRESET_48_1_1(LOCATION, CONTEXT)},
|
||||
{"48_2_1", BT_AUDIO_LC3_UNICAST_PRESET_48_2_1(LOCATION, CONTEXT)},
|
||||
{"48_3_1", BT_AUDIO_LC3_UNICAST_PRESET_48_3_1(LOCATION, CONTEXT)},
|
||||
{"48_4_1", BT_AUDIO_LC3_UNICAST_PRESET_48_4_1(LOCATION, CONTEXT)},
|
||||
{"48_5_1", BT_AUDIO_LC3_UNICAST_PRESET_48_5_1(LOCATION, CONTEXT)},
|
||||
{"48_6_1", BT_AUDIO_LC3_UNICAST_PRESET_48_6_1(LOCATION, CONTEXT)},
|
||||
{"8_1_1", BT_BAP_LC3_UNICAST_PRESET_8_1_1(LOCATION, CONTEXT)},
|
||||
{"8_2_1", BT_BAP_LC3_UNICAST_PRESET_8_2_1(LOCATION, CONTEXT)},
|
||||
{"16_1_1", BT_BAP_LC3_UNICAST_PRESET_16_1_1(LOCATION, CONTEXT)},
|
||||
{"16_2_1", BT_BAP_LC3_UNICAST_PRESET_16_2_1(LOCATION, CONTEXT)},
|
||||
{"24_1_1", BT_BAP_LC3_UNICAST_PRESET_24_1_1(LOCATION, CONTEXT)},
|
||||
{"24_2_1", BT_BAP_LC3_UNICAST_PRESET_24_2_1(LOCATION, CONTEXT)},
|
||||
{"32_1_1", BT_BAP_LC3_UNICAST_PRESET_32_1_1(LOCATION, CONTEXT)},
|
||||
{"32_2_1", BT_BAP_LC3_UNICAST_PRESET_32_2_1(LOCATION, CONTEXT)},
|
||||
{"441_1_1", BT_BAP_LC3_UNICAST_PRESET_441_1_1(LOCATION, CONTEXT)},
|
||||
{"441_2_1", BT_BAP_LC3_UNICAST_PRESET_441_2_1(LOCATION, CONTEXT)},
|
||||
{"48_1_1", BT_BAP_LC3_UNICAST_PRESET_48_1_1(LOCATION, CONTEXT)},
|
||||
{"48_2_1", BT_BAP_LC3_UNICAST_PRESET_48_2_1(LOCATION, CONTEXT)},
|
||||
{"48_3_1", BT_BAP_LC3_UNICAST_PRESET_48_3_1(LOCATION, CONTEXT)},
|
||||
{"48_4_1", BT_BAP_LC3_UNICAST_PRESET_48_4_1(LOCATION, CONTEXT)},
|
||||
{"48_5_1", BT_BAP_LC3_UNICAST_PRESET_48_5_1(LOCATION, CONTEXT)},
|
||||
{"48_6_1", BT_BAP_LC3_UNICAST_PRESET_48_6_1(LOCATION, CONTEXT)},
|
||||
/* High-reliability presets */
|
||||
{"8_1_2", BT_AUDIO_LC3_UNICAST_PRESET_8_1_2(LOCATION, CONTEXT)},
|
||||
{"8_2_2", BT_AUDIO_LC3_UNICAST_PRESET_8_2_2(LOCATION, CONTEXT)},
|
||||
{"16_1_2", BT_AUDIO_LC3_UNICAST_PRESET_16_1_2(LOCATION, CONTEXT)},
|
||||
{"16_2_2", BT_AUDIO_LC3_UNICAST_PRESET_16_2_2(LOCATION, CONTEXT)},
|
||||
{"24_1_2", BT_AUDIO_LC3_UNICAST_PRESET_24_1_2(LOCATION, CONTEXT)},
|
||||
{"24_2_2", BT_AUDIO_LC3_UNICAST_PRESET_24_2_2(LOCATION, CONTEXT)},
|
||||
{"32_1_2", BT_AUDIO_LC3_UNICAST_PRESET_32_1_2(LOCATION, CONTEXT)},
|
||||
{"32_2_2", BT_AUDIO_LC3_UNICAST_PRESET_32_2_2(LOCATION, CONTEXT)},
|
||||
{"441_1_2", BT_AUDIO_LC3_UNICAST_PRESET_441_1_2(LOCATION, CONTEXT)},
|
||||
{"441_2_2", BT_AUDIO_LC3_UNICAST_PRESET_441_2_2(LOCATION, CONTEXT)},
|
||||
{"48_1_2", BT_AUDIO_LC3_UNICAST_PRESET_48_1_2(LOCATION, CONTEXT)},
|
||||
{"48_2_2", BT_AUDIO_LC3_UNICAST_PRESET_48_2_2(LOCATION, CONTEXT)},
|
||||
{"48_3_2", BT_AUDIO_LC3_UNICAST_PRESET_48_3_2(LOCATION, CONTEXT)},
|
||||
{"48_4_2", BT_AUDIO_LC3_UNICAST_PRESET_48_4_2(LOCATION, CONTEXT)},
|
||||
{"48_5_2", BT_AUDIO_LC3_UNICAST_PRESET_48_5_2(LOCATION, CONTEXT)},
|
||||
{"48_6_2", BT_AUDIO_LC3_UNICAST_PRESET_48_6_2(LOCATION, CONTEXT)},
|
||||
{"8_1_2", BT_BAP_LC3_UNICAST_PRESET_8_1_2(LOCATION, CONTEXT)},
|
||||
{"8_2_2", BT_BAP_LC3_UNICAST_PRESET_8_2_2(LOCATION, CONTEXT)},
|
||||
{"16_1_2", BT_BAP_LC3_UNICAST_PRESET_16_1_2(LOCATION, CONTEXT)},
|
||||
{"16_2_2", BT_BAP_LC3_UNICAST_PRESET_16_2_2(LOCATION, CONTEXT)},
|
||||
{"24_1_2", BT_BAP_LC3_UNICAST_PRESET_24_1_2(LOCATION, CONTEXT)},
|
||||
{"24_2_2", BT_BAP_LC3_UNICAST_PRESET_24_2_2(LOCATION, CONTEXT)},
|
||||
{"32_1_2", BT_BAP_LC3_UNICAST_PRESET_32_1_2(LOCATION, CONTEXT)},
|
||||
{"32_2_2", BT_BAP_LC3_UNICAST_PRESET_32_2_2(LOCATION, CONTEXT)},
|
||||
{"441_1_2", BT_BAP_LC3_UNICAST_PRESET_441_1_2(LOCATION, CONTEXT)},
|
||||
{"441_2_2", BT_BAP_LC3_UNICAST_PRESET_441_2_2(LOCATION, CONTEXT)},
|
||||
{"48_1_2", BT_BAP_LC3_UNICAST_PRESET_48_1_2(LOCATION, CONTEXT)},
|
||||
{"48_2_2", BT_BAP_LC3_UNICAST_PRESET_48_2_2(LOCATION, CONTEXT)},
|
||||
{"48_3_2", BT_BAP_LC3_UNICAST_PRESET_48_3_2(LOCATION, CONTEXT)},
|
||||
{"48_4_2", BT_BAP_LC3_UNICAST_PRESET_48_4_2(LOCATION, CONTEXT)},
|
||||
{"48_5_2", BT_BAP_LC3_UNICAST_PRESET_48_5_2(LOCATION, CONTEXT)},
|
||||
{"48_6_2", BT_BAP_LC3_UNICAST_PRESET_48_6_2(LOCATION, CONTEXT)},
|
||||
};
|
||||
|
||||
static struct named_lc3_preset lc3_broadcast_presets[] = {
|
||||
{"8_1_1", BT_AUDIO_LC3_BROADCAST_PRESET_8_1_1(LOCATION, CONTEXT)},
|
||||
{"8_2_1", BT_AUDIO_LC3_BROADCAST_PRESET_8_2_1(LOCATION, CONTEXT)},
|
||||
{"16_1_1", BT_AUDIO_LC3_BROADCAST_PRESET_16_1_1(LOCATION, CONTEXT)},
|
||||
{"16_2_1", BT_AUDIO_LC3_BROADCAST_PRESET_16_2_1(LOCATION, CONTEXT)},
|
||||
{"24_1_1", BT_AUDIO_LC3_BROADCAST_PRESET_24_1_1(LOCATION, CONTEXT)},
|
||||
{"24_2_1", BT_AUDIO_LC3_BROADCAST_PRESET_24_2_1(LOCATION, CONTEXT)},
|
||||
{"32_1_1", BT_AUDIO_LC3_BROADCAST_PRESET_32_1_1(LOCATION, CONTEXT)},
|
||||
{"32_2_1", BT_AUDIO_LC3_BROADCAST_PRESET_32_2_1(LOCATION, CONTEXT)},
|
||||
{"441_1_1", BT_AUDIO_LC3_BROADCAST_PRESET_441_1_1(LOCATION, CONTEXT)},
|
||||
{"441_2_1", BT_AUDIO_LC3_BROADCAST_PRESET_441_2_1(LOCATION, CONTEXT)},
|
||||
{"48_1_1", BT_AUDIO_LC3_BROADCAST_PRESET_48_1_1(LOCATION, CONTEXT)},
|
||||
{"48_2_1", BT_AUDIO_LC3_BROADCAST_PRESET_48_2_1(LOCATION, CONTEXT)},
|
||||
{"48_3_1", BT_AUDIO_LC3_BROADCAST_PRESET_48_3_1(LOCATION, CONTEXT)},
|
||||
{"48_4_1", BT_AUDIO_LC3_BROADCAST_PRESET_48_4_1(LOCATION, CONTEXT)},
|
||||
{"48_5_1", BT_AUDIO_LC3_BROADCAST_PRESET_48_5_1(LOCATION, CONTEXT)},
|
||||
{"48_6_1", BT_AUDIO_LC3_BROADCAST_PRESET_48_6_1(LOCATION, CONTEXT)},
|
||||
{"8_1_1", BT_BAP_LC3_BROADCAST_PRESET_8_1_1(LOCATION, CONTEXT)},
|
||||
{"8_2_1", BT_BAP_LC3_BROADCAST_PRESET_8_2_1(LOCATION, CONTEXT)},
|
||||
{"16_1_1", BT_BAP_LC3_BROADCAST_PRESET_16_1_1(LOCATION, CONTEXT)},
|
||||
{"16_2_1", BT_BAP_LC3_BROADCAST_PRESET_16_2_1(LOCATION, CONTEXT)},
|
||||
{"24_1_1", BT_BAP_LC3_BROADCAST_PRESET_24_1_1(LOCATION, CONTEXT)},
|
||||
{"24_2_1", BT_BAP_LC3_BROADCAST_PRESET_24_2_1(LOCATION, CONTEXT)},
|
||||
{"32_1_1", BT_BAP_LC3_BROADCAST_PRESET_32_1_1(LOCATION, CONTEXT)},
|
||||
{"32_2_1", BT_BAP_LC3_BROADCAST_PRESET_32_2_1(LOCATION, CONTEXT)},
|
||||
{"441_1_1", BT_BAP_LC3_BROADCAST_PRESET_441_1_1(LOCATION, CONTEXT)},
|
||||
{"441_2_1", BT_BAP_LC3_BROADCAST_PRESET_441_2_1(LOCATION, CONTEXT)},
|
||||
{"48_1_1", BT_BAP_LC3_BROADCAST_PRESET_48_1_1(LOCATION, CONTEXT)},
|
||||
{"48_2_1", BT_BAP_LC3_BROADCAST_PRESET_48_2_1(LOCATION, CONTEXT)},
|
||||
{"48_3_1", BT_BAP_LC3_BROADCAST_PRESET_48_3_1(LOCATION, CONTEXT)},
|
||||
{"48_4_1", BT_BAP_LC3_BROADCAST_PRESET_48_4_1(LOCATION, CONTEXT)},
|
||||
{"48_5_1", BT_BAP_LC3_BROADCAST_PRESET_48_5_1(LOCATION, CONTEXT)},
|
||||
{"48_6_1", BT_BAP_LC3_BROADCAST_PRESET_48_6_1(LOCATION, CONTEXT)},
|
||||
/* High-reliability presets */
|
||||
{"8_1_2", BT_AUDIO_LC3_BROADCAST_PRESET_8_1_2(LOCATION, CONTEXT)},
|
||||
{"8_2_2", BT_AUDIO_LC3_BROADCAST_PRESET_8_2_2(LOCATION, CONTEXT)},
|
||||
{"16_1_2", BT_AUDIO_LC3_BROADCAST_PRESET_16_1_2(LOCATION, CONTEXT)},
|
||||
{"16_2_2", BT_AUDIO_LC3_BROADCAST_PRESET_16_2_2(LOCATION, CONTEXT)},
|
||||
{"24_1_2", BT_AUDIO_LC3_BROADCAST_PRESET_24_1_2(LOCATION, CONTEXT)},
|
||||
{"24_2_2", BT_AUDIO_LC3_BROADCAST_PRESET_24_2_2(LOCATION, CONTEXT)},
|
||||
{"32_1_2", BT_AUDIO_LC3_BROADCAST_PRESET_32_1_2(LOCATION, CONTEXT)},
|
||||
{"32_2_2", BT_AUDIO_LC3_BROADCAST_PRESET_32_2_2(LOCATION, CONTEXT)},
|
||||
{"441_1_2", BT_AUDIO_LC3_BROADCAST_PRESET_441_1_2(LOCATION, CONTEXT)},
|
||||
{"441_2_2", BT_AUDIO_LC3_BROADCAST_PRESET_441_2_2(LOCATION, CONTEXT)},
|
||||
{"48_1_2", BT_AUDIO_LC3_BROADCAST_PRESET_48_1_2(LOCATION, CONTEXT)},
|
||||
{"48_2_2", BT_AUDIO_LC3_BROADCAST_PRESET_48_2_2(LOCATION, CONTEXT)},
|
||||
{"48_3_2", BT_AUDIO_LC3_BROADCAST_PRESET_48_3_2(LOCATION, CONTEXT)},
|
||||
{"48_4_2", BT_AUDIO_LC3_BROADCAST_PRESET_48_4_2(LOCATION, CONTEXT)},
|
||||
{"48_5_2", BT_AUDIO_LC3_BROADCAST_PRESET_48_5_2(LOCATION, CONTEXT)},
|
||||
{"48_6_2", BT_AUDIO_LC3_BROADCAST_PRESET_48_6_2(LOCATION, CONTEXT)},
|
||||
{"8_1_2", BT_BAP_LC3_BROADCAST_PRESET_8_1_2(LOCATION, CONTEXT)},
|
||||
{"8_2_2", BT_BAP_LC3_BROADCAST_PRESET_8_2_2(LOCATION, CONTEXT)},
|
||||
{"16_1_2", BT_BAP_LC3_BROADCAST_PRESET_16_1_2(LOCATION, CONTEXT)},
|
||||
{"16_2_2", BT_BAP_LC3_BROADCAST_PRESET_16_2_2(LOCATION, CONTEXT)},
|
||||
{"24_1_2", BT_BAP_LC3_BROADCAST_PRESET_24_1_2(LOCATION, CONTEXT)},
|
||||
{"24_2_2", BT_BAP_LC3_BROADCAST_PRESET_24_2_2(LOCATION, CONTEXT)},
|
||||
{"32_1_2", BT_BAP_LC3_BROADCAST_PRESET_32_1_2(LOCATION, CONTEXT)},
|
||||
{"32_2_2", BT_BAP_LC3_BROADCAST_PRESET_32_2_2(LOCATION, CONTEXT)},
|
||||
{"441_1_2", BT_BAP_LC3_BROADCAST_PRESET_441_1_2(LOCATION, CONTEXT)},
|
||||
{"441_2_2", BT_BAP_LC3_BROADCAST_PRESET_441_2_2(LOCATION, CONTEXT)},
|
||||
{"48_1_2", BT_BAP_LC3_BROADCAST_PRESET_48_1_2(LOCATION, CONTEXT)},
|
||||
{"48_2_2", BT_BAP_LC3_BROADCAST_PRESET_48_2_2(LOCATION, CONTEXT)},
|
||||
{"48_3_2", BT_BAP_LC3_BROADCAST_PRESET_48_3_2(LOCATION, CONTEXT)},
|
||||
{"48_4_2", BT_BAP_LC3_BROADCAST_PRESET_48_4_2(LOCATION, CONTEXT)},
|
||||
{"48_5_2", BT_BAP_LC3_BROADCAST_PRESET_48_5_2(LOCATION, CONTEXT)},
|
||||
{"48_6_2", BT_BAP_LC3_BROADCAST_PRESET_48_6_2(LOCATION, CONTEXT)},
|
||||
};
|
||||
|
||||
/* Default to 16_2_1 */
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <zephyr/bluetooth/bluetooth.h>
|
||||
#include <zephyr/bluetooth/audio/audio.h>
|
||||
#include <zephyr/bluetooth/audio/bap.h>
|
||||
#include <zephyr/bluetooth/audio/bap_lc3_preset.h>
|
||||
#include <zephyr/bluetooth/audio/pacs.h>
|
||||
#include "common.h"
|
||||
#include "bap_unicast_common.h"
|
||||
|
@ -19,9 +20,8 @@ static struct bt_bap_stream g_streams[CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SNK_COUNT
|
|||
static struct bt_bap_ep *g_sinks[CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SNK_COUNT];
|
||||
|
||||
/* Mandatory support preset by both client and server */
|
||||
static struct bt_audio_lc3_preset preset_16_2_1 =
|
||||
BT_AUDIO_LC3_UNICAST_PRESET_16_2_1(BT_AUDIO_LOCATION_FRONT_LEFT,
|
||||
BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED);
|
||||
static struct bt_bap_lc3_preset preset_16_2_1 = BT_BAP_LC3_UNICAST_PRESET_16_2_1(
|
||||
BT_AUDIO_LOCATION_FRONT_LEFT, BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED);
|
||||
|
||||
CREATE_FLAG(flag_connected);
|
||||
CREATE_FLAG(flag_mtu_exchanged);
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <zephyr/bluetooth/bluetooth.h>
|
||||
#include <zephyr/bluetooth/audio/audio.h>
|
||||
#include <zephyr/bluetooth/audio/bap.h>
|
||||
#include <zephyr/bluetooth/audio/bap_lc3_preset.h>
|
||||
#include <zephyr/bluetooth/audio/pacs.h>
|
||||
#include "common.h"
|
||||
|
||||
|
@ -25,9 +26,8 @@ CREATE_FLAG(flag_received);
|
|||
static struct bt_bap_broadcast_sink *g_sink;
|
||||
static struct bt_bap_stream broadcast_sink_streams[CONFIG_BT_BAP_BROADCAST_SNK_STREAM_COUNT];
|
||||
static struct bt_bap_stream *streams[ARRAY_SIZE(broadcast_sink_streams)];
|
||||
static struct bt_audio_lc3_preset preset_16_2_1 =
|
||||
BT_AUDIO_LC3_BROADCAST_PRESET_16_2_1(BT_AUDIO_LOCATION_FRONT_LEFT,
|
||||
BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED);
|
||||
static struct bt_bap_lc3_preset preset_16_2_1 = BT_BAP_LC3_BROADCAST_PRESET_16_2_1(
|
||||
BT_AUDIO_LOCATION_FRONT_LEFT, BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED);
|
||||
|
||||
static K_SEM_DEFINE(sem_started, 0U, ARRAY_SIZE(streams));
|
||||
static K_SEM_DEFINE(sem_stopped, 0U, ARRAY_SIZE(streams));
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <zephyr/bluetooth/bluetooth.h>
|
||||
#include <zephyr/bluetooth/audio/audio.h>
|
||||
#include <zephyr/bluetooth/audio/bap.h>
|
||||
#include <zephyr/bluetooth/audio/bap_lc3_preset.h>
|
||||
#include "common.h"
|
||||
|
||||
/* When BROADCAST_ENQUEUE_COUNT > 1 we can enqueue enough buffers to ensure that
|
||||
|
@ -28,12 +29,10 @@ NET_BUF_POOL_FIXED_DEFINE(tx_pool,
|
|||
extern enum bst_result_t bst_result;
|
||||
static struct bt_bap_stream broadcast_source_streams[CONFIG_BT_BAP_BROADCAST_SRC_STREAM_COUNT];
|
||||
static struct bt_bap_stream *streams[ARRAY_SIZE(broadcast_source_streams)];
|
||||
static struct bt_audio_lc3_preset preset_16_2_1 =
|
||||
BT_AUDIO_LC3_BROADCAST_PRESET_16_2_1(BT_AUDIO_LOCATION_FRONT_LEFT,
|
||||
BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED);
|
||||
static struct bt_audio_lc3_preset preset_16_2_2 =
|
||||
BT_AUDIO_LC3_BROADCAST_PRESET_16_2_2(BT_AUDIO_LOCATION_FRONT_LEFT,
|
||||
BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED);
|
||||
static struct bt_bap_lc3_preset preset_16_2_1 = BT_BAP_LC3_BROADCAST_PRESET_16_2_1(
|
||||
BT_AUDIO_LOCATION_FRONT_LEFT, BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED);
|
||||
static struct bt_bap_lc3_preset preset_16_2_2 = BT_BAP_LC3_BROADCAST_PRESET_16_2_2(
|
||||
BT_AUDIO_LOCATION_FRONT_LEFT, BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED);
|
||||
CREATE_FLAG(flag_stopping);
|
||||
|
||||
static K_SEM_DEFINE(sem_started, 0U, ARRAY_SIZE(streams));
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#if defined(CONFIG_BT_CAP_ACCEPTOR)
|
||||
|
||||
#include <zephyr/bluetooth/bluetooth.h>
|
||||
#include <zephyr/bluetooth/audio/bap_lc3_preset.h>
|
||||
#include <zephyr/bluetooth/audio/cap.h>
|
||||
#include <zephyr/bluetooth/audio/pacs.h>
|
||||
#include "common.h"
|
||||
|
@ -23,9 +24,8 @@ CREATE_FLAG(flag_pa_sync_lost);
|
|||
|
||||
static struct bt_bap_broadcast_sink *g_broadcast_sink;
|
||||
static struct bt_cap_stream broadcast_sink_streams[CONFIG_BT_BAP_BROADCAST_SNK_STREAM_COUNT];
|
||||
static struct bt_audio_lc3_preset broadcast_preset_16_2_1 =
|
||||
BT_AUDIO_LC3_BROADCAST_PRESET_16_2_1(BT_AUDIO_LOCATION_FRONT_LEFT,
|
||||
BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED);
|
||||
static struct bt_bap_lc3_preset broadcast_preset_16_2_1 = BT_BAP_LC3_BROADCAST_PRESET_16_2_1(
|
||||
BT_AUDIO_LOCATION_FRONT_LEFT, BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED);
|
||||
|
||||
static K_SEM_DEFINE(sem_broadcast_started, 0U, ARRAY_SIZE(broadcast_sink_streams));
|
||||
static K_SEM_DEFINE(sem_broadcast_stopped, 0U, ARRAY_SIZE(broadcast_sink_streams));
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#if defined(CONFIG_BT_CAP_INITIATOR)
|
||||
|
||||
#include <zephyr/bluetooth/bluetooth.h>
|
||||
#include <zephyr/bluetooth/audio/bap_lc3_preset.h>
|
||||
#include <zephyr/bluetooth/audio/cap.h>
|
||||
#include "common.h"
|
||||
#include "bap_unicast_common.h"
|
||||
|
@ -29,9 +30,8 @@ NET_BUF_POOL_FIXED_DEFINE(tx_pool,
|
|||
extern enum bst_result_t bst_result;
|
||||
static struct bt_cap_stream broadcast_source_streams[CONFIG_BT_BAP_BROADCAST_SRC_STREAM_COUNT];
|
||||
static struct bt_cap_stream *broadcast_streams[ARRAY_SIZE(broadcast_source_streams)];
|
||||
static struct bt_audio_lc3_preset broadcast_preset_16_2_1 =
|
||||
BT_AUDIO_LC3_BROADCAST_PRESET_16_2_1(BT_AUDIO_LOCATION_FRONT_LEFT,
|
||||
BT_AUDIO_CONTEXT_TYPE_MEDIA);
|
||||
static struct bt_bap_lc3_preset broadcast_preset_16_2_1 = BT_BAP_LC3_BROADCAST_PRESET_16_2_1(
|
||||
BT_AUDIO_LOCATION_FRONT_LEFT, BT_AUDIO_CONTEXT_TYPE_MEDIA);
|
||||
|
||||
static K_SEM_DEFINE(sem_broadcast_started, 0U, ARRAY_SIZE(broadcast_streams));
|
||||
static K_SEM_DEFINE(sem_broadcast_stopped, 0U, ARRAY_SIZE(broadcast_streams));
|
||||
|
|
Loading…
Reference in a new issue