diff --git a/spa/include/spa/monitor/device.h b/spa/include/spa/monitor/device.h index 16ad4a1d6..fc19361f7 100644 --- a/spa/include/spa/monitor/device.h +++ b/spa/include/spa/monitor/device.h @@ -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 diff --git a/spa/plugins/bluez5/bluez5-dbus.c b/spa/plugins/bluez5/bluez5-dbus.c index 6f0712223..f4f5290a3 100644 --- a/spa/plugins/bluez5/bluez5-dbus.c +++ b/spa/plugins/bluez5/bluez5-dbus.c @@ -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);