Zephyr API Documentation 3.7.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
tmap.h File Reference

Header for Bluetooth TMAP. More...

#include <zephyr/autoconf.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/sys/util.h>
#include <zephyr/sys/util_macro.h>

Go to the source code of this file.

Data Structures

struct  bt_tmap_cb
 TMAP callback structure. More...
 

Macros

#define BT_TMAP_CG_SUPPORTED
 Call Gateway (CG) supported.
 
#define BT_TMAP_CT_SUPPORTED
 Call Terminal (CT) supported.
 
#define BT_TMAP_UMS_SUPPORTED
 Unicast Media Sender (UMS) supported.
 
#define BT_TMAP_UMR_SUPPORTED
 Unicast Media Receiver (UMR) supported.
 
#define BT_TMAP_BMS_SUPPORTED    (IS_ENABLED(CONFIG_BT_CAP_INITIATOR) && IS_ENABLED(CONFIG_BT_BAP_BROADCAST_SOURCE))
 Broadcast Media Sender (BMS) supported.
 
#define BT_TMAP_BMR_SUPPORTED    (IS_ENABLED(CONFIG_BT_CAP_ACCEPTOR) && IS_ENABLED(CONFIG_BT_BAP_BROADCAST_SINK))
 Broadcast Media Receiver (BMR) supported.
 

Enumerations

enum  bt_tmap_role {
  BT_TMAP_ROLE_CG = BIT(0) , BT_TMAP_ROLE_CT = BIT(1) , BT_TMAP_ROLE_UMS = BIT(2) , BT_TMAP_ROLE_UMR = BIT(3) ,
  BT_TMAP_ROLE_BMS = BIT(4) , BT_TMAP_ROLE_BMR = BIT(5)
}
 TMAP Role characteristic. More...
 

Functions

int bt_tmap_register (enum bt_tmap_role role)
 Adds TMAS instance to database and sets the received TMAP role(s).
 
int bt_tmap_discover (struct bt_conn *conn, const struct bt_tmap_cb *tmap_cb)
 Perform service discovery as TMAP Client.
 
void bt_tmap_set_role (enum bt_tmap_role role)
 Set one or multiple TMAP roles dynamically.
 

Detailed Description

Header for Bluetooth TMAP.

Copyright 2023 NXP Copyright (c) 2024 Nordic Semiconductor ASA

SPDX-License-Identifier: Apache-2.0

Macro Definition Documentation

◆ BT_TMAP_BMR_SUPPORTED

#define BT_TMAP_BMR_SUPPORTED    (IS_ENABLED(CONFIG_BT_CAP_ACCEPTOR) && IS_ENABLED(CONFIG_BT_BAP_BROADCAST_SINK))

Broadcast Media Receiver (BMR) supported.

◆ BT_TMAP_BMS_SUPPORTED

#define BT_TMAP_BMS_SUPPORTED    (IS_ENABLED(CONFIG_BT_CAP_INITIATOR) && IS_ENABLED(CONFIG_BT_BAP_BROADCAST_SOURCE))

Broadcast Media Sender (BMS) supported.

◆ BT_TMAP_CG_SUPPORTED

#define BT_TMAP_CG_SUPPORTED
Value:
(IS_ENABLED(CONFIG_BT_CAP_INITIATOR) && IS_ENABLED(CONFIG_BT_BAP_UNICAST_CLIENT) && \
IS_ENABLED(CONFIG_BT_TBS) && IS_ENABLED(CONFIG_BT_VCP_VOL_CTLR))
#define IS_ENABLED(config_macro)
Check for macro definition in compiler-visible expressions.
Definition util_macro.h:124

Call Gateway (CG) supported.

◆ BT_TMAP_CT_SUPPORTED

#define BT_TMAP_CT_SUPPORTED
Value:
(IS_ENABLED(CONFIG_BT_CAP_ACCEPTOR) && IS_ENABLED(CONFIG_BT_BAP_UNICAST_SERVER) && \
IS_ENABLED(CONFIG_BT_TBS_CLIENT) && \
(IS_ENABLED(CONFIG_BT_ASCS_ASE_SNK) && \
IS_ENABLED(CONFIG_BT_VCP_VOL_REND) == IS_ENABLED(CONFIG_BT_ASCS_ASE_SNK)))

Call Terminal (CT) supported.

◆ BT_TMAP_UMR_SUPPORTED

#define BT_TMAP_UMR_SUPPORTED
Value:
(IS_ENABLED(CONFIG_BT_CAP_ACCEPTOR) && IS_ENABLED(CONFIG_BT_ASCS_ASE_SNK) && \
IS_ENABLED(CONFIG_BT_VCP_VOL_REND))

Unicast Media Receiver (UMR) supported.

◆ BT_TMAP_UMS_SUPPORTED

#define BT_TMAP_UMS_SUPPORTED
Value:
(IS_ENABLED(CONFIG_BT_CAP_INITIATOR) && \
IS_ENABLED(CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SNK) && IS_ENABLED(CONFIG_BT_VCP_VOL_CTLR) && \
IS_ENABLED(CONFIG_BT_MCS))

Unicast Media Sender (UMS) supported.

Enumeration Type Documentation

◆ bt_tmap_role

TMAP Role characteristic.

Enumerator
BT_TMAP_ROLE_CG 

TMAP Call Gateway role.

This role is defined to telephone and VoIP applications using the Call Control Profile to control calls on a remote TMAP Call Terminal. Audio streams in this role are typically bi-directional.

BT_TMAP_ROLE_CT 

TMAP Call Terminal role.

This role is defined to telephone and VoIP applications using the Call Control Profile to expose calls to remote TMAP Call Gateways. Audio streams in this role are typically bi-directional.

BT_TMAP_ROLE_UMS 

TMAP Unicast Media Sender role.

This role is defined send media audio to TMAP Unicast Media Receivers. Audio streams in this role are typically uni-directional.

BT_TMAP_ROLE_UMR 

TMAP Unicast Media Receiver role.

This role is defined receive media audio to TMAP Unicast Media Senders. Audio streams in this role are typically uni-directional.

BT_TMAP_ROLE_BMS 

TMAP Broadcast Media Sender role.

This role is defined send media audio to TMAP Broadcast Media Receivers. Audio streams in this role are always uni-directional.

BT_TMAP_ROLE_BMR 

TMAP Broadcast Media Receiver role.

This role is defined send media audio to TMAP Broadcast Media Senders. Audio streams in this role are always uni-directional.

Function Documentation

◆ bt_tmap_discover()

int bt_tmap_discover ( struct bt_conn * conn,
const struct bt_tmap_cb * tmap_cb )

Perform service discovery as TMAP Client.

Parameters
connPointer to the connection.
tmap_cbPointer to struct of TMAP callbacks.
Returns
0 on success or negative error value on failure.

◆ bt_tmap_register()

int bt_tmap_register ( enum bt_tmap_role role)

Adds TMAS instance to database and sets the received TMAP role(s).

Parameters
roleTMAP role(s) of the device (one or multiple).
Returns
0 on success or negative error value on failure.

◆ bt_tmap_set_role()

void bt_tmap_set_role ( enum bt_tmap_role role)

Set one or multiple TMAP roles dynamically.

Previously registered value will be overwritten.

Parameters
roleTMAP role(s).