From daf3a3c4b08c89aa658353764c5237f0a4bef9f7 Mon Sep 17 00:00:00 2001 From: Tanu Kaskinen Date: Sun, 4 Oct 2020 13:18:16 +0300 Subject: alsa-mixer: Fix jack name comparison HDMI jacks are configured like this: [Jack HDMI/DP] append-pcm-to-name = yes The pa_alsa_jack.name field is then "HDMI/DP" and pa_alsa_jack.alsa_name is set to "HDMI/DP,pcm=3 Jack" or similar. If we compare the name fields of HDMI paths, they appear to use the same jack element even though they are different in reality, so all HDMI ports got incorrectly assigned to the same availability group. --- src/modules/alsa/alsa-mixer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c index 345132f57..063179052 100644 --- a/src/modules/alsa/alsa-mixer.c +++ b/src/modules/alsa/alsa-mixer.c @@ -4311,7 +4311,7 @@ static void profile_set_set_availability_groups(pa_alsa_profile_set *ps) { PA_LLIST_FOREACH(j2, p2->jacks) { if (!j2->has_control || j2->state_plugged == PA_AVAILABLE_NO) continue; - if (pa_streq(j->name, j2->name)) { + if (pa_streq(j->alsa_name, j2->alsa_name)) { j->state_plugged = PA_AVAILABLE_UNKNOWN; j2->state_plugged = PA_AVAILABLE_UNKNOWN; found = p2->availability_group; -- cgit v1.2.1