pulse-server: use name if description not set

This commit is contained in:
Wim Taymans 2020-10-31 21:20:39 +01:00
parent 98b1b8090d
commit 4bb859fb82

View file

@ -244,6 +244,8 @@ static uint32_t collect_profile_info(struct pw_manager_object *card, struct card
SPA_PARAM_PROFILE_classes, SPA_POD_OPT_Pod(&classes)) < 0) { SPA_PARAM_PROFILE_classes, SPA_POD_OPT_Pod(&classes)) < 0) {
continue; continue;
} }
if (pi->description == NULL)
pi->description = pi->name;
if (pi->id == card_info->active_profile) if (pi->id == card_info->active_profile)
card_info->active_profile_name = pi->name; card_info->active_profile_name = pi->name;
@ -443,6 +445,8 @@ static uint32_t collect_port_info(struct pw_manager_object *card, struct card_in
SPA_PARAM_ROUTE_profiles, SPA_POD_OPT_Pod(&profiles)) < 0) SPA_PARAM_ROUTE_profiles, SPA_POD_OPT_Pod(&profiles)) < 0)
continue; continue;
if (pi->description == NULL)
pi->description = pi->name;
if (devices) if (devices)
pi->devices = spa_pod_get_array(devices, &pi->n_devices); pi->devices = spa_pod_get_array(devices, &pi->n_devices);
if (profiles) if (profiles)