mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
bluez5-device: Set device intended role for HFP
This commit is contained in:
parent
f87942027f
commit
be6824cb15
1 changed files with 5 additions and 1 deletions
|
|
@ -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_bt_device *device = this->bt_dev;
|
||||||
struct spa_device_object_info info;
|
struct spa_device_object_info info;
|
||||||
struct spa_dict_item items[6];
|
struct spa_dict_item items[7];
|
||||||
uint32_t n_items = 0;
|
uint32_t n_items = 0;
|
||||||
char transport[32], str_id[32];
|
char transport[32], str_id[32];
|
||||||
bool is_dyn_node = SPA_FLAG_IS_SET(id, DYNAMIC_NODE_ID_FLAG);
|
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);
|
items[5] = SPA_DICT_ITEM_INIT("card.profile.device", str_id);
|
||||||
n_items++;
|
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 = SPA_DEVICE_OBJECT_INFO_INIT();
|
||||||
info.type = SPA_TYPE_INTERFACE_Node;
|
info.type = SPA_TYPE_INTERFACE_Node;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue