Bluetooth: Audio: Rename bt_audio_codec_qos -> bt_bap_qos_cfg
The QoS structure is not related to a codec, but rather a stream, and should thus not use the "Codec" name. The BAP and ASCS specs refer to the QoS as "QoS configuration" several places, so it is an obvious choice for a name. Since the structure is defined and used by BAP, the prefix was changed from bt_audio to bt_bap. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
parent
e1cacb3a18
commit
dc97bbd35f
50 changed files with 531 additions and 537 deletions
|
@ -317,6 +317,11 @@ Bluetooth Audio
|
|||
unregistered with :c:func:`bt_tbs_unregister_bearer`.
|
||||
(:github:`76108`)
|
||||
|
||||
* There has been a rename from ``bt_audio_codec_qos`` to ``bt_bap_qos_cfg``. This effects all
|
||||
structs, enums and defines that used the ``bt_audio_codec_qos`` name. To use the new naming simply
|
||||
do a search-and-replace for ``bt_audio_codec_qos`` to ``bt_bap_qos_cfg`` and
|
||||
``BT_AUDIO_CODEC_QOS`` to ``BT_BAP_QOS_CFG``. (:github:`76633`)
|
||||
|
||||
Bluetooth Classic
|
||||
=================
|
||||
|
||||
|
|
|
@ -790,261 +790,6 @@ enum bt_audio_dir {
|
|||
BT_AUDIO_DIR_SOURCE = 0x02,
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Helper to declare elements of bt_audio_codec_qos
|
||||
*
|
||||
* @param _interval SDU interval (usec)
|
||||
* @param _framing Framing
|
||||
* @param _phy Target PHY
|
||||
* @param _sdu Maximum SDU Size
|
||||
* @param _rtn Retransmission number
|
||||
* @param _latency Maximum Transport Latency (msec)
|
||||
* @param _pd Presentation Delay (usec)
|
||||
*/
|
||||
#define BT_AUDIO_CODEC_QOS(_interval, _framing, _phy, _sdu, _rtn, _latency, _pd) \
|
||||
((struct bt_audio_codec_qos){ \
|
||||
.interval = _interval, \
|
||||
.framing = _framing, \
|
||||
.phy = _phy, \
|
||||
.sdu = _sdu, \
|
||||
.rtn = _rtn, \
|
||||
IF_ENABLED(UTIL_OR(IS_ENABLED(CONFIG_BT_BAP_BROADCAST_SOURCE), \
|
||||
IS_ENABLED(CONFIG_BT_BAP_UNICAST)), \
|
||||
(.latency = _latency,)) \
|
||||
.pd = _pd, \
|
||||
})
|
||||
|
||||
/** @brief Codec QoS Framing */
|
||||
enum bt_audio_codec_qos_framing {
|
||||
/** Packets may be framed or unframed */
|
||||
BT_AUDIO_CODEC_QOS_FRAMING_UNFRAMED = 0x00,
|
||||
/** Packets are always framed */
|
||||
BT_AUDIO_CODEC_QOS_FRAMING_FRAMED = 0x01,
|
||||
};
|
||||
|
||||
/** @brief Codec QoS Preferred PHY */
|
||||
enum {
|
||||
/** LE 1M PHY */
|
||||
BT_AUDIO_CODEC_QOS_1M = BIT(0),
|
||||
/** LE 2M PHY */
|
||||
BT_AUDIO_CODEC_QOS_2M = BIT(1),
|
||||
/** LE Coded PHY */
|
||||
BT_AUDIO_CODEC_QOS_CODED = BIT(2),
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Helper to declare Input Unframed bt_audio_codec_qos
|
||||
*
|
||||
* @param _interval SDU interval (usec)
|
||||
* @param _sdu Maximum SDU Size
|
||||
* @param _rtn Retransmission number
|
||||
* @param _latency Maximum Transport Latency (msec)
|
||||
* @param _pd Presentation Delay (usec)
|
||||
*/
|
||||
#define BT_AUDIO_CODEC_QOS_UNFRAMED(_interval, _sdu, _rtn, _latency, _pd) \
|
||||
BT_AUDIO_CODEC_QOS(_interval, BT_AUDIO_CODEC_QOS_FRAMING_UNFRAMED, BT_AUDIO_CODEC_QOS_2M, \
|
||||
_sdu, _rtn, _latency, _pd)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare Input Framed bt_audio_codec_qos
|
||||
*
|
||||
* @param _interval SDU interval (usec)
|
||||
* @param _sdu Maximum SDU Size
|
||||
* @param _rtn Retransmission number
|
||||
* @param _latency Maximum Transport Latency (msec)
|
||||
* @param _pd Presentation Delay (usec)
|
||||
*/
|
||||
#define BT_AUDIO_CODEC_QOS_FRAMED(_interval, _sdu, _rtn, _latency, _pd) \
|
||||
BT_AUDIO_CODEC_QOS(_interval, BT_AUDIO_CODEC_QOS_FRAMING_FRAMED, BT_AUDIO_CODEC_QOS_2M, \
|
||||
_sdu, _rtn, _latency, _pd)
|
||||
|
||||
/** @brief Codec QoS structure. */
|
||||
struct bt_audio_codec_qos {
|
||||
/**
|
||||
* @brief Presentation Delay in microseconds
|
||||
*
|
||||
* This value can be changed up and until bt_bap_stream_qos() has been called.
|
||||
* Once a stream has been QoS configured, modifying this field does not modify the value.
|
||||
* It is however possible to modify this field and call bt_bap_stream_qos() again to update
|
||||
* the value, assuming that the stream is in the correct state.
|
||||
*
|
||||
* Value range 0 to @ref BT_AUDIO_PD_MAX.
|
||||
*/
|
||||
uint32_t pd;
|
||||
|
||||
/**
|
||||
* @brief Connected Isochronous Group (CIG) parameters
|
||||
*
|
||||
* The fields in this struct affect the value sent to the controller via HCI
|
||||
* when creating the CIG. Once the group has been created with
|
||||
* bt_bap_unicast_group_create(), modifying these fields will not affect the group.
|
||||
*/
|
||||
struct {
|
||||
/** QoS Framing */
|
||||
enum bt_audio_codec_qos_framing framing;
|
||||
|
||||
/**
|
||||
* @brief PHY
|
||||
*
|
||||
* Allowed values are @ref BT_AUDIO_CODEC_QOS_1M, @ref BT_AUDIO_CODEC_QOS_2M and
|
||||
* @ref BT_AUDIO_CODEC_QOS_CODED.
|
||||
*/
|
||||
uint8_t phy;
|
||||
|
||||
/**
|
||||
* @brief Retransmission Number
|
||||
*
|
||||
* This a recommendation to the controller, and the actual retransmission number
|
||||
* may be different than this.
|
||||
*/
|
||||
uint8_t rtn;
|
||||
|
||||
/**
|
||||
* @brief Maximum SDU size
|
||||
*
|
||||
* Value range @ref BT_ISO_MIN_SDU to @ref BT_ISO_MAX_SDU.
|
||||
*/
|
||||
uint16_t sdu;
|
||||
|
||||
#if defined(CONFIG_BT_BAP_BROADCAST_SOURCE) || defined(CONFIG_BT_BAP_UNICAST) || \
|
||||
defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief Maximum Transport Latency
|
||||
*
|
||||
* Not used for the @kconfig{CONFIG_BT_BAP_BROADCAST_SINK} role.
|
||||
*/
|
||||
uint16_t latency;
|
||||
#endif /* CONFIG_BT_BAP_BROADCAST_SOURCE || CONFIG_BT_BAP_UNICAST */
|
||||
|
||||
/**
|
||||
* @brief SDU Interval
|
||||
*
|
||||
* Value range @ref BT_ISO_SDU_INTERVAL_MIN to @ref BT_ISO_SDU_INTERVAL_MAX
|
||||
*/
|
||||
uint32_t interval;
|
||||
|
||||
#if defined(CONFIG_BT_ISO_TEST_PARAMS) || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief Maximum PDU size
|
||||
*
|
||||
* Maximum size, in octets, of the payload from link layer to link layer.
|
||||
*
|
||||
* Value range @ref BT_ISO_CONNECTED_PDU_MIN to @ref BT_ISO_PDU_MAX for
|
||||
* connected ISO.
|
||||
*
|
||||
* Value range @ref BT_ISO_BROADCAST_PDU_MIN to @ref BT_ISO_PDU_MAX for
|
||||
* broadcast ISO.
|
||||
*/
|
||||
uint16_t max_pdu;
|
||||
|
||||
/**
|
||||
* @brief Burst number
|
||||
*
|
||||
* Value range @ref BT_ISO_BN_MIN to @ref BT_ISO_BN_MAX.
|
||||
*/
|
||||
uint8_t burst_number;
|
||||
|
||||
/**
|
||||
* @brief Number of subevents
|
||||
*
|
||||
* Maximum number of subevents in each CIS or BIS event.
|
||||
*
|
||||
* Value range @ref BT_ISO_NSE_MIN to @ref BT_ISO_NSE_MAX.
|
||||
*/
|
||||
uint8_t num_subevents;
|
||||
#endif /* CONFIG_BT_ISO_TEST_PARAMS */
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Helper to declare elements of @ref bt_audio_codec_qos_pref
|
||||
*
|
||||
* @param _unframed_supported Unframed PDUs supported
|
||||
* @param _phy Preferred Target PHY
|
||||
* @param _rtn Preferred Retransmission number
|
||||
* @param _latency Preferred Maximum Transport Latency (msec)
|
||||
* @param _pd_min Minimum Presentation Delay (usec)
|
||||
* @param _pd_max Maximum Presentation Delay (usec)
|
||||
* @param _pref_pd_min Preferred Minimum Presentation Delay (usec)
|
||||
* @param _pref_pd_max Preferred Maximum Presentation Delay (usec)
|
||||
*/
|
||||
#define BT_AUDIO_CODEC_QOS_PREF(_unframed_supported, _phy, _rtn, _latency, _pd_min, _pd_max, \
|
||||
_pref_pd_min, _pref_pd_max) \
|
||||
{ \
|
||||
.unframed_supported = _unframed_supported, \
|
||||
.phy = _phy, \
|
||||
.rtn = _rtn, \
|
||||
.latency = _latency, \
|
||||
.pd_min = _pd_min, \
|
||||
.pd_max = _pd_max, \
|
||||
.pref_pd_min = _pref_pd_min, \
|
||||
.pref_pd_max = _pref_pd_max, \
|
||||
}
|
||||
|
||||
/** @brief Audio Stream Quality of Service Preference structure. */
|
||||
struct bt_audio_codec_qos_pref {
|
||||
/**
|
||||
* @brief Unframed PDUs supported
|
||||
*
|
||||
* Unlike the other fields, this is not a preference but whether
|
||||
* the codec supports unframed ISOAL PDUs.
|
||||
*/
|
||||
bool unframed_supported;
|
||||
|
||||
/**
|
||||
* @brief Preferred PHY bitfield
|
||||
*
|
||||
* Bitfield consisting of one or more of @ref BT_GAP_LE_PHY_1M, @ref BT_GAP_LE_PHY_2M and
|
||||
* @ref BT_GAP_LE_PHY_CODED.
|
||||
*/
|
||||
uint8_t phy;
|
||||
|
||||
/** Preferred Retransmission Number */
|
||||
uint8_t rtn;
|
||||
|
||||
/**
|
||||
* Preferred Transport Latency
|
||||
*
|
||||
* Value range @ref BT_ISO_LATENCY_MIN to @ref BT_ISO_LATENCY_MAX
|
||||
*/
|
||||
uint16_t latency;
|
||||
|
||||
/**
|
||||
* @brief Minimum Presentation Delay in microseconds
|
||||
*
|
||||
* Unlike the other fields, this is not a preference but a minimum requirement.
|
||||
*
|
||||
* Value range 0 to @ref BT_AUDIO_PD_MAX, or @ref BT_AUDIO_PD_PREF_NONE
|
||||
* to indicate no preference.
|
||||
*/
|
||||
uint32_t pd_min;
|
||||
|
||||
/**
|
||||
* @brief Maximum Presentation Delay
|
||||
*
|
||||
* Unlike the other fields, this is not a preference but a maximum requirement.
|
||||
*
|
||||
* Value range 0 to @ref BT_AUDIO_PD_MAX, or @ref BT_AUDIO_PD_PREF_NONE
|
||||
* to indicate no preference.
|
||||
*/
|
||||
uint32_t pd_max;
|
||||
|
||||
/**
|
||||
* @brief Preferred minimum Presentation Delay
|
||||
*
|
||||
* Value range @ref bt_audio_codec_qos_pref.pd_min to @ref bt_audio_codec_qos_pref.pd_max.
|
||||
*/
|
||||
uint32_t pref_pd_min;
|
||||
|
||||
/**
|
||||
* @brief Preferred maximum Presentation Delay
|
||||
*
|
||||
* Value range @ref bt_audio_codec_qos_pref.pd_min to @ref bt_audio_codec_qos_pref.pd_max,
|
||||
* and higher than @ref bt_audio_codec_qos_pref.pref_pd_min
|
||||
*/
|
||||
uint32_t pref_pd_max;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Audio codec Config APIs
|
||||
* @defgroup bt_audio_codec_cfg Codec config parsing APIs
|
||||
|
|
|
@ -35,11 +35,262 @@
|
|||
#include <zephyr/bluetooth/iso.h>
|
||||
#include <zephyr/net_buf.h>
|
||||
#include <zephyr/sys/slist.h>
|
||||
#include <zephyr/sys/util_macro.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Helper to declare elements of bt_bap_qos_cfg
|
||||
*
|
||||
* @param _interval SDU interval (usec)
|
||||
* @param _framing Framing
|
||||
* @param _phy Target PHY
|
||||
* @param _sdu Maximum SDU Size
|
||||
* @param _rtn Retransmission number
|
||||
* @param _latency Maximum Transport Latency (msec)
|
||||
* @param _pd Presentation Delay (usec)
|
||||
*/
|
||||
#define BT_BAP_QOS_CFG(_interval, _framing, _phy, _sdu, _rtn, _latency, _pd) \
|
||||
((struct bt_bap_qos_cfg){ \
|
||||
.interval = _interval, \
|
||||
.framing = _framing, \
|
||||
.phy = _phy, \
|
||||
.sdu = _sdu, \
|
||||
.rtn = _rtn, \
|
||||
IF_ENABLED(UTIL_OR(IS_ENABLED(CONFIG_BT_BAP_BROADCAST_SOURCE), \
|
||||
IS_ENABLED(CONFIG_BT_BAP_UNICAST)), \
|
||||
(.latency = _latency,)) \
|
||||
.pd = _pd, \
|
||||
})
|
||||
|
||||
/** @brief QoS Framing */
|
||||
enum bt_bap_qos_cfg_framing {
|
||||
/** Packets may be framed or unframed */
|
||||
BT_BAP_QOS_CFG_FRAMING_UNFRAMED = 0x00,
|
||||
/** Packets are always framed */
|
||||
BT_BAP_QOS_CFG_FRAMING_FRAMED = 0x01,
|
||||
};
|
||||
|
||||
/** @brief QoS Preferred PHY */
|
||||
enum {
|
||||
/** LE 1M PHY */
|
||||
BT_BAP_QOS_CFG_1M = BIT(0),
|
||||
/** LE 2M PHY */
|
||||
BT_BAP_QOS_CFG_2M = BIT(1),
|
||||
/** LE Coded PHY */
|
||||
BT_BAP_QOS_CFG_CODED = BIT(2),
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Helper to declare Input Unframed bt_bap_qos_cfg
|
||||
*
|
||||
* @param _interval SDU interval (usec)
|
||||
* @param _sdu Maximum SDU Size
|
||||
* @param _rtn Retransmission number
|
||||
* @param _latency Maximum Transport Latency (msec)
|
||||
* @param _pd Presentation Delay (usec)
|
||||
*/
|
||||
#define BT_BAP_QOS_CFG_UNFRAMED(_interval, _sdu, _rtn, _latency, _pd) \
|
||||
BT_BAP_QOS_CFG(_interval, BT_BAP_QOS_CFG_FRAMING_UNFRAMED, BT_BAP_QOS_CFG_2M, _sdu, _rtn, \
|
||||
_latency, _pd)
|
||||
|
||||
/**
|
||||
* @brief Helper to declare Input Framed bt_bap_qos_cfg
|
||||
*
|
||||
* @param _interval SDU interval (usec)
|
||||
* @param _sdu Maximum SDU Size
|
||||
* @param _rtn Retransmission number
|
||||
* @param _latency Maximum Transport Latency (msec)
|
||||
* @param _pd Presentation Delay (usec)
|
||||
*/
|
||||
#define BT_BAP_QOS_CFG_FRAMED(_interval, _sdu, _rtn, _latency, _pd) \
|
||||
BT_BAP_QOS_CFG(_interval, BT_BAP_QOS_CFG_FRAMING_FRAMED, BT_BAP_QOS_CFG_2M, _sdu, _rtn, \
|
||||
_latency, _pd)
|
||||
|
||||
/** @brief QoS configuration structure. */
|
||||
struct bt_bap_qos_cfg {
|
||||
/**
|
||||
* @brief Presentation Delay in microseconds
|
||||
*
|
||||
* This value can be changed up and until bt_bap_stream_qos() has been called.
|
||||
* Once a stream has been QoS configured, modifying this field does not modify the value.
|
||||
* It is however possible to modify this field and call bt_bap_stream_qos() again to update
|
||||
* the value, assuming that the stream is in the correct state.
|
||||
*
|
||||
* Value range 0 to @ref BT_AUDIO_PD_MAX.
|
||||
*/
|
||||
uint32_t pd;
|
||||
|
||||
/**
|
||||
* @brief Connected Isochronous Group (CIG) parameters
|
||||
*
|
||||
* The fields in this struct affect the value sent to the controller via HCI
|
||||
* when creating the CIG. Once the group has been created with
|
||||
* bt_bap_unicast_group_create(), modifying these fields will not affect the group.
|
||||
*/
|
||||
struct {
|
||||
/** QoS Framing */
|
||||
enum bt_bap_qos_cfg_framing framing;
|
||||
|
||||
/**
|
||||
* @brief PHY
|
||||
*
|
||||
* Allowed values are @ref BT_BAP_QOS_CFG_1M, @ref BT_BAP_QOS_CFG_2M and
|
||||
* @ref BT_BAP_QOS_CFG_CODED.
|
||||
*/
|
||||
uint8_t phy;
|
||||
|
||||
/**
|
||||
* @brief Retransmission Number
|
||||
*
|
||||
* This a recommendation to the controller, and the actual retransmission number
|
||||
* may be different than this.
|
||||
*/
|
||||
uint8_t rtn;
|
||||
|
||||
/**
|
||||
* @brief Maximum SDU size
|
||||
*
|
||||
* Value range @ref BT_ISO_MIN_SDU to @ref BT_ISO_MAX_SDU.
|
||||
*/
|
||||
uint16_t sdu;
|
||||
|
||||
#if defined(CONFIG_BT_BAP_BROADCAST_SOURCE) || defined(CONFIG_BT_BAP_UNICAST) || \
|
||||
defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief Maximum Transport Latency
|
||||
*
|
||||
* Not used for the @kconfig{CONFIG_BT_BAP_BROADCAST_SINK} role.
|
||||
*/
|
||||
uint16_t latency;
|
||||
#endif /* CONFIG_BT_BAP_BROADCAST_SOURCE || CONFIG_BT_BAP_UNICAST */
|
||||
|
||||
/**
|
||||
* @brief SDU Interval
|
||||
*
|
||||
* Value range @ref BT_ISO_SDU_INTERVAL_MIN to @ref BT_ISO_SDU_INTERVAL_MAX
|
||||
*/
|
||||
uint32_t interval;
|
||||
|
||||
#if defined(CONFIG_BT_ISO_TEST_PARAMS) || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief Maximum PDU size
|
||||
*
|
||||
* Maximum size, in octets, of the payload from link layer to link layer.
|
||||
*
|
||||
* Value range @ref BT_ISO_CONNECTED_PDU_MIN to @ref BT_ISO_PDU_MAX for
|
||||
* connected ISO.
|
||||
*
|
||||
* Value range @ref BT_ISO_BROADCAST_PDU_MIN to @ref BT_ISO_PDU_MAX for
|
||||
* broadcast ISO.
|
||||
*/
|
||||
uint16_t max_pdu;
|
||||
|
||||
/**
|
||||
* @brief Burst number
|
||||
*
|
||||
* Value range @ref BT_ISO_BN_MIN to @ref BT_ISO_BN_MAX.
|
||||
*/
|
||||
uint8_t burst_number;
|
||||
|
||||
/**
|
||||
* @brief Number of subevents
|
||||
*
|
||||
* Maximum number of subevents in each CIS or BIS event.
|
||||
*
|
||||
* Value range @ref BT_ISO_NSE_MIN to @ref BT_ISO_NSE_MAX.
|
||||
*/
|
||||
uint8_t num_subevents;
|
||||
#endif /* CONFIG_BT_ISO_TEST_PARAMS */
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Helper to declare elements of @ref bt_bap_qos_cfg_pref
|
||||
*
|
||||
* @param _unframed_supported Unframed PDUs supported
|
||||
* @param _phy Preferred Target PHY
|
||||
* @param _rtn Preferred Retransmission number
|
||||
* @param _latency Preferred Maximum Transport Latency (msec)
|
||||
* @param _pd_min Minimum Presentation Delay (usec)
|
||||
* @param _pd_max Maximum Presentation Delay (usec)
|
||||
* @param _pref_pd_min Preferred Minimum Presentation Delay (usec)
|
||||
* @param _pref_pd_max Preferred Maximum Presentation Delay (usec)
|
||||
*/
|
||||
#define BT_BAP_QOS_CFG_PREF(_unframed_supported, _phy, _rtn, _latency, _pd_min, _pd_max, \
|
||||
_pref_pd_min, _pref_pd_max) \
|
||||
{ \
|
||||
.unframed_supported = _unframed_supported, .phy = _phy, .rtn = _rtn, \
|
||||
.latency = _latency, .pd_min = _pd_min, .pd_max = _pd_max, \
|
||||
.pref_pd_min = _pref_pd_min, .pref_pd_max = _pref_pd_max, \
|
||||
}
|
||||
|
||||
/** @brief Audio Stream Quality of Service Preference structure. */
|
||||
struct bt_bap_qos_cfg_pref {
|
||||
/**
|
||||
* @brief Unframed PDUs supported
|
||||
*
|
||||
* Unlike the other fields, this is not a preference but whether
|
||||
* the codec supports unframed ISOAL PDUs.
|
||||
*/
|
||||
bool unframed_supported;
|
||||
|
||||
/**
|
||||
* @brief Preferred PHY bitfield
|
||||
*
|
||||
* Bitfield consisting of one or more of @ref BT_GAP_LE_PHY_1M, @ref BT_GAP_LE_PHY_2M and
|
||||
* @ref BT_GAP_LE_PHY_CODED.
|
||||
*/
|
||||
uint8_t phy;
|
||||
|
||||
/** Preferred Retransmission Number */
|
||||
uint8_t rtn;
|
||||
|
||||
/**
|
||||
* Preferred Transport Latency
|
||||
*
|
||||
* Value range @ref BT_ISO_LATENCY_MIN to @ref BT_ISO_LATENCY_MAX
|
||||
*/
|
||||
uint16_t latency;
|
||||
|
||||
/**
|
||||
* @brief Minimum Presentation Delay in microseconds
|
||||
*
|
||||
* Unlike the other fields, this is not a preference but a minimum requirement.
|
||||
*
|
||||
* Value range 0 to @ref BT_AUDIO_PD_MAX
|
||||
*/
|
||||
uint32_t pd_min;
|
||||
|
||||
/**
|
||||
* @brief Maximum Presentation Delay in microseconds
|
||||
*
|
||||
* Unlike the other fields, this is not a preference but a maximum requirement.
|
||||
*
|
||||
* Value range @ref bt_bap_qos_cfg_pref.pd_min to @ref BT_AUDIO_PD_MAX
|
||||
*/
|
||||
uint32_t pd_max;
|
||||
|
||||
/**
|
||||
* @brief Preferred minimum Presentation Delay in microseconds
|
||||
*
|
||||
* Value range @ref bt_bap_qos_cfg_pref.pd_min to @ref bt_bap_qos_cfg_pref.pd_max, or
|
||||
* @ref BT_AUDIO_PD_PREF_NONE to indicate no preference.
|
||||
*/
|
||||
uint32_t pref_pd_min;
|
||||
|
||||
/**
|
||||
* @brief Preferred maximum Presentation Delay in microseconds
|
||||
*
|
||||
* Value range @ref bt_bap_qos_cfg_pref.pd_min to @ref bt_bap_qos_cfg_pref.pd_max,
|
||||
* and higher than or equal to @ref bt_bap_qos_cfg_pref.pref_pd_min, or
|
||||
* @ref BT_AUDIO_PD_PREF_NONE to indicate no preference.
|
||||
*/
|
||||
uint32_t pref_pd_max;
|
||||
};
|
||||
|
||||
/** Periodic advertising state reported by the Scan Delegator */
|
||||
enum bt_bap_pa_state {
|
||||
/** The periodic advertising has not been synchronized */
|
||||
|
@ -435,7 +686,7 @@ struct bt_bap_ep_info {
|
|||
struct bt_bap_ep *paired_ep;
|
||||
|
||||
/** Pointer to the preferred QoS settings associated with the endpoint */
|
||||
const struct bt_audio_codec_qos_pref *qos_pref;
|
||||
const struct bt_bap_qos_cfg_pref *qos_pref;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -468,7 +719,7 @@ struct bt_bap_stream {
|
|||
struct bt_audio_codec_cfg *codec_cfg;
|
||||
|
||||
/** QoS Configuration */
|
||||
struct bt_audio_codec_qos *qos;
|
||||
struct bt_bap_qos_cfg *qos;
|
||||
|
||||
/** Audio stream operations */
|
||||
struct bt_bap_stream_ops *ops;
|
||||
|
@ -508,8 +759,7 @@ struct bt_bap_stream_ops {
|
|||
* @param stream Stream object that has been configured.
|
||||
* @param pref Remote QoS preferences.
|
||||
*/
|
||||
void (*configured)(struct bt_bap_stream *stream,
|
||||
const struct bt_audio_codec_qos_pref *pref);
|
||||
void (*configured)(struct bt_bap_stream *stream, const struct bt_bap_qos_cfg_pref *pref);
|
||||
|
||||
/**
|
||||
* @brief Stream QoS set callback
|
||||
|
@ -917,7 +1167,7 @@ struct bt_bap_unicast_server_cb {
|
|||
*/
|
||||
int (*config)(struct bt_conn *conn, const struct bt_bap_ep *ep, enum bt_audio_dir dir,
|
||||
const struct bt_audio_codec_cfg *codec_cfg, struct bt_bap_stream **stream,
|
||||
struct bt_audio_codec_qos_pref *const pref, struct bt_bap_ascs_rsp *rsp);
|
||||
struct bt_bap_qos_cfg_pref *const pref, struct bt_bap_ascs_rsp *rsp);
|
||||
|
||||
/**
|
||||
* @brief Stream reconfig request callback
|
||||
|
@ -937,7 +1187,7 @@ struct bt_bap_unicast_server_cb {
|
|||
*/
|
||||
int (*reconfig)(struct bt_bap_stream *stream, enum bt_audio_dir dir,
|
||||
const struct bt_audio_codec_cfg *codec_cfg,
|
||||
struct bt_audio_codec_qos_pref *const pref, struct bt_bap_ascs_rsp *rsp);
|
||||
struct bt_bap_qos_cfg_pref *const pref, struct bt_bap_ascs_rsp *rsp);
|
||||
|
||||
/**
|
||||
* @brief Stream QoS request callback
|
||||
|
@ -952,7 +1202,7 @@ struct bt_bap_unicast_server_cb {
|
|||
*
|
||||
* @return 0 in case of success or negative value in case of error.
|
||||
*/
|
||||
int (*qos)(struct bt_bap_stream *stream, const struct bt_audio_codec_qos *qos,
|
||||
int (*qos)(struct bt_bap_stream *stream, const struct bt_bap_qos_cfg *qos,
|
||||
struct bt_bap_ascs_rsp *rsp);
|
||||
|
||||
/**
|
||||
|
@ -1128,7 +1378,7 @@ void bt_bap_unicast_server_foreach_ep(struct bt_conn *conn, bt_bap_ep_func_t fun
|
|||
*/
|
||||
int bt_bap_unicast_server_config_ase(struct bt_conn *conn, struct bt_bap_stream *stream,
|
||||
struct bt_audio_codec_cfg *codec_cfg,
|
||||
const struct bt_audio_codec_qos_pref *qos_pref);
|
||||
const struct bt_bap_qos_cfg_pref *qos_pref);
|
||||
|
||||
/** @} */ /* End of group bt_bap_unicast_server */
|
||||
|
||||
|
@ -1144,7 +1394,7 @@ struct bt_bap_unicast_group_stream_param {
|
|||
struct bt_bap_stream *stream;
|
||||
|
||||
/** The QoS settings for the stream object. */
|
||||
struct bt_audio_codec_qos *qos;
|
||||
struct bt_bap_qos_cfg *qos;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -1216,7 +1466,7 @@ struct bt_bap_unicast_group_param {
|
|||
* Create a new audio unicast group with one or more audio streams as a unicast client.
|
||||
* All streams shall share the same framing.
|
||||
* All streams in the same direction shall share the same interval and latency (see
|
||||
* @ref bt_audio_codec_qos).
|
||||
* @ref bt_bap_qos_cfg).
|
||||
*
|
||||
* @param[in] param The unicast group create parameters.
|
||||
* @param[out] unicast_group Pointer to the unicast group created.
|
||||
|
@ -1232,7 +1482,7 @@ int bt_bap_unicast_group_create(struct bt_bap_unicast_group_param *param,
|
|||
* Reconfigure a unicast group with one or more audio streams as a unicast client.
|
||||
* All streams shall share the same framing.
|
||||
* All streams in the same direction shall share the same interval and latency (see
|
||||
* @ref bt_audio_codec_qos).
|
||||
* @ref bt_bap_qos_cfg).
|
||||
* All streams in @p param shall already belong to @p unicast_group.
|
||||
* Use bt_bap_unicast_group_add_streams() to add additional streams.
|
||||
*
|
||||
|
@ -1738,7 +1988,7 @@ struct bt_bap_broadcast_source_param {
|
|||
struct bt_bap_broadcast_source_subgroup_param *params;
|
||||
|
||||
/** Quality of Service configuration. */
|
||||
struct bt_audio_codec_qos *qos;
|
||||
struct bt_bap_qos_cfg *qos;
|
||||
|
||||
/**
|
||||
* @brief Broadcast Source packing mode.
|
||||
|
|
|
@ -21,12 +21,13 @@
|
|||
* @ingroup bluetooth
|
||||
* @{
|
||||
*
|
||||
* These APIs provide preset for codec configuration and codec QoS based on values supplied by the
|
||||
* These APIs provide preset for codec configuration and QoS based on values supplied by the
|
||||
* codec configuration tables in the BAP specification.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <zephyr/bluetooth/audio/audio.h>
|
||||
#include <zephyr/bluetooth/audio/bap.h>
|
||||
#include <zephyr/bluetooth/audio/lc3.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -38,7 +39,7 @@ struct bt_bap_lc3_preset {
|
|||
/** The LC3 Codec */
|
||||
struct bt_audio_codec_cfg codec_cfg;
|
||||
/** The BAP spec defined QoS values */
|
||||
struct bt_audio_codec_qos qos;
|
||||
struct bt_bap_qos_cfg qos;
|
||||
};
|
||||
|
||||
/** Helper to declare an LC3 preset structure */
|
||||
|
@ -59,7 +60,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_8KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 26u, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 26u, 2u, 8u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 26u, 2u, 8u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 8_2_1 codec configuration
|
||||
|
@ -71,7 +72,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_8KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 30U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 30u, 2u, 10u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 30u, 2u, 10u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 16_1_1 codec configuration
|
||||
|
@ -83,7 +84,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_16KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 30U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 30u, 2u, 8u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 30u, 2u, 8u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 16_2_1 codec configuration
|
||||
|
@ -97,7 +98,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_16KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 40U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 40u, 2u, 10u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 40u, 2u, 10u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 24_1_1 codec configuration
|
||||
|
@ -109,7 +110,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_24KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 45U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 45u, 2u, 8u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 45u, 2u, 8u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 24_2_1 codec configuration
|
||||
|
@ -123,7 +124,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_24KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 60U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 60u, 2u, 10u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 60u, 2u, 10u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 32_1_1 codec configuration
|
||||
|
@ -135,7 +136,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_32KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 60U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 60u, 2u, 8u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 60u, 2u, 8u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 32_2_1 codec configuration
|
||||
|
@ -147,7 +148,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_32KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 80U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 80u, 2u, 10u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 80u, 2u, 10u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 441_1_1 codec configuration
|
||||
|
@ -159,7 +160,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_44KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 97U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_FRAMED(8163u, 97u, 5u, 24u, 40000u))
|
||||
BT_BAP_QOS_CFG_FRAMED(8163u, 97u, 5u, 24u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 441_2_1 codec configuration
|
||||
|
@ -171,7 +172,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_44KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 130U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_FRAMED(10884u, 130u, 5u, 31u, 40000u))
|
||||
BT_BAP_QOS_CFG_FRAMED(10884u, 130u, 5u, 31u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_1_1 codec configuration
|
||||
|
@ -183,7 +184,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 75U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 75u, 5u, 15u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 75u, 5u, 15u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_2_1 codec configuration
|
||||
|
@ -195,7 +196,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 100U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 100u, 5u, 20u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 100u, 5u, 20u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_3_1 codec configuration
|
||||
|
@ -207,7 +208,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 90U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 90u, 5u, 15u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 90u, 5u, 15u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_4_1 codec configuration
|
||||
|
@ -219,7 +220,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 120u, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 120u, 5u, 20u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 120u, 5u, 20u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 8_5_1 codec configuration
|
||||
|
@ -231,7 +232,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 117u, \
|
||||
1, _stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 117u, 5u, 15u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 117u, 5u, 15u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_6_1 codec configuration
|
||||
|
@ -243,7 +244,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 155u, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 155u, 5u, 20u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 155u, 5u, 20u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 8_1_2 codec configuration
|
||||
|
@ -256,7 +257,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_8KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 26u, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 26u, 13u, 75u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 26u, 13u, 75u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 8_2_2 codec configuration
|
||||
|
@ -268,7 +269,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_8KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 30U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 30u, 13u, 95u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 30u, 13u, 95u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 16_1_2 codec configuration
|
||||
|
@ -280,7 +281,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_16KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 30U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 30u, 13u, 75u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 30u, 13u, 75u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 16_2_2 codec configuration
|
||||
|
@ -292,7 +293,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_16KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 40U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 40u, 13u, 95u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 40u, 13u, 95u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 24_1_2 codec configuration
|
||||
|
@ -304,7 +305,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_24KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 45U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 45u, 13u, 75u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 45u, 13u, 75u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 24_2_2 codec configuration
|
||||
|
@ -316,7 +317,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_24KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 60U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 60u, 13u, 95u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 60u, 13u, 95u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 32_1_2 codec configuration
|
||||
|
@ -328,7 +329,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_32KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 60U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 60u, 13u, 75u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 60u, 13u, 75u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 32_2_2 codec configuration
|
||||
|
@ -340,7 +341,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_32KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 80U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 80u, 13u, 95u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 80u, 13u, 95u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 441_1_2 codec configuration
|
||||
|
@ -352,7 +353,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_44KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 97U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_FRAMED(8163u, 97u, 13u, 80u, 40000u))
|
||||
BT_BAP_QOS_CFG_FRAMED(8163u, 97u, 13u, 80u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 441_2_2 codec configuration
|
||||
|
@ -364,7 +365,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_44KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 130U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_FRAMED(10884u, 130u, 13u, 85u, 40000u))
|
||||
BT_BAP_QOS_CFG_FRAMED(10884u, 130u, 13u, 85u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_1_2 codec configuration
|
||||
|
@ -376,7 +377,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 75U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 75u, 13u, 75u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 75u, 13u, 75u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_2_2 codec configuration
|
||||
|
@ -388,7 +389,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 100U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 100u, 13u, 95u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 100u, 13u, 95u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_3_2 codec configuration
|
||||
|
@ -400,7 +401,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 90U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 90u, 13u, 75u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 90u, 13u, 75u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_4_2 codec configuration
|
||||
|
@ -412,7 +413,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 120u, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 120u, 13u, 100u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 120u, 13u, 100u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_5_2 codec configuration
|
||||
|
@ -424,7 +425,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 117u, \
|
||||
1, _stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 117u, 13u, 75u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 117u, 13u, 75u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Unicast 48_6_2 codec configuration
|
||||
|
@ -436,7 +437,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 155u, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 155u, 13u, 100u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 155u, 13u, 100u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 8_1_1 codec configuration
|
||||
|
@ -449,7 +450,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_8KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 26u, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 26u, 2u, 8u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 26u, 2u, 8u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 8_2_1 codec configuration
|
||||
|
@ -461,7 +462,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_8KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 30U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 30u, 2u, 10u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 30u, 2u, 10u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 16_1_1 codec configuration
|
||||
|
@ -473,7 +474,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_16KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 30U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 30u, 2u, 8u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 30u, 2u, 8u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 16_2_1 codec configuration
|
||||
|
@ -487,7 +488,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_16KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 40U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 40u, 2u, 10u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 40u, 2u, 10u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 24_1_1 codec configuration
|
||||
|
@ -499,7 +500,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_24KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 45U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 45u, 2u, 8u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 45u, 2u, 8u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 24_2_1 codec configuration
|
||||
|
@ -513,7 +514,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_24KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 60U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 60u, 2u, 10u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 60u, 2u, 10u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 32_1_1 codec configuration
|
||||
|
@ -525,7 +526,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_32KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 60U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 60u, 2u, 8u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 60u, 2u, 8u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 32_2_1 codec configuration
|
||||
|
@ -537,7 +538,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_32KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 80U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 80u, 2u, 10u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 80u, 2u, 10u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 441_1_1 codec configuration
|
||||
|
@ -549,7 +550,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_44KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 97U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_FRAMED(8163u, 97u, 4u, 24u, 40000u))
|
||||
BT_BAP_QOS_CFG_FRAMED(8163u, 97u, 4u, 24u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 441_2_1 codec configuration
|
||||
|
@ -561,7 +562,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_44KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 130U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_FRAMED(10884u, 130u, 4u, 31u, 40000u))
|
||||
BT_BAP_QOS_CFG_FRAMED(10884u, 130u, 4u, 31u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_1_1 codec configuration
|
||||
|
@ -573,7 +574,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 75U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 75u, 4u, 15u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 75u, 4u, 15u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_2_1 codec configuration
|
||||
|
@ -585,7 +586,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 100U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 100u, 4u, 20u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 100u, 4u, 20u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_3_1 codec configuration
|
||||
|
@ -597,7 +598,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 90U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 90u, 4u, 15u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 90u, 4u, 15u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_4_1 codec configuration
|
||||
|
@ -609,7 +610,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 120u, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 120u, 4u, 20u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 120u, 4u, 20u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_5_1 codec configuration
|
||||
|
@ -621,7 +622,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 117u, \
|
||||
1, _stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 117u, 4u, 15u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 117u, 4u, 15u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_6_1 codec configuration
|
||||
|
@ -633,7 +634,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 155u, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 155u, 4u, 20u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 155u, 4u, 20u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 8_1_2 codec configuration
|
||||
|
@ -646,7 +647,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_8KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 26u, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 26u, 4u, 45u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 26u, 4u, 45u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 8_2_2 codec configuration
|
||||
|
@ -658,7 +659,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_8KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 30U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 30u, 4u, 60u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 30u, 4u, 60u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 16_1_2 codec configuration
|
||||
|
@ -670,7 +671,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_16KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 30U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 30u, 4u, 45u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 30u, 4u, 45u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 16_2_2 codec configuration
|
||||
|
@ -684,7 +685,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_16KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 40U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 40u, 4u, 60u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 40u, 4u, 60u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 24_1_2 codec configuration
|
||||
|
@ -696,7 +697,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_24KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 45U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 45u, 4u, 45u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 45u, 4u, 45u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 24_2_2 codec configuration
|
||||
|
@ -710,7 +711,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_24KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 60U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 60u, 4u, 60u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 60u, 4u, 60u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 32_1_2 codec configuration
|
||||
|
@ -722,7 +723,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_32KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 60U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 60u, 4u, 45u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 60u, 4u, 45u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 32_2_2 codec configuration
|
||||
|
@ -734,7 +735,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_32KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 80U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 80u, 4u, 60u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 80u, 4u, 60u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 441_1_2 codec configuration
|
||||
|
@ -746,7 +747,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_44KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 97U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_FRAMED(8163u, 97u, 4u, 54u, 40000u))
|
||||
BT_BAP_QOS_CFG_FRAMED(8163u, 97u, 4u, 54u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 441_2_2 codec configuration
|
||||
|
@ -758,7 +759,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_44KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 130U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_FRAMED(10884u, 130u, 4u, 60u, 40000u))
|
||||
BT_BAP_QOS_CFG_FRAMED(10884u, 130u, 4u, 60u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_1_2 codec configuration
|
||||
|
@ -770,7 +771,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 75U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 75u, 4u, 50u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 75u, 4u, 50u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_2_2 codec configuration
|
||||
|
@ -782,7 +783,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 100U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 100u, 4u, 65u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 100u, 4u, 65u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_3_2 codec configuration
|
||||
|
@ -794,7 +795,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 90U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 90u, 4u, 50u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 90u, 4u, 50u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_4_2 codec configuration
|
||||
|
@ -806,7 +807,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 120u, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 120u, 4u, 65u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 120u, 4u, 65u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_5_2 codec configuration
|
||||
|
@ -818,7 +819,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 117u, \
|
||||
1, _stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 117u, 4u, 50u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 117u, 4u, 50u, 40000u))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 Broadcast 48_6_2 codec configuration
|
||||
|
@ -830,7 +831,7 @@ struct bt_bap_lc3_preset {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 155u, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 155u, 4u, 65u, 40000u))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 155u, 4u, 65u, 40000u))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -456,7 +456,7 @@ struct bt_cap_initiator_broadcast_create_param {
|
|||
struct bt_cap_initiator_broadcast_subgroup_param *subgroup_params;
|
||||
|
||||
/** Quality of Service configuration. */
|
||||
struct bt_audio_codec_qos *qos;
|
||||
struct bt_bap_qos_cfg *qos;
|
||||
|
||||
/**
|
||||
* @brief Broadcast Source packing mode.
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
* @ingroup bluetooth
|
||||
* @{
|
||||
*
|
||||
* These APIs provide presets for codec configuration and codec QoS based on values supplied by the
|
||||
* These APIs provide presets for codec configuration and QoS based on values supplied by the
|
||||
* codec configurations from table 3.16 in the GMAP v1.0 specification
|
||||
*/
|
||||
|
||||
|
@ -43,7 +43,7 @@ extern "C" {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_32KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 60U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 60U, 1U, 15U, 10000U))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 60U, 1U, 15U, 10000U))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 32_2_gr codec configuration
|
||||
|
@ -55,7 +55,7 @@ extern "C" {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_32KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 80U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 80U, 1U, 20U, 10000U))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 80U, 1U, 20U, 10000U))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 48_1_gr codec configuration
|
||||
|
@ -67,7 +67,7 @@ extern "C" {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 75U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 75U, 1U, 15U, 10000U))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 75U, 1U, 15U, 10000U))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 48_2_gr codec configuration
|
||||
|
@ -81,7 +81,7 @@ extern "C" {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 100U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 100U, 1U, 20U, 10000U))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 100U, 1U, 20U, 10000U))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 48_3_gr codec configuration
|
||||
|
@ -93,7 +93,7 @@ extern "C" {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 90U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 90U, 1U, 15U, 10000U))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 90U, 1U, 15U, 10000U))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 48_4_gr codec configuration
|
||||
|
@ -107,7 +107,7 @@ extern "C" {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 120u, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 120U, 1U, 20U, 10000U))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 120U, 1U, 20U, 10000U))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 16_1_gs codec configuration
|
||||
|
@ -119,7 +119,7 @@ extern "C" {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_16KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 30U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 30U, 1U, 15U, 60000U))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 30U, 1U, 15U, 60000U))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 16_2_gs codec configuration
|
||||
|
@ -131,7 +131,7 @@ extern "C" {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_16KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 40U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 40U, 1U, 20U, 60000U))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 40U, 1U, 20U, 60000U))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 32_1_gs codec configuration
|
||||
|
@ -143,7 +143,7 @@ extern "C" {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_32KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 60U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 60U, 1U, 15U, 60000U))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 60U, 1U, 15U, 60000U))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 32_2_gs codec configuration
|
||||
|
@ -155,7 +155,7 @@ extern "C" {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_32KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 80U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 80U, 1U, 20U, 60000U))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 80U, 1U, 20U, 60000U))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 48_1_gs codec configuration
|
||||
|
@ -167,7 +167,7 @@ extern "C" {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 75U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 75U, 1U, 15U, 60000U))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 75U, 1U, 15U, 60000U))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 48_2_gs codec configuration
|
||||
|
@ -179,7 +179,7 @@ extern "C" {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 100U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 100U, 1U, 20U, 60000U))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 100U, 1U, 20U, 60000U))
|
||||
|
||||
/* GMAP LC3 broadcast presets defined by table 3.22 in the GMAP v1.0 specification */
|
||||
|
||||
|
@ -193,7 +193,7 @@ extern "C" {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 75U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 75U, 1U, 8U, 10000U))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 75U, 1U, 8U, 10000U))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 48_2_g codec configuration
|
||||
|
@ -205,7 +205,7 @@ extern "C" {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 100U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 100U, 1U, 10U, 10000U))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 100U, 1U, 10U, 10000U))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 48_3_g codec configuration
|
||||
|
@ -217,7 +217,7 @@ extern "C" {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 90U, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(7500u, 90U, 1U, 8U, 10000U))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(7500u, 90U, 1U, 8U, 10000U))
|
||||
|
||||
/**
|
||||
* @brief Helper to declare LC3 48_4_g codec configuration
|
||||
|
@ -229,7 +229,7 @@ extern "C" {
|
|||
BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ, \
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 120u, 1, \
|
||||
_stream_context), \
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, 120U, 1U, 10U, 10000U))
|
||||
BT_BAP_QOS_CFG_UNFRAMED(10000u, 120U, 1U, 10U, 10000U))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -215,8 +215,7 @@ static void start_scan(void)
|
|||
printk("Scanning successfully started\n");
|
||||
}
|
||||
|
||||
static void stream_configured(struct bt_bap_stream *stream,
|
||||
const struct bt_audio_codec_qos_pref *pref)
|
||||
static void stream_configured(struct bt_bap_stream *stream, const struct bt_bap_qos_cfg_pref *pref)
|
||||
{
|
||||
printk("Audio Stream %p configured\n", stream);
|
||||
|
||||
|
|
|
@ -63,8 +63,8 @@ static struct audio_source {
|
|||
} source_streams[CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT];
|
||||
static size_t configured_source_stream_count;
|
||||
|
||||
static const struct bt_audio_codec_qos_pref qos_pref =
|
||||
BT_AUDIO_CODEC_QOS_PREF(true, BT_GAP_LE_PHY_2M, 0x02, 10, 40000, 40000, 40000, 40000);
|
||||
static const struct bt_bap_qos_cfg_pref qos_pref =
|
||||
BT_BAP_QOS_CFG_PREF(true, BT_GAP_LE_PHY_2M, 0x02, 10, 40000, 40000, 40000, 40000);
|
||||
|
||||
static K_SEM_DEFINE(sem_disconnected, 0, 1);
|
||||
|
||||
|
@ -184,7 +184,7 @@ static void print_codec_cfg(const struct bt_audio_codec_cfg *codec_cfg)
|
|||
bt_audio_data_parse(codec_cfg->meta, codec_cfg->meta_len, print_cb, "meta");
|
||||
}
|
||||
|
||||
static void print_qos(const struct bt_audio_codec_qos *qos)
|
||||
static void print_qos(const struct bt_bap_qos_cfg *qos)
|
||||
{
|
||||
printk("QoS: interval %u framing 0x%02x phy 0x%02x sdu %u "
|
||||
"rtn %u latency %u pd %u\n",
|
||||
|
@ -304,7 +304,7 @@ static struct bt_bap_stream *stream_alloc(enum bt_audio_dir dir)
|
|||
|
||||
static int lc3_config(struct bt_conn *conn, const struct bt_bap_ep *ep, enum bt_audio_dir dir,
|
||||
const struct bt_audio_codec_cfg *codec_cfg, struct bt_bap_stream **stream,
|
||||
struct bt_audio_codec_qos_pref *const pref, struct bt_bap_ascs_rsp *rsp)
|
||||
struct bt_bap_qos_cfg_pref *const pref, struct bt_bap_ascs_rsp *rsp)
|
||||
{
|
||||
printk("ASE Codec Config: conn %p ep %p dir %u\n", conn, ep, dir);
|
||||
|
||||
|
@ -336,7 +336,7 @@ static int lc3_config(struct bt_conn *conn, const struct bt_bap_ep *ep, enum bt_
|
|||
|
||||
static int lc3_reconfig(struct bt_bap_stream *stream, enum bt_audio_dir dir,
|
||||
const struct bt_audio_codec_cfg *codec_cfg,
|
||||
struct bt_audio_codec_qos_pref *const pref, struct bt_bap_ascs_rsp *rsp)
|
||||
struct bt_bap_qos_cfg_pref *const pref, struct bt_bap_ascs_rsp *rsp)
|
||||
{
|
||||
printk("ASE Codec Reconfig: stream %p\n", stream);
|
||||
|
||||
|
@ -353,7 +353,7 @@ static int lc3_reconfig(struct bt_bap_stream *stream, enum bt_audio_dir dir,
|
|||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
static int lc3_qos(struct bt_bap_stream *stream, const struct bt_audio_codec_qos *qos,
|
||||
static int lc3_qos(struct bt_bap_stream *stream, const struct bt_bap_qos_cfg *qos,
|
||||
struct bt_bap_ascs_rsp *rsp)
|
||||
{
|
||||
printk("QoS: stream %p qos %p\n", stream, qos);
|
||||
|
|
|
@ -41,7 +41,7 @@ LOG_MODULE_REGISTER(cap_acceptor_unicast, LOG_LEVEL_INF);
|
|||
#define LATENCY 20U
|
||||
#define RTN 2U
|
||||
|
||||
static const struct bt_audio_codec_qos_pref qos_pref = BT_AUDIO_CODEC_QOS_PREF(
|
||||
static const struct bt_bap_qos_cfg_pref qos_pref = BT_BAP_QOS_CFG_PREF(
|
||||
UNFRAMED_SUPPORTED, PREF_PHY, RTN, LATENCY, MIN_PD, MAX_PD, MIN_PD, MAX_PD);
|
||||
uint64_t total_unicast_rx_iso_packet_count; /* This value is exposed to test code */
|
||||
uint64_t total_unicast_tx_iso_packet_count; /* This value is exposed to test code */
|
||||
|
@ -99,7 +99,7 @@ static void log_codec_cfg(const struct bt_audio_codec_cfg *codec_cfg)
|
|||
bt_audio_data_parse(codec_cfg->meta, codec_cfg->meta_len, log_codec_cfg_cb, "meta");
|
||||
}
|
||||
|
||||
static void log_qos(const struct bt_audio_codec_qos *qos)
|
||||
static void log_qos(const struct bt_bap_qos_cfg *qos)
|
||||
{
|
||||
LOG_INF("QoS: interval %u framing 0x%02x phy 0x%02x sdu %u rtn %u latency %u pd %u",
|
||||
qos->interval, qos->framing, qos->phy, qos->sdu, qos->rtn, qos->latency, qos->pd);
|
||||
|
@ -109,7 +109,7 @@ static int unicast_server_config_cb(struct bt_conn *conn, const struct bt_bap_ep
|
|||
enum bt_audio_dir dir,
|
||||
const struct bt_audio_codec_cfg *codec_cfg,
|
||||
struct bt_bap_stream **bap_stream,
|
||||
struct bt_audio_codec_qos_pref *const pref,
|
||||
struct bt_bap_qos_cfg_pref *const pref,
|
||||
struct bt_bap_ascs_rsp *rsp)
|
||||
{
|
||||
struct bt_cap_stream *cap_stream;
|
||||
|
@ -137,7 +137,7 @@ static int unicast_server_config_cb(struct bt_conn *conn, const struct bt_bap_ep
|
|||
|
||||
static int unicast_server_reconfig_cb(struct bt_bap_stream *bap_stream, enum bt_audio_dir dir,
|
||||
const struct bt_audio_codec_cfg *codec_cfg,
|
||||
struct bt_audio_codec_qos_pref *const pref,
|
||||
struct bt_bap_qos_cfg_pref *const pref,
|
||||
struct bt_bap_ascs_rsp *rsp)
|
||||
{
|
||||
LOG_INF("ASE Codec Reconfig: bap_stream %p", bap_stream);
|
||||
|
@ -147,8 +147,8 @@ static int unicast_server_reconfig_cb(struct bt_bap_stream *bap_stream, enum bt_
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int unicast_server_qos_cb(struct bt_bap_stream *bap_stream,
|
||||
const struct bt_audio_codec_qos *qos, struct bt_bap_ascs_rsp *rsp)
|
||||
static int unicast_server_qos_cb(struct bt_bap_stream *bap_stream, const struct bt_bap_qos_cfg *qos,
|
||||
struct bt_bap_ascs_rsp *rsp)
|
||||
{
|
||||
LOG_INF("QoS: bap_stream %p qos %p", bap_stream, qos);
|
||||
|
||||
|
@ -249,7 +249,7 @@ static const struct bt_bap_unicast_server_cb unicast_server_cb = {
|
|||
};
|
||||
|
||||
static void unicast_stream_configured_cb(struct bt_bap_stream *bap_stream,
|
||||
const struct bt_audio_codec_qos_pref *pref)
|
||||
const struct bt_bap_qos_cfg_pref *pref)
|
||||
{
|
||||
LOG_INF("Configured bap_stream %p", bap_stream);
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ static bool is_tx_stream(struct bt_bap_stream *stream)
|
|||
}
|
||||
|
||||
static void unicast_stream_configured_cb(struct bt_bap_stream *stream,
|
||||
const struct bt_audio_codec_qos_pref *pref)
|
||||
const struct bt_bap_qos_cfg_pref *pref)
|
||||
{
|
||||
LOG_INF("Configured stream %p", stream);
|
||||
|
||||
|
|
|
@ -37,8 +37,8 @@ static struct audio_source {
|
|||
} source_streams[CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT];
|
||||
static size_t configured_source_stream_count;
|
||||
|
||||
static const struct bt_audio_codec_qos_pref qos_pref =
|
||||
BT_AUDIO_CODEC_QOS_PREF(true, BT_GAP_LE_PHY_2M, 0x02, 10, 20000, 40000, 20000, 40000);
|
||||
static const struct bt_bap_qos_cfg_pref qos_pref =
|
||||
BT_BAP_QOS_CFG_PREF(true, BT_GAP_LE_PHY_2M, 0x02, 10, 20000, 40000, 20000, 40000);
|
||||
|
||||
static uint16_t get_and_incr_seq_num(const struct bt_bap_stream *stream)
|
||||
{
|
||||
|
@ -111,7 +111,7 @@ static void print_codec_cfg(const struct bt_audio_codec_cfg *codec_cfg)
|
|||
bt_audio_data_parse(codec_cfg->meta, codec_cfg->meta_len, print_cb, "meta");
|
||||
}
|
||||
|
||||
static void print_qos(const struct bt_audio_codec_qos *qos)
|
||||
static void print_qos(const struct bt_bap_qos_cfg *qos)
|
||||
{
|
||||
printk("QoS: interval %u framing 0x%02x phy 0x%02x sdu %u "
|
||||
"rtn %u latency %u pd %u\n",
|
||||
|
@ -201,7 +201,7 @@ static struct bt_bap_stream *stream_alloc(void)
|
|||
|
||||
static int lc3_config(struct bt_conn *conn, const struct bt_bap_ep *ep, enum bt_audio_dir dir,
|
||||
const struct bt_audio_codec_cfg *codec_cfg, struct bt_bap_stream **stream,
|
||||
struct bt_audio_codec_qos_pref *const pref, struct bt_bap_ascs_rsp *rsp)
|
||||
struct bt_bap_qos_cfg_pref *const pref, struct bt_bap_ascs_rsp *rsp)
|
||||
{
|
||||
printk("ASE Codec Config: conn %p ep %p dir %u\n", conn, ep, dir);
|
||||
|
||||
|
@ -227,7 +227,7 @@ static int lc3_config(struct bt_conn *conn, const struct bt_bap_ep *ep, enum bt_
|
|||
|
||||
static int lc3_reconfig(struct bt_bap_stream *stream, enum bt_audio_dir dir,
|
||||
const struct bt_audio_codec_cfg *codec_cfg,
|
||||
struct bt_audio_codec_qos_pref *const pref, struct bt_bap_ascs_rsp *rsp)
|
||||
struct bt_bap_qos_cfg_pref *const pref, struct bt_bap_ascs_rsp *rsp)
|
||||
{
|
||||
printk("ASE Codec Reconfig: stream %p\n", stream);
|
||||
|
||||
|
@ -239,7 +239,7 @@ static int lc3_reconfig(struct bt_bap_stream *stream, enum bt_audio_dir dir,
|
|||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
static int lc3_qos(struct bt_bap_stream *stream, const struct bt_audio_codec_qos *qos,
|
||||
static int lc3_qos(struct bt_bap_stream *stream, const struct bt_bap_qos_cfg *qos,
|
||||
struct bt_bap_ascs_rsp *rsp)
|
||||
{
|
||||
printk("QoS: stream %p qos %p\n", stream, qos);
|
||||
|
|
|
@ -43,7 +43,7 @@ static K_SEM_DEFINE(sem_discover_source, 0, 1);
|
|||
static K_SEM_DEFINE(sem_audio_start, 0, 1);
|
||||
|
||||
static void unicast_stream_configured(struct bt_bap_stream *stream,
|
||||
const struct bt_audio_codec_qos_pref *pref)
|
||||
const struct bt_bap_qos_cfg_pref *pref)
|
||||
{
|
||||
printk("Configured stream %p\n", stream);
|
||||
|
||||
|
|
|
@ -50,8 +50,8 @@ static struct audio_source {
|
|||
} source_streams[CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT];
|
||||
static size_t configured_source_stream_count;
|
||||
|
||||
static const struct bt_audio_codec_qos_pref qos_pref =
|
||||
BT_AUDIO_CODEC_QOS_PREF(true, BT_GAP_LE_PHY_2M, 0x02, 10, 20000, 40000, 20000, 40000);
|
||||
static const struct bt_bap_qos_cfg_pref qos_pref =
|
||||
BT_BAP_QOS_CFG_PREF(true, BT_GAP_LE_PHY_2M, 0x02, 10, 20000, 40000, 20000, 40000);
|
||||
|
||||
static void print_hex(const uint8_t *ptr, size_t len)
|
||||
{
|
||||
|
@ -111,7 +111,7 @@ static void print_codec_cfg(const struct bt_audio_codec_cfg *codec_cfg)
|
|||
bt_audio_data_parse(codec_cfg->meta, codec_cfg->meta_len, print_cb, "meta");
|
||||
}
|
||||
|
||||
static void print_qos(const struct bt_audio_codec_qos *qos)
|
||||
static void print_qos(const struct bt_bap_qos_cfg *qos)
|
||||
{
|
||||
printk("QoS: interval %u framing 0x%02x phy 0x%02x sdu %u "
|
||||
"rtn %u latency %u pd %u\n",
|
||||
|
@ -134,7 +134,7 @@ static struct bt_bap_stream *stream_alloc(void)
|
|||
|
||||
static int lc3_config(struct bt_conn *conn, const struct bt_bap_ep *ep, enum bt_audio_dir dir,
|
||||
const struct bt_audio_codec_cfg *codec_cfg, struct bt_bap_stream **stream,
|
||||
struct bt_audio_codec_qos_pref *const pref, struct bt_bap_ascs_rsp *rsp)
|
||||
struct bt_bap_qos_cfg_pref *const pref, struct bt_bap_ascs_rsp *rsp)
|
||||
{
|
||||
|
||||
printk("ASE Codec Config: conn %p ep %p dir %u\n", conn, ep, dir);
|
||||
|
@ -162,7 +162,7 @@ static int lc3_config(struct bt_conn *conn, const struct bt_bap_ep *ep, enum bt_
|
|||
|
||||
static int lc3_reconfig(struct bt_bap_stream *stream, enum bt_audio_dir dir,
|
||||
const struct bt_audio_codec_cfg *codec_cfg,
|
||||
struct bt_audio_codec_qos_pref *const pref, struct bt_bap_ascs_rsp *rsp)
|
||||
struct bt_bap_qos_cfg_pref *const pref, struct bt_bap_ascs_rsp *rsp)
|
||||
{
|
||||
printk("ASE Codec Reconfig: stream %p\n", stream);
|
||||
print_codec_cfg(codec_cfg);
|
||||
|
@ -171,7 +171,7 @@ static int lc3_reconfig(struct bt_bap_stream *stream, enum bt_audio_dir dir,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int lc3_qos(struct bt_bap_stream *stream, const struct bt_audio_codec_qos *qos,
|
||||
static int lc3_qos(struct bt_bap_stream *stream, const struct bt_bap_qos_cfg *qos,
|
||||
struct bt_bap_ascs_rsp *rsp)
|
||||
{
|
||||
printk("QoS: stream %p qos %p\n", stream, qos);
|
||||
|
|
|
@ -713,7 +713,7 @@ int ascs_ep_set_state(struct bt_bap_ep *ep, uint8_t state)
|
|||
static void ascs_ep_get_status_config(struct bt_bap_ep *ep, struct net_buf_simple *buf)
|
||||
{
|
||||
struct bt_ascs_ase_status_config *cfg;
|
||||
struct bt_audio_codec_qos_pref *pref = &ep->qos_pref;
|
||||
struct bt_bap_qos_cfg_pref *pref = &ep->qos_pref;
|
||||
|
||||
cfg = net_buf_simple_add(buf, sizeof(*cfg));
|
||||
cfg->framing = pref->unframed_supported ? BT_ASCS_QOS_FRAMING_UNFRAMED
|
||||
|
@ -960,7 +960,7 @@ static void ascs_iso_sent(struct bt_iso_chan *chan)
|
|||
static void ascs_update_sdu_size(struct bt_bap_ep *ep)
|
||||
{
|
||||
struct bt_iso_chan_io_qos *io_qos;
|
||||
struct bt_audio_codec_qos *codec_qos = &ep->qos;
|
||||
struct bt_bap_qos_cfg *qos_cfg = &ep->qos;
|
||||
|
||||
if (ep->dir == BT_AUDIO_DIR_SINK) {
|
||||
io_qos = ep->iso->chan.qos->rx;
|
||||
|
@ -970,8 +970,8 @@ static void ascs_update_sdu_size(struct bt_bap_ep *ep)
|
|||
return;
|
||||
}
|
||||
|
||||
io_qos->sdu = codec_qos->sdu;
|
||||
io_qos->rtn = codec_qos->rtn;
|
||||
io_qos->sdu = qos_cfg->sdu;
|
||||
io_qos->rtn = qos_cfg->rtn;
|
||||
}
|
||||
|
||||
static void ascs_ep_iso_connected(struct bt_bap_ep *ep)
|
||||
|
@ -1631,7 +1631,7 @@ static int ase_config(struct bt_ascs_ase *ase, const struct bt_ascs_config *cfg)
|
|||
BT_BAP_ASCS_REASON_NONE);
|
||||
}
|
||||
|
||||
if (err == 0 && !bt_audio_valid_qos_pref(&ase->ep.qos_pref)) {
|
||||
if (err == 0 && !bt_bap_valid_qos_pref(&ase->ep.qos_pref)) {
|
||||
LOG_ERR("Invalid QoS preferences");
|
||||
|
||||
/* If the upper layers provide an invalid QoS preferences we reject the
|
||||
|
@ -1672,7 +1672,7 @@ static int ase_config(struct bt_ascs_ase *ase, const struct bt_ascs_config *cfg)
|
|||
BT_BAP_ASCS_REASON_NONE);
|
||||
}
|
||||
|
||||
if (err == 0 && !bt_audio_valid_qos_pref(&ase->ep.qos_pref)) {
|
||||
if (err == 0 && !bt_bap_valid_qos_pref(&ase->ep.qos_pref)) {
|
||||
LOG_ERR("Invalid QoS preferences");
|
||||
|
||||
/* If the upper layers provide an invalid QoS preferences we reject the
|
||||
|
@ -1726,7 +1726,7 @@ static struct bt_bap_ep *ep_lookup_stream(struct bt_conn *conn, struct bt_bap_st
|
|||
|
||||
int bt_ascs_config_ase(struct bt_conn *conn, struct bt_bap_stream *stream,
|
||||
struct bt_audio_codec_cfg *codec_cfg,
|
||||
const struct bt_audio_codec_qos_pref *qos_pref)
|
||||
const struct bt_bap_qos_cfg_pref *qos_pref)
|
||||
{
|
||||
int err;
|
||||
struct bt_ascs_ase *ase = NULL;
|
||||
|
@ -1934,7 +1934,7 @@ void bt_ascs_foreach_ep(struct bt_conn *conn, bt_bap_ep_func_t func, void *user_
|
|||
}
|
||||
|
||||
static void ase_qos(struct bt_ascs_ase *ase, uint8_t cig_id, uint8_t cis_id,
|
||||
struct bt_audio_codec_qos *qos, struct bt_bap_ascs_rsp *rsp)
|
||||
struct bt_bap_qos_cfg *qos, struct bt_bap_ascs_rsp *rsp)
|
||||
{
|
||||
struct bt_bap_ep *ep = &ase->ep;
|
||||
struct bt_bap_stream *stream;
|
||||
|
@ -2094,7 +2094,7 @@ static ssize_t ascs_qos(struct bt_conn *conn, struct net_buf_simple *buf)
|
|||
for (uint8_t i = 0; i < req->num_ases; i++) {
|
||||
struct bt_bap_ascs_rsp rsp = BT_BAP_ASCS_RSP(BT_BAP_ASCS_RSP_CODE_UNSPECIFIED,
|
||||
BT_BAP_ASCS_REASON_NONE);
|
||||
struct bt_audio_codec_qos cqos;
|
||||
struct bt_bap_qos_cfg cqos;
|
||||
const struct bt_ascs_qos *qos;
|
||||
struct bt_ascs_ase *ase;
|
||||
|
||||
|
|
|
@ -352,7 +352,7 @@ int ascs_ep_set_state(struct bt_bap_ep *ep, uint8_t state);
|
|||
|
||||
int bt_ascs_config_ase(struct bt_conn *conn, struct bt_bap_stream *stream,
|
||||
struct bt_audio_codec_cfg *codec_cfg,
|
||||
const struct bt_audio_codec_qos_pref *qos_pref);
|
||||
const struct bt_bap_qos_cfg_pref *qos_pref);
|
||||
int bt_ascs_disable_ase(struct bt_bap_ep *ep);
|
||||
int bt_ascs_release_ase(struct bt_bap_ep *ep);
|
||||
|
||||
|
|
|
@ -733,7 +733,7 @@ static int store_base_info(struct bt_bap_broadcast_sink *sink, const struct bt_b
|
|||
|
||||
/* Ensure that we have not synced while parsing the BASE */
|
||||
if (sink->big == NULL) {
|
||||
sink->codec_qos.pd = pres_delay;
|
||||
sink->qos_cfg.pd = pres_delay;
|
||||
memcpy(sink->bis, data.bis, sizeof(sink->bis));
|
||||
memcpy(sink->subgroups, data.subgroups, sizeof(sink->subgroups));
|
||||
sink->subgroup_count = data.subgroup_count;
|
||||
|
@ -944,10 +944,10 @@ static void biginfo_recv(struct bt_le_per_adv_sync *sync,
|
|||
}
|
||||
}
|
||||
|
||||
sink->codec_qos.framing = biginfo->framing;
|
||||
sink->codec_qos.phy = biginfo->phy;
|
||||
sink->codec_qos.sdu = biginfo->max_sdu;
|
||||
sink->codec_qos.interval = biginfo->sdu_interval;
|
||||
sink->qos_cfg.framing = biginfo->framing;
|
||||
sink->qos_cfg.phy = biginfo->phy;
|
||||
sink->qos_cfg.sdu = biginfo->max_sdu;
|
||||
sink->qos_cfg.interval = biginfo->sdu_interval;
|
||||
|
||||
SYS_SLIST_FOR_EACH_CONTAINER(&sink_cbs, listener, _node) {
|
||||
if (listener->syncable != NULL) {
|
||||
|
@ -1045,13 +1045,13 @@ static int bt_bap_broadcast_sink_setup_stream(struct bt_bap_broadcast_sink *sink
|
|||
bt_bap_iso_init(iso, &broadcast_sink_iso_ops);
|
||||
bt_bap_iso_bind_ep(iso, ep);
|
||||
|
||||
bt_audio_codec_qos_to_iso_qos(iso->chan.qos->rx, &sink->codec_qos);
|
||||
bt_bap_qos_cfg_to_iso_qos(iso->chan.qos->rx, &sink->qos_cfg);
|
||||
bt_bap_iso_configure_data_path(ep, codec_cfg);
|
||||
|
||||
bt_bap_iso_unref(iso);
|
||||
|
||||
bt_bap_stream_attach(NULL, stream, ep, codec_cfg);
|
||||
stream->qos = &sink->codec_qos;
|
||||
stream->qos = &sink->qos_cfg;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -293,7 +293,7 @@ static struct bt_bap_broadcast_subgroup *broadcast_source_new_subgroup(uint8_t i
|
|||
|
||||
static int broadcast_source_setup_stream(uint8_t index, struct bt_bap_stream *stream,
|
||||
struct bt_audio_codec_cfg *codec_cfg,
|
||||
struct bt_audio_codec_qos *qos,
|
||||
struct bt_bap_qos_cfg *qos,
|
||||
struct bt_bap_broadcast_source *source)
|
||||
{
|
||||
struct bt_bap_iso *iso;
|
||||
|
@ -314,7 +314,7 @@ static int broadcast_source_setup_stream(uint8_t index, struct bt_bap_stream *st
|
|||
bt_bap_iso_init(iso, &broadcast_source_iso_ops);
|
||||
bt_bap_iso_bind_ep(iso, ep);
|
||||
|
||||
bt_audio_codec_qos_to_iso_qos(iso->chan.qos->tx, qos);
|
||||
bt_bap_qos_cfg_to_iso_qos(iso->chan.qos->tx, qos);
|
||||
bt_bap_iso_configure_data_path(ep, codec_cfg);
|
||||
#if defined(CONFIG_BT_ISO_TEST_PARAMS)
|
||||
iso->chan.qos->num_subevents = qos->num_subevents;
|
||||
|
@ -509,7 +509,7 @@ static void broadcast_source_cleanup(struct bt_bap_broadcast_source *source)
|
|||
static bool valid_broadcast_source_param(const struct bt_bap_broadcast_source_param *param,
|
||||
const struct bt_bap_broadcast_source *source)
|
||||
{
|
||||
const struct bt_audio_codec_qos *qos;
|
||||
const struct bt_bap_qos_cfg *qos;
|
||||
|
||||
CHECKIF(param == NULL) {
|
||||
LOG_DBG("param is NULL");
|
||||
|
@ -716,7 +716,7 @@ int bt_bap_broadcast_source_create(struct bt_bap_broadcast_source_param *param,
|
|||
struct bt_bap_broadcast_source **out_source)
|
||||
{
|
||||
struct bt_bap_broadcast_source *source;
|
||||
struct bt_audio_codec_qos *qos;
|
||||
struct bt_bap_qos_cfg *qos;
|
||||
size_t stream_count;
|
||||
uint8_t index;
|
||||
uint8_t bis_count;
|
||||
|
@ -864,7 +864,7 @@ int bt_bap_broadcast_source_reconfig(struct bt_bap_broadcast_source *source,
|
|||
{
|
||||
struct bt_bap_broadcast_subgroup *subgroup;
|
||||
enum bt_bap_ep_state broadcast_state;
|
||||
struct bt_audio_codec_qos *qos;
|
||||
struct bt_bap_qos_cfg *qos;
|
||||
size_t subgroup_cnt;
|
||||
uint8_t bis_count;
|
||||
|
||||
|
@ -1020,7 +1020,7 @@ int bt_bap_broadcast_source_reconfig(struct bt_bap_broadcast_source *source,
|
|||
struct bt_iso_chan_io_qos *iso_qos;
|
||||
|
||||
iso_qos = stream->ep->iso->chan.qos->tx;
|
||||
bt_audio_codec_qos_to_iso_qos(iso_qos, qos);
|
||||
bt_bap_qos_cfg_to_iso_qos(iso_qos, qos);
|
||||
stream->qos = qos;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,8 +48,8 @@ struct bt_bap_ep {
|
|||
struct bt_ascs_ase_status status;
|
||||
struct bt_bap_stream *stream;
|
||||
struct bt_audio_codec_cfg codec_cfg;
|
||||
struct bt_audio_codec_qos qos;
|
||||
struct bt_audio_codec_qos_pref qos_pref;
|
||||
struct bt_bap_qos_cfg qos;
|
||||
struct bt_bap_qos_cfg_pref qos_pref;
|
||||
struct bt_bap_iso *iso;
|
||||
|
||||
/* unicast stopped reason */
|
||||
|
@ -111,7 +111,7 @@ struct bt_bap_broadcast_source {
|
|||
uint32_t broadcast_id; /* 24 bit */
|
||||
|
||||
struct bt_iso_big *big;
|
||||
struct bt_audio_codec_qos *qos;
|
||||
struct bt_bap_qos_cfg *qos;
|
||||
#if defined(CONFIG_BT_ISO_TEST_PARAMS)
|
||||
/* Stored advanced parameters */
|
||||
uint8_t irc;
|
||||
|
@ -178,7 +178,7 @@ struct bt_bap_broadcast_sink {
|
|||
uint32_t broadcast_id; /* 24 bit */
|
||||
uint32_t indexes_bitfield;
|
||||
uint32_t valid_indexes_bitfield; /* based on codec support */
|
||||
struct bt_audio_codec_qos codec_qos;
|
||||
struct bt_bap_qos_cfg qos_cfg;
|
||||
struct bt_le_per_adv_sync *pa_sync;
|
||||
struct bt_iso_big *big;
|
||||
struct bt_bap_broadcast_sink_bis bis[CONFIG_BT_BAP_BROADCAST_SNK_STREAM_COUNT];
|
||||
|
|
|
@ -45,15 +45,14 @@ LOG_MODULE_REGISTER(bt_bap_stream, CONFIG_BT_BAP_STREAM_LOG_LEVEL);
|
|||
|
||||
#if defined(CONFIG_BT_BAP_UNICAST_CLIENT) || defined(CONFIG_BT_BAP_BROADCAST_SOURCE) || \
|
||||
defined(CONFIG_BT_BAP_BROADCAST_SINK)
|
||||
void bt_audio_codec_qos_to_iso_qos(struct bt_iso_chan_io_qos *io,
|
||||
const struct bt_audio_codec_qos *codec_qos)
|
||||
void bt_bap_qos_cfg_to_iso_qos(struct bt_iso_chan_io_qos *io, const struct bt_bap_qos_cfg *qos_cfg)
|
||||
{
|
||||
io->sdu = codec_qos->sdu;
|
||||
io->phy = codec_qos->phy;
|
||||
io->rtn = codec_qos->rtn;
|
||||
io->sdu = qos_cfg->sdu;
|
||||
io->phy = qos_cfg->phy;
|
||||
io->rtn = qos_cfg->rtn;
|
||||
#if defined(CONFIG_BT_ISO_TEST_PARAMS)
|
||||
io->burst_number = codec_qos->burst_number;
|
||||
io->max_pdu = codec_qos->max_pdu;
|
||||
io->burst_number = qos_cfg->burst_number;
|
||||
io->max_pdu = qos_cfg->max_pdu;
|
||||
#endif /* CONFIG_BT_ISO_TEST_PARAMS */
|
||||
}
|
||||
#endif /* CONFIG_BT_BAP_UNICAST_CLIENT || \
|
||||
|
@ -167,7 +166,7 @@ int bt_bap_ep_get_info(const struct bt_bap_ep *ep, struct bt_bap_ep_info *info)
|
|||
return 0;
|
||||
}
|
||||
|
||||
enum bt_bap_ascs_reason bt_audio_verify_qos(const struct bt_audio_codec_qos *qos)
|
||||
enum bt_bap_ascs_reason bt_audio_verify_qos(const struct bt_bap_qos_cfg *qos)
|
||||
{
|
||||
if (qos->interval < BT_ISO_SDU_INTERVAL_MIN ||
|
||||
qos->interval > BT_ISO_SDU_INTERVAL_MAX) {
|
||||
|
@ -176,14 +175,13 @@ enum bt_bap_ascs_reason bt_audio_verify_qos(const struct bt_audio_codec_qos *qos
|
|||
return BT_BAP_ASCS_REASON_INTERVAL;
|
||||
}
|
||||
|
||||
if (qos->framing > BT_AUDIO_CODEC_QOS_FRAMING_FRAMED) {
|
||||
if (qos->framing > BT_BAP_QOS_CFG_FRAMING_FRAMED) {
|
||||
LOG_DBG("Invalid Framing 0x%02x", qos->framing);
|
||||
return BT_BAP_ASCS_REASON_FRAMING;
|
||||
}
|
||||
|
||||
if (qos->phy != BT_AUDIO_CODEC_QOS_1M &&
|
||||
qos->phy != BT_AUDIO_CODEC_QOS_2M &&
|
||||
qos->phy != BT_AUDIO_CODEC_QOS_CODED) {
|
||||
if (qos->phy != BT_BAP_QOS_CFG_1M && qos->phy != BT_BAP_QOS_CFG_2M &&
|
||||
qos->phy != BT_BAP_QOS_CFG_CODED) {
|
||||
LOG_DBG("Invalid PHY 0x%02x", qos->phy);
|
||||
return BT_BAP_ASCS_REASON_PHY;
|
||||
}
|
||||
|
@ -265,7 +263,7 @@ bool bt_audio_valid_codec_cfg(const struct bt_audio_codec_cfg *codec_cfg)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool bt_audio_valid_qos_pref(const struct bt_audio_codec_qos_pref *qos_pref)
|
||||
bool bt_bap_valid_qos_pref(const struct bt_bap_qos_cfg_pref *qos_pref)
|
||||
{
|
||||
const uint8_t phy_mask = BT_GAP_LE_PHY_1M | BT_GAP_LE_PHY_2M | BT_GAP_LE_PHY_CODED;
|
||||
|
||||
|
@ -487,9 +485,9 @@ static bool bt_bap_stream_is_broadcast(const struct bt_bap_stream *stream)
|
|||
}
|
||||
|
||||
enum bt_bap_ascs_reason bt_bap_stream_verify_qos(const struct bt_bap_stream *stream,
|
||||
const struct bt_audio_codec_qos *qos)
|
||||
const struct bt_bap_qos_cfg *qos)
|
||||
{
|
||||
const struct bt_audio_codec_qos_pref *qos_pref = &stream->ep->qos_pref;
|
||||
const struct bt_bap_qos_cfg_pref *qos_pref = &stream->ep->qos_pref;
|
||||
|
||||
if (qos_pref->latency < qos->latency) {
|
||||
/* Latency is a preferred value. Print debug info but do not fail. */
|
||||
|
|
|
@ -25,17 +25,16 @@ void bt_bap_stream_reset(struct bt_bap_stream *stream);
|
|||
void bt_bap_stream_attach(struct bt_conn *conn, struct bt_bap_stream *stream, struct bt_bap_ep *ep,
|
||||
struct bt_audio_codec_cfg *codec_cfg);
|
||||
|
||||
void bt_audio_codec_qos_to_iso_qos(struct bt_iso_chan_io_qos *io,
|
||||
const struct bt_audio_codec_qos *codec_qos);
|
||||
void bt_bap_qos_cfg_to_iso_qos(struct bt_iso_chan_io_qos *io, const struct bt_bap_qos_cfg *qos_cfg);
|
||||
|
||||
void bt_bap_stream_detach(struct bt_bap_stream *stream);
|
||||
|
||||
enum bt_bap_ascs_reason bt_audio_verify_qos(const struct bt_audio_codec_qos *qos);
|
||||
enum bt_bap_ascs_reason bt_audio_verify_qos(const struct bt_bap_qos_cfg *qos);
|
||||
bool bt_audio_valid_codec_cfg(const struct bt_audio_codec_cfg *codec_cfg);
|
||||
bool bt_audio_valid_qos_pref(const struct bt_audio_codec_qos_pref *qos_pref);
|
||||
bool bt_bap_valid_qos_pref(const struct bt_bap_qos_cfg_pref *qos_pref);
|
||||
bool bt_bap_stream_can_disconnect(const struct bt_bap_stream *stream);
|
||||
|
||||
enum bt_bap_ascs_reason bt_bap_stream_verify_qos(const struct bt_bap_stream *stream,
|
||||
const struct bt_audio_codec_qos *qos);
|
||||
const struct bt_bap_qos_cfg *qos);
|
||||
|
||||
struct bt_iso_chan *bt_bap_stream_iso_chan_get(struct bt_bap_stream *stream);
|
||||
|
|
|
@ -678,7 +678,7 @@ static void unicast_client_ep_config_state(struct bt_bap_ep *ep, struct net_buf_
|
|||
struct bt_bap_unicast_client_ep *client_ep =
|
||||
CONTAINER_OF(ep, struct bt_bap_unicast_client_ep, ep);
|
||||
struct bt_ascs_ase_status_config *cfg;
|
||||
struct bt_audio_codec_qos_pref *pref;
|
||||
struct bt_bap_qos_cfg_pref *pref;
|
||||
struct bt_bap_stream *stream;
|
||||
void *cc;
|
||||
|
||||
|
@ -740,7 +740,7 @@ static void unicast_client_ep_config_state(struct bt_bap_ep *ep, struct net_buf_
|
|||
pref->latency, pref->pd_min, pref->pd_max, pref->pref_pd_min, pref->pref_pd_max,
|
||||
stream->codec_cfg->id);
|
||||
|
||||
if (!bt_audio_valid_qos_pref(pref)) {
|
||||
if (!bt_bap_valid_qos_pref(pref)) {
|
||||
LOG_DBG("Invalid QoS preferences");
|
||||
memset(pref, 0, sizeof(*pref));
|
||||
|
||||
|
@ -1827,7 +1827,7 @@ static int unicast_client_ep_config(struct bt_bap_ep *ep, struct net_buf_simple
|
|||
}
|
||||
|
||||
int bt_bap_unicast_client_ep_qos(struct bt_bap_ep *ep, struct net_buf_simple *buf,
|
||||
struct bt_audio_codec_qos *qos)
|
||||
struct bt_bap_qos_cfg *qos)
|
||||
{
|
||||
struct bt_ascs_qos *req;
|
||||
struct bt_conn_iso *conn_iso;
|
||||
|
@ -2153,7 +2153,7 @@ static void unicast_client_ep_reset(struct bt_conn *conn, uint8_t reason)
|
|||
reset_att_buf(client);
|
||||
}
|
||||
|
||||
static void bt_audio_codec_qos_to_cig_param(struct bt_iso_cig_param *cig_param,
|
||||
static void bt_bap_qos_cfg_to_cig_param(struct bt_iso_cig_param *cig_param,
|
||||
const struct bt_bap_unicast_group *group)
|
||||
{
|
||||
cig_param->framing = group->cig_param.framing;
|
||||
|
@ -2214,7 +2214,7 @@ static int bt_audio_cig_create(struct bt_bap_unicast_group *group)
|
|||
|
||||
param.num_cis = unicast_group_get_cis_count(group);
|
||||
param.cis_channels = group->cis;
|
||||
bt_audio_codec_qos_to_cig_param(¶m, group);
|
||||
bt_bap_qos_cfg_to_cig_param(¶m, group);
|
||||
|
||||
err = bt_iso_cig_create(¶m, &group->cig);
|
||||
if (err != 0) {
|
||||
|
@ -2245,7 +2245,7 @@ static int bt_audio_cig_reconfigure(struct bt_bap_unicast_group *group)
|
|||
|
||||
param.num_cis = cis_count;
|
||||
param.cis_channels = group->cis;
|
||||
bt_audio_codec_qos_to_cig_param(¶m, group);
|
||||
bt_bap_qos_cfg_to_cig_param(¶m, group);
|
||||
|
||||
err = bt_iso_cig_reconfigure(group->cig, ¶m);
|
||||
if (err != 0) {
|
||||
|
@ -2333,9 +2333,9 @@ static void unicast_group_del_iso(struct bt_bap_unicast_group *group, struct bt_
|
|||
}
|
||||
}
|
||||
|
||||
static void unicast_client_codec_qos_to_iso_qos(struct bt_bap_iso *iso,
|
||||
const struct bt_audio_codec_qos *qos,
|
||||
enum bt_audio_dir dir)
|
||||
static void unicast_client_qos_cfg_to_iso_qos(struct bt_bap_iso *iso,
|
||||
const struct bt_bap_qos_cfg *qos,
|
||||
enum bt_audio_dir dir)
|
||||
{
|
||||
struct bt_iso_chan_io_qos *io_qos;
|
||||
struct bt_iso_chan_io_qos *other_io_qos;
|
||||
|
@ -2362,7 +2362,7 @@ static void unicast_client_codec_qos_to_iso_qos(struct bt_bap_iso *iso,
|
|||
}
|
||||
}
|
||||
|
||||
bt_audio_codec_qos_to_iso_qos(io_qos, qos);
|
||||
bt_bap_qos_cfg_to_iso_qos(io_qos, qos);
|
||||
#if defined(CONFIG_BT_ISO_TEST_PARAMS)
|
||||
iso->chan.qos->num_subevents = qos->num_subevents;
|
||||
#endif /* CONFIG_BT_ISO_TEST_PARAMS */
|
||||
|
@ -2377,11 +2377,11 @@ static void unicast_client_codec_qos_to_iso_qos(struct bt_bap_iso *iso,
|
|||
|
||||
static void unicast_group_set_iso_stream_param(struct bt_bap_unicast_group *group,
|
||||
struct bt_bap_iso *iso,
|
||||
struct bt_audio_codec_qos *qos,
|
||||
struct bt_bap_qos_cfg *qos,
|
||||
enum bt_audio_dir dir)
|
||||
{
|
||||
/* Store the stream Codec QoS in the bap_iso */
|
||||
unicast_client_codec_qos_to_iso_qos(iso, qos, dir);
|
||||
unicast_client_qos_cfg_to_iso_qos(iso, qos, dir);
|
||||
|
||||
/* Store the group Codec QoS in the group - This assume thats the parameters have been
|
||||
* verified first
|
||||
|
@ -2401,7 +2401,7 @@ static void unicast_group_add_stream(struct bt_bap_unicast_group *group,
|
|||
struct bt_bap_iso *iso, enum bt_audio_dir dir)
|
||||
{
|
||||
struct bt_bap_stream *stream = param->stream;
|
||||
struct bt_audio_codec_qos *qos = param->qos;
|
||||
struct bt_bap_qos_cfg *qos = param->qos;
|
||||
|
||||
LOG_DBG("group %p stream %p qos %p iso %p dir %u", group, stream, qos, iso, dir);
|
||||
|
||||
|
@ -2610,7 +2610,7 @@ static bool valid_unicast_group_stream_param(const struct bt_bap_unicast_group *
|
|||
struct bt_bap_unicast_group_cig_param *cig_param,
|
||||
enum bt_audio_dir dir)
|
||||
{
|
||||
const struct bt_audio_codec_qos *qos;
|
||||
const struct bt_bap_qos_cfg *qos;
|
||||
|
||||
CHECKIF(param->stream == NULL) {
|
||||
LOG_DBG("param->stream is NULL");
|
||||
|
@ -2670,14 +2670,14 @@ static bool valid_unicast_group_stream_param(const struct bt_bap_unicast_group *
|
|||
}
|
||||
|
||||
if (cig_param->framing == 0) {
|
||||
if (qos->framing == BT_AUDIO_CODEC_QOS_FRAMING_UNFRAMED) {
|
||||
if (qos->framing == BT_BAP_QOS_CFG_FRAMING_UNFRAMED) {
|
||||
cig_param->framing = BT_ISO_FRAMING_UNFRAMED;
|
||||
} else if (qos->framing == BT_AUDIO_CODEC_QOS_FRAMING_FRAMED) {
|
||||
} else if (qos->framing == BT_BAP_QOS_CFG_FRAMING_FRAMED) {
|
||||
cig_param->framing = BT_ISO_FRAMING_FRAMED;
|
||||
}
|
||||
} else if ((qos->framing == BT_AUDIO_CODEC_QOS_FRAMING_UNFRAMED &&
|
||||
} else if ((qos->framing == BT_BAP_QOS_CFG_FRAMING_UNFRAMED &&
|
||||
cig_param->framing != BT_ISO_FRAMING_UNFRAMED) ||
|
||||
(qos->framing == BT_AUDIO_CODEC_QOS_FRAMING_FRAMED &&
|
||||
(qos->framing == BT_BAP_QOS_CFG_FRAMING_FRAMED &&
|
||||
cig_param->framing != BT_ISO_FRAMING_FRAMED)) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ int bt_bap_unicast_client_release(struct bt_bap_stream *stream);
|
|||
struct net_buf_simple *bt_bap_unicast_client_ep_create_pdu(struct bt_conn *conn, uint8_t op);
|
||||
|
||||
int bt_bap_unicast_client_ep_qos(struct bt_bap_ep *ep, struct net_buf_simple *buf,
|
||||
struct bt_audio_codec_qos *qos);
|
||||
struct bt_bap_qos_cfg *qos);
|
||||
|
||||
int bt_bap_unicast_client_ep_send(struct bt_conn *conn, struct bt_bap_ep *ep,
|
||||
struct net_buf_simple *buf);
|
||||
|
|
|
@ -188,7 +188,7 @@ int bt_bap_unicast_server_release(struct bt_bap_stream *stream)
|
|||
|
||||
int bt_bap_unicast_server_config_ase(struct bt_conn *conn, struct bt_bap_stream *stream,
|
||||
struct bt_audio_codec_cfg *codec_cfg,
|
||||
const struct bt_audio_codec_qos_pref *qos_pref)
|
||||
const struct bt_bap_qos_cfg_pref *qos_pref)
|
||||
{
|
||||
return bt_ascs_config_ase(conn, stream, codec_cfg, qos_pref);
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ static bool stream_is_central(struct bt_bap_stream *bap_stream)
|
|||
|
||||
#if defined(CONFIG_BT_BAP_UNICAST)
|
||||
static void cap_stream_configured_cb(struct bt_bap_stream *bap_stream,
|
||||
const struct bt_audio_codec_qos_pref *pref)
|
||||
const struct bt_bap_qos_cfg_pref *pref)
|
||||
{
|
||||
struct bt_cap_stream *cap_stream = CONTAINER_OF(bap_stream,
|
||||
struct bt_cap_stream,
|
||||
|
|
|
@ -93,7 +93,7 @@ struct named_lc3_preset {
|
|||
struct shell_stream {
|
||||
struct bt_cap_stream stream;
|
||||
struct bt_audio_codec_cfg codec_cfg;
|
||||
struct bt_audio_codec_qos qos;
|
||||
struct bt_bap_qos_cfg qos;
|
||||
bool is_tx;
|
||||
bool is_rx;
|
||||
|
||||
|
@ -177,7 +177,7 @@ struct broadcast_source {
|
|||
struct bt_cap_broadcast_source *cap_source;
|
||||
};
|
||||
struct bt_audio_codec_cfg codec_cfg;
|
||||
struct bt_audio_codec_qos qos;
|
||||
struct bt_bap_qos_cfg qos;
|
||||
};
|
||||
|
||||
struct broadcast_sink {
|
||||
|
@ -236,7 +236,7 @@ int cap_ac_unicast(const struct shell *sh, const struct bap_unicast_ac_param *pa
|
|||
#endif /* CONFIG_BT_BAP_UNICAST_CLIENT */
|
||||
#endif /* CONFIG_BT_BAP_UNICAST */
|
||||
|
||||
static inline void print_qos(const struct shell *sh, const struct bt_audio_codec_qos *qos)
|
||||
static inline void print_qos(const struct shell *sh, const struct bt_bap_qos_cfg *qos)
|
||||
{
|
||||
#if defined(CONFIG_BT_BAP_BROADCAST_SOURCE) || defined(CONFIG_BT_BAP_UNICAST)
|
||||
shell_print(sh,
|
||||
|
|
|
@ -619,8 +619,8 @@ static int cmd_select_unicast(const struct shell *sh, size_t argc, char *argv[])
|
|||
}
|
||||
|
||||
#if defined(CONFIG_BT_BAP_UNICAST_SERVER)
|
||||
static const struct bt_audio_codec_qos_pref qos_pref =
|
||||
BT_AUDIO_CODEC_QOS_PREF(true, BT_GAP_LE_PHY_2M, 0u, 60u, 10000u, 60000u, 10000u, 60000u);
|
||||
static const struct bt_bap_qos_cfg_pref qos_pref =
|
||||
BT_BAP_QOS_CFG_PREF(true, BT_GAP_LE_PHY_2M, 0u, 60u, 10000u, 60000u, 10000u, 60000u);
|
||||
|
||||
static struct bt_bap_stream *stream_alloc(void)
|
||||
{
|
||||
|
@ -637,7 +637,7 @@ static struct bt_bap_stream *stream_alloc(void)
|
|||
|
||||
static int lc3_config(struct bt_conn *conn, const struct bt_bap_ep *ep, enum bt_audio_dir dir,
|
||||
const struct bt_audio_codec_cfg *codec_cfg, struct bt_bap_stream **stream,
|
||||
struct bt_audio_codec_qos_pref *const pref, struct bt_bap_ascs_rsp *rsp)
|
||||
struct bt_bap_qos_cfg_pref *const pref, struct bt_bap_ascs_rsp *rsp)
|
||||
{
|
||||
shell_print(ctx_shell, "ASE Codec Config: conn %p ep %p dir %u", conn, ep, dir);
|
||||
|
||||
|
@ -663,7 +663,7 @@ static int lc3_config(struct bt_conn *conn, const struct bt_bap_ep *ep, enum bt_
|
|||
|
||||
static int lc3_reconfig(struct bt_bap_stream *stream, enum bt_audio_dir dir,
|
||||
const struct bt_audio_codec_cfg *codec_cfg,
|
||||
struct bt_audio_codec_qos_pref *const pref, struct bt_bap_ascs_rsp *rsp)
|
||||
struct bt_bap_qos_cfg_pref *const pref, struct bt_bap_ascs_rsp *rsp)
|
||||
{
|
||||
shell_print(ctx_shell, "ASE Codec Reconfig: stream %p", stream);
|
||||
|
||||
|
@ -678,7 +678,7 @@ static int lc3_reconfig(struct bt_bap_stream *stream, enum bt_audio_dir dir,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int lc3_qos(struct bt_bap_stream *stream, const struct bt_audio_codec_qos *qos,
|
||||
static int lc3_qos(struct bt_bap_stream *stream, const struct bt_bap_qos_cfg *qos,
|
||||
struct bt_bap_ascs_rsp *rsp)
|
||||
{
|
||||
shell_print(ctx_shell, "QoS: stream %p %p", stream, qos);
|
||||
|
@ -822,8 +822,8 @@ int bap_ac_create_unicast_group(const struct bap_unicast_ac_param *param,
|
|||
0};
|
||||
struct bt_bap_unicast_group_stream_pair_param pair_params[BAP_UNICAST_AC_MAX_PAIR] = {0};
|
||||
struct bt_bap_unicast_group_param group_param = {0};
|
||||
struct bt_audio_codec_qos *snk_qos[BAP_UNICAST_AC_MAX_SNK];
|
||||
struct bt_audio_codec_qos *src_qos[BAP_UNICAST_AC_MAX_SRC];
|
||||
struct bt_bap_qos_cfg *snk_qos[BAP_UNICAST_AC_MAX_SNK];
|
||||
struct bt_bap_qos_cfg *src_qos[BAP_UNICAST_AC_MAX_SRC];
|
||||
size_t snk_stream_cnt = 0U;
|
||||
size_t src_stream_cnt = 0U;
|
||||
size_t pair_cnt = 0U;
|
||||
|
@ -1316,7 +1316,7 @@ static int cmd_config(const struct shell *sh, size_t argc, char *argv[])
|
|||
|
||||
static int cmd_stream_qos(const struct shell *sh, size_t argc, char *argv[])
|
||||
{
|
||||
struct bt_audio_codec_qos *qos;
|
||||
struct bt_bap_qos_cfg *qos;
|
||||
unsigned long interval;
|
||||
int err = 0;
|
||||
|
||||
|
@ -3134,7 +3134,7 @@ static void stream_stopped_cb(struct bt_bap_stream *stream, uint8_t reason)
|
|||
|
||||
#if defined(CONFIG_BT_BAP_UNICAST)
|
||||
static void stream_configured_cb(struct bt_bap_stream *stream,
|
||||
const struct bt_audio_codec_qos_pref *pref)
|
||||
const struct bt_bap_qos_cfg_pref *pref)
|
||||
{
|
||||
shell_print(ctx_shell, "Stream %p configured\n", stream);
|
||||
}
|
||||
|
|
|
@ -18,12 +18,12 @@ void mock_bap_unicast_server_cleanup(void);
|
|||
DECLARE_FAKE_VALUE_FUNC(int, mock_bap_unicast_server_cb_config, struct bt_conn *,
|
||||
const struct bt_bap_ep *, enum bt_audio_dir,
|
||||
const struct bt_audio_codec_cfg *, struct bt_bap_stream **,
|
||||
struct bt_audio_codec_qos_pref *const, struct bt_bap_ascs_rsp *);
|
||||
struct bt_bap_qos_cfg_pref *const, struct bt_bap_ascs_rsp *);
|
||||
DECLARE_FAKE_VALUE_FUNC(int, mock_bap_unicast_server_cb_reconfig, struct bt_bap_stream *,
|
||||
enum bt_audio_dir, const struct bt_audio_codec_cfg *,
|
||||
struct bt_audio_codec_qos_pref *const, struct bt_bap_ascs_rsp *);
|
||||
struct bt_bap_qos_cfg_pref *const, struct bt_bap_ascs_rsp *);
|
||||
DECLARE_FAKE_VALUE_FUNC(int, mock_bap_unicast_server_cb_qos, struct bt_bap_stream *,
|
||||
const struct bt_audio_codec_qos *, struct bt_bap_ascs_rsp *);
|
||||
const struct bt_bap_qos_cfg *, struct bt_bap_ascs_rsp *);
|
||||
DECLARE_FAKE_VALUE_FUNC(int, mock_bap_unicast_server_cb_enable, struct bt_bap_stream *,
|
||||
const uint8_t *, size_t, struct bt_bap_ascs_rsp *);
|
||||
DECLARE_FAKE_VALUE_FUNC(int, mock_bap_unicast_server_cb_start, struct bt_bap_stream *,
|
||||
|
|
|
@ -746,14 +746,14 @@ ZTEST_F(ascs_test_suite, test_cis_link_loss_in_enabling_state_client_retries)
|
|||
}
|
||||
|
||||
static struct bt_bap_stream *stream_allocated;
|
||||
static const struct bt_audio_codec_qos_pref qos_pref =
|
||||
BT_AUDIO_CODEC_QOS_PREF(true, BT_GAP_LE_PHY_2M, 0x02, 10, 40000, 40000, 40000, 40000);
|
||||
static const struct bt_bap_qos_cfg_pref qos_pref =
|
||||
BT_BAP_QOS_CFG_PREF(true, BT_GAP_LE_PHY_2M, 0x02, 10, 40000, 40000, 40000, 40000);
|
||||
|
||||
static int unicast_server_cb_config_custom_fake(struct bt_conn *conn, const struct bt_bap_ep *ep,
|
||||
enum bt_audio_dir dir,
|
||||
const struct bt_audio_codec_cfg *codec_cfg,
|
||||
struct bt_bap_stream **stream,
|
||||
struct bt_audio_codec_qos_pref *const pref,
|
||||
struct bt_bap_qos_cfg_pref *const pref,
|
||||
struct bt_bap_ascs_rsp *rsp)
|
||||
{
|
||||
*stream = stream_allocated;
|
||||
|
|
|
@ -367,14 +367,14 @@ ZTEST_F(test_ase_control_params, test_codec_configure_invalid_ase_id_0x00)
|
|||
}
|
||||
|
||||
static struct bt_bap_stream test_stream;
|
||||
static const struct bt_audio_codec_qos_pref qos_pref =
|
||||
BT_AUDIO_CODEC_QOS_PREF(true, BT_GAP_LE_PHY_2M, 0x02, 10, 40000, 40000, 40000, 40000);
|
||||
static const struct bt_bap_qos_cfg_pref qos_pref =
|
||||
BT_BAP_QOS_CFG_PREF(true, BT_GAP_LE_PHY_2M, 0x02, 10, 40000, 40000, 40000, 40000);
|
||||
|
||||
static int unicast_server_cb_config_custom_fake(struct bt_conn *conn, const struct bt_bap_ep *ep,
|
||||
enum bt_audio_dir dir,
|
||||
const struct bt_audio_codec_cfg *codec_cfg,
|
||||
struct bt_bap_stream **stream,
|
||||
struct bt_audio_codec_qos_pref *const pref,
|
||||
struct bt_bap_qos_cfg_pref *const pref,
|
||||
struct bt_bap_ascs_rsp *rsp)
|
||||
{
|
||||
*stream = &test_stream;
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
#define test_sink_ase_state_transition_fixture test_ase_state_transition_fixture
|
||||
#define test_source_ase_state_transition_fixture test_ase_state_transition_fixture
|
||||
|
||||
static const struct bt_audio_codec_qos_pref qos_pref =
|
||||
BT_AUDIO_CODEC_QOS_PREF(true, BT_GAP_LE_PHY_2M, 0x02, 10, 40000, 40000, 40000, 40000);
|
||||
static const struct bt_bap_qos_cfg_pref qos_pref =
|
||||
BT_BAP_QOS_CFG_PREF(true, BT_GAP_LE_PHY_2M, 0x02, 10, 40000, 40000, 40000, 40000);
|
||||
|
||||
struct test_ase_state_transition_fixture {
|
||||
struct bt_conn conn;
|
||||
|
|
|
@ -127,14 +127,14 @@ uint8_t test_ase_id_get(const struct bt_gatt_attr *ase)
|
|||
}
|
||||
|
||||
static struct bt_bap_stream *stream_allocated;
|
||||
static const struct bt_audio_codec_qos_pref qos_pref =
|
||||
BT_AUDIO_CODEC_QOS_PREF(true, BT_GAP_LE_PHY_2M, 0x02, 10, 40000, 40000, 40000, 40000);
|
||||
static const struct bt_bap_qos_cfg_pref qos_pref =
|
||||
BT_BAP_QOS_CFG_PREF(true, BT_GAP_LE_PHY_2M, 0x02, 10, 40000, 40000, 40000, 40000);
|
||||
|
||||
static int unicast_server_cb_config_custom_fake(struct bt_conn *conn, const struct bt_bap_ep *ep,
|
||||
enum bt_audio_dir dir,
|
||||
const struct bt_audio_codec_cfg *codec_cfg,
|
||||
struct bt_bap_stream **stream,
|
||||
struct bt_audio_codec_qos_pref *const pref,
|
||||
struct bt_bap_qos_cfg_pref *const pref,
|
||||
struct bt_bap_ascs_rsp *rsp)
|
||||
{
|
||||
*stream = stream_allocated;
|
||||
|
|
|
@ -33,12 +33,12 @@ void mock_bap_unicast_server_cleanup(void)
|
|||
DEFINE_FAKE_VALUE_FUNC(int, mock_bap_unicast_server_cb_config, struct bt_conn *,
|
||||
const struct bt_bap_ep *, enum bt_audio_dir,
|
||||
const struct bt_audio_codec_cfg *, struct bt_bap_stream **,
|
||||
struct bt_audio_codec_qos_pref *const, struct bt_bap_ascs_rsp *);
|
||||
struct bt_bap_qos_cfg_pref *const, struct bt_bap_ascs_rsp *);
|
||||
DEFINE_FAKE_VALUE_FUNC(int, mock_bap_unicast_server_cb_reconfig, struct bt_bap_stream *,
|
||||
enum bt_audio_dir, const struct bt_audio_codec_cfg *,
|
||||
struct bt_audio_codec_qos_pref *const, struct bt_bap_ascs_rsp *);
|
||||
struct bt_bap_qos_cfg_pref *const, struct bt_bap_ascs_rsp *);
|
||||
DEFINE_FAKE_VALUE_FUNC(int, mock_bap_unicast_server_cb_qos, struct bt_bap_stream *,
|
||||
const struct bt_audio_codec_qos *, struct bt_bap_ascs_rsp *);
|
||||
const struct bt_bap_qos_cfg *, struct bt_bap_ascs_rsp *);
|
||||
DEFINE_FAKE_VALUE_FUNC(int, mock_bap_unicast_server_cb_enable, struct bt_bap_stream *,
|
||||
const uint8_t *, size_t, struct bt_bap_ascs_rsp *);
|
||||
DEFINE_FAKE_VALUE_FUNC(int, mock_bap_unicast_server_cb_start, struct bt_bap_stream *,
|
||||
|
|
|
@ -54,7 +54,7 @@ static void bap_broadcast_source_test_suite_fixture_init(
|
|||
struct bt_bap_broadcast_source_subgroup_param *subgroup_param;
|
||||
struct bt_bap_broadcast_source_stream_param *stream_params;
|
||||
struct bt_audio_codec_cfg *codec_cfg;
|
||||
struct bt_audio_codec_qos *codec_qos;
|
||||
struct bt_bap_qos_cfg *qos_cfg;
|
||||
struct bt_bap_stream *streams;
|
||||
const uint16_t latency = 10U; /* ms*/
|
||||
const uint32_t pd = 40000U; /* us */
|
||||
|
@ -75,8 +75,8 @@ static void bap_broadcast_source_test_suite_fixture_init(
|
|||
zassert_not_null(stream_params);
|
||||
codec_cfg = malloc(sizeof(struct bt_audio_codec_cfg));
|
||||
zassert_not_null(codec_cfg);
|
||||
codec_qos = malloc(sizeof(struct bt_audio_codec_qos));
|
||||
zassert_not_null(codec_qos);
|
||||
qos_cfg = malloc(sizeof(struct bt_bap_qos_cfg));
|
||||
zassert_not_null(qos_cfg);
|
||||
streams = malloc(sizeof(struct bt_bap_stream) * CONFIG_BT_BAP_BROADCAST_SRC_STREAM_COUNT);
|
||||
zassert_not_null(streams);
|
||||
bis_data = malloc(CONFIG_BT_AUDIO_CODEC_CFG_MAX_DATA_SIZE);
|
||||
|
@ -91,14 +91,14 @@ static void bap_broadcast_source_test_suite_fixture_init(
|
|||
sizeof(struct bt_bap_broadcast_source_stream_param) *
|
||||
CONFIG_BT_BAP_BROADCAST_SRC_STREAM_COUNT);
|
||||
memset(codec_cfg, 0, sizeof(struct bt_audio_codec_cfg));
|
||||
memset(codec_qos, 0, sizeof(struct bt_audio_codec_qos));
|
||||
memset(qos_cfg, 0, sizeof(struct bt_bap_qos_cfg));
|
||||
memset(streams, 0, sizeof(struct bt_bap_stream) * CONFIG_BT_BAP_BROADCAST_SRC_STREAM_COUNT);
|
||||
memset(bis_data, 0, CONFIG_BT_AUDIO_CODEC_CFG_MAX_DATA_SIZE);
|
||||
|
||||
/* Initialize default values*/
|
||||
*codec_cfg = BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_16KHZ,
|
||||
BT_AUDIO_CODEC_CFG_DURATION_10, loc, 40U, 1, ctx);
|
||||
*codec_qos = BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, sdu, rtn, latency, pd);
|
||||
*qos_cfg = BT_BAP_QOS_CFG_UNFRAMED(10000u, sdu, rtn, latency, pd);
|
||||
memcpy(bis_data, bis_cfg_data, sizeof(bis_cfg_data));
|
||||
|
||||
for (size_t i = 0U; i < CONFIG_BT_BAP_BROADCAST_SRC_SUBGROUP_COUNT; i++) {
|
||||
|
@ -116,7 +116,7 @@ static void bap_broadcast_source_test_suite_fixture_init(
|
|||
|
||||
fixture->param->params_count = CONFIG_BT_BAP_BROADCAST_SRC_SUBGROUP_COUNT;
|
||||
fixture->param->params = subgroup_param;
|
||||
fixture->param->qos = codec_qos;
|
||||
fixture->param->qos = qos_cfg;
|
||||
fixture->param->encryption = false;
|
||||
memset(fixture->param->broadcast_code, 0, sizeof(fixture->param->broadcast_code));
|
||||
fixture->param->packing = BT_ISO_PACKING_SEQUENTIAL;
|
||||
|
@ -320,7 +320,7 @@ ZTEST_F(bap_broadcast_source_test_suite, test_broadcast_source_create_inval_subg
|
|||
ZTEST_F(bap_broadcast_source_test_suite, test_broadcast_source_create_inval_qos_null)
|
||||
{
|
||||
struct bt_bap_broadcast_source_param *create_param = fixture->param;
|
||||
struct bt_audio_codec_qos *qos = create_param->qos;
|
||||
struct bt_bap_qos_cfg *qos = create_param->qos;
|
||||
int err;
|
||||
|
||||
create_param->qos = NULL;
|
||||
|
@ -759,7 +759,7 @@ ZTEST_F(bap_broadcast_source_test_suite,
|
|||
ZTEST_F(bap_broadcast_source_test_suite, test_broadcast_source_reconfigure_inval_qos_null)
|
||||
{
|
||||
struct bt_bap_broadcast_source_param *param = fixture->param;
|
||||
struct bt_audio_codec_qos *qos = param->qos;
|
||||
struct bt_bap_qos_cfg *qos = param->qos;
|
||||
int err;
|
||||
|
||||
printk("Creating broadcast source with %zu subgroups with %zu streams\n",
|
||||
|
|
|
@ -43,7 +43,7 @@ int bt_bap_unicast_client_config(struct bt_bap_stream *stream,
|
|||
stream->ep->status.state = BT_BAP_EP_STATE_CODEC_CONFIGURED;
|
||||
|
||||
if (stream->ops != NULL && stream->ops->configured != NULL) {
|
||||
const struct bt_audio_codec_qos_pref pref = {0};
|
||||
const struct bt_bap_qos_cfg_pref pref = {0};
|
||||
|
||||
stream->ops->configured(stream, &pref);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ void mock_bap_stream_init(void);
|
|||
void mock_bap_stream_cleanup(void);
|
||||
|
||||
DECLARE_FAKE_VOID_FUNC(mock_bap_stream_configured_cb, struct bt_bap_stream *,
|
||||
const struct bt_audio_codec_qos_pref *);
|
||||
const struct bt_bap_qos_cfg_pref *);
|
||||
DECLARE_FAKE_VOID_FUNC(mock_bap_stream_qos_set_cb, struct bt_bap_stream *);
|
||||
DECLARE_FAKE_VOID_FUNC(mock_bap_stream_enabled_cb, struct bt_bap_stream *);
|
||||
DECLARE_FAKE_VOID_FUNC(mock_bap_stream_metadata_updated_cb, struct bt_bap_stream *);
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
struct bt_bap_stream_ops mock_bap_stream_ops;
|
||||
|
||||
DEFINE_FAKE_VOID_FUNC(mock_bap_stream_configured_cb, struct bt_bap_stream *,
|
||||
const struct bt_audio_codec_qos_pref *);
|
||||
const struct bt_bap_qos_cfg_pref *);
|
||||
DEFINE_FAKE_VOID_FUNC(mock_bap_stream_qos_set_cb, struct bt_bap_stream *);
|
||||
DEFINE_FAKE_VOID_FUNC(mock_bap_stream_enabled_cb, struct bt_bap_stream *);
|
||||
DEFINE_FAKE_VOID_FUNC(mock_bap_stream_metadata_updated_cb, struct bt_bap_stream *);
|
||||
|
|
|
@ -319,7 +319,7 @@ uint8_t btp_bap_broadcast_source_setup(const void *cmd, uint16_t cmd_len,
|
|||
codec_cfg.data_len = cp->cc_ltvs_len;
|
||||
memcpy(codec_cfg.data, cp->cc_ltvs, cp->cc_ltvs_len);
|
||||
|
||||
source->qos.phy = BT_AUDIO_CODEC_QOS_2M;
|
||||
source->qos.phy = BT_BAP_QOS_CFG_2M;
|
||||
source->qos.framing = cp->framing;
|
||||
source->qos.rtn = cp->retransmission_num;
|
||||
source->qos.latency = sys_le16_to_cpu(cp->max_transport_latency);
|
||||
|
|
|
@ -30,7 +30,7 @@ struct btp_bap_broadcast_remote_source {
|
|||
struct btp_bap_broadcast_stream streams[CONFIG_BT_BAP_BROADCAST_SNK_STREAM_COUNT];
|
||||
struct bt_bap_stream *sink_streams[CONFIG_BT_BAP_BROADCAST_SNK_STREAM_COUNT];
|
||||
struct bt_bap_broadcast_sink *sink;
|
||||
struct bt_audio_codec_qos qos;
|
||||
struct bt_bap_qos_cfg qos;
|
||||
/* BIS Index bitfield read from Base */
|
||||
uint32_t bis_index_bitfield;
|
||||
/* BIS Index bitfield read from sync request */
|
||||
|
@ -42,7 +42,7 @@ struct btp_bap_broadcast_remote_source {
|
|||
|
||||
struct btp_bap_broadcast_local_source {
|
||||
uint32_t broadcast_id;
|
||||
struct bt_audio_codec_qos qos;
|
||||
struct bt_bap_qos_cfg qos;
|
||||
struct btp_bap_broadcast_stream streams[CONFIG_BT_BAP_BROADCAST_SRC_STREAM_COUNT];
|
||||
struct bt_audio_codec_cfg subgroup_codec_cfg[CONFIG_BT_BAP_BROADCAST_SRC_SUBGROUP_COUNT];
|
||||
/* Only for BTP BAP commands */
|
||||
|
|
|
@ -25,8 +25,8 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME, CONFIG_BTTESTER_LOG_LEVEL);
|
|||
#include "btp_bap_audio_stream.h"
|
||||
#include "btp_bap_unicast.h"
|
||||
|
||||
static struct bt_audio_codec_qos_pref qos_pref =
|
||||
BT_AUDIO_CODEC_QOS_PREF(true, BT_GAP_LE_PHY_2M, 0x02, 10, 10000, 40000, 10000, 40000);
|
||||
static struct bt_bap_qos_cfg_pref qos_pref =
|
||||
BT_BAP_QOS_CFG_PREF(true, BT_GAP_LE_PHY_2M, 0x02, 10, 10000, 40000, 10000, 40000);
|
||||
|
||||
static struct btp_bap_unicast_connection connections[CONFIG_BT_MAX_CONN];
|
||||
static struct btp_bap_unicast_group cigs[CONFIG_BT_ISO_MAX_CIG];
|
||||
|
@ -268,7 +268,7 @@ static void btp_send_ase_found_ev(struct bt_conn *conn, struct bt_bap_ep *ep)
|
|||
tester_event(BTP_SERVICE_ID_BAP, BTP_BAP_EV_ASE_FOUND, &ev, sizeof(ev));
|
||||
}
|
||||
|
||||
static inline void print_qos(const struct bt_audio_codec_qos *qos)
|
||||
static inline void print_qos(const struct bt_bap_qos_cfg *qos)
|
||||
{
|
||||
LOG_DBG("QoS: interval %u framing 0x%02x phy 0x%02x sdu %u rtn %u latency %u pd %u",
|
||||
qos->interval, qos->framing, qos->phy, qos->sdu, qos->rtn, qos->latency, qos->pd);
|
||||
|
@ -323,7 +323,7 @@ static int validate_codec_parameters(const struct bt_audio_codec_cfg *codec_cfg)
|
|||
|
||||
static int lc3_config(struct bt_conn *conn, const struct bt_bap_ep *ep, enum bt_audio_dir dir,
|
||||
const struct bt_audio_codec_cfg *codec_cfg, struct bt_bap_stream **stream,
|
||||
struct bt_audio_codec_qos_pref *const pref, struct bt_bap_ascs_rsp *rsp)
|
||||
struct bt_bap_qos_cfg_pref *const pref, struct bt_bap_ascs_rsp *rsp)
|
||||
{
|
||||
struct bt_bap_ep_info info;
|
||||
struct btp_bap_unicast_connection *u_conn;
|
||||
|
@ -372,7 +372,7 @@ static int lc3_config(struct bt_conn *conn, const struct bt_bap_ep *ep, enum bt_
|
|||
|
||||
static int lc3_reconfig(struct bt_bap_stream *stream, enum bt_audio_dir dir,
|
||||
const struct bt_audio_codec_cfg *codec_cfg,
|
||||
struct bt_audio_codec_qos_pref *const pref, struct bt_bap_ascs_rsp *rsp)
|
||||
struct bt_bap_qos_cfg_pref *const pref, struct bt_bap_ascs_rsp *rsp)
|
||||
{
|
||||
LOG_DBG("ASE Codec Reconfig: stream %p", stream);
|
||||
|
||||
|
@ -381,7 +381,7 @@ static int lc3_reconfig(struct bt_bap_stream *stream, enum bt_audio_dir dir,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int lc3_qos(struct bt_bap_stream *stream, const struct bt_audio_codec_qos *qos,
|
||||
static int lc3_qos(struct bt_bap_stream *stream, const struct bt_bap_qos_cfg *qos,
|
||||
struct bt_bap_ascs_rsp *rsp)
|
||||
{
|
||||
LOG_DBG("QoS: stream %p qos %p", stream, qos);
|
||||
|
@ -500,8 +500,7 @@ static const struct bt_bap_unicast_server_cb unicast_server_cb = {
|
|||
.release = lc3_release,
|
||||
};
|
||||
|
||||
static void stream_configured(struct bt_bap_stream *stream,
|
||||
const struct bt_audio_codec_qos_pref *pref)
|
||||
static void stream_configured(struct bt_bap_stream *stream, const struct bt_bap_qos_cfg_pref *pref)
|
||||
{
|
||||
struct bt_bap_ep_info info;
|
||||
struct btp_bap_unicast_connection *u_conn;
|
||||
|
@ -957,7 +956,7 @@ uint8_t btp_bap_discover(const void *cmd, uint16_t cmd_len,
|
|||
|
||||
static int server_stream_config(struct bt_conn *conn, struct bt_bap_stream *stream,
|
||||
struct bt_audio_codec_cfg *codec_cfg,
|
||||
struct bt_audio_codec_qos_pref *qos)
|
||||
struct bt_bap_qos_cfg_pref *qos)
|
||||
{
|
||||
int err;
|
||||
struct bt_bap_ep_info info;
|
||||
|
@ -1276,14 +1275,14 @@ uint8_t btp_ascs_preconfigure_qos(const void *cmd, uint16_t cmd_len,
|
|||
void *rsp, uint16_t *rsp_len)
|
||||
{
|
||||
const struct btp_ascs_preconfigure_qos_cmd *cp = cmd;
|
||||
struct bt_audio_codec_qos *qos;
|
||||
struct bt_bap_qos_cfg *qos;
|
||||
|
||||
LOG_DBG("");
|
||||
|
||||
qos = &cigs[cp->cig_id].qos[cp->cis_id];
|
||||
memset(qos, 0, sizeof(*qos));
|
||||
|
||||
qos->phy = BT_AUDIO_CODEC_QOS_2M;
|
||||
qos->phy = BT_BAP_QOS_CFG_2M;
|
||||
qos->framing = cp->framing;
|
||||
qos->rtn = cp->retransmission_num;
|
||||
qos->sdu = sys_le16_to_cpu(cp->max_sdu);
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SRC_COUNT
|
||||
|
||||
struct btp_bap_unicast_group {
|
||||
struct bt_audio_codec_qos qos[CONFIG_BT_BAP_UNICAST_CLIENT_GROUP_STREAM_COUNT];
|
||||
struct bt_bap_qos_cfg qos[CONFIG_BT_BAP_UNICAST_CLIENT_GROUP_STREAM_COUNT];
|
||||
struct bt_bap_unicast_group *cig;
|
||||
bool in_use;
|
||||
};
|
||||
|
|
|
@ -190,7 +190,7 @@ static uint8_t btp_cap_discover(const void *cmd, uint16_t cmd_len,
|
|||
|
||||
static int cap_unicast_setup_ase(struct bt_conn *conn, uint8_t ase_id, uint8_t cis_id,
|
||||
uint8_t cig_id, struct bt_audio_codec_cfg *codec_cfg,
|
||||
struct bt_audio_codec_qos *qos)
|
||||
struct bt_bap_qos_cfg *qos)
|
||||
{
|
||||
struct btp_bap_unicast_group *group;
|
||||
struct btp_bap_unicast_stream *u_stream;
|
||||
|
@ -232,7 +232,7 @@ static uint8_t btp_cap_unicast_setup_ase(const void *cmd, uint16_t cmd_len,
|
|||
{
|
||||
const struct btp_cap_unicast_setup_ase_cmd *cp = cmd;
|
||||
struct bt_audio_codec_cfg codec_cfg;
|
||||
struct bt_audio_codec_qos qos;
|
||||
struct bt_bap_qos_cfg qos;
|
||||
struct bt_conn *conn;
|
||||
const uint8_t *ltv_ptr;
|
||||
int err;
|
||||
|
@ -247,7 +247,7 @@ static uint8_t btp_cap_unicast_setup_ase(const void *cmd, uint16_t cmd_len,
|
|||
}
|
||||
|
||||
memset(&qos, 0, sizeof(qos));
|
||||
qos.phy = BT_AUDIO_CODEC_QOS_2M;
|
||||
qos.phy = BT_BAP_QOS_CFG_2M;
|
||||
qos.framing = cp->framing;
|
||||
qos.rtn = cp->retransmission_num;
|
||||
qos.sdu = sys_le16_to_cpu(cp->max_sdu);
|
||||
|
@ -605,7 +605,7 @@ static uint8_t btp_cap_broadcast_source_setup(const void *cmd, uint16_t cmd_len,
|
|||
struct btp_cap_broadcast_source_setup_rp *rp = rsp;
|
||||
struct btp_bap_broadcast_local_source *source =
|
||||
btp_bap_broadcast_local_source_get(cp->source_id);
|
||||
struct bt_audio_codec_qos *qos = &source->qos;
|
||||
struct bt_bap_qos_cfg *qos = &source->qos;
|
||||
|
||||
LOG_DBG("");
|
||||
|
||||
|
@ -651,7 +651,7 @@ static uint8_t btp_cap_broadcast_source_setup(const void *cmd, uint16_t cmd_len,
|
|||
}
|
||||
|
||||
memset(qos, 0, sizeof(*qos));
|
||||
qos->phy = BT_AUDIO_CODEC_QOS_2M;
|
||||
qos->phy = BT_BAP_QOS_CFG_2M;
|
||||
qos->framing = cp->framing;
|
||||
qos->rtn = cp->retransmission_num;
|
||||
qos->sdu = sys_le16_to_cpu(cp->max_sdu);
|
||||
|
|
|
@ -85,7 +85,7 @@ void print_codec_cfg(const struct bt_audio_codec_cfg *codec_cfg)
|
|||
print_ltv_array("meta", codec_cfg->meta, codec_cfg->meta_len);
|
||||
}
|
||||
|
||||
void print_qos(const struct bt_audio_codec_qos *qos)
|
||||
void print_qos(const struct bt_bap_qos_cfg *qos)
|
||||
{
|
||||
printk("QoS: interval %u framing 0x%02x phy 0x%02x sdu %u "
|
||||
"rtn %u latency %u pd %u\n",
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
struct unicast_stream {
|
||||
struct bt_cap_stream stream;
|
||||
struct bt_audio_codec_cfg codec_cfg;
|
||||
struct bt_audio_codec_qos qos;
|
||||
struct bt_bap_qos_cfg qos;
|
||||
};
|
||||
|
||||
struct named_lc3_preset {
|
||||
|
@ -57,7 +57,7 @@ struct named_lc3_preset {
|
|||
void print_hex(const uint8_t *ptr, size_t len);
|
||||
void print_codec_cap(const struct bt_audio_codec_cap *codec_cap);
|
||||
void print_codec_cfg(const struct bt_audio_codec_cfg *codec_cfg);
|
||||
void print_qos(const struct bt_audio_codec_qos *qos);
|
||||
void print_qos(const struct bt_bap_qos_cfg *qos);
|
||||
void copy_unicast_stream_preset(struct unicast_stream *stream,
|
||||
const struct named_lc3_preset *named_preset);
|
||||
|
||||
|
|
|
@ -72,8 +72,7 @@ CREATE_FLAG(flag_stream_stopped);
|
|||
CREATE_FLAG(flag_stream_released);
|
||||
CREATE_FLAG(flag_operation_success);
|
||||
|
||||
static void stream_configured(struct bt_bap_stream *stream,
|
||||
const struct bt_audio_codec_qos_pref *pref)
|
||||
static void stream_configured(struct bt_bap_stream *stream, const struct bt_bap_qos_cfg_pref *pref)
|
||||
{
|
||||
printk("Configured stream %p\n", stream);
|
||||
|
||||
|
@ -1197,9 +1196,8 @@ static void test_main_async_group(void)
|
|||
{
|
||||
struct bt_bap_stream rx_stream = {0};
|
||||
struct bt_bap_stream tx_stream = {0};
|
||||
struct bt_audio_codec_qos rx_qos = BT_AUDIO_CODEC_QOS_UNFRAMED(7500U, 30U, 2U, 75U, 40000U);
|
||||
struct bt_audio_codec_qos tx_qos =
|
||||
BT_AUDIO_CODEC_QOS_UNFRAMED(10000U, 40U, 2U, 100U, 40000U);
|
||||
struct bt_bap_qos_cfg rx_qos = BT_BAP_QOS_CFG_UNFRAMED(7500U, 30U, 2U, 75U, 40000U);
|
||||
struct bt_bap_qos_cfg tx_qos = BT_BAP_QOS_CFG_UNFRAMED(10000U, 40U, 2U, 100U, 40000U);
|
||||
struct bt_bap_unicast_group_stream_param rx_param = {
|
||||
.qos = &rx_qos,
|
||||
.stream = &rx_stream,
|
||||
|
|
|
@ -70,8 +70,8 @@ static const struct bt_audio_codec_cap lc3_codec_cap = {
|
|||
static struct audio_test_stream
|
||||
test_streams[CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT + CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT];
|
||||
|
||||
static const struct bt_audio_codec_qos_pref qos_pref =
|
||||
BT_AUDIO_CODEC_QOS_PREF(true, BT_GAP_LE_PHY_2M, 0x02, 10, 40000, 40000, 40000, 40000);
|
||||
static const struct bt_bap_qos_cfg_pref qos_pref =
|
||||
BT_BAP_QOS_CFG_PREF(true, BT_GAP_LE_PHY_2M, 0x02, 10, 40000, 40000, 40000, 40000);
|
||||
|
||||
static uint8_t unicast_server_addata[] = {
|
||||
BT_UUID_16_ENCODE(BT_UUID_ASCS_VAL), /* ASCS UUID */
|
||||
|
@ -113,7 +113,7 @@ static struct bt_bap_stream *stream_alloc(void)
|
|||
|
||||
static int lc3_config(struct bt_conn *conn, const struct bt_bap_ep *ep, enum bt_audio_dir dir,
|
||||
const struct bt_audio_codec_cfg *codec_cfg, struct bt_bap_stream **stream,
|
||||
struct bt_audio_codec_qos_pref *const pref, struct bt_bap_ascs_rsp *rsp)
|
||||
struct bt_bap_qos_cfg_pref *const pref, struct bt_bap_ascs_rsp *rsp)
|
||||
{
|
||||
printk("ASE Codec Config: conn %p ep %p dir %u\n", conn, ep, dir);
|
||||
|
||||
|
@ -139,7 +139,7 @@ static int lc3_config(struct bt_conn *conn, const struct bt_bap_ep *ep, enum bt_
|
|||
|
||||
static int lc3_reconfig(struct bt_bap_stream *stream, enum bt_audio_dir dir,
|
||||
const struct bt_audio_codec_cfg *codec_cfg,
|
||||
struct bt_audio_codec_qos_pref *const pref, struct bt_bap_ascs_rsp *rsp)
|
||||
struct bt_bap_qos_cfg_pref *const pref, struct bt_bap_ascs_rsp *rsp)
|
||||
{
|
||||
printk("ASE Codec Reconfig: stream %p\n", stream);
|
||||
|
||||
|
@ -150,7 +150,7 @@ static int lc3_reconfig(struct bt_bap_stream *stream, enum bt_audio_dir dir,
|
|||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
static int lc3_qos(struct bt_bap_stream *stream, const struct bt_audio_codec_qos *qos,
|
||||
static int lc3_qos(struct bt_bap_stream *stream, const struct bt_bap_qos_cfg *qos,
|
||||
struct bt_bap_ascs_rsp *rsp)
|
||||
{
|
||||
struct audio_test_stream *test_stream = audio_test_stream_from_bap_stream(stream);
|
||||
|
|
|
@ -64,8 +64,8 @@ static struct bt_le_per_adv_sync *pa_sync;
|
|||
static uint32_t broadcaster_broadcast_id;
|
||||
static struct audio_test_stream broadcast_sink_streams[CONFIG_BT_BAP_BROADCAST_SNK_STREAM_COUNT];
|
||||
|
||||
static const struct bt_audio_codec_qos_pref unicast_qos_pref =
|
||||
BT_AUDIO_CODEC_QOS_PREF(true, BT_GAP_LE_PHY_2M, 0u, 60u, 20000u, 40000u, 20000u, 40000u);
|
||||
static const struct bt_bap_qos_cfg_pref unicast_qos_pref =
|
||||
BT_BAP_QOS_CFG_PREF(true, BT_GAP_LE_PHY_2M, 0u, 60u, 20000u, 40000u, 20000u, 40000u);
|
||||
|
||||
static bool auto_start_sink_streams;
|
||||
|
||||
|
@ -452,7 +452,7 @@ static struct bt_bap_stream *unicast_stream_alloc(void)
|
|||
static int unicast_server_config(struct bt_conn *conn, const struct bt_bap_ep *ep,
|
||||
enum bt_audio_dir dir, const struct bt_audio_codec_cfg *codec_cfg,
|
||||
struct bt_bap_stream **stream,
|
||||
struct bt_audio_codec_qos_pref *const pref,
|
||||
struct bt_bap_qos_cfg_pref *const pref,
|
||||
struct bt_bap_ascs_rsp *rsp)
|
||||
{
|
||||
printk("ASE Codec Config: conn %p ep %p dir %u\n", conn, ep, dir);
|
||||
|
@ -478,7 +478,7 @@ static int unicast_server_config(struct bt_conn *conn, const struct bt_bap_ep *e
|
|||
|
||||
static int unicast_server_reconfig(struct bt_bap_stream *stream, enum bt_audio_dir dir,
|
||||
const struct bt_audio_codec_cfg *codec_cfg,
|
||||
struct bt_audio_codec_qos_pref *const pref,
|
||||
struct bt_bap_qos_cfg_pref *const pref,
|
||||
struct bt_bap_ascs_rsp *rsp)
|
||||
{
|
||||
printk("ASE Codec Reconfig: stream %p\n", stream);
|
||||
|
@ -493,7 +493,7 @@ static int unicast_server_reconfig(struct bt_bap_stream *stream, enum bt_audio_d
|
|||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
static int unicast_server_qos(struct bt_bap_stream *stream, const struct bt_audio_codec_qos *qos,
|
||||
static int unicast_server_qos(struct bt_bap_stream *stream, const struct bt_bap_qos_cfg *qos,
|
||||
struct bt_bap_ascs_rsp *rsp)
|
||||
{
|
||||
printk("QoS: stream %p qos %p\n", stream, qos);
|
||||
|
|
|
@ -727,7 +727,7 @@ static int test_cap_initiator_ac(const struct cap_initiator_ac_param *param)
|
|||
struct bt_cap_initiator_broadcast_create_param create_param = {0};
|
||||
struct bt_cap_broadcast_source *broadcast_source;
|
||||
struct bt_audio_codec_cfg codec_cfg;
|
||||
struct bt_audio_codec_qos qos;
|
||||
struct bt_bap_qos_cfg qos;
|
||||
struct bt_le_ext_adv *adv;
|
||||
int err;
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@ static const struct named_lc3_preset lc3_unicast_presets[] = {
|
|||
};
|
||||
|
||||
static void unicast_stream_configured(struct bt_bap_stream *stream,
|
||||
const struct bt_audio_codec_qos_pref *pref)
|
||||
const struct bt_bap_qos_cfg_pref *pref)
|
||||
{
|
||||
struct bt_cap_stream *cap_stream = cap_stream_from_bap_stream(stream);
|
||||
printk("Configured stream %p\n", stream);
|
||||
|
@ -902,8 +902,8 @@ static int cap_initiator_ac_create_unicast_group(const struct cap_initiator_ac_p
|
|||
struct bt_bap_unicast_group_stream_param src_group_stream_params[CAP_AC_MAX_SRC] = {0};
|
||||
struct bt_bap_unicast_group_stream_pair_param pair_params[CAP_AC_MAX_PAIR] = {0};
|
||||
struct bt_bap_unicast_group_param group_param = {0};
|
||||
struct bt_audio_codec_qos *snk_qos[CAP_AC_MAX_SNK];
|
||||
struct bt_audio_codec_qos *src_qos[CAP_AC_MAX_SRC];
|
||||
struct bt_bap_qos_cfg *snk_qos[CAP_AC_MAX_SNK];
|
||||
struct bt_bap_qos_cfg *src_qos[CAP_AC_MAX_SRC];
|
||||
size_t snk_stream_cnt = 0U;
|
||||
size_t src_stream_cnt = 0U;
|
||||
size_t pair_cnt = 0U;
|
||||
|
|
|
@ -226,7 +226,7 @@ static void stream_sent_cb(struct bt_bap_stream *bap_stream)
|
|||
}
|
||||
|
||||
static void stream_configured_cb(struct bt_bap_stream *stream,
|
||||
const struct bt_audio_codec_qos_pref *pref)
|
||||
const struct bt_bap_qos_cfg_pref *pref)
|
||||
{
|
||||
printk("Configured stream %p\n", stream);
|
||||
|
||||
|
@ -1203,7 +1203,7 @@ static int test_gmap_ugg_broadcast_ac(const struct gmap_broadcast_ac_param *para
|
|||
stream_params[GMAP_BROADCAST_AC_MAX_STREAM] = {0};
|
||||
struct bt_cap_broadcast_source *broadcast_source;
|
||||
struct bt_audio_codec_cfg codec_cfg;
|
||||
struct bt_audio_codec_qos qos;
|
||||
struct bt_bap_qos_cfg qos;
|
||||
struct bt_le_ext_adv *adv;
|
||||
int err;
|
||||
|
||||
|
|
|
@ -42,8 +42,8 @@ static struct bt_audio_codec_cap codec_cap =
|
|||
BT_AUDIO_CODEC_CAP_LC3(BT_AUDIO_CODEC_CAP_FREQ_ANY, BT_AUDIO_CODEC_CAP_DURATION_ANY,
|
||||
BT_AUDIO_CODEC_CAP_CHAN_COUNT_SUPPORT(1, 2), 30, 240, 2, CONTEXT);
|
||||
|
||||
static const struct bt_audio_codec_qos_pref unicast_qos_pref =
|
||||
BT_AUDIO_CODEC_QOS_PREF(true, BT_GAP_LE_PHY_2M, 0U, 60U, 10000U, 60000U, 10000U, 60000U);
|
||||
static const struct bt_bap_qos_cfg_pref unicast_qos_pref =
|
||||
BT_BAP_QOS_CFG_PREF(true, BT_GAP_LE_PHY_2M, 0U, 60U, 10000U, 60000U, 10000U, 60000U);
|
||||
|
||||
#define UNICAST_CHANNEL_COUNT_1 BIT(0)
|
||||
|
||||
|
@ -112,7 +112,7 @@ static struct bt_bap_stream *unicast_stream_alloc(void)
|
|||
static int unicast_server_config(struct bt_conn *conn, const struct bt_bap_ep *ep,
|
||||
enum bt_audio_dir dir, const struct bt_audio_codec_cfg *codec_cfg,
|
||||
struct bt_bap_stream **stream,
|
||||
struct bt_audio_codec_qos_pref *const pref,
|
||||
struct bt_bap_qos_cfg_pref *const pref,
|
||||
struct bt_bap_ascs_rsp *rsp)
|
||||
{
|
||||
printk("ASE Codec Config: conn %p ep %p dir %u\n", conn, ep, dir);
|
||||
|
@ -136,7 +136,7 @@ static int unicast_server_config(struct bt_conn *conn, const struct bt_bap_ep *e
|
|||
|
||||
static int unicast_server_reconfig(struct bt_bap_stream *stream, enum bt_audio_dir dir,
|
||||
const struct bt_audio_codec_cfg *codec_cfg,
|
||||
struct bt_audio_codec_qos_pref *const pref,
|
||||
struct bt_bap_qos_cfg_pref *const pref,
|
||||
struct bt_bap_ascs_rsp *rsp)
|
||||
{
|
||||
printk("ASE Codec Reconfig: stream %p\n", stream);
|
||||
|
@ -151,7 +151,7 @@ static int unicast_server_reconfig(struct bt_bap_stream *stream, enum bt_audio_d
|
|||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
static int unicast_server_qos(struct bt_bap_stream *stream, const struct bt_audio_codec_qos *qos,
|
||||
static int unicast_server_qos(struct bt_bap_stream *stream, const struct bt_bap_qos_cfg *qos,
|
||||
struct bt_bap_ascs_rsp *rsp)
|
||||
{
|
||||
printk("QoS: stream %p qos %p\n", stream, qos);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue