bluez5-device: Set device intended role for HFP

This commit is contained in:
Sanchayan Maity 2021-08-12 20:40:05 +05:30 committed by Wim Taymans
parent f87942027f
commit be6824cb15

View file

@ -345,7 +345,7 @@ static void emit_node(struct impl *this, struct spa_bt_transport *t,
{
struct spa_bt_device *device = this->bt_dev;
struct spa_device_object_info info;
struct spa_dict_item items[6];
struct spa_dict_item items[7];
uint32_t n_items = 0;
char transport[32], str_id[32];
bool is_dyn_node = SPA_FLAG_IS_SET(id, DYNAMIC_NODE_ID_FLAG);
@ -362,6 +362,10 @@ static void emit_node(struct impl *this, struct spa_bt_transport *t,
items[5] = SPA_DICT_ITEM_INIT("card.profile.device", str_id);
n_items++;
}
if (spa_streq(spa_bt_profile_name(t->profile), "headset-head-unit")) {
items[n_items] = SPA_DICT_ITEM_INIT("device.intended-roles", "Communication");
n_items++;
}
info = SPA_DEVICE_OBJECT_INFO_INIT();
info.type = SPA_TYPE_INTERFACE_Node;