From e6d7b1aa705611d69e771358a9809e83baab18eb Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 9 Sep 2021 18:05:20 +0200 Subject: [PATCH] media-session: copy some device keys to the nodes Chrome seems to want to use the device.bus --- src/examples/media-session/alsa-monitor.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/examples/media-session/alsa-monitor.c b/src/examples/media-session/alsa-monitor.c index d4b2016a5..4cb6e8497 100644 --- a/src/examples/media-session/alsa-monitor.c +++ b/src/examples/media-session/alsa-monitor.c @@ -328,7 +328,7 @@ static struct node *alsa_create_node(struct device *device, uint32_t id, struct node *node; struct impl *impl = device->impl; int res; - const char *dev, *subdev, *stream, *profile, *profile_desc, *rules; + const char *dev, *subdev, *stream, *profile, *profile_desc, *rules, *str; char tmp[1024]; int i, priority; @@ -475,6 +475,13 @@ static struct node *alsa_create_node(struct device *device, uint32_t id, if (pw_properties_get(node->props, PW_KEY_DEVICE_ICON_NAME) == NULL) update_icon_name(node->props, node->direction == PW_DIRECTION_INPUT); + if ((str = pw_properties_get(device->props, PW_KEY_DEVICE_BUS)) != NULL) + pw_properties_set(node->props, PW_KEY_DEVICE_BUS, str); + if ((str = pw_properties_get(device->props, PW_KEY_DEVICE_BUS_PATH)) != NULL) + pw_properties_set(node->props, PW_KEY_DEVICE_BUS_PATH, str); + if ((str = pw_properties_get(device->props, PW_KEY_DEVICE_FORM_FACTOR)) != NULL) + pw_properties_set(node->props, PW_KEY_DEVICE_FORM_FACTOR, str); + node->impl = impl; node->device = device; node->id = id;