From 3424d10231b40ae54114202b97d580553771b9f7 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 27 Apr 2021 16:42:52 +0200 Subject: [PATCH] Revert "acp: use the right profile name and description" This reverts commit 09106151d3a829ab6108260136b3a4f79f23797d. We need the actual name and description of the mapping, not the profile or else we end up with the full profile description in the node description instead of the part of the profile that applies to the device. --- spa/plugins/alsa/acp/acp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spa/plugins/alsa/acp/acp.c b/spa/plugins/alsa/acp/acp.c index 2dc1591fa..bf84a2ed6 100644 --- a/spa/plugins/alsa/acp/acp.c +++ b/spa/plugins/alsa/acp/acp.c @@ -199,8 +199,8 @@ static void device_free(void *data) pa_hashmap_free(dev->ports); } -static void init_device(pa_card *impl, pa_alsa_profile *ap, pa_alsa_device *dev, - pa_alsa_direction_t direction, pa_alsa_mapping *m, uint32_t index) +static void init_device(pa_card *impl, pa_alsa_device *dev, pa_alsa_direction_t direction, + pa_alsa_mapping *m, uint32_t index) { uint32_t i; @@ -231,8 +231,8 @@ static void init_device(pa_card *impl, pa_alsa_profile *ap, pa_alsa_device *dev, dev->device.direction = ACP_DIRECTION_CAPTURE; pa_proplist_update(dev->proplist, PA_UPDATE_REPLACE, m->input_proplist); } - pa_proplist_sets(dev->proplist, PA_PROP_DEVICE_PROFILE_NAME, ap->name); - pa_proplist_sets(dev->proplist, PA_PROP_DEVICE_PROFILE_DESCRIPTION, ap->description); + pa_proplist_sets(dev->proplist, PA_PROP_DEVICE_PROFILE_NAME, m->name); + pa_proplist_sets(dev->proplist, PA_PROP_DEVICE_PROFILE_DESCRIPTION, m->description); pa_proplist_setf(dev->proplist, "card.profile.device", "%u", index); pa_proplist_as_dict(dev->proplist, &dev->device.props); @@ -430,7 +430,7 @@ static void add_profiles(pa_card *impl) PA_IDXSET_FOREACH(m, ap->output_mappings, idx) { dev = &m->output; if (dev->mapping == NULL) { - init_device(impl, ap, dev, PA_ALSA_DIRECTION_OUTPUT, m, n_devices++); + init_device(impl, dev, PA_ALSA_DIRECTION_OUTPUT, m, n_devices++); pa_dynarray_append(&impl->out.devices, dev); } if (impl->use_ucm) { @@ -451,7 +451,7 @@ static void add_profiles(pa_card *impl) PA_IDXSET_FOREACH(m, ap->input_mappings, idx) { dev = &m->input; if (dev->mapping == NULL) { - init_device(impl, ap, dev, PA_ALSA_DIRECTION_INPUT, m, n_devices++); + init_device(impl, dev, PA_ALSA_DIRECTION_INPUT, m, n_devices++); pa_dynarray_append(&impl->out.devices, dev); }