From: Tanu Kaskinen Date: Sun, 4 Oct 2020 10:18:16 +0000 (+0300) Subject: alsa-mixer: Fix jack name comparison X-Git-Tag: v13.99.3^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=daf3a3c4b08c89aa658353764c5237f0a4bef9f7;p=platform%2Fupstream%2Fpulseaudio.git 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. --- 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;