]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
ALSA: hda: hdmi - preserve non-MST PCM routing for Intel platforms
authorKai Vehmanen <kai.vehmanen@linux.intel.com>
Wed, 12 Aug 2020 05:58:20 +0000 (13:58 +0800)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Fri, 4 Sep 2020 19:30:13 +0000 (16:30 -0300)
BugLink: https://bugs.launchpad.net/bugs/1867704
Commit 5398e94fb753 ("ALSA: hda - Add DP-MST support for NVIDIA codecs")
introduced a slight change of behaviour how non-MST monitors are
assigned to PCMs on Intel platforms.

In the drm_audio_component.h interface, the third parameter
to pin_eld_notify() is pipe number. On Intel platforms, this value
is -1 for MST. On other platforms, a non-zero pipe id is used to
signal MST use.

This difference leads to some subtle differences in hdmi_find_pcm_slot()
with regards to how non-MST monitors are assigned to PCMs.
This patch restores the original behaviour on Intel platforms while
keeping the new allocation policy on other platforms.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20191129143756.23941-2-kai.vehmanen@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
(backported from commit 609f5485344b05a7eaffe9fdd09d42ad1c501cdf)
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-By: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
sound/pci/hda/patch_hdmi.c

index 2051bfaa19bbf03fdcabaef7cc94d545d42b0992..a544dff55b7943cada356f7b4d1149b5ef103d7b 100644 (file)
@@ -1381,6 +1381,11 @@ static int hdmi_find_pcm_slot(struct hdmi_spec *spec,
                i = spec->num_nids + (per_pin->dev_id - 1);
                if (i < spec->pcm_used && !(test_bit(i, &spec->pcm_bitmap)))
                        return i;
+
+               /* keep legacy assignment for dev_id>0 on Intel platforms */
+               if (is_haswell_plus(per_pin->codec))
+                       if (!test_bit(per_pin->pin_nid_idx, &spec->pcm_bitmap))
+                               return per_pin->pin_nid_idx;
        }
 
        /* have a second try; check the area over num_nids */