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.
This commit is contained in:
Tanu Kaskinen 2020-10-04 13:18:16 +03:00 committed by Arun Raghavan
parent eee8292ae1
commit daf3a3c4b0

View file

@ -4311,7 +4311,7 @@ static void profile_set_set_availability_groups(pa_alsa_profile_set *ps) {
PA_LLIST_FOREACH(j2, p2->jacks) { PA_LLIST_FOREACH(j2, p2->jacks) {
if (!j2->has_control || j2->state_plugged == PA_AVAILABLE_NO) if (!j2->has_control || j2->state_plugged == PA_AVAILABLE_NO)
continue; continue;
if (pa_streq(j->name, j2->name)) { if (pa_streq(j->alsa_name, j2->alsa_name)) {
j->state_plugged = PA_AVAILABLE_UNKNOWN; j->state_plugged = PA_AVAILABLE_UNKNOWN;
j2->state_plugged = PA_AVAILABLE_UNKNOWN; j2->state_plugged = PA_AVAILABLE_UNKNOWN;
found = p2->availability_group; found = p2->availability_group;