diff options
author | 2025-02-10 05:23:43 -0800 | |
---|---|---|
committer | 2025-02-10 05:23:43 -0800 | |
commit | 8f02f22edd6c28ab41affe706f7fb874753135d3 (patch) | |
tree | 475ea9e8b52c080983b55911f344bc44b287c309 | |
parent | 6e7793e410eee49bceab040950b62cf311bf0692 (diff) | |
parent | 3396648e8ef457fadaeb50bf2b9f6d1e1f1ab3f9 (diff) |
Merge "GATT: Add handles for Gaming Audio Service (GMAS)" into main
-rw-r--r-- | system/stack/gatt/gatt_api.cc | 2 | ||||
-rw-r--r-- | system/stack/gatt/gatt_int.h | 4 | ||||
-rw-r--r-- | system/stack/gatt/gatt_main.cc | 1 | ||||
-rw-r--r-- | system/stack/include/bt_uuid16.h | 1 |
4 files changed, 7 insertions, 1 deletions
diff --git a/system/stack/gatt/gatt_api.cc b/system/stack/gatt/gatt_api.cc index 3e10a8b660..1b60132b00 100644 --- a/system/stack/gatt/gatt_api.cc +++ b/system/stack/gatt/gatt_api.cc @@ -204,6 +204,8 @@ tGATT_STATUS GATTS_AddService(tGATT_IF gatt_if, btgatt_db_element_t* service, in s_hdl = gatt_cb.hdl_cfg.gtbs_start_hdl; } else if (svc_uuid == Uuid::From16Bit(UUID_SERVCLASS_TMAS_SERVER)) { s_hdl = gatt_cb.hdl_cfg.tmas_start_hdl; + } else if (svc_uuid == Uuid::From16Bit(UUID_SERVCLASS_GMAS_SERVER)) { + s_hdl = gatt_cb.hdl_cfg.gmas_start_hdl; } else { if (!gatt_cb.hdl_list_info->empty()) { s_hdl = gatt_cb.hdl_list_info->front().asgn_range.e_handle + 1; diff --git a/system/stack/gatt/gatt_int.h b/system/stack/gatt/gatt_int.h index 4ba6d7d127..2a3f949ede 100644 --- a/system/stack/gatt/gatt_int.h +++ b/system/stack/gatt/gatt_int.h @@ -256,7 +256,8 @@ inline std::string gatt_channel_state_text(const tGATT_CH_STATE& state) { #define GATT_GMCS_START_HANDLE 40 #define GATT_GTBS_START_HANDLE 90 #define GATT_TMAS_START_HANDLE 130 -#define GATT_APP_START_HANDLE 134 +#define GATT_GMAS_START_HANDLE 133 +#define GATT_APP_START_HANDLE 144 typedef struct hdl_cfg { uint16_t gatt_start_hdl; @@ -264,6 +265,7 @@ typedef struct hdl_cfg { uint16_t gmcs_start_hdl; uint16_t gtbs_start_hdl; uint16_t tmas_start_hdl; + uint16_t gmas_start_hdl; uint16_t app_start_hdl; } tGATT_HDL_CFG; diff --git a/system/stack/gatt/gatt_main.cc b/system/stack/gatt/gatt_main.cc index 2688cfa582..7458cedc64 100644 --- a/system/stack/gatt/gatt_main.cc +++ b/system/stack/gatt/gatt_main.cc @@ -148,6 +148,7 @@ void gatt_init(void) { gatt_cb.hdl_cfg.gmcs_start_hdl = GATT_GMCS_START_HANDLE; gatt_cb.hdl_cfg.gtbs_start_hdl = GATT_GTBS_START_HANDLE; gatt_cb.hdl_cfg.tmas_start_hdl = GATT_TMAS_START_HANDLE; + gatt_cb.hdl_cfg.gmas_start_hdl = GATT_GMAS_START_HANDLE; gatt_cb.hdl_cfg.app_start_hdl = GATT_APP_START_HANDLE; gatt_cb.hdl_list_info = new std::list<tGATT_HDL_LIST_ELEM>(); diff --git a/system/stack/include/bt_uuid16.h b/system/stack/include/bt_uuid16.h index da82d1f2f5..edbd17abaf 100644 --- a/system/stack/include/bt_uuid16.h +++ b/system/stack/include/bt_uuid16.h @@ -127,3 +127,4 @@ Service*/ #define UUID_SERVCLASS_TMAS_SERVER 0x1855 /* Telephone and Media Audio Service */ #define UUID_SERVCLASS_RAS 0x185B /* Ranging Service */ +#define UUID_SERVCLASS_GMAS_SERVER 0x1858 /* Gaming Audio Service */ |