connectivity/bluetooth/api/audio/bluetooth-le-audio-arch.html · connectivity/bluetooth/api/audio/bluetooth-le-audio-arch.rst 공식 원문 ↗

Zephyr 3.7.0 · Connectivity · Bluetooth · LE Audio

LE Audio Stack architecture

BAP·CAP·MCP·VCP·CSIP을 GAF 계층에서 연결하고 실제 data 소유권과 보안 요구사항까지 설명합니다.

Official pathconnectivity/bluetooth/api/audio/bluetooth-le-audio-arch.html
Source fileconnectivity/bluetooth/api/audio/bluetooth-le-audio-arch.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

Part 1

요약·해설

1,307줄 공식 architecture 문서의 도식 4개, 의존성·상태 표 12개와 전체 설명을 보존했습니다.

Framework

GAF

Tables

12

Diagrams

4

Security

Level 2 · 128-bit

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 75C19AE7C9D90CC8E3C5F1E1F9E5B5FCA7537592E18D0ACB06F84011C0508E1F
.. _bluetooth_le_audio_arch:

LE Audio Stack
##############

.. graphviz::
   :caption: Bluetooth Audio Architecture

   digraph bluetooth_audio_arch {
      r [shape=record, width=5, height=3
         label="{{TMAP | HAP | PBP | GMAP | ...} |
                  GAF |
                  {{{ GATT | GAP } | Low-level protocols (L2CAP, ATT, etc.)} | GAP | ISO}
                  | HCI Driver (USB, UART, SPI, virtual, etc.)}"
         ];
   }

Overall design
**************

The overall design of the LE Audio stack is that the implementation follows the specifications
as closely as possible,
both in terms of structure but also naming.
Most API functions are prefixed by the specification acronym
(e.g. `bt_bap` for the Basic Audio Profile (BAP) and `bt_vcp` for the Volume Control Profile (VCP)).
The functions are then further prefixed with the specific role from each profile where applicable
(e.g. :c:func:`bt_bap_unicast_client_discover` and :c:func:`bt_vcp_vol_rend_set_vol`).
There are usually a function per procedure defined by the profile or service specifications,
and additional helper or meta functions that do not correspond to procedures.

The structure of the files generally also follow this,
where BAP related files are prefixed with `bap` and VCP related files are prefixed with `vcp`.
If the file is specific for a profile role, the role is also embedded in the file name.

Generic Audio Framework (GAF)
*****************************
The Generic Audio Framework (GAF) is considered the middleware of the Bluetooth
LE Audio architecture. The GAF contains the profiles and services that allows
higher layer applications and profiles to set up streams, change volume, control
media and telephony and more. The GAF builds on GATT, GAP and isochronous
channels (ISO).

GAF uses GAP to connect, advertise and synchronize to other devices.
GAF uses GATT to configure streams, associate streams with content
(e.g. media or telephony), control volume and more.
GAF uses ISO for the audio streams themselves, both as unicast (connected)
audio streams or broadcast (unconnected) audio streams.

GAF mandates the use of the LC3 codec, but also supports other codecs.

.. graphviz::
   :caption: Generic Audio Framework (GAF)

   digraph gaf {
      node [shape=record];
      edge [style=invis];
      compound=true;
      nodesep=0.1;

      subgraph hap_layer {
         cluster=true;
         label="HAP";
         HAS;
         BAS [style=dashed];
         IAS [style=dashed];
      }

      subgraph pbp_layer {
         cluster=true;
         label="PBP";
         PBS[style=invis]; // Make it possible to treat PBP like the others
      }

      subgraph tmap_layer {
         cluster=true;
         label="TMAP";
         TMAS;
      }

      subgraph gmap_layer {
         cluster=true;
         label="GMAP";
         GMAS;
      }

      subgraph gaf_layer {
         cluster=true;
         label="Generic Audio Framework";

         subgraph transition_and_coordination_control_layer {
            cluster=true;
            label="Transition and Coordination Control";
            style=dashed;

            subgraph cap_layer {
               cluster=true;
               style=solid;
               label="CAP";
               CAS;
            }

            subgraph csip_layer {
               cluster=true;
               style=solid;
               label="CSIP";
               CSIS;
            }
         }

         subgraph stream_control_layer {
            cluster=true;
            label="Stream Control";
            style=dashed;

            subgraph bap_layer {
               cluster=true;
               label="BAP";
               style=solid;
               PACS [style=dashed];
               ASCS [style=dashed];
               BASS [style=dashed];
            }
         }

         subgraph content_control_layer {
            cluster=true;
            label="Content Control";
            style=dashed;

            subgraph mcp_layer {
               cluster=true;
               label="MCP";
               style=solid;
               MCS;
            }

            subgraph ccp_layer {
               cluster=true;
               label="CCP";
               style=solid;
               TBS;
            }
         }

         subgraph rendering_and_capture_control_layer {
            cluster=true;
            label="Rendering and Capture Control";
            style=dashed;

            subgraph micp_layer {
               cluster=true;
               label="MICP";
               style=solid;
               MICS;
               MICP_AICS [style=dashed];
            }

            subgraph vcp_layer {
               cluster=true;
               label="VCP";
               style=solid;
               VCS;
               VOCS [style=dashed];
               VCP_AICS [style=dashed];
            }
         }
      }

      HAS -> CAS;
      PBS -> CAS;
      TMAS -> CAS;
      GMAS -> CAS;

      CAS -> MCS;
      CAS -> TBS;
      CAS -> ASCS;
      CAS -> PACS;
      CAS -> BASS;
      CAS -> MICS;
      CAS -> MICP_AICS;
      CAS -> VCS;
      CAS -> VOCS;
      CAS -> VCP_AICS;

      CSIS -> MCS;
      CSIS -> TBS;
      CSIS -> ASCS;
      CSIS -> PACS;
      CSIS -> BASS;
      CSIS -> MICS;
      CSIS -> MICP_AICS;
      CSIS -> VCS;
      CSIS -> VOCS;
      CSIS -> VCP_AICS;
   }

The top-level profiles TMAP and HAP are not part of the GAF, but rather provide
top-level requirements for how to use the GAF.

GAF and the top layer profiles gave been implemented in Zephyr with the following structure.

.. graphviz::
   :caption: Zephyr Generic Audio Framework

   digraph gaf {
      node [shape=record];
      edge [style=invis];
      compound=true;
      nodesep=0.1;

      subgraph hap_layer {
         cluster=true;
         label="HAP";
         HAS_H [label="has.h"];
         BAS_H [label="bas.h"];
         IAS_H [label="ias.h"];
      }

      subgraph pbp_layer {
         cluster=true;
         label="PBP";
         PBP_H [label="pbp.h"]; // Make it possible to treat PBP like the others
      }

      subgraph tmap_layer {
         cluster=true;
         label="TMAP";
         TMAP_H [label="tmap.h"];
      }

      subgraph gmap_layer {
         cluster=true;
         label="GMAP";
         GMAP_H [label="gmap.h"];
         GMAP_PRESET_H [label="gmap_lc3_preset.h"];
      }

      subgraph gaf_layer {
         cluster=true;
         label="Generic Audio Framework";
         AUDIO_H [label="audio.h"];
         LC3_H [label="lc3.h"];

         subgraph transition_and_coordination_control_layer {
            cluster=true;
            label="Transition and Coordination Control";
            style=dashed;

            subgraph cap_layer {
               cluster=true;
               style=solid;
               label="CAP";
               CAP_H [label="cap.h"];
            }

            subgraph csip_layer {
               cluster=true;
               style=solid;
               label="CSIP";
               CSIP_H [label="csip.h"];
            }
         }

         subgraph stream_control_layer {
            cluster=true;
            label="Stream Control";
            style=dashed;

            subgraph bap_layer {
               cluster=true;
               label="BAP";
               style=solid;
               PACS_H [label="pacs.h"];
               BAP_H [label="bap.h"];
               BAP_PRESET_H [label="bap_lc3_preset.h"];
            }
         }

         subgraph content_control_layer {
            cluster=true;
            label="Content Control";
            style=dashed;

            subgraph mcp_layer {
               cluster=true;
               label="MCP";
               style=solid;
               MCS_H [label="mcs.h"];
               MCC_H [label="mcc.h"];
               MP_H [label="media_proxy.h"];
            }

            subgraph ccp_layer {
               cluster=true;
               label="CCP";
               style=solid;
               TBS_H [label="tbs.h"];
            }
         }

         subgraph rendering_and_capture_control_layer {
            cluster=true;
            label="Rendering and Capture Control";
            style=dashed;

            subgraph micp_layer {
               cluster=true;
               label="MICP";
               style=solid;
               MICP_H [label="micp.h"];
               AICS_H [label="aics.h"];
            }

            subgraph vcp_layer {
               cluster=true;
               label="VCP";
               style=solid;
               VCP_H [label="vcp.h"];
               VOCS_H [label="vocs.h"];
               AICS_H [label="aics.h"];
            }
         }
      }

      HAS_H -> CAP_H;
      PBP_H -> CAP_H;
      TMAP_H -> CAP_H;
      GMAP_H -> CAP_H;
      GMAP_PRESET_H -> CAP_H;

      CAP_H -> MCS_H;
      CAP_H -> MCC_H;
      CAP_H -> MP_H;
      CAP_H -> TBS_H;
      CAP_H -> BAP_H;
      CAP_H -> BAP_PRESET_H;
      CAP_H -> PACS_H;
      CAP_H -> MICP_H;
      CAP_H -> VCP_H;

      CSIP_H -> MCS_H;
      CSIP_H -> MCC_H;
      CSIP_H -> MP_H;
      CSIP_H -> TBS_H;
      CSIP_H -> BAP_H;
      CSIP_H -> BAP_PRESET_H;
      CSIP_H -> PACS_H;
      CSIP_H -> MICP_H;
      CSIP_H -> VCP_H;
   }

Profile Dependencies
====================

The LE Audio profiles depend on other profiles and services, as outlined in the following tables.
In these tables 'Server' refers to acting in the GATT server role, and 'Client' refers to acting in the GATT client role for the specific
service.
If a profile role depends on another profile that depends on a service, then that dependency is implicitly also applied to that profile.
For example, if the CAP Acceptor uses the BAP Unicast Server role, then the requirements on the ASCS Server and PACS Server also apply to the CAP Acceptor.

The dependencies for Stream Control (BAP) are in the following table.

.. table:: BAP dependencies
   :widths: auto
   :align: center

   +--------------------+----------------+----------------+------------------+----------------+----------------+---------------------+
   |                    | Unicast Server | Unicast Client | Broadcast Source | Broadcast Sink | Scan Delegator | Broadcast Assistant |
   +====================+================+================+==================+================+================+=====================+
   | BAP Scan Delegator |                |                |                  | M              |                |                     |
   +--------------------+----------------+----------------+------------------+----------------+----------------+---------------------+
   | ASCS Client        |                | M              |                  |                |                |                     |
   +--------------------+----------------+----------------+------------------+----------------+----------------+---------------------+
   | ASCS Server        | M              |                |                  |                |                |                     |
   +--------------------+----------------+----------------+------------------+----------------+----------------+---------------------+
   | PACS Client        |                | M              |                  |                |                | O                   |
   +--------------------+----------------+----------------+------------------+----------------+----------------+---------------------+
   | PACS Server        | M              |                |                  | M              |                |                     |
   +--------------------+----------------+----------------+------------------+----------------+----------------+---------------------+
   | BASS Client        |                |                |                  |                |                | M                   |
   +--------------------+----------------+----------------+------------------+----------------+----------------+---------------------+
   | BASS Server        |                |                |                  |                | M              |                     |
   +--------------------+----------------+----------------+------------------+----------------+----------------+---------------------+

Note:

* As the table shows, the Broadcast Source role has no dependencies on other LE Audio profiles or services

The dependencies for Content Control (MCP and CCP) are in the following tables.

.. table:: MCP dependencies
   :widths: auto
   :align: center

   +-------------+----------------------+----------------------+
   |             | Media Control Server | Media Control Client |
   +=============+======================+======================+
   | GMCS Server | M                    |                      |
   +-------------+----------------------+----------------------+
   | GMCS Client |                      | M                    |
   +-------------+----------------------+----------------------+
   | MCS Server  | O                    |                      |
   +-------------+----------------------+----------------------+
   | MCS Client  |                      | O                    |
   +-------------+----------------------+----------------------+
   | OTS Server  | O                    |                      |
   +-------------+----------------------+----------------------+
   | OTS Client  |                      | O                    |
   +-------------+----------------------+----------------------+

.. table:: CCP dependencies
   :widths: auto
   :align: center

   +--------------+---------------------+---------------------+
   |              | Call Control Server | Call Control Client |
   +==============+=====================+=====================+
   | GTBS Server  | M                   |                     |
   +--------------+---------------------+---------------------+
   | GTBS Client  |                     | M                   |
   +--------------+---------------------+---------------------+
   | TBS Server   | M                   |                     |
   +--------------+---------------------+---------------------+
   | TBS Client   |                     | M                   |
   +--------------+---------------------+---------------------+


The dependencies for Rendering Control (MICP and VCP) are in the following tables.

.. table:: MICP dependencies
   :widths: auto
   :align: center

   +-------------+-----------------------+-------------------+
   |             | Microphone Controller | Microphone Device |
   +=============+=======================+===================+
   | MICS Server | M                     |                   |
   +-------------+-----------------------+-------------------+
   | MICS Client |                       | M                 |
   +-------------+-----------------------+-------------------+
   | AICS Server | O                     |                   |
   +-------------+-----------------------+-------------------+
   | AICS Client |                       | O                 |
   +-------------+-----------------------+-------------------+

.. table:: VCP dependencies
   :widths: auto
   :align: center

   +-------------+------------------+-------------------+
   |             | Volume Renderer  | Volume Controller |
   +=============+==================+===================+
   | VCS Server  | M                |                   |
   +-------------+------------------+-------------------+
   | VCS Client  |                  | M                 |
   +-------------+------------------+-------------------+
   | VOCS Server | O                |                   |
   +-------------+------------------+-------------------+
   | VOCS Client |                  | O                 |
   +-------------+------------------+-------------------+
   | AICS Server | O                |                   |
   +-------------+------------------+-------------------+
   | AICS Client |                  | O                 |
   +-------------+------------------+-------------------+

The last element in GAF is Transition and Coordination Control (CAP and CSIP) with the dependencies from the following tables.

.. table:: CAP dependencies
   :widths: auto
   :align: center

   +----------------------------+----------+-----------+-----------+
   |                            | Acceptor | Initiator | Commander |
   +============================+==========+===========+===========+
   | CAS Server                 | M        |           | C.8       |
   +----------------------------+----------+-----------+-----------+
   | CAS Client                 |          | M         | M         |
   +----------------------------+----------+-----------+-----------+
   | BAP Unicast Client         |          | C.1       |           |
   +----------------------------+----------+-----------+-----------+
   | BAP Unicast Server         | C.2      |           |           |
   +----------------------------+----------+-----------+-----------+
   | BAP Broadcast Source       |          | C.1       |           |
   +----------------------------+----------+-----------+-----------+
   | BAP Broadcast Sink         | C.2      |           |           |
   +----------------------------+----------+-----------+-----------+
   | BAP Broadcast Assistant    |          |           | C.4, C.6  |
   +----------------------------+----------+-----------+-----------+
   | BAP Scan Delegator         | C.3      |           | C.6       |
   +----------------------------+----------+-----------+-----------+
   | VCP Volume Controller      |          |           | C.6       |
   +----------------------------+----------+-----------+-----------+
   | VCP Volume Renderer        | O        |           |           |
   +----------------------------+----------+-----------+-----------+
   | MICP Microphone Controller |          |           | C.6       |
   +----------------------------+----------+-----------+-----------+
   | MICP Microphone Device     | O        |           |           |
   +----------------------------+----------+-----------+-----------+
   | CCP Call Control Server    |          | O         |           |
   +----------------------------+----------+-----------+-----------+
   | CCP Call Control Client    | O        |           | C.6       |
   +----------------------------+----------+-----------+-----------+
   | MCP Media Control Server   |          | O         |           |
   +----------------------------+----------+-----------+-----------+
   | MCP Media Control Client   | O        |           | C.6       |
   +----------------------------+----------+-----------+-----------+
   | CSIP Set Coordinator       |          | C.5       | M         |
   +----------------------------+----------+-----------+-----------+
   | CSIP Set Member            | C.7      |           |           |
   +----------------------------+----------+-----------+-----------+

Notes:

* C.1: Support at least one of BAP Unicast Client or BAP Broadcast Source
* C.2: Support at least one of BAP Unicast Server or BAP Broadcast Sink
* C.3: Mandatory if BAP Broadcast Sink
* C.4: Mandatory if BAP Scan Delegator
* C.5: Mandatory if BAP Unicast Client
* C.6: Support at least one
* C.7: Mandatory if part of a coordinated set
* C.8: Mandatory if the Commander transmits CAP announcements


.. table:: CSIP dependencies
   :widths: auto
   :align: center

   +------------+------------+-----------------+
   |            | Set Member | Set Coordinator |
   +============+============+=================+
   | CSIS Server| M          |                 |
   +------------+------------+-----------------+
   | CSIS Client|            | M               |
   +------------+------------+-----------------+


The dependencies of the higher level profiles (GMAP, HAP, PBP and TMAP) are listed in the following tables.

.. table:: GMAP dependencies
   :widths: auto
   :align: center

   +----------------------------+----------------------+-----------------------+-----------------------+-------------------------+
   |                            | Unicast Game Gateway | Unicast Game Terminal | Broadcast Game Sender | Broadcast Game Receiver |
   +============================+======================+=======================+=======================+=========================+
   | GMAS Server                | M                    | M                     | O                     | M                       |
   +----------------------------+----------------------+-----------------------+-----------------------+-------------------------+
   | GMAS Client                | M                    | O                     | O                     | O                       |
   +----------------------------+----------------------+-----------------------+-----------------------+-------------------------+
   | CAP Initiator              | M                    |                       | M                     |                         |
   +----------------------------+----------------------+-----------------------+-----------------------+-------------------------+
   | CAP Acceptor               |                      | M                     |                       | M                       |
   +----------------------------+----------------------+-----------------------+-----------------------+-------------------------+
   | CAP Commander              | M                    |                       | M                     |                         |
   +----------------------------+----------------------+-----------------------+-----------------------+-------------------------+
   | BAP Broadcast Source       |                      |                       | M                     |                         |
   +----------------------------+----------------------+-----------------------+-----------------------+-------------------------+
   | BAP Broadcast Sink         |                      |                       |                       | M                       |
   +----------------------------+----------------------+-----------------------+-----------------------+-------------------------+
   | BAP Unicast Client         | M                    |                       |                       |                         |
   +----------------------------+----------------------+-----------------------+-----------------------+-------------------------+
   | BAP Unicast Server         |                      | M                     |                       |                         |
   +----------------------------+----------------------+-----------------------+-----------------------+-------------------------+
   | VCP Volume Controller      | M                    |                       |                       |                         |
   +----------------------------+----------------------+-----------------------+-----------------------+-------------------------+
   | VCP Volume Renderer        |                      | C.1                   |                       | M                       |
   +----------------------------+----------------------+-----------------------+-----------------------+-------------------------+
   | MICP Microphone Controller | O                    |                       |                       |                         |
   +----------------------------+----------------------+-----------------------+-----------------------+-------------------------+
   | MICP Microphone Device     |                      | C.2                   |                       |                         |
   +----------------------------+----------------------+-----------------------+-----------------------+-------------------------+

Notes:

* C.1 Mandatory if the UGT supports the UGT Sink feature
* C.2 Optional if the UGT supports the UGT Source feature

.. table:: HAP dependencies
   :widths: auto
   :align: center

   +----------------------------+-------------+----------------------------+-------------------------------+
   |                            | Hearing Aid | Hearing Aid Unicast Client | Hearing Aid Remote Controller |
   +============================+=============+============================+===============================+
   | HAS Client                 |             |                            | M                             |
   +----------------------------+-------------+----------------------------+-------------------------------+
   | HAS Server                 | M           |                            |                               |
   +----------------------------+-------------+----------------------------+-------------------------------+
   | CAP Initiator              |             | M                          |                               |
   +----------------------------+-------------+----------------------------+-------------------------------+
   | CAP Acceptor               | M           |                            |                               |
   +----------------------------+-------------+----------------------------+-------------------------------+
   | CAP Commander              |             |                            | M                             |
   +----------------------------+-------------+----------------------------+-------------------------------+
   | BAP Unicast Client         |             | M                          |                               |
   +----------------------------+-------------+----------------------------+-------------------------------+
   | BAP Unicast Server         | M           |                            |                               |
   +----------------------------+-------------+----------------------------+-------------------------------+
   | VCP Volume Controller      |             |                            | M                             |
   +----------------------------+-------------+----------------------------+-------------------------------+
   | VCP Volume Renderer        | M           |                            |                               |
   +----------------------------+-------------+----------------------------+-------------------------------+
   | VOCS Server                | C.1         |                            |                               |
   +----------------------------+-------------+----------------------------+-------------------------------+
   | AICS Server                | O           |                            |                               |
   +----------------------------+-------------+----------------------------+-------------------------------+
   | MICP Microphone Controller |             |                            | O                             |
   +----------------------------+-------------+----------------------------+-------------------------------+
   | MICP Microphone Device     | C.2         |                            |                               |
   +----------------------------+-------------+----------------------------+-------------------------------+
   | CCP Call Control Client    | O           |                            |                               |
   +----------------------------+-------------+----------------------------+-------------------------------+
   | CCP Call Control Server    |             | O                          |                               |
   +----------------------------+-------------+----------------------------+-------------------------------+
   | CSIP Set Coordinator       |             | M                          | M                             |
   +----------------------------+-------------+----------------------------+-------------------------------+
   | CSIP Set Member            | C.3         |                            |                               |
   +----------------------------+-------------+----------------------------+-------------------------------+
   | BAS Server                 | C.4         |                            |                               |
   +----------------------------+-------------+----------------------------+-------------------------------+
   | IAS Server                 | O           |                            |                               |
   +----------------------------+-------------+----------------------------+-------------------------------+

Notes:

* C.1 Mandatory if the HA supports the Volume Baslance feature and is part of a Binaural Hearing Aid Set
* C.2 Mandatory if the HA supports the BAP Audio Source Role
* C.3 Mandatory if the HA is capable of being part of a Binaural Hearing Aid set
* C.4 If equipped with batteries
* C.5 If CCP Call Control Server is supported

.. table:: PBP dependencies
   :widths: auto
   :align: center

   +-------------------------+-------------------------+-----------------------+----------------------------+
   |                         | Public Broadcast Source | Public Broadcast sink | Public Broadcast Assistant |
   +=========================+=========================+=======================+============================+
   | CAP Initiator           | M                       |                       |                            |
   +-------------------------+-------------------------+-----------------------+----------------------------+
   | CAP Acceptor            |                         | M                     |                            |
   +-------------------------+-------------------------+-----------------------+----------------------------+
   | CAP Commander           |                         |                       | M                          |
   +-------------------------+-------------------------+-----------------------+----------------------------+
   | BAP Broadcast Assistant |                         |                       | M                          |
   +-------------------------+-------------------------+-----------------------+----------------------------+

.. table:: TMAP dependencies
   :widths: auto
   :align: center

   +-----------------------------------+--------------+---------------+----------------------+------------------------+------------------------+--------------------------+
   |                                   | Call Gateway | Call Terminal | Unicast Media Sender | Unicast Media Receiver | Broadcast Media Sender | Broadcast Media Receiver |
   +===================================+==============+===============+======================+========================+========================+==========================+
   | TMAS Server                       | M            | M             | M                    | M                      | O                      | M                        |
   +-----------------------------------+--------------+---------------+----------------------+------------------------+------------------------+--------------------------+
   | TMAS Client                       | O            | O             | O                    | O                      | O                      | O                        |
   +-----------------------------------+--------------+---------------+----------------------+------------------------+------------------------+--------------------------+
   | CAP Initiator                     | M            |               | M                    |                        | M                      |                          |
   +-----------------------------------+--------------+---------------+----------------------+------------------------+------------------------+--------------------------+
   | CAP Acceptor                      |              | M             |                      | M                      |                        | M                        |
   +-----------------------------------+--------------+---------------+----------------------+------------------------+------------------------+--------------------------+
   | CAP Commander                     | M            | O             | M                    | O                      | O                      | O                        |
   +-----------------------------------+--------------+---------------+----------------------+------------------------+------------------------+--------------------------+
   | BAP Broadcast Source              |              |               |                      |                        | M                      |                          |
   +-----------------------------------+--------------+---------------+----------------------+------------------------+------------------------+--------------------------+
   | BAP Broadcast Sink                |              |               |                      |                        |                        | M                        |
   +-----------------------------------+--------------+---------------+----------------------+------------------------+------------------------+--------------------------+
   | BAP Unicast Client                | M            |               | M                    |                        |                        |                          |
   +-----------------------------------+--------------+---------------+----------------------+------------------------+------------------------+--------------------------+
   | BAP Unicast Server                |              | M             |                      | M                      |                        |                          |
   +-----------------------------------+--------------+---------------+----------------------+------------------------+------------------------+--------------------------+
   | VCP Volume Controller             | M            |               | M                    |                        |                        |                          |
   +-----------------------------------+--------------+---------------+----------------------+------------------------+------------------------+--------------------------+
   | VCP Volume Renderer               |              | C.1           |                      | M                      |                        | M                        |
   +-----------------------------------+--------------+---------------+----------------------+------------------------+------------------------+--------------------------+
   | MCP Media Control Server          |              |               | M                    |                        |                        |                          |
   +-----------------------------------+--------------+---------------+----------------------+------------------------+------------------------+--------------------------+
   | CCP Call Control Server           | M            |               |                      |                        |                        |                          |
   +-----------------------------------+--------------+---------------+----------------------+------------------------+------------------------+--------------------------+

Notes:

* C.1 Mandatory to support if the BAP Unicast Server is acting as an Audio Sink

Bluetooth Audio Stack Status
============================

The following table shows the current status and support of the profiles in the
Bluetooth Audio Stack.

.. table:: Bluetooth Audio Profile status
   :widths: auto

   +--------+-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   | Module | Role                          | Version | Added in Release | Status                | Remaining                                        |
   +========+===============================+=========+==================+=======================+==================================================+
   | VCP    | Volume Renderer               | 1.0     | 2.6              | - Feature complete    | - Sample Application                             |
   |        |                               |         |                  | - Shell Module        |                                                  |
   |        |                               |         |                  | - BSIM test           |                                                  |
   |        +-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   |        | Volume Controller             | 1.0     | 2.6              | - Feature complete    | - Sample Application                             |
   |        |                               |         |                  | - Shell Module        |                                                  |
   |        |                               |         |                  | - BSIM test           |                                                  |
   +--------+-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   | MICP   | Microphone Device             | 1.0     | 2.7              | - Feature complete    | - Sample Application                             |
   |        |                               |         |                  | - Shell Module        |                                                  |
   |        |                               |         |                  | - BSIM test           |                                                  |
   |        +-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   |        | Microphone Controller         | 1.0     | 2.7              | - Feature complete    | - Sample Application                             |
   |        |                               |         |                  | - Shell Module        |                                                  |
   |        |                               |         |                  | - BSIM test           |                                                  |
   +--------+-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   | CSIP   | Set Member                    | 1.0.1   | 3.0              | - Feature complete    | - Sample Application                             |
   |        |                               |         |                  | - Shell Module        |                                                  |
   |        |                               |         |                  | - BSIM test           |                                                  |
   |        +-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   |        | Set Coordinator               | 1.0.1   | 3.0              | - Feature complete    | - Sample Application                             |
   |        |                               |         |                  | - Shell Module        |                                                  |
   |        |                               |         |                  | - BSIM test           |                                                  |
   +--------+-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   | CCP    | Call Control Server           | 1.0     | 3.0              | - Feature complete    | - API refactor                                   |
   |        |                               |         |                  | - Shell Module        | - Sample Application                             |
   |        |                               |         |                  | - BSIM test           |                                                  |
   |        +-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   |        | Call Control Client           | 1.0     | 3.0              | - Feature complete    | - API refactor                                   |
   |        |                               |         |                  | - Shell Module        | - Sample Application                             |
   |        |                               |         |                  | - BSIM test           |                                                  |
   +--------+-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   | MCP    | Media Control Server          | 1.0     | 3.0              | - Feature complete    | - API refactor                                   |
   |        |                               |         |                  | - Shell Module        | - Support for multiple instances and connections |
   |        |                               |         |                  | - BSIM test           | - Sample Application                             |
   |        +-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   |        | Media Control Client          | 1.0     | 3.0              | - Feature complete    | - API refactor                                   |
   |        |                               |         |                  | - Shell Module        | - Sample Application                             |
   |        |                               |         |                  | - BSIM test           |                                                  |
   +--------+-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   | BAP    | Unicast Server                | 1.0.1   | 3.0              | - Feature complete    |                                                  |
   |        |                               |         |                  | - Shell Module        |                                                  |
   |        |                               |         |                  | - BSIM test           |                                                  |
   |        |                               |         |                  | - Sample Application  |                                                  |
   |        +-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   |        | Unicast Client                | 1.0.1   | 3.0              | - Feature complete    |                                                  |
   |        |                               |         |                  | - Shell Module        |                                                  |
   |        |                               |         |                  | - BSIM test           |                                                  |
   |        |                               |         |                  | - Sample Application  |                                                  |
   |        +-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   |        | Broadcast Source              | 1.0.1   | 3.0              | - Feature complete    |                                                  |
   |        |                               |         |                  | - Shell Module        |                                                  |
   |        |                               |         |                  | - BSIM test           |                                                  |
   |        |                               |         |                  | - Sample Application  |                                                  |
   |        +-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   |        | Broadcast Sink                | 1.0.1   | 3.0              | - Feature complete    |                                                  |
   |        |                               |         |                  | - Shell Module        |                                                  |
   |        |                               |         |                  | - BSIM test           |                                                  |
   |        |                               |         |                  | - Sample Application  |                                                  |
   |        +-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   |        | Scan Delegator                | 1.0.1   | 3.3              | - Feature complete    |                                                  |
   |        |                               |         |                  | - Shell Module        |                                                  |
   |        |                               |         |                  | - BSIM test           |                                                  |
   |        |                               |         |                  | - Sample Application  |                                                  |
   |        +-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   |        | Broadcast Assistant           | 1.0.1   | 3.3              | - Feature complete    |                                                  |
   |        |                               |         |                  | - Shell Module        |                                                  |
   |        |                               |         |                  | - BSIM test           |                                                  |
   |        |                               |         |                  | - Sample Application  |                                                  |
   +--------+-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   | CAP    | Acceptor                      | 1.0     | 3.2              | - Feature complete    |                                                  |
   |        |                               |         |                  | - Shell Module        |                                                  |
   |        |                               |         |                  | - BSIM test           |                                                  |
   |        |                               |         |                  | - Sample Application  |                                                  |
   |        +-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   |        | Initiator                     | 1.0     | 3.3              | - Feature complete    |                                                  |
   |        |                               |         |                  | - Shell Module        |                                                  |
   |        |                               |         |                  | - BSIM test           |                                                  |
   |        |                               |         |                  | - Sample Application  |                                                  |
   |        +-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   |        | Commander                     |         |                  | - WIP                 | - Feature complete                               |
   |        |                               |         |                  |                       | - Shell Module                                   |
   |        |                               |         |                  |                       | - BSIM test                                      |
   |        |                               |         |                  |                       | - Sample Application                             |
   +--------+-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   | HAP    | Hearing Aid                   | 1.0     | 3.1              | - Feature complete    |                                                  |
   |        |                               |         |                  | - Shell Module        |                                                  |
   |        |                               |         |                  | - BSIM test           |                                                  |
   |        |                               |         |                  | - Sample Application  |                                                  |
   |        +-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   |        | Hearing Aid Unicast Client    | 1.0     | 3.1              | - Feature complete    |                                                  |
   |        |                               |         |                  | - Shell Module        |                                                  |
   |        |                               |         |                  | - BSIM test           |                                                  |
   |        |                               |         |                  | - Sample Application  |                                                  |
   |        +-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   |        | Hearing Aid Remote Controller |         |                  | - WIP                 | - Feature complete                               |
   |        |                               |         |                  |                       | - Shell Module                                   |
   |        |                               |         |                  |                       | - BSIM test                                      |
   |        |                               |         |                  |                       | - Sample Application                             |
   +--------+-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   | TMAP   | Call Gateway                  | 1.0     | 3.4              | - Feature complete    |                                                  |
   |        |                               |         |                  | - Shell Module        |                                                  |
   |        |                               |         |                  | - BSIM test           |                                                  |
   |        |                               |         |                  | - Sample Application  |                                                  |
   |        +-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   |        | Call Terminal                 | 1.0     | 3.4              | - Feature complete    |                                                  |
   |        |                               |         |                  | - Shell Module        |                                                  |
   |        |                               |         |                  | - BSIM test           |                                                  |
   |        |                               |         |                  | - Sample Application  |                                                  |
   |        +-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   |        | Unicast Media Sender          | 1.0     | 3.4              | - Feature complete    |                                                  |
   |        |                               |         |                  | - Shell Module        |                                                  |
   |        |                               |         |                  | - BSIM test           |                                                  |
   |        |                               |         |                  | - Sample Application  |                                                  |
   |        +-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   |        | Unicast Media Receiver        | 1.0     | 3.4              | - Feature complete    |                                                  |
   |        |                               |         |                  | - Shell Module        |                                                  |
   |        |                               |         |                  | - BSIM test           |                                                  |
   |        |                               |         |                  | - Sample Application  |                                                  |
   |        +-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   |        | Broadcast Media Sender        | 1.0     | 3.4              | - Feature complete    |                                                  |
   |        |                               |         |                  | - Shell Module        |                                                  |
   |        |                               |         |                  | - BSIM test           |                                                  |
   |        |                               |         |                  | - Sample Application  |                                                  |
   |        +-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   |        | Broadcast Media Receiver      | 1.0     | 3.4              | - Feature complete    |                                                  |
   |        |                               |         |                  | - Shell Module        |                                                  |
   |        |                               |         |                  | - BSIM test           |                                                  |
   |        |                               |         |                  | - Sample Application  |                                                  |
   +--------+-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   | PBP    | Public Broadcast Source       |         | 3.5              | - Feature complete    |                                                  |
   |        |                               |         |                  | - Shell Module        |                                                  |
   |        |                               |         |                  | - BSIM test           |                                                  |
   |        |                               |         |                  | - Sample Application  |                                                  |
   |        +-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   |        | Public Broadcast Sink         |         | 3.5              | - Feature complete    |                                                  |
   |        |                               |         |                  | - Shell Module        |                                                  |
   |        |                               |         |                  | - BSIM test           |                                                  |
   |        |                               |         |                  | - Sample Application  |                                                  |
   |        +-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   |        | Public Broadcast Assistant    |         |                  |                       | - Feature complete                               |
   |        |                               |         |                  |                       | - Shell Module                                   |
   |        |                               |         |                  |                       | - BSIM test                                      |
   |        |                               |         |                  |                       | - Sample Application                             |
   +--------+-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   | GMAP   | Unicast Game Gateway          |         | 3.5              | - Feature complete    | - Sample Application                             |
   |        |                               |         |                  | - Shell Module        |                                                  |
   |        |                               |         |                  | - BSIM test           |                                                  |
   |        |                               |         |                  |                       |                                                  |
   |        +-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   |        | Unicast Game Terminal         |         | 3.5              | - Feature complete    | - Sample Application                             |
   |        |                               |         |                  | - Shell Module        |                                                  |
   |        |                               |         |                  | - BSIM test           |                                                  |
   |        |                               |         |                  |                       |                                                  |
   |        +-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   |        | Broadcast Game Sender         |         | 3.5              | - Feature complete    | - Sample Application                             |
   |        |                               |         |                  | - Shell Module        |                                                  |
   |        |                               |         |                  | - BSIM test           |                                                  |
   |        |                               |         |                  |                       |                                                  |
   |        +-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+
   |        | Broadcast Game Receiver       |         | 3.5              | - Feature complete    | - Sample Application                             |
   |        |                               |         |                  | - Shell Module        |                                                  |
   |        |                               |         |                  | - BSIM test           |                                                  |
   |        |                               |         |                  |                       |                                                  |
   +--------+-------------------------------+---------+------------------+-----------------------+--------------------------------------------------+

Using the Bluetooth Audio Stack
===============================

To use any of the profiles in the Bluetooth Audio Stack, including the top-level
profiles outside of GAF, :kconfig:option:`CONFIG_BT_AUDIO` shall be enabled.
This Kconfig option allows the enabling of the individual profiles inside of the
Bluetooth Audio Stack. Each profile can generally be enabled on its own, but
enabling higher-layer profiles (such as CAP, TMAP and HAP) will typically
require enabling some of the lower layer profiles.

It is, however, possible to create a device that uses e.g. only Stream Control
(with just the BAP), without using any of the content control or
rendering/capture control profiles, or vice versa. Using the higher layer
profiles will however typically provide a better user experience and better
interoperability with other devices.

Common Audio Profile (CAP)
--------------------------

The Common Audio Profile introduces restrictions and requirements on the lower layer profiles.
The procedures in CAP works on one or more streams for one or more devices. Is it thus possible via
CAP to do a single function call to setup multiple streams across multiple devices.

The figure below shows a complete structure of the procedures in CAP and
how they correspond to procedures from the other profiles. The circles with I, A and C show whether
the procedure has active involvement or requirements from the CAP Initiator, CAP Accept and CAP
Commander roles respectively.

.. figure:: ../../../../../../connectivity/bluetooth/api/audio/img/cap_proc.svg
   :align: center
   :alt: Common Audio Profile Procedures

   Common Audio Profile Procedures

The API reference for CAP can be found in :ref:`Common Audio Profile <bluetooth_cap>`.

Stream Control (BAP)
--------------------

Stream control is implemented by the Basic Audio Profile. This profile
defines multiple roles:

* Unicast Client
* Unicast Server
* Broadcast Source
* Broadcast Sink
* Scan Delegator
* Broadcast Assistant

Each role can be enabled individually, and it is possible to support more than
one role.

Notes about the stream control services
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

There are 3 services primarily used by stream control using the Basic Audio Profile.

Audio Stream Control Service (ASCS)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

ASCS is a service used exclusively for setting up unicast streams,
and is located on the BAP Unicast Server device.
The service exposes one or more endpoints that can either be a sink or source endpoint,
from the perspective of the Unicast Server.
That means a sink endpoint is always audio from the Unicast Client to the Unicast Server,
and a source endpoint is always from the Unicast Server to the Unicast Client.

Unlike most other GATT services,
ASCS require that each characteristic in the service has unique data per client.
This means that if a Unicast Server is connected to multiple Unicast Clients,
the Unicast Clients are not able to see or control the endpoints configured by the other clients.
For example if a person's smartphone is streaming audio to a headset,
then the same person will not be able to see or control that stream from their smartwatch.

Broadcast Audio Scan Service (BASS)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

BASS is a service that is exclusively used by the Scan Delegator and Broadcast Assistant.
The main purpose of the service is to offload scanning from low power peripherals to e.g. phones
and PCs.
Unlike ASCS where the data is required to be unique per client,
the data in BASS (called receive states) are (usually) shared among all connected clients.
That means it is possible for a person to tell their headphones to synchronize to a
Broadcast Source using their phone,
and then later tell their headphones to stop synchronizing using their smartwatch.

A Broadcast Assistant can be any device,
and may only support this one role without any audio capabilities.
This allows legacy devices that do not support periodic advertisements or isochronous channels to
still provide an interface and scan offloading for peripherals.
The Bluetooth SIG have provided a guide on how to develop such legacy Broadcast Assistants that can
be found at
https://www.bluetooth.com/bluetooth-resources/developing-auracast-receivers-with-an-assistant-application-for-legacy-smartphones/.
An important note about this guide is that many operating systems (especially on phones),
do not allow generic usage of the BASS UUID,
effectively making it impossible to implement your own Broadcast Assistant,
because you cannot access the BASS.

Published Audio Capabilities Service (PACS)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

PACS is used to expose a device's audio capabilities in Published Audio Capabilities (PAC) records.
PACS is used by nearly all roles,
where the Unicast Client and Broadcast Assistant will act as PACS clients,
and Unicast Server and Broadcast Sink will act as PACS servers.
These records contain information about the codec, and which values are supported by each codec.
The values for the LC3 codec are defined by the Bluetooth Assigned numbers
(https://www.bluetooth.com/specifications/assigned-numbers/), and the values for other codecs such
as SBC are left undefined/implementation specific for BAP.

PACS also usually share the same data between each connected client,
but by using functions such as :c:func:`bt_pacs_conn_set_available_contexts_for_conn`,
it is possible to set specific values for specific clients.

The API reference for stream control can be found in
:ref:`Bluetooth Audio <bluetooth_audio>`.


Rendering and Capture Control
-----------------------------

Rendering and capture control is implemented by the Volume Control Profile
(VCP) and Microphone Control Profile (MICP).

The VCP implementation supports the following roles

* Volume Control Service (VCS) Server
* Volume Control Service (VCS) Client

The MICP implementation supports the following roles

* Microphone Control Profile (MICP) Microphone Device (server)
* Microphone Control Profile (MICP) Microphone Controller (client)

The API reference for volume control can be found in
:ref:`Bluetooth Volume Control <bluetooth_volume>`.

The API reference for Microphone Control can be found in
:ref:`Bluetooth Microphone Control <bluetooth_microphone>`.


Content Control
---------------

Content control is implemented by the Call Control Profile (CCP) and
Media Control Profile (MCP).

The CCP implementation is not yet implemented in Zephyr.

The MCP implementation supports the following roles

* Media Control Service (MCS) Server via the Media Proxy module
* Media Control Client (MCC)

The API reference for media control can be found in
:ref:`Bluetooth Media Control <bluetooth_media>`.

Generic TBS and Generic MCS
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Both the Telephone Bearer Service (TBS) used by CCP and the Media Control Service (MCS) used by MCP
have the concept of generic instances of the services called Generic TBS (GTBS) and
Generic MCS (GMCS).

While these share a common name prefix, the behavior of these two may be significantly different.

Generic TBS
^^^^^^^^^^^

The TBS spec defines GTBS as

   GTBS provides a single point of access and exposes a representation of its internal telephone
   bearers into a single telephone bearer.
   This service provides telephone status and control of the device as a single unit with a
   single set of characteristics.
   It is left up to the implementation to determine what telephone bearer a characteristic of
   GTBS represents at any time.
   There is no specified manner of representing a characteristic from each individual TBS that
   resides on the device to the same characteristic of the GTBS.

   For example, if there is more than one TBS on a device and each has a unique telephone bearer
   name (e.g., Name1 and Name2),
   the way the GTBS represents the telephone bearer name is left up to the implementation.
   GTBS is suited for clients that do not need to access or control all the
   information available on specific telephone bearers.

This means that a GTBS instance represents one or more telephone bearers.
A telephone bearer could be any application on a device that can handle (telephone) calls,
such as the default Call application on a smartphone,
but also other applications such as Signal, Discord, Teams, Slack, etc.

GTBS may be standalone (i.e.the device only has a GTBS instance without any TBS instances),
and the behavior of the GTBS is mostly left up to the implementation.
In Zephyr the implementation of GBTS is that it contains some generic information,
such as the provider name which is defined to  simply be "Generic TBS",
but the majority of the information in the GTBS instance in Zephyr has been implemented to be a
union of the data of the other bearers.
For example if you have a bearer for regular phone calls and
Teams and have an active call in both bearers,
then each of those bearers will report a single call,
but the GTBS instance will report 2 calls,
making it possible for a simple Call Control Client to control all calls from a single bearer.
Similarly the supported URIs for each bearer are also made into a union in GTBS, and when placing
a call using the GTBS the server will pick the most suited bearer depending on the URI.
For example calls with URI `tel` would go to the regular phone application,
and calls with the URI `skype` would go to the Teams application.

In conclusion the GTBS implementation in Zephyr is a union of the non-generic telephone bearers.

Generic MCS
^^^^^^^^^^^

The MCS spec defines GMCS as

   The GMCS provides status and control of media playback for the device as a single unit.
   An MCS instance describes and controls the media playback for a
   specific media player within the device.
   A device implements MCS instances to allow clients to access the
   separate internal media player entities.

and where the behavior of GMCS is defined as

   ... the behavior of MCS and GMCS is identical,
   and all the characteristics and the characteristics' behaviors are the same.
   The term “MCS” is used throughout the document.
   Unless otherwise specifically stated in this specification,
   the same meaning applies to GMCS as well.

This means that a GMCS instance works the same way as an MCS instance,
and it follows that GMCS

   controls the media playback for a specific media player within the device

A media player on a device could be anything that plays media,
such as a Spotify or Youtube application on a smartphone.
Thus if a device has multiple MCS instances,
then each of these control media for that specific application,
but the GMCS also controls media playback for a specific media player.
GMCS can thus be considered a pointer to a specific MCS instance,
and control either e.g. Spotify or Youtube, but not both.

The MCS spec does however provide an example of GMCS where a device can

   Implement a GMCS that provides status and control of media playback for the device as a whole.

Which may indicate that an implementation may use GMCS to represent all media players with GMCS and
not a specific media player as stated above. In the case where a device does not have any MCS
instances and only GMCS, then GMCS will point to a generic instance.

The Zephyr implementation of MCS and GMCS is incomplete,
and currently only supports instantiating a single instance that can either be an MCS or GMCS.
This means that the implementation is neither complete nor spec-compliant.

Difference between GTBS and GMCS
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The definitions and implementations of GTBS and GMCS as stated above are notably different.
GTBS works as a union between the other TBS instances (if any),
and GMCS works as a pointer to a specific MCS instance (if any).
This effectively means that a simple Call Control Client can control all calls just using GTBS,
but a Media Control Client may only be able to control a single player using GMCS.

Coordinated Sets
----------------

Coordinated Sets is implemented by the Coordinated Sets Identification Profile
(CSIP).

The CSIP implementation supports the following roles

* Coordinated Set Identification Service (CSIP) Set Member
* Coordinated Set Identification Service (CSIP) Set Coordinator

The API reference for media control can be found in
:ref:`Bluetooth Coordinated Sets <bluetooth_coordinated_sets>`.

Specification correctness and data location
-------------------------------------------

The implementations are designed to ensure specification compliance as much as possible.
When a specification introduces a requirement with e.g. a **shall** then the implementation should
attempt to ensure that this requirement is always followed.
Depending on the context of this,
the implementation ensures this by rejecting invalid parameters from the application,
or from the remote devices.

Some requirements from the specifications are not or can not be handled by the stack itself for
various reasons.
One reason when the stack cannot handle a requirement is if the data related to the requirement is
exclusively controlled by the application.
An example of this is the advertising data,
where multiple service have requirements for what to advertise and when,
but where both the advertising state and data is exclusively controlled by the application.

Oppositely there are also requirements from the specification,
where the data related to the requirement is exclusively controlled by the stack.
An example of this is the Volume Control Service (VCS) state,
where the specifications mandata that the VCP Volume Renderer (VCS server) modify the values
without a choice,
e.g. when setting the absolutely volume.
In cases like this the application is only notified about the change with a callback,
but cannot reject the request (the stack will reject any invalid requests).

Generally when the data is simple (like the VCS state which only take up a few bytes),
the data is kept in and controlled by the stack,
as this can ensure that the requirements can be handled by the stack,
making it easier to use a profile role correctly.
When the data is more complex (e.g. the PAC records),
the data may be kept by the application and the stack only contains a reference to it.
When the data is very application specific (e.g. advertising data),
the data is kept in and controlled by the application.

As a rule of thumb, the return types of the callbacks for each profile implementation indicate
whether the data is controlled by the stack or the application.
For example all the callbacks for the VCP Volume Renderer have the return type of `void`,
but the return type of the BAP Unicast Server callbacks are `int`,
indicating that the application not only controls a lot of the Unicast Server data,
but can also reject the requests.
The choice of what the return type of the callbacks often depend on the specifications,
and how much control the role has in a given context.

Things worth knowing or considering when using LE Audio
=======================================================

This section describes a few tings to consider when contributing to or using LE Audio in Zephyr.
The things described by this section are not unique to Zephyr as they are defined by the
specifications.

Security requirements
---------------------

All LE Audio services require Security Level 2 but where the key must be 128-bit and derived via an
OOB method or via LE Secure connections.
There is no Core-spec defined way of reporting this in GATT,
as ATT does not have a specific error code for missing OOB method or LE Secure Connections
(although there is a way to report wrong key size).

In Zephyr we do not force the device to always use these, as a device that uses LE Audio may also
use other profiles and services that do not require such security.
We guard all access to services using a custom security check implemented in
:zephyr_file:`subsys/bluetooth/audio/audio.c`, where all LE Audio services must use the
internal `BT_AUDIO_CHRC` macro for proper security verification.

Access to the LTK for encrypted SIRKs in CSIS
---------------------------------------------

The Coordinated Set Identification Service (CSIS) may encrypt the SIRK (set identity resolving key).
The process of encrypting the SIRK requires the LTK as the encryption key,
which is typically not exposed to higher layer implementations such as CSIS.
This does not have any effect on the security though.

MTU requirements
----------------

The Basic Audio Profile (BAP) has a requirement that both sides shall support a minimum ATT_MTU of
at least 64 on the unenhanced ATT bearer or at least one enhanced ATT bearer.
The requirement comes from the preferred (or sometimes mandatory) use of GATT Write Without
Response, and where support for Write Long Characteristic Value is optional in most cases.

If a ASCS device supports values larger than the minimum ATT_MTU of 64 octets, then it shall support
Read long Characteristic Value by setting :kconfig:option:`CONFIG_BT_ATT_PREPARE_COUNT` to a
non-zero value.

LE Audio resources
##################

This section contains some links and reference to resources that are useful for either contributors
to the LE Audio Stack in Zephyr, LE Audio application developers or both.

The LE audio channel on Discord
*******************************

Zephyr has a specific Discord channel for LE Audio development, which is open to all.
Find it here at https://discordapp.com/channels/720317445772017664/1207326649591271434 or simply
search for `ble-audio` from within Discord.
Since the `ble-audio` channel is open for all,
we cannot discuss any specifications that are in development in that channel.
For discussions that require a Bluetooth SIG membership we refer to the `bluetooth-sig`
Discord channel found at https://discordapp.com/channels/720317445772017664/869172014018097162.

Zephyr weekly meetings
**********************

Anyone who is a Bluetooth SIG member and a Zephyr member can join the weekly meetings where we
discuss and plan the development of LE Audio in Zephyr. You can find the time of the meetings by
joining the Bluetooth-sig group at https://lists.zephyrproject.org/g/Bluetooth-sig.

Github project
**************

LE Audio in Zephyr has its own Github project available at
https://github.com/orgs/zephyrproject-rtos/projects/26.
The project is mostly automated,
and the LE Audio contributors almost only rely on the automated workflows
to present the state of development.
Anyone is able to pick any of the open issues and work on it.
If you cannot assign the issue to yourself,
please leave a comment in the issue itself or ping the Discord channel for help.

Bluetooth SIG errata for LE Audio
*********************************

There are many specifications for LE Audio,
and several of them are still being updated and developed.
To get an overview of the errata for the LE Audio specifications you can visit

* Generic Audio (GA) errata https://bluetooth.atlassian.net/wiki/spaces/GA/pages/1634402349/GAWG+Errata+Lists
* Hearing Aid (HA) errata https://bluetooth.atlassian.net/wiki/spaces/HA/pages/1634140216/HA+WG+Errata+List
* Audio, Telephony and Automotive (ATA) errata https://bluetooth.atlassian.net/wiki/spaces/ATA/pages/1668481034/ATA+Errata+Lists

Access to errata requires a Bluetooth SIG membership.

Bluetooth SIG working groups for LE Audio
*****************************************

There are 3 working groups in the Bluetooth SIG related to LE Audio:

* Generic Audio (GA) https://www.bluetooth.org/groups/group.aspx?gId=665
* Hearing Aid (HA) https://www.bluetooth.org/groups/group.aspx?gId=605
* Audio, Telephony, and Automotive (ATA) https://www.bluetooth.org/groups/group.aspx?gId=659

By joining these groups you will also get emails from their respective mailing lists,
where multiple questions and discussions are handled.
The working groups also have scheduled weekly meetings,
where issues and the development of the specifications are handled.

Access to the Bluetooth SIG working groups requires a Bluetooth SIG membership.

The LE Audio Book
*****************

There is a free ebook on LE Audio at https://www.bluetooth.com/bluetooth-resources/le-audio-book/.
The book was released in January 2022,
and thus before some of the specifications were finalized,
but also before some of the released updates to the specifications.
Nevertheless the book still provides a good explanation for many of the concepts and ideas,
but please refer to the individual specifications for technical information.

Bluetooth SIG informational papers, reports and guides
******************************************************

The Bluetooth SIG occasionally release new informational papers, report and guides.
These can be found at https://www.bluetooth.com/bluetooth-resources/?tags=le-audio&keyword.
Here you will also find the aforementioned LE Audio book, among many other good resources.

Part 3

한국어 전문 번역

LE Audio Stack

Bluetooth Audio Architecture

상위 profile: TMAP · HAP · PBP · GMAP · ...

↓

GAF

↓

Service·transport: GATT · GAP · L2CAP · ATT · ISO

↓

HCI driver: USB · UART · SPI · virtual

전체 설계

LE Audio stack은 구조와 이름을 Bluetooth specification에 최대한 가깝게 맞춥니다. API function에는 보통 specification acronym이 prefix로 붙습니다. Basic Audio Profile은 bt_bap, Volume Control Profile은 bt_vcp를 사용합니다. 해당 profile의 role이 있으면 bt_bap_unicast_client_discover, bt_vcp_vol_rend_set_vol처럼 role도 이름에 포함됩니다.

대개 profile·service specification의 procedure 하나마다 function 하나가 있고, procedure와 직접 대응하지 않는 helper 또는 meta function을 추가합니다. File 이름도 BAP는 bap, VCP는 vcp prefix를 사용하며 특정 role 전용 file이면 role을 file 이름에 넣습니다.

Generic Audio Framework

GAF는 Bluetooth LE Audio architecture의 middleware입니다. 상위 application과 profile이 stream을 설정하고 volume을 바꾸며 media·telephony를 제어하도록 profile과 service를 제공합니다. GAP는 연결·advertising·동기화, GATT는 stream 구성·content 연결·volume 제어, ISO는 connected unicast 또는 unconnected broadcast audio stream 전송에 사용합니다. LC3 codec은 필수이며 다른 codec도 지원합니다.

Generic Audio Framework 계층

상위: HAP(HAS, BAS, IAS) · PBP · TMAP(TMAS) · GMAP(GMAS)

↓ CAP/CAS를 통해 GAF 기능을 조합

제어 영역ProfileService
전환·조정CAP · CSIPCAS · CSIS
StreamBAPPACS · ASCS · BASS
ContentMCP · CCPMCS · TBS
Rendering·captureMICP · VCPMICS · AICS · VCS · VOCS

TMAP·HAP 같은 top-level profile은 GAF 자체가 아니라 GAF 사용 방법에 상위 요구사항을 부여합니다. Zephyr 구현은 다음 header 구조로 이 관계를 드러냅니다.

Zephyr GAF header 구조

계층Header
공통audio.h · lc3.h
상위 profilehas.h · bas.h · ias.h · pbp.h · tmap.h · gmap.h · gmap_lc3_preset.h
전환·조정cap.h · csip.h
Streampacs.h · bap.h · bap_lc3_preset.h
Contentmcs.h · mcc.h · media_proxy.h · tbs.h
Rendering·capturemicp.h · aics.h · vcp.h · vocs.h

Profile 의존성

표의 Server와 Client는 해당 service의 GATT server·client role을 뜻합니다. Profile이 다른 profile에 의존하고 그 profile이 service에 의존하면 service 의존성도 전이됩니다. 예를 들어 CAP Acceptor가 BAP Unicast Server를 사용하면 ASCS Server와 PACS Server 요구사항도 적용됩니다. M은 mandatory, O는 optional, C.n은 조건부 요구사항입니다.

BAP dependencies

DependencyUnicast ServerUnicast ClientBroadcast SourceBroadcast SinkScan DelegatorBroadcast Assistant
BAP Scan DelegatorM
ASCS ClientM
ASCS ServerM
PACS ClientMO
PACS ServerMM
BASS ClientM
BASS ServerM

Broadcast Source role은 다른 LE Audio profile이나 service에 의존하지 않습니다.

MCP dependencies

DependencyMedia Control ServerMedia Control Client
GMCS ServerM
GMCS ClientM
MCS ServerO
MCS ClientO
OTS ServerO
OTS ClientO

CCP dependencies

DependencyCall Control ServerCall Control Client
GTBS ServerM
GTBS ClientM
TBS ServerM
TBS ClientM

MICP dependencies

DependencyMicrophone ControllerMicrophone Device
MICS ServerM
MICS ClientM
AICS ServerO
AICS ClientO

VCP dependencies

DependencyVolume RendererVolume Controller
VCS ServerM
VCS ClientM
VOCS ServerO
VOCS ClientO
AICS ServerO
AICS ClientO

CAP dependencies

DependencyAcceptorInitiatorCommander
CAS ServerMC.8
CAS ClientMM
BAP Unicast ClientC.1
BAP Unicast ServerC.2
BAP Broadcast SourceC.1
BAP Broadcast SinkC.2
BAP Broadcast AssistantC.4, C.6
BAP Scan DelegatorC.3C.6
VCP Volume ControllerC.6
VCP Volume RendererO
MICP Microphone ControllerC.6
MICP Microphone DeviceO
CCP Call Control ServerO
CCP Call Control ClientOC.6
MCP Media Control ServerO
MCP Media Control ClientOC.6
CSIP Set CoordinatorC.5M
CSIP Set MemberC.7
  • C.1: BAP Unicast Client 또는 BAP Broadcast Source 중 하나 이상 지원
  • C.2: BAP Unicast Server 또는 BAP Broadcast Sink 중 하나 이상 지원
  • C.3: BAP Broadcast Sink이면 필수
  • C.4: BAP Scan Delegator이면 필수
  • C.5: BAP Unicast Client이면 필수
  • C.6: 해당 항목 중 하나 이상 지원
  • C.7: Coordinated set 구성원이면 필수
  • C.8: Commander가 CAP announcement를 송신하면 필수

CSIP dependencies

DependencySet MemberSet Coordinator
CSIS ServerM
CSIS ClientM

GMAP dependencies

DependencyUnicast Game GatewayUnicast Game TerminalBroadcast Game SenderBroadcast Game Receiver
GMAS ServerMMOM
GMAS ClientMOOO
CAP InitiatorMM
CAP AcceptorMM
CAP CommanderMM
BAP Broadcast SourceM
BAP Broadcast SinkM
BAP Unicast ClientM
BAP Unicast ServerM
VCP Volume ControllerM
VCP Volume RendererC.1M
MICP Microphone ControllerO
MICP Microphone DeviceC.2
  • C.1: UGT가 UGT Sink feature를 지원하면 필수
  • C.2: UGT가 UGT Source feature를 지원하면 선택

HAP dependencies

DependencyHearing AidHearing Aid Unicast ClientHearing Aid Remote Controller
HAS ClientM
HAS ServerM
CAP InitiatorM
CAP AcceptorM
CAP CommanderM
BAP Unicast ClientM
BAP Unicast ServerM
VCP Volume ControllerM
VCP Volume RendererM
VOCS ServerC.1
AICS ServerO
MICP Microphone ControllerO
MICP Microphone DeviceC.2
CCP Call Control ClientO
CCP Call Control ServerO
CSIP Set CoordinatorMM
CSIP Set MemberC.3
BAS ServerC.4
IAS ServerO
  • C.1: Hearing Aid가 Volume Balance를 지원하고 binaural set 구성원이면 필수
  • C.2: Hearing Aid가 BAP Audio Source role을 지원하면 필수
  • C.3: Binaural Hearing Aid set에 들어갈 수 있으면 필수
  • C.4: Battery가 있으면 필수
  • C.5: CCP Call Control Server가 지원되면 적용

PBP dependencies

DependencyPublic Broadcast SourcePublic Broadcast SinkPublic Broadcast Assistant
CAP InitiatorM
CAP AcceptorM
CAP CommanderM
BAP Broadcast AssistantM

TMAP dependencies

DependencyCall GatewayCall TerminalUnicast Media SenderUnicast Media ReceiverBroadcast Media SenderBroadcast Media Receiver
TMAS ServerMMMMOM
TMAS ClientOOOOOO
CAP InitiatorMMM
CAP AcceptorMMM
CAP CommanderMOMOOO
BAP Broadcast SourceM
BAP Broadcast SinkM
BAP Unicast ClientMM
BAP Unicast ServerMM
VCP Volume ControllerMM
VCP Volume RendererC.1MM
MCP Media Control ServerM
CCP Call Control ServerM

TMAP의 C.1은 BAP Unicast Server가 Audio Sink로 동작할 때 지원이 필수라는 뜻입니다.

Bluetooth Audio Stack 상태

다음 표는 Zephyr 3.7.0 문서에 기록된 profile role별 구현 상태입니다. WIP와 남은 작업도 원문 기준으로 구분했습니다.

ModuleRoleVersion추가 release상태남은 작업
VCPVolume Renderer1.02.6기능 완성 · Shell module · BSIM testSample application
VCPVolume Controller1.02.6기능 완성 · Shell module · BSIM testSample application
MICPMicrophone Device1.02.7기능 완성 · Shell module · BSIM testSample application
MICPMicrophone Controller1.02.7기능 완성 · Shell module · BSIM testSample application
CSIPSet Member1.0.13.0기능 완성 · Shell module · BSIM testSample application
CSIPSet Coordinator1.0.13.0기능 완성 · Shell module · BSIM testSample application
CCPCall Control Server1.03.0기능 완성 · Shell module · BSIM testAPI refactor · Sample application
CCPCall Control Client1.03.0기능 완성 · Shell module · BSIM testAPI refactor · Sample application
MCPMedia Control Server1.03.0기능 완성 · Shell module · BSIM testAPI refactor · Multiple instance/connection · Sample application
MCPMedia Control Client1.03.0기능 완성 · Shell module · BSIM testAPI refactor · Sample application
BAPUnicast Server1.0.13.0기능 완성 · Shell module · BSIM test · Sample application
BAPUnicast Client1.0.13.0기능 완성 · Shell module · BSIM test · Sample application
BAPBroadcast Source1.0.13.0기능 완성 · Shell module · BSIM test · Sample application
BAPBroadcast Sink1.0.13.0기능 완성 · Shell module · BSIM test · Sample application
BAPScan Delegator1.0.13.3기능 완성 · Shell module · BSIM test · Sample application
BAPBroadcast Assistant1.0.13.3기능 완성 · Shell module · BSIM test · Sample application
CAPAcceptor1.03.2기능 완성 · Shell module · BSIM test · Sample application
CAPInitiator1.03.3기능 완성 · Shell module · BSIM test · Sample application
CAPCommanderWIP기능 완성 · Shell module · BSIM test · Sample application
HAPHearing Aid1.03.1기능 완성 · Shell module · BSIM test · Sample application
HAPHearing Aid Unicast Client1.03.1기능 완성 · Shell module · BSIM test · Sample application
HAPHearing Aid Remote ControllerWIP기능 완성 · Shell module · BSIM test · Sample application
TMAPCall Gateway1.03.4기능 완성 · Shell module · BSIM test · Sample application
TMAPCall Terminal1.03.4기능 완성 · Shell module · BSIM test · Sample application
TMAPUnicast Media Sender1.03.4기능 완성 · Shell module · BSIM test · Sample application
TMAPUnicast Media Receiver1.03.4기능 완성 · Shell module · BSIM test · Sample application
TMAPBroadcast Media Sender1.03.4기능 완성 · Shell module · BSIM test · Sample application
TMAPBroadcast Media Receiver1.03.4기능 완성 · Shell module · BSIM test · Sample application
PBPPublic Broadcast Source3.5기능 완성 · Shell module · BSIM test · Sample application
PBPPublic Broadcast Sink3.5기능 완성 · Shell module · BSIM test · Sample application
PBPPublic Broadcast Assistant기능 완성 · Shell module · BSIM test · Sample application
GMAPUnicast Game Gateway3.5기능 완성 · Shell module · BSIM testSample application
GMAPUnicast Game Terminal3.5기능 완성 · Shell module · BSIM testSample application
GMAPBroadcast Game Sender3.5기능 완성 · Shell module · BSIM testSample application
GMAPBroadcast Game Receiver3.5기능 완성 · Shell module · BSIM testSample application

Bluetooth Audio Stack 사용

Top-level profile을 포함해 stack의 어느 profile이든 사용하려면 CONFIG_BT_AUDIO를 활성화해야 합니다. 각 profile은 대체로 독립적으로 활성화할 수 있지만 CAP·TMAP·HAP 같은 상위 profile은 보통 여러 하위 profile을 함께 요구합니다.

BAP만 사용해 Stream Control만 제공하고 content control이나 rendering/capture control을 생략하는 device도 만들 수 있습니다. 반대 구성도 가능합니다. 다만 상위 profile까지 사용하면 일반적으로 user experience와 다른 device와의 interoperability가 좋아집니다.

Common Audio Profile

CAP는 하위 profile에 제약과 요구사항을 추가합니다. CAP procedure는 하나 이상의 device에 있는 하나 이상의 stream을 함께 처리하므로 function call 한 번으로 여러 device의 여러 stream을 설정할 수 있습니다. 다음 공식 도식에서 I·A·C 원은 각각 CAP Initiator, Acceptor, Commander가 procedure에 능동적으로 관여하거나 요구사항을 가진다는 뜻입니다.

Common Audio Profile Procedures
Common Audio Profile Procedures 공식 도식

Stream Control: BAP

Basic Audio Profile은 Unicast Client·Server, Broadcast Source·Sink, Scan Delegator, Broadcast Assistant role을 정의합니다. 각 role은 개별 활성화할 수 있고 한 device가 여러 role을 함께 지원할 수 있습니다.

Audio Stream Control Service

ASCS는 unicast stream 설정에만 사용하며 BAP Unicast Server device에 있습니다. Endpoint는 Server 관점의 sink 또는 source입니다. Sink endpoint는 Client에서 Server로 가는 audio, source endpoint는 Server에서 Client로 가는 audio입니다.

일반 GATT service와 달리 ASCS의 각 characteristic은 client마다 고유한 data를 가져야 합니다. 여러 Client가 한 Server에 연결되어도 다른 Client가 구성한 endpoint를 보거나 제어할 수 없습니다. Smartphone이 headset으로 audio를 보내는 stream을 같은 사람의 smartwatch가 볼 수 없는 이유입니다.

Broadcast Audio Scan Service

BASS는 Scan Delegator와 Broadcast Assistant가 사용하며, 저전력 peripheral의 scan 부담을 phone·PC로 넘기는 것이 주목적입니다. Receive state는 보통 모든 client가 공유하므로 phone으로 headphone을 Broadcast Source에 동기화한 뒤 smartwatch로 동기화를 중단할 수 있습니다.

Broadcast Assistant는 audio 기능 없이 이 role만 지원할 수 있습니다. 그래서 periodic advertising이나 isochronous channel을 지원하지 않는 legacy device도 peripheral에 UI와 scan offload를 제공할 수 있습니다. 다만 특히 phone OS는 BASS UUID의 일반 사용을 허용하지 않는 경우가 많아 자체 Assistant 구현이 불가능할 수 있습니다.

Published Audio Capabilities Service

PACS는 device의 audio capability를 PAC record로 공개합니다. Unicast Client와 Broadcast Assistant는 PACS client, Unicast Server와 Broadcast Sink는 PACS server로 동작합니다. Record에는 codec과 지원 값이 들어갑니다. LC3 값은 Bluetooth Assigned Numbers가 정의하지만 SBC 같은 다른 codec 값은 BAP에서 implementation-specific입니다.

PACS data도 보통 client 사이에서 공유하지만 bt_pacs_conn_set_available_contexts_for_conn 같은 function으로 client별 값을 설정할 수 있습니다.

Rendering과 Capture Control

Volume Control Profile은 VCS Server와 VCS Client role을, Microphone Control Profile은 Microphone Device(server)와 Microphone Controller(client) role을 제공합니다.

Content Control

Call Control Profile과 Media Control Profile이 content를 제어합니다. 이 문서 시점에는 CCP가 Zephyr에 아직 구현되지 않았습니다. MCP는 Media Proxy를 통한 MCS Server와 Media Control Client(MCC)를 지원합니다.

Generic TBS

GTBS는 내부 telephone bearer들을 하나로 표현하는 단일 접근점입니다. 여러 TBS의 provider name 등을 어떻게 대표할지는 구현에 맡기며, 개별 bearer의 모든 정보가 필요하지 않은 단순 client에 적합합니다. Bearer는 기본 전화 application뿐 아니라 Signal, Discord, Teams, Slack처럼 call을 처리하는 application일 수 있습니다.

GTBS만 단독으로 둘 수도 있습니다. Zephyr의 GTBS는 provider name 같은 일부 generic 정보를 가지며, 대부분의 상태는 다른 bearer data의 합집합으로 구현합니다. 일반 전화와 Teams에 각각 active call 하나가 있으면 각 bearer는 한 건을 보고하지만 GTBS는 두 건을 보고합니다. URI도 합집합으로 만들고 tel은 일반 전화, skype는 Teams처럼 가장 알맞은 bearer를 선택합니다.

Generic MCS

GMCS는 device 전체의 media playback 상태와 제어를 제공하지만 MCS와 characteristic 동작은 동일합니다. MCS instance가 특정 media player를 제어하므로 GMCS도 특정 MCS를 가리키는 pointer처럼 Spotify 또는 YouTube 하나를 제어할 수 있습니다. Specification에는 device 전체를 제어하는 GMCS 예제도 있어 구현 해석의 여지가 있습니다.

Zephyr 3.7.0의 MCS·GMCS 구현은 불완전하며 MCS 또는 GMCS 중 하나인 단일 instance만 만들 수 있습니다. 따라서 완전한 specification 준수 구현이 아닙니다.

GTBS와 GMCS 차이

GTBS는 여러 TBS의 합집합처럼 동작하지만 GMCS는 특정 MCS를 가리킵니다. 따라서 단순 Call Control Client는 GTBS만으로 모든 call을 제어할 수 있는 반면 Media Control Client는 GMCS를 통해 player 하나만 제어할 수 있습니다.

Coordinated Sets

CSIP가 coordinated set을 구현하며 CSIP Set Member와 Set Coordinator role을 지원합니다.

Specification 준수와 data 위치

구현은 specification의 shall 요구사항을 가능한 한 항상 지키도록 설계합니다. Stack은 application 또는 remote device의 잘못된 parameter를 거부합니다. 그러나 advertising처럼 상태와 data를 application만 제어하면 stack이 요구사항을 직접 보장할 수 없습니다.

반대로 VCS state처럼 stack만 제어하는 data도 있습니다. Absolute volume 설정 같은 경우 application은 callback으로 통지만 받고 요청을 거부할 수 없습니다. 단순하고 작은 data는 stack이 보관해 요구사항을 보장하고, PAC record처럼 복잡하면 application이 보관하고 stack은 reference만 유지합니다. Advertising처럼 application-specific인 data는 application이 완전히 제어합니다.

Callback return type은 소유권을 가늠하는 실용적인 단서입니다. VCP Volume Renderer callback은 void여서 application이 변경을 거부할 수 없습니다. BAP Unicast Server callback은 int여서 application이 많은 data를 제어하고 request를 거부할 수 있습니다.

LE Audio 사용 시 고려사항

Security 요구사항

모든 LE Audio service는 Security Level 2를 요구하되 key는 128-bit이고 OOB 또는 LE Secure Connections에서 파생되어야 합니다. ATT에는 잘못된 key size를 알릴 방법은 있지만 OOB·Secure Connections 부재 전용 error code는 없습니다.

LE Audio device가 더 낮은 security를 허용하는 다른 service도 함께 쓸 수 있어 Zephyr는 device 전체에 이 조건을 강제하지 않습니다. 대신 subsys/bluetooth/audio/audio.c의 custom security check와 내부 BT_AUDIO_CHRC macro로 모든 LE Audio service access를 검증합니다.

Encrypted SIRK와 LTK

CSIS는 Set Identity Resolving Key를 암호화할 수 있습니다. 암호화에는 일반적으로 CSIS 같은 상위 구현에 노출되지 않는 LTK를 key로 사용하지만, 이것이 security를 약화시키지는 않습니다.

MTU 요구사항

BAP 양쪽은 unenhanced ATT bearer에서 최소 64의 ATT_MTU 또는 enhanced ATT bearer 하나 이상을 지원해야 합니다. GATT Write Without Response를 선호하거나 의무화하고 Write Long Characteristic Value 지원은 대체로 optional이기 때문입니다. ASCS가 64 octet보다 큰 값을 지원하면 CONFIG_BT_ATT_PREPARE_COUNT를 0이 아닌 값으로 설정해 Read Long Characteristic Value를 지원해야 합니다.

LE Audio 자료

Source

출처

영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.