提交 643a2cc9 编写于 作者: T Takashi Iwai

ALSA: hda: hdmi - Keep old slot assignment behavior for Intel platforms

The commit 609f5485 ("ALSA: hda: hdmi - preserve non-MST PCM
routing for Intel platforms") tried to restore the old behavior wrt
assignment of the PCM slot for Intel platforms, but this didn't do it
right.  As found in the later discussion, a positive pipe id on Intel
platforms can be passed for single monitor attachment case.

This patch reverts the previous attempt and applies a simpler
workaround instead.  Actually, for Intel platforms, we can handle as
if per_pin->dev_id=0, assign the primary slot at the first try.  This
assures the compatible behavior with the previous versions regarding
the slot assignment.

Fixes: 609f5485 ("ALSA: hda: hdmi - preserve non-MST PCM routing for Intel platforms")
Link: https://lore.kernel.org/r/20191203154105.30414-1-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
上级 e38e486d
......@@ -1348,21 +1348,18 @@ static int hdmi_find_pcm_slot(struct hdmi_spec *spec,
* with the legacy static per_pin-pcm assignment that existed in the
* days before DP-MST.
*
* Intel DP-MST prefers this legacy behavior for compatibility, too.
*
* per_pin of m!=0 prefers to get pcm=(num_nids + (m - 1)).
*/
if (per_pin->dev_id == 0) {
if (per_pin->dev_id == 0 || spec->intel_hsw_fixup) {
if (!test_bit(per_pin->pin_nid_idx, &spec->pcm_bitmap))
return per_pin->pin_nid_idx;
} else {
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 (spec->intel_hsw_fixup)
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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册