Zephyr API Documentation 4.0.0-rc3
A Scalable Open Source RTOS
|
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. | |
Bluetooth Gaming Audio Profile (GMAP)
enum bt_gmap_bgr_feat |
#include <zephyr/bluetooth/audio/gmap.h>
Broadcast Game Receiver Feature bitfield.
enum bt_gmap_bgs_feat |
#include <zephyr/bluetooth/audio/gmap.h>
Broadcast Game Sender Feature bitfield.
Enumerator | |
---|---|
BT_GMAP_BGS_FEAT_96KBPS | 96 kbps support |
enum bt_gmap_role |
#include <zephyr/bluetooth/audio/gmap.h>
Gaming Role bitfield.
enum bt_gmap_ugg_feat |
#include <zephyr/bluetooth/audio/gmap.h>
Unicast Game Gateway Feature bitfield.
enum bt_gmap_ugt_feat |
#include <zephyr/bluetooth/audio/gmap.h>
Unicast Game Terminal Feature bitfield.
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.
cb | The callback structure. |
-EINVAL | if cb is NULL |
-EALREADY | if callbacks have already be registered |
0 | on success |
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.
conn | Bluetooth connection object. |
-EINVAL | if conn is NULL |
-EBUSY | if discovery is already in progress for conn |
-ENOEXEC | if discovery failed to initiate |
0 | on success |
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).
role | Gaming Audio Profile role(s) of the device (one or multiple). |
features | Features of the roles. If a role is not in the role parameter, then the feature value for that role is simply ignored. |
-EINVAL | on invalid arguments |
-ENOEXEC | on service register failure |
0 | on success |
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.
role | Gaming Audio Profile role(s). |
features | Features of the roles. If a role is not in the role parameter, then the feature value for that role is simply ignored. |
-ENOEXEC | if the service has not yet been registered |
-EINVAL | on invalid arguments |
-EALREADY | if the role and features are the same as existing ones |
-ENOENT | on service unregister failure |
-ECANCELED | on service re-register failure |
0 | on success |