Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Bluetooth Gaming Audio Profile

Bluetooth Gaming Audio Profile (GMAP) More...

Data Structures

struct  bt_gmap_feat
 Broadcast Game Receiver Feature bitfield. More...
 
struct  bt_gmap_cb
 Hearing Access Service Client callback structure. More...
 

Enumerations

enum  bt_gmap_role { BT_GMAP_ROLE_UGG = BIT(0) , BT_GMAP_ROLE_UGT = BIT(1) , BT_GMAP_ROLE_BGS = BIT(2) , BT_GMAP_ROLE_BGR = BIT(3) }
 Gaming Role bitfield. More...
 
enum  bt_gmap_ugg_feat { BT_GMAP_UGG_FEAT_MULTIPLEX = BIT(0) , BT_GMAP_UGG_FEAT_96KBPS_SOURCE = BIT(1) , BT_GMAP_UGG_FEAT_MULTISINK = BIT(2) }
 Unicast Game Gateway Feature bitfield. More...
 
enum  bt_gmap_ugt_feat {
  BT_GMAP_UGT_FEAT_SOURCE = BIT(0) , BT_GMAP_UGT_FEAT_80KBPS_SOURCE = BIT(1) , BT_GMAP_UGT_FEAT_SINK = BIT(2) , BT_GMAP_UGT_FEAT_64KBPS_SINK = BIT(3) ,
  BT_GMAP_UGT_FEAT_MULTIPLEX = BIT(4) , BT_GMAP_UGT_FEAT_MULTISINK = BIT(5) , BT_GMAP_UGT_FEAT_MULTISOURCE = BIT(6)
}
 Unicast Game Terminal Feature bitfield. More...
 
enum  bt_gmap_bgs_feat { BT_GMAP_BGS_FEAT_96KBPS = BIT(0) }
 Broadcast Game Sender Feature bitfield. More...
 
enum  bt_gmap_bgr_feat { BT_GMAP_BGR_FEAT_MULTISINK = BIT(0) , BT_GMAP_BGR_FEAT_MULTIPLEX = BIT(1) }
 Broadcast Game Receiver Feature bitfield. More...
 

Functions

int bt_gmap_cb_register (const struct bt_gmap_cb *cb)
 Registers the callbacks used by the Gaming Audio Profile.
 
int bt_gmap_discover (struct bt_conn *conn)
 Discover Gaming Service on a remote device.
 
int bt_gmap_register (enum bt_gmap_role role, struct bt_gmap_feat features)
 Adds GMAS instance to database and sets the received Gaming Audio Profile role(s).
 
int bt_gmap_set_role (enum bt_gmap_role role, struct bt_gmap_feat features)
 Set one or multiple Gaming Audio Profile roles and features dynamically.
 

Detailed Description

Bluetooth Gaming Audio Profile (GMAP)

Since
3.5
Version
0.8.0

Enumeration Type Documentation

◆ bt_gmap_bgr_feat

#include <zephyr/bluetooth/audio/gmap.h>

Broadcast Game Receiver Feature bitfield.

Enumerator
BT_GMAP_BGR_FEAT_MULTISINK 

Support for receiving at least two audio channels, each in a separate BIS.

Requires CONFIG_BT_BAP_BROADCAST_SNK_STREAM_COUNT > 1

BT_GMAP_BGR_FEAT_MULTIPLEX 

Support for receiving multiple LC3 codec frames per block in an SDU.

◆ bt_gmap_bgs_feat

#include <zephyr/bluetooth/audio/gmap.h>

Broadcast Game Sender Feature bitfield.

Enumerator
BT_GMAP_BGS_FEAT_96KBPS 

96 kbps support

◆ bt_gmap_role

#include <zephyr/bluetooth/audio/gmap.h>

Gaming Role bitfield.

Enumerator
BT_GMAP_ROLE_UGG 

Gaming Role Unicast Game Gateway.

Requires CONFIG_BT_CAP_INITIATOR, CONFIG_BT_BAP_UNICAST_CLIENT and CONFIG_BT_VCP_VOL_CTLR to be enabled.

BT_GMAP_ROLE_UGT 

Gaming Role Unicast Game Terminal.

Requires CONFIG_BT_CAP_ACCEPTOR and CONFIG_BT_BAP_UNICAST_SERVER to be enabled.

BT_GMAP_ROLE_BGS 

Gaming Role Broadcast Game Sender.

Requires CONFIG_BT_CAP_INITIATOR and CONFIG_BT_BAP_BROADCAST_SOURCE to be enabled.

BT_GMAP_ROLE_BGR 

Gaming Role Broadcast Game Receiver.

Requires CONFIG_BT_CAP_ACCEPTOR, CONFIG_BT_BAP_BROADCAST_SINK and CONFIG_BT_VCP_VOL_REND to be enabled.

◆ bt_gmap_ugg_feat

#include <zephyr/bluetooth/audio/gmap.h>

Unicast Game Gateway Feature bitfield.

Enumerator
BT_GMAP_UGG_FEAT_MULTIPLEX 

Support transmitting multiple LC3 codec frames per block in an SDU.

Requires CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SRC_COUNT > 0

BT_GMAP_UGG_FEAT_96KBPS_SOURCE 

96 kbps source support

Requires CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SRC_COUNT > 0

BT_GMAP_UGG_FEAT_MULTISINK 

Support for receiving at least two channels of audio, each in a separate CIS.

Requires CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SNK_COUNT > 1 and CONFIG_BT_BAP_UNICAST_CLIENT_GROUP_STREAM_COUNT > 1

◆ bt_gmap_ugt_feat

#include <zephyr/bluetooth/audio/gmap.h>

Unicast Game Terminal Feature bitfield.

Enumerator
BT_GMAP_UGT_FEAT_SOURCE 

Source support.

Requires CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT > 0

BT_GMAP_UGT_FEAT_80KBPS_SOURCE 

80 kbps source support

Requires BT_GMAP_UGT_FEAT_SOURCE to be set as well

BT_GMAP_UGT_FEAT_SINK 

Sink support.

Requires CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT > 0

BT_GMAP_UGT_FEAT_64KBPS_SINK 

64 kbps sink support

Requires BT_GMAP_UGT_FEAT_SINK to be set as well

BT_GMAP_UGT_FEAT_MULTIPLEX 

Support for receiving multiple LC3 codec frames per block in an SDU.

Requires BT_GMAP_UGT_FEAT_SINK to be set as well

BT_GMAP_UGT_FEAT_MULTISINK 

Support for receiving at least two audio channels, each in a separate CIS.

Requires CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT > 1 and CONFIG_BT_ASCS_MAX_ACTIVE_ASES > 1, and BT_GMAP_UGT_FEAT_SINK to be set as well

BT_GMAP_UGT_FEAT_MULTISOURCE 

Support for sending at least two audio channels, each in a separate CIS.

Requires CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT > 1 and CONFIG_BT_ASCS_MAX_ACTIVE_ASES > 1, and BT_GMAP_UGT_FEAT_SOURCE to be set as well

Function Documentation

◆ bt_gmap_cb_register()

int bt_gmap_cb_register ( const struct bt_gmap_cb * cb)

#include <zephyr/bluetooth/audio/gmap.h>

Registers the callbacks used by the Gaming Audio Profile.

Parameters
cbThe callback structure.
Return values
-EINVALif cb is NULL
-EALREADYif callbacks have already be registered
0on success

◆ bt_gmap_discover()

int bt_gmap_discover ( struct bt_conn * conn)

#include <zephyr/bluetooth/audio/gmap.h>

Discover Gaming Service on a remote device.

Procedure to find a Gaming Service on a server identified by conn. The bt_gmap_cb::discover callback is called when the discovery procedure completes of fails. On discovery success the callback contains information about the remote device.

Parameters
connBluetooth connection object.
Return values
-EINVALif conn is NULL
-EBUSYif discovery is already in progress for conn
-ENOEXECif discovery failed to initiate
0on success

◆ bt_gmap_register()

int bt_gmap_register ( enum bt_gmap_role role,
struct bt_gmap_feat features )

#include <zephyr/bluetooth/audio/gmap.h>

Adds GMAS instance to database and sets the received Gaming Audio Profile role(s).

Parameters
roleGaming Audio Profile role(s) of the device (one or multiple).
featuresFeatures of the roles. If a role is not in the role parameter, then the feature value for that role is simply ignored.
Return values
-EINVALon invalid arguments
-ENOEXECon service register failure
0on success

◆ bt_gmap_set_role()

int bt_gmap_set_role ( enum bt_gmap_role role,
struct bt_gmap_feat features )

#include <zephyr/bluetooth/audio/gmap.h>

Set one or multiple Gaming Audio Profile roles and features dynamically.

Previously registered value will be overwritten. If there is a role change, this will trigger a Gaming Audio Service (GMAS) service change. If there is only a feature change, no service change will happen.

Parameters
roleGaming Audio Profile role(s).
featuresFeatures of the roles. If a role is not in the role parameter, then the feature value for that role is simply ignored.
Return values
-ENOEXECif the service has not yet been registered
-EINVALon invalid arguments
-EALREADYif the role and features are the same as existing ones
-ENOENTon service unregister failure
-ECANCELEDon service re-register failure
0on success