bluez5: add device.string in properties

See #842
This commit is contained in:
Wim Taymans 2021-03-18 12:44:09 +01:00
parent 2ee4e94c59
commit 08f2284eea
2 changed files with 4 additions and 0 deletions

View File

@ -288,6 +288,8 @@ struct spa_device_methods {
* "computer", "portable" */
#define SPA_KEY_DEVICE_PROFILE "device.profile " /**< profile for the device */
#define SPA_KEY_DEVICE_PROFILE_SET "device.profile-set" /**< profile set for the device */
#define SPA_KEY_DEVICE_STRING "device.string" /**< device string in the underlying
* layer's format. E.g. "surround51:0" */
#ifdef __cplusplus

View File

@ -749,6 +749,7 @@ static int device_connected_old(struct spa_bt_monitor *monitor, struct spa_bt_de
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_DEVICE_FORM_FACTOR,
spa_bt_form_factor_name(
spa_bt_form_factor_from_class(device->bluetooth_class)));
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_DEVICE_STRING, device->address);
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_API_BLUEZ5_PATH, device->path);
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_API_BLUEZ5_ADDRESS, device->address);
snprintf(dev, sizeof(dev), "pointer:%p", device);
@ -823,6 +824,7 @@ static int device_connected(struct spa_bt_monitor *monitor, struct spa_bt_device
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_DEVICE_FORM_FACTOR,
spa_bt_form_factor_name(
spa_bt_form_factor_from_class(device->bluetooth_class)));
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_DEVICE_STRING, device->address);
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_API_BLUEZ5_PATH, device->path);
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_API_BLUEZ5_ADDRESS, device->address);
snprintf(dev, sizeof(dev), "pointer:%p", device);