LCOV - code coverage report
Current view: top level - zephyr/bluetooth/audio - bap_lc3_preset.h Hit Total Coverage
Test: new.info Lines: 69 69 100.0 %
Date: 2024-12-22 00:14:23

          Line data    Source code
       1           1 : /**
       2             :  * @file
       3             :  * @brief Header for Bluetooth BAP LC3 presets.
       4             :  *
       5             :  * Copyright (c) 2023-2024 Nordic Semiconductor ASA
       6             :  *
       7             :  * SPDX-License-Identifier: Apache-2.0
       8             :  */
       9             : 
      10             : #ifndef ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_BAP_LC3_PRESET_
      11             : #define ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_BAP_LC3_PRESET_
      12             : 
      13             : /**
      14             :  * @brief Basic Audio Profile (BAP) LC3 Presets
      15             :  *
      16             :  * @defgroup bt_bap_lc3_preset Basic Audio Profile (BAP) LC3 Presets
      17             :  *
      18             :  * @since 3.0
      19             :  * @version 0.8.0
      20             :  *
      21             :  * @ingroup bluetooth
      22             :  * @{
      23             :  *
      24             :  * These APIs provide preset for codec configuration and QoS based on values supplied by the
      25             :  * codec configuration tables in the BAP specification.
      26             :  *
      27             :  */
      28             : 
      29             : #include <zephyr/bluetooth/audio/audio.h>
      30             : #include <zephyr/bluetooth/audio/bap.h>
      31             : #include <zephyr/bluetooth/audio/lc3.h>
      32             : 
      33             : #ifdef __cplusplus
      34             : extern "C" {
      35             : #endif
      36             : 
      37             : /** Struct to hold a BAP defined LC3 preset */
      38           1 : struct bt_bap_lc3_preset {
      39             :         /** The LC3 Codec */
      40           1 :         struct bt_audio_codec_cfg codec_cfg;
      41             :         /** The BAP spec defined QoS values */
      42           1 :         struct bt_bap_qos_cfg qos;
      43             : };
      44             : 
      45             : /** Helper to declare an LC3 preset structure */
      46           1 : #define BT_BAP_LC3_PRESET(_codec, _qos)                                                            \
      47             :         {                                                                                          \
      48             :                 .codec_cfg = _codec, .qos = _qos,                                                  \
      49             :         }
      50             : 
      51             : /* LC3 Unicast presets defined by table 5.2 in the BAP v1.0 specification */
      52             : 
      53             : /**
      54             :  * @brief Helper to declare LC3 Unicast 8_1_1 codec configuration
      55             :  *
      56             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
      57             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
      58             :  */
      59           1 : #define BT_BAP_LC3_UNICAST_PRESET_8_1_1(_loc, _stream_context)                                     \
      60             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_8KHZ,                  \
      61             :                                                     BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 26u, 1, \
      62             :                                                     _stream_context),                              \
      63             :                           BT_BAP_QOS_CFG_UNFRAMED(7500u, 26u, 2u, 8u, 40000u))
      64             : 
      65             : /**
      66             :  * @brief Helper to declare LC3 Unicast 8_2_1 codec configuration
      67             :  *
      68             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
      69             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
      70             :  */
      71           1 : #define BT_BAP_LC3_UNICAST_PRESET_8_2_1(_loc, _stream_context)                                     \
      72             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_8KHZ,                  \
      73             :                                                     BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 30U, 1,  \
      74             :                                                     _stream_context),                              \
      75             :                           BT_BAP_QOS_CFG_UNFRAMED(10000u, 30u, 2u, 10u, 40000u))
      76             : 
      77             : /**
      78             :  * @brief Helper to declare LC3 Unicast 16_1_1 codec configuration
      79             :  *
      80             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
      81             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
      82             :  */
      83           1 : #define BT_BAP_LC3_UNICAST_PRESET_16_1_1(_loc, _stream_context)                                    \
      84             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_16KHZ,                 \
      85             :                                                     BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 30U, 1, \
      86             :                                                     _stream_context),                              \
      87             :                           BT_BAP_QOS_CFG_UNFRAMED(7500u, 30u, 2u, 8u, 40000u))
      88             : 
      89             : /**
      90             :  * @brief Helper to declare LC3 Unicast 16_2_1 codec configuration
      91             :  *
      92             :  * Mandatory to support as both unicast client and server
      93             :  *
      94             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
      95             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
      96             :  */
      97           1 : #define BT_BAP_LC3_UNICAST_PRESET_16_2_1(_loc, _stream_context)                                    \
      98             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_16KHZ,                 \
      99             :                                                     BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 40U, 1,  \
     100             :                                                     _stream_context),                              \
     101             :                           BT_BAP_QOS_CFG_UNFRAMED(10000u, 40u, 2u, 10u, 40000u))
     102             : 
     103             : /**
     104             :  * @brief Helper to declare LC3 Unicast 24_1_1 codec configuration
     105             :  *
     106             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     107             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     108             :  */
     109           1 : #define BT_BAP_LC3_UNICAST_PRESET_24_1_1(_loc, _stream_context)                                    \
     110             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_24KHZ,                 \
     111             :                                                     BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 45U, 1, \
     112             :                                                     _stream_context),                              \
     113             :                           BT_BAP_QOS_CFG_UNFRAMED(7500u, 45u, 2u, 8u, 40000u))
     114             : 
     115             : /**
     116             :  * @brief Helper to declare LC3 Unicast 24_2_1 codec configuration
     117             :  *
     118             :  * Mandatory to support as unicast server
     119             :  *
     120             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     121             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     122             :  */
     123           1 : #define BT_BAP_LC3_UNICAST_PRESET_24_2_1(_loc, _stream_context)                                    \
     124             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_24KHZ,                 \
     125             :                                                     BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 60U, 1,  \
     126             :                                                     _stream_context),                              \
     127             :                           BT_BAP_QOS_CFG_UNFRAMED(10000u, 60u, 2u, 10u, 40000u))
     128             : 
     129             : /**
     130             :  * @brief Helper to declare LC3 Unicast 32_1_1 codec configuration
     131             :  *
     132             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     133             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     134             :  */
     135           1 : #define BT_BAP_LC3_UNICAST_PRESET_32_1_1(_loc, _stream_context)                                    \
     136             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_32KHZ,                 \
     137             :                                                     BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 60U, 1, \
     138             :                                                     _stream_context),                              \
     139             :                           BT_BAP_QOS_CFG_UNFRAMED(7500u, 60u, 2u, 8u, 40000u))
     140             : 
     141             : /**
     142             :  * @brief Helper to declare LC3 Unicast 32_2_1 codec configuration
     143             :  *
     144             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     145             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     146             :  */
     147           1 : #define BT_BAP_LC3_UNICAST_PRESET_32_2_1(_loc, _stream_context)                                    \
     148             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_32KHZ,                 \
     149             :                                                     BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 80U, 1,  \
     150             :                                                     _stream_context),                              \
     151             :                           BT_BAP_QOS_CFG_UNFRAMED(10000u, 80u, 2u, 10u, 40000u))
     152             : 
     153             : /**
     154             :  * @brief Helper to declare LC3 Unicast 441_1_1 codec configuration
     155             :  *
     156             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     157             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     158             :  */
     159           1 : #define BT_BAP_LC3_UNICAST_PRESET_441_1_1(_loc, _stream_context)                                   \
     160             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_44KHZ,                 \
     161             :                                                     BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 97U, 1, \
     162             :                                                     _stream_context),                              \
     163             :                           BT_BAP_QOS_CFG_FRAMED(8163u, 97u, 5u, 24u, 40000u))
     164             : 
     165             : /**
     166             :  * @brief Helper to declare LC3 Unicast 441_2_1 codec configuration
     167             :  *
     168             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     169             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     170             :  */
     171           1 : #define BT_BAP_LC3_UNICAST_PRESET_441_2_1(_loc, _stream_context)                                   \
     172             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_44KHZ,                 \
     173             :                                                     BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 130U, 1, \
     174             :                                                     _stream_context),                              \
     175             :                           BT_BAP_QOS_CFG_FRAMED(10884u, 130u, 5u, 31u, 40000u))
     176             : 
     177             : /**
     178             :  * @brief Helper to declare LC3 Unicast 48_1_1 codec configuration
     179             :  *
     180             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     181             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     182             :  */
     183           1 : #define BT_BAP_LC3_UNICAST_PRESET_48_1_1(_loc, _stream_context)                                    \
     184             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
     185             :                                                     BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 75U, 1, \
     186             :                                                     _stream_context),                              \
     187             :                           BT_BAP_QOS_CFG_UNFRAMED(7500u, 75u, 5u, 15u, 40000u))
     188             : 
     189             : /**
     190             :  * @brief Helper to declare LC3 Unicast 48_2_1 codec configuration
     191             :  *
     192             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     193             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     194             :  */
     195           1 : #define BT_BAP_LC3_UNICAST_PRESET_48_2_1(_loc, _stream_context)                                    \
     196             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
     197             :                                                     BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 100U, 1, \
     198             :                                                     _stream_context),                              \
     199             :                           BT_BAP_QOS_CFG_UNFRAMED(10000u, 100u, 5u, 20u, 40000u))
     200             : 
     201             : /**
     202             :  * @brief Helper to declare LC3 Unicast 48_3_1 codec configuration
     203             :  *
     204             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     205             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     206             :  */
     207           1 : #define BT_BAP_LC3_UNICAST_PRESET_48_3_1(_loc, _stream_context)                                    \
     208             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
     209             :                                                     BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 90U, 1, \
     210             :                                                     _stream_context),                              \
     211             :                           BT_BAP_QOS_CFG_UNFRAMED(7500u, 90u, 5u, 15u, 40000u))
     212             : 
     213             : /**
     214             :  * @brief Helper to declare LC3 Unicast 48_4_1 codec configuration
     215             :  *
     216             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     217             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     218             :  */
     219           1 : #define BT_BAP_LC3_UNICAST_PRESET_48_4_1(_loc, _stream_context)                                    \
     220             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
     221             :                                                     BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 120u, 1, \
     222             :                                                     _stream_context),                              \
     223             :                           BT_BAP_QOS_CFG_UNFRAMED(10000u, 120u, 5u, 20u, 40000u))
     224             : 
     225             : /**
     226             :  * @brief Helper to declare LC3 Unicast 8_5_1 codec configuration
     227             :  *
     228             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     229             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     230             :  */
     231           1 : #define BT_BAP_LC3_UNICAST_PRESET_48_5_1(_loc, _stream_context)                                    \
     232             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
     233             :                                                     BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 117u,   \
     234             :                                                     1, _stream_context),                           \
     235             :                           BT_BAP_QOS_CFG_UNFRAMED(7500u, 117u, 5u, 15u, 40000u))
     236             : 
     237             : /**
     238             :  * @brief Helper to declare LC3 Unicast 48_6_1 codec configuration
     239             :  *
     240             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     241             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     242             :  */
     243           1 : #define BT_BAP_LC3_UNICAST_PRESET_48_6_1(_loc, _stream_context)                                    \
     244             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
     245             :                                                     BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 155u, 1, \
     246             :                                                     _stream_context),                              \
     247             :                           BT_BAP_QOS_CFG_UNFRAMED(10000u, 155u, 5u, 20u, 40000u))
     248             : 
     249             : /**
     250             :  * @brief Helper to declare LC3 Unicast 8_1_2 codec configuration
     251             :  *
     252             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     253             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     254             :  */
     255             : /* Following presets are for unicast high reliability audio data */
     256           1 : #define BT_BAP_LC3_UNICAST_PRESET_8_1_2(_loc, _stream_context)                                     \
     257             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_8KHZ,                  \
     258             :                                                     BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 26u, 1, \
     259             :                                                     _stream_context),                              \
     260             :                           BT_BAP_QOS_CFG_UNFRAMED(7500u, 26u, 13u, 75u, 40000u))
     261             : 
     262             : /**
     263             :  * @brief Helper to declare LC3 Unicast 8_2_2 codec configuration
     264             :  *
     265             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     266             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     267             :  */
     268           1 : #define BT_BAP_LC3_UNICAST_PRESET_8_2_2(_loc, _stream_context)                                     \
     269             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_8KHZ,                  \
     270             :                                                     BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 30U, 1,  \
     271             :                                                     _stream_context),                              \
     272             :                           BT_BAP_QOS_CFG_UNFRAMED(10000u, 30u, 13u, 95u, 40000u))
     273             : 
     274             : /**
     275             :  * @brief Helper to declare LC3 Unicast 16_1_2 codec configuration
     276             :  *
     277             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     278             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     279             :  */
     280           1 : #define BT_BAP_LC3_UNICAST_PRESET_16_1_2(_loc, _stream_context)                                    \
     281             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_16KHZ,                 \
     282             :                                                     BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 30U, 1, \
     283             :                                                     _stream_context),                              \
     284             :                           BT_BAP_QOS_CFG_UNFRAMED(7500u, 30u, 13u, 75u, 40000u))
     285             : 
     286             : /**
     287             :  * @brief Helper to declare LC3 Unicast 16_2_2 codec configuration
     288             :  *
     289             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     290             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     291             :  */
     292           1 : #define BT_BAP_LC3_UNICAST_PRESET_16_2_2(_loc, _stream_context)                                    \
     293             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_16KHZ,                 \
     294             :                                                     BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 40U, 1,  \
     295             :                                                     _stream_context),                              \
     296             :                           BT_BAP_QOS_CFG_UNFRAMED(10000u, 40u, 13u, 95u, 40000u))
     297             : 
     298             : /**
     299             :  * @brief Helper to declare LC3 Unicast 24_1_2 codec configuration
     300             :  *
     301             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     302             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     303             :  */
     304           1 : #define BT_BAP_LC3_UNICAST_PRESET_24_1_2(_loc, _stream_context)                                    \
     305             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_24KHZ,                 \
     306             :                                                     BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 45U, 1, \
     307             :                                                     _stream_context),                              \
     308             :                           BT_BAP_QOS_CFG_UNFRAMED(7500u, 45u, 13u, 75u, 40000u))
     309             : 
     310             : /**
     311             :  * @brief Helper to declare LC3 Unicast 24_2_2 codec configuration
     312             :  *
     313             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     314             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     315             :  */
     316           1 : #define BT_BAP_LC3_UNICAST_PRESET_24_2_2(_loc, _stream_context)                                    \
     317             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_24KHZ,                 \
     318             :                                                     BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 60U, 1,  \
     319             :                                                     _stream_context),                              \
     320             :                           BT_BAP_QOS_CFG_UNFRAMED(10000u, 60u, 13u, 95u, 40000u))
     321             : 
     322             : /**
     323             :  * @brief Helper to declare LC3 Unicast 32_1_2 codec configuration
     324             :  *
     325             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     326             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     327             :  */
     328           1 : #define BT_BAP_LC3_UNICAST_PRESET_32_1_2(_loc, _stream_context)                                    \
     329             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_32KHZ,                 \
     330             :                                                     BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 60U, 1, \
     331             :                                                     _stream_context),                              \
     332             :                           BT_BAP_QOS_CFG_UNFRAMED(7500u, 60u, 13u, 75u, 40000u))
     333             : 
     334             : /**
     335             :  * @brief Helper to declare LC3 Unicast 32_2_2 codec configuration
     336             :  *
     337             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     338             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     339             :  */
     340           1 : #define BT_BAP_LC3_UNICAST_PRESET_32_2_2(_loc, _stream_context)                                    \
     341             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_32KHZ,                 \
     342             :                                                     BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 80U, 1,  \
     343             :                                                     _stream_context),                              \
     344             :                           BT_BAP_QOS_CFG_UNFRAMED(10000u, 80u, 13u, 95u, 40000u))
     345             : 
     346             : /**
     347             :  * @brief Helper to declare LC3 Unicast 441_1_2 codec configuration
     348             :  *
     349             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     350             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     351             :  */
     352           1 : #define BT_BAP_LC3_UNICAST_PRESET_441_1_2(_loc, _stream_context)                                   \
     353             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_44KHZ,                 \
     354             :                                                     BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 97U, 1, \
     355             :                                                     _stream_context),                              \
     356             :                           BT_BAP_QOS_CFG_FRAMED(8163u, 97u, 13u, 80u, 40000u))
     357             : 
     358             : /**
     359             :  * @brief Helper to declare LC3 Unicast 441_2_2 codec configuration
     360             :  *
     361             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     362             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     363             :  */
     364           1 : #define BT_BAP_LC3_UNICAST_PRESET_441_2_2(_loc, _stream_context)                                   \
     365             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_44KHZ,                 \
     366             :                                                     BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 130U, 1, \
     367             :                                                     _stream_context),                              \
     368             :                           BT_BAP_QOS_CFG_FRAMED(10884u, 130u, 13u, 85u, 40000u))
     369             : 
     370             : /**
     371             :  * @brief Helper to declare LC3 Unicast 48_1_2 codec configuration
     372             :  *
     373             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     374             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     375             :  */
     376           1 : #define BT_BAP_LC3_UNICAST_PRESET_48_1_2(_loc, _stream_context)                                    \
     377             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
     378             :                                                     BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 75U, 1, \
     379             :                                                     _stream_context),                              \
     380             :                           BT_BAP_QOS_CFG_UNFRAMED(7500u, 75u, 13u, 75u, 40000u))
     381             : 
     382             : /**
     383             :  * @brief Helper to declare LC3 Unicast 48_2_2 codec configuration
     384             :  *
     385             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     386             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     387             :  */
     388           1 : #define BT_BAP_LC3_UNICAST_PRESET_48_2_2(_loc, _stream_context)                                    \
     389             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
     390             :                                                     BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 100U, 1, \
     391             :                                                     _stream_context),                              \
     392             :                           BT_BAP_QOS_CFG_UNFRAMED(10000u, 100u, 13u, 95u, 40000u))
     393             : 
     394             : /**
     395             :  * @brief Helper to declare LC3 Unicast 48_3_2 codec configuration
     396             :  *
     397             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     398             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     399             :  */
     400           1 : #define BT_BAP_LC3_UNICAST_PRESET_48_3_2(_loc, _stream_context)                                    \
     401             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
     402             :                                                     BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 90U, 1, \
     403             :                                                     _stream_context),                              \
     404             :                           BT_BAP_QOS_CFG_UNFRAMED(7500u, 90u, 13u, 75u, 40000u))
     405             : 
     406             : /**
     407             :  * @brief Helper to declare LC3 Unicast 48_4_2 codec configuration
     408             :  *
     409             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     410             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     411             :  */
     412           1 : #define BT_BAP_LC3_UNICAST_PRESET_48_4_2(_loc, _stream_context)                                    \
     413             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
     414             :                                                     BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 120u, 1, \
     415             :                                                     _stream_context),                              \
     416             :                           BT_BAP_QOS_CFG_UNFRAMED(10000u, 120u, 13u, 100u, 40000u))
     417             : 
     418             : /**
     419             :  * @brief Helper to declare LC3 Unicast 48_5_2 codec configuration
     420             :  *
     421             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     422             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     423             :  */
     424           1 : #define BT_BAP_LC3_UNICAST_PRESET_48_5_2(_loc, _stream_context)                                    \
     425             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
     426             :                                                     BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 117u,   \
     427             :                                                     1, _stream_context),                           \
     428             :                           BT_BAP_QOS_CFG_UNFRAMED(7500u, 117u, 13u, 75u, 40000u))
     429             : 
     430             : /**
     431             :  * @brief Helper to declare LC3 Unicast 48_6_2 codec configuration
     432             :  *
     433             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     434             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     435             :  */
     436           1 : #define BT_BAP_LC3_UNICAST_PRESET_48_6_2(_loc, _stream_context)                                    \
     437             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
     438             :                                                     BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 155u, 1, \
     439             :                                                     _stream_context),                              \
     440             :                           BT_BAP_QOS_CFG_UNFRAMED(10000u, 155u, 13u, 100u, 40000u))
     441             : 
     442             : /**
     443             :  * @brief Helper to declare LC3 Broadcast 8_1_1 codec configuration
     444             :  *
     445             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     446             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     447             :  */
     448             : /* LC3 Broadcast presets defined by table 6.4 in the BAP v1.0 specification */
     449           1 : #define BT_BAP_LC3_BROADCAST_PRESET_8_1_1(_loc, _stream_context)                                   \
     450             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_8KHZ,                  \
     451             :                                                     BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 26u, 1, \
     452             :                                                     _stream_context),                              \
     453             :                           BT_BAP_QOS_CFG_UNFRAMED(7500u, 26u, 2u, 8u, 40000u))
     454             : 
     455             : /**
     456             :  * @brief Helper to declare LC3 Broadcast 8_2_1 codec configuration
     457             :  *
     458             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     459             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     460             :  */
     461           1 : #define BT_BAP_LC3_BROADCAST_PRESET_8_2_1(_loc, _stream_context)                                   \
     462             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_8KHZ,                  \
     463             :                                                     BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 30U, 1,  \
     464             :                                                     _stream_context),                              \
     465             :                           BT_BAP_QOS_CFG_UNFRAMED(10000u, 30u, 2u, 10u, 40000u))
     466             : 
     467             : /**
     468             :  * @brief Helper to declare LC3 Broadcast 16_1_1 codec configuration
     469             :  *
     470             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     471             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     472             :  */
     473           1 : #define BT_BAP_LC3_BROADCAST_PRESET_16_1_1(_loc, _stream_context)                                  \
     474             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_16KHZ,                 \
     475             :                                                     BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 30U, 1, \
     476             :                                                     _stream_context),                              \
     477             :                           BT_BAP_QOS_CFG_UNFRAMED(7500u, 30u, 2u, 8u, 40000u))
     478             : 
     479             : /**
     480             :  * @brief Helper to declare LC3 Broadcast 16_2_1 codec configuration
     481             :  *
     482             :  * Mandatory to support as both broadcast source and sink
     483             :  *
     484             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     485             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     486             :  */
     487           1 : #define BT_BAP_LC3_BROADCAST_PRESET_16_2_1(_loc, _stream_context)                                  \
     488             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_16KHZ,                 \
     489             :                                                     BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 40U, 1,  \
     490             :                                                     _stream_context),                              \
     491             :                           BT_BAP_QOS_CFG_UNFRAMED(10000u, 40u, 2u, 10u, 40000u))
     492             : 
     493             : /**
     494             :  * @brief Helper to declare LC3 Broadcast 24_1_1 codec configuration
     495             :  *
     496             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     497             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     498             :  */
     499           1 : #define BT_BAP_LC3_BROADCAST_PRESET_24_1_1(_loc, _stream_context)                                  \
     500             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_24KHZ,                 \
     501             :                                                     BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 45U, 1, \
     502             :                                                     _stream_context),                              \
     503             :                           BT_BAP_QOS_CFG_UNFRAMED(7500u, 45u, 2u, 8u, 40000u))
     504             : 
     505             : /**
     506             :  * @brief Helper to declare LC3 Broadcast 24_2_1 codec configuration
     507             :  *
     508             :  * Mandatory to support as broadcast sink
     509             :  *
     510             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     511             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     512             :  */
     513           1 : #define BT_BAP_LC3_BROADCAST_PRESET_24_2_1(_loc, _stream_context)                                  \
     514             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_24KHZ,                 \
     515             :                                                     BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 60U, 1,  \
     516             :                                                     _stream_context),                              \
     517             :                           BT_BAP_QOS_CFG_UNFRAMED(10000u, 60u, 2u, 10u, 40000u))
     518             : 
     519             : /**
     520             :  * @brief Helper to declare LC3 Broadcast 32_1_1 codec configuration
     521             :  *
     522             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     523             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     524             :  */
     525           1 : #define BT_BAP_LC3_BROADCAST_PRESET_32_1_1(_loc, _stream_context)                                  \
     526             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_32KHZ,                 \
     527             :                                                     BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 60U, 1, \
     528             :                                                     _stream_context),                              \
     529             :                           BT_BAP_QOS_CFG_UNFRAMED(7500u, 60u, 2u, 8u, 40000u))
     530             : 
     531             : /**
     532             :  * @brief Helper to declare LC3 Broadcast 32_2_1 codec configuration
     533             :  *
     534             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     535             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     536             :  */
     537           1 : #define BT_BAP_LC3_BROADCAST_PRESET_32_2_1(_loc, _stream_context)                                  \
     538             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_32KHZ,                 \
     539             :                                                     BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 80U, 1,  \
     540             :                                                     _stream_context),                              \
     541             :                           BT_BAP_QOS_CFG_UNFRAMED(10000u, 80u, 2u, 10u, 40000u))
     542             : 
     543             : /**
     544             :  * @brief Helper to declare LC3 Broadcast 441_1_1 codec configuration
     545             :  *
     546             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     547             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     548             :  */
     549           1 : #define BT_BAP_LC3_BROADCAST_PRESET_441_1_1(_loc, _stream_context)                                 \
     550             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_44KHZ,                 \
     551             :                                                     BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 97U, 1, \
     552             :                                                     _stream_context),                              \
     553             :                           BT_BAP_QOS_CFG_FRAMED(8163u, 97u, 4u, 24u, 40000u))
     554             : 
     555             : /**
     556             :  * @brief Helper to declare LC3 Broadcast 441_2_1 codec configuration
     557             :  *
     558             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     559             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     560             :  */
     561           1 : #define BT_BAP_LC3_BROADCAST_PRESET_441_2_1(_loc, _stream_context)                                 \
     562             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_44KHZ,                 \
     563             :                                                     BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 130U, 1, \
     564             :                                                     _stream_context),                              \
     565             :                           BT_BAP_QOS_CFG_FRAMED(10884u, 130u, 4u, 31u, 40000u))
     566             : 
     567             : /**
     568             :  * @brief Helper to declare LC3 Broadcast 48_1_1 codec configuration
     569             :  *
     570             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     571             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     572             :  */
     573           1 : #define BT_BAP_LC3_BROADCAST_PRESET_48_1_1(_loc, _stream_context)                                  \
     574             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
     575             :                                                     BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 75U, 1, \
     576             :                                                     _stream_context),                              \
     577             :                           BT_BAP_QOS_CFG_UNFRAMED(7500u, 75u, 4u, 15u, 40000u))
     578             : 
     579             : /**
     580             :  * @brief Helper to declare LC3 Broadcast 48_2_1 codec configuration
     581             :  *
     582             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     583             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     584             :  */
     585           1 : #define BT_BAP_LC3_BROADCAST_PRESET_48_2_1(_loc, _stream_context)                                  \
     586             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
     587             :                                                     BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 100U, 1, \
     588             :                                                     _stream_context),                              \
     589             :                           BT_BAP_QOS_CFG_UNFRAMED(10000u, 100u, 4u, 20u, 40000u))
     590             : 
     591             : /**
     592             :  * @brief Helper to declare LC3 Broadcast 48_3_1 codec configuration
     593             :  *
     594             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     595             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     596             :  */
     597           1 : #define BT_BAP_LC3_BROADCAST_PRESET_48_3_1(_loc, _stream_context)                                  \
     598             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
     599             :                                                     BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 90U, 1, \
     600             :                                                     _stream_context),                              \
     601             :                           BT_BAP_QOS_CFG_UNFRAMED(7500u, 90u, 4u, 15u, 40000u))
     602             : 
     603             : /**
     604             :  * @brief Helper to declare LC3 Broadcast 48_4_1 codec configuration
     605             :  *
     606             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     607             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     608             :  */
     609           1 : #define BT_BAP_LC3_BROADCAST_PRESET_48_4_1(_loc, _stream_context)                                  \
     610             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
     611             :                                                     BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 120u, 1, \
     612             :                                                     _stream_context),                              \
     613             :                           BT_BAP_QOS_CFG_UNFRAMED(10000u, 120u, 4u, 20u, 40000u))
     614             : 
     615             : /**
     616             :  * @brief Helper to declare LC3 Broadcast 48_5_1 codec configuration
     617             :  *
     618             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     619             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     620             :  */
     621           1 : #define BT_BAP_LC3_BROADCAST_PRESET_48_5_1(_loc, _stream_context)                                  \
     622             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
     623             :                                                     BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 117u,   \
     624             :                                                     1, _stream_context),                           \
     625             :                           BT_BAP_QOS_CFG_UNFRAMED(7500u, 117u, 4u, 15u, 40000u))
     626             : 
     627             : /**
     628             :  * @brief Helper to declare LC3 Broadcast 48_6_1 codec configuration
     629             :  *
     630             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     631             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     632             :  */
     633           1 : #define BT_BAP_LC3_BROADCAST_PRESET_48_6_1(_loc, _stream_context)                                  \
     634             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
     635             :                                                     BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 155u, 1, \
     636             :                                                     _stream_context),                              \
     637             :                           BT_BAP_QOS_CFG_UNFRAMED(10000u, 155u, 4u, 20u, 40000u))
     638             : 
     639             : /**
     640             :  * @brief Helper to declare LC3 Broadcast 8_1_2 codec configuration
     641             :  *
     642             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     643             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     644             :  */
     645             : /* Following presets are for broadcast high reliability audio data */
     646           1 : #define BT_BAP_LC3_BROADCAST_PRESET_8_1_2(_loc, _stream_context)                                   \
     647             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_8KHZ,                  \
     648             :                                                     BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 26u, 1, \
     649             :                                                     _stream_context),                              \
     650             :                           BT_BAP_QOS_CFG_UNFRAMED(7500u, 26u, 4u, 45u, 40000u))
     651             : 
     652             : /**
     653             :  * @brief Helper to declare LC3 Broadcast 8_2_2 codec configuration
     654             :  *
     655             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     656             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     657             :  */
     658           1 : #define BT_BAP_LC3_BROADCAST_PRESET_8_2_2(_loc, _stream_context)                                   \
     659             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_8KHZ,                  \
     660             :                                                     BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 30U, 1,  \
     661             :                                                     _stream_context),                              \
     662             :                           BT_BAP_QOS_CFG_UNFRAMED(10000u, 30u, 4u, 60u, 40000u))
     663             : 
     664             : /**
     665             :  * @brief Helper to declare LC3 Broadcast 16_1_2 codec configuration
     666             :  *
     667             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     668             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     669             :  */
     670           1 : #define BT_BAP_LC3_BROADCAST_PRESET_16_1_2(_loc, _stream_context)                                  \
     671             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_16KHZ,                 \
     672             :                                                     BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 30U, 1, \
     673             :                                                     _stream_context),                              \
     674             :                           BT_BAP_QOS_CFG_UNFRAMED(7500u, 30u, 4u, 45u, 40000u))
     675             : 
     676             : /**
     677             :  * @brief Helper to declare LC3 Broadcast 16_2_2 codec configuration
     678             :  *
     679             :  * Mandatory to support as both broadcast source and sink
     680             :  *
     681             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     682             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     683             :  */
     684           1 : #define BT_BAP_LC3_BROADCAST_PRESET_16_2_2(_loc, _stream_context)                                  \
     685             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_16KHZ,                 \
     686             :                                                     BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 40U, 1,  \
     687             :                                                     _stream_context),                              \
     688             :                           BT_BAP_QOS_CFG_UNFRAMED(10000u, 40u, 4u, 60u, 40000u))
     689             : 
     690             : /**
     691             :  * @brief Helper to declare LC3 Broadcast 24_1_2 codec configuration
     692             :  *
     693             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     694             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     695             :  */
     696           1 : #define BT_BAP_LC3_BROADCAST_PRESET_24_1_2(_loc, _stream_context)                                  \
     697             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_24KHZ,                 \
     698             :                                                     BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 45U, 1, \
     699             :                                                     _stream_context),                              \
     700             :                           BT_BAP_QOS_CFG_UNFRAMED(7500u, 45u, 4u, 45u, 40000u))
     701             : 
     702             : /**
     703             :  * @brief Helper to declare LC3 Broadcast 24_2_2 codec configuration
     704             :  *
     705             :  * Mandatory to support as broadcast sink
     706             :  *
     707             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     708             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     709             :  */
     710           1 : #define BT_BAP_LC3_BROADCAST_PRESET_24_2_2(_loc, _stream_context)                                  \
     711             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_24KHZ,                 \
     712             :                                                     BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 60U, 1,  \
     713             :                                                     _stream_context),                              \
     714             :                           BT_BAP_QOS_CFG_UNFRAMED(10000u, 60u, 4u, 60u, 40000u))
     715             : 
     716             : /**
     717             :  * @brief Helper to declare LC3 Broadcast 32_1_2 codec configuration
     718             :  *
     719             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     720             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     721             :  */
     722           1 : #define BT_BAP_LC3_BROADCAST_PRESET_32_1_2(_loc, _stream_context)                                  \
     723             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_32KHZ,                 \
     724             :                                                     BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 60U, 1, \
     725             :                                                     _stream_context),                              \
     726             :                           BT_BAP_QOS_CFG_UNFRAMED(7500u, 60u, 4u, 45u, 40000u))
     727             : 
     728             : /**
     729             :  * @brief Helper to declare LC3 Broadcast 32_2_2 codec configuration
     730             :  *
     731             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     732             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     733             :  */
     734           1 : #define BT_BAP_LC3_BROADCAST_PRESET_32_2_2(_loc, _stream_context)                                  \
     735             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_32KHZ,                 \
     736             :                                                     BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 80U, 1,  \
     737             :                                                     _stream_context),                              \
     738             :                           BT_BAP_QOS_CFG_UNFRAMED(10000u, 80u, 4u, 60u, 40000u))
     739             : 
     740             : /**
     741             :  * @brief Helper to declare LC3 Broadcast 441_1_2 codec configuration
     742             :  *
     743             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     744             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     745             :  */
     746           1 : #define BT_BAP_LC3_BROADCAST_PRESET_441_1_2(_loc, _stream_context)                                 \
     747             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_44KHZ,                 \
     748             :                                                     BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 97U, 1, \
     749             :                                                     _stream_context),                              \
     750             :                           BT_BAP_QOS_CFG_FRAMED(8163u, 97u, 4u, 54u, 40000u))
     751             : 
     752             : /**
     753             :  * @brief Helper to declare LC3 Broadcast 441_2_2 codec configuration
     754             :  *
     755             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     756             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     757             :  */
     758           1 : #define BT_BAP_LC3_BROADCAST_PRESET_441_2_2(_loc, _stream_context)                                 \
     759             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_44KHZ,                 \
     760             :                                                     BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 130U, 1, \
     761             :                                                     _stream_context),                              \
     762             :                           BT_BAP_QOS_CFG_FRAMED(10884u, 130u, 4u, 60u, 40000u))
     763             : 
     764             : /**
     765             :  * @brief Helper to declare LC3 Broadcast 48_1_2 codec configuration
     766             :  *
     767             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     768             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     769             :  */
     770           1 : #define BT_BAP_LC3_BROADCAST_PRESET_48_1_2(_loc, _stream_context)                                  \
     771             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
     772             :                                                     BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 75U, 1, \
     773             :                                                     _stream_context),                              \
     774             :                           BT_BAP_QOS_CFG_UNFRAMED(7500u, 75u, 4u, 50u, 40000u))
     775             : 
     776             : /**
     777             :  * @brief Helper to declare LC3 Broadcast 48_2_2 codec configuration
     778             :  *
     779             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     780             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     781             :  */
     782           1 : #define BT_BAP_LC3_BROADCAST_PRESET_48_2_2(_loc, _stream_context)                                  \
     783             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
     784             :                                                     BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 100U, 1, \
     785             :                                                     _stream_context),                              \
     786             :                           BT_BAP_QOS_CFG_UNFRAMED(10000u, 100u, 4u, 65u, 40000u))
     787             : 
     788             : /**
     789             :  * @brief Helper to declare LC3 Broadcast 48_3_2 codec configuration
     790             :  *
     791             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     792             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     793             :  */
     794           1 : #define BT_BAP_LC3_BROADCAST_PRESET_48_3_2(_loc, _stream_context)                                  \
     795             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
     796             :                                                     BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 90U, 1, \
     797             :                                                     _stream_context),                              \
     798             :                           BT_BAP_QOS_CFG_UNFRAMED(7500u, 90u, 4u, 50u, 40000u))
     799             : 
     800             : /**
     801             :  * @brief Helper to declare LC3 Broadcast 48_4_2 codec configuration
     802             :  *
     803             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     804             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     805             :  */
     806           1 : #define BT_BAP_LC3_BROADCAST_PRESET_48_4_2(_loc, _stream_context)                                  \
     807             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
     808             :                                                     BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 120u, 1, \
     809             :                                                     _stream_context),                              \
     810             :                           BT_BAP_QOS_CFG_UNFRAMED(10000u, 120u, 4u, 65u, 40000u))
     811             : 
     812             : /**
     813             :  * @brief Helper to declare LC3 Broadcast 48_5_2 codec configuration
     814             :  *
     815             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     816             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     817             :  */
     818           1 : #define BT_BAP_LC3_BROADCAST_PRESET_48_5_2(_loc, _stream_context)                                  \
     819             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
     820             :                                                     BT_AUDIO_CODEC_CFG_DURATION_7_5, _loc, 117u,   \
     821             :                                                     1, _stream_context),                           \
     822             :                           BT_BAP_QOS_CFG_UNFRAMED(7500u, 117u, 4u, 50u, 40000u))
     823             : 
     824             : /**
     825             :  * @brief Helper to declare LC3 Broadcast 48_6_2 codec configuration
     826             :  *
     827             :  * @param _loc             Audio channel location bitfield (@ref bt_audio_location)
     828             :  * @param _stream_context  Stream context (``BT_AUDIO_CONTEXT_*``)
     829             :  */
     830           1 : #define BT_BAP_LC3_BROADCAST_PRESET_48_6_2(_loc, _stream_context)                                  \
     831             :         BT_BAP_LC3_PRESET(BT_AUDIO_CODEC_LC3_CONFIG(BT_AUDIO_CODEC_CFG_FREQ_48KHZ,                 \
     832             :                                                     BT_AUDIO_CODEC_CFG_DURATION_10, _loc, 155u, 1, \
     833             :                                                     _stream_context),                              \
     834             :                           BT_BAP_QOS_CFG_UNFRAMED(10000u, 155u, 4u, 65u, 40000u))
     835             : 
     836             : #ifdef __cplusplus
     837             : }
     838             : #endif
     839             : /** @} */
     840             : 
     841             : #endif /* ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_BAP_LC3_PRESET_ */

Generated by: LCOV version 1.14