All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Cc: Nikhil Mahale <nmahale@nvidia.com>, alsa-devel@alsa-project.org
Subject: Re: [alsa-devel] [PATCH 2/2] [RFC] ALSA: hda: hdmi - preserve non-MST PCM routing for Intel platforms
Date: Tue, 03 Dec 2019 15:05:45 +0100	[thread overview]
Message-ID: <s5hwobdmrly.wl-tiwai@suse.de> (raw)
In-Reply-To: <alpine.DEB.2.21.1912031523380.16459@zeliteleevi>

On Tue, 03 Dec 2019 14:48:10 +0100,
Kai Vehmanen wrote:
> 
> Hi Takashi and Nikhil,
> 
> On Mon, 2 Dec 2019, Kai Vehmanen wrote:
> > yup, -1 for non-MST, that was just plain wrong in my Friday mail. The 
> > problem seems to be pipe id is positive in some non-MST cases (like 
> > https://github.com/thesofproject/linux/issues/1536 ), which is very 
> > suprising looking at e.g. intel_audio_codec_enable(), but that seems to be 
> > happening nevertheless.
> 
> ok, got graphics driver log from this case now, and this turns out to be a 
> system with an unusual converter setup for HDMI output. I.e. from user 
> point of view it's HDMI, but for graphics driver it looks like a DP 
> connection (with MST enabled which is not so common but apparently is the 
> case). So i915 driver is working as expected and in patch_hdmi we should 
> handle it as a normal MST case.
> 
> Takashi, considering the commit message is wrong, I think it's better
> to revert the "ALSA: hda: hdmi - preserve non-MST PCM routing for Intel 
> platforms" patch. Should I send a revert?
> 
> It also doesn't fully preseve the old routing as in the case of a single 
> DP-MST monitor (with dev_id=1), hdmi_find_pcm_slot() will not pick the 
> preferred PCM "per_pin->pin_nid_idx", but will choose "spec->num_nids + 
> (per_pin->dev_id - 1)". So seems better to just drop it.

Well, if we want to keep the old behavior for compatibility just to be
sure, how about a patch like below?


Takashi

--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -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 */
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply	other threads:[~2019-12-03 14:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-29 14:37 [alsa-devel] [PATCH 1/2] ALSA: hda: hdmi - fix kernel oops caused by invalid PCM idx Kai Vehmanen
2019-11-29 14:37 ` [alsa-devel] [PATCH 2/2] [RFC] ALSA: hda: hdmi - preserve non-MST PCM routing for Intel platforms Kai Vehmanen
2019-11-29 14:44   ` Takashi Iwai
2019-11-29 14:47   ` Kai Vehmanen
2019-11-29 15:08     ` Takashi Iwai
2019-11-29 16:36       ` Kai Vehmanen
2019-12-02  5:07   ` Nikhil Mahale
2019-12-02 11:18     ` Kai Vehmanen
2019-12-03 13:48       ` Kai Vehmanen
2019-12-03 14:05         ` Takashi Iwai [this message]
2019-12-03 14:35           ` Kai Vehmanen
2019-11-29 14:43 ` [alsa-devel] [PATCH 1/2] ALSA: hda: hdmi - fix kernel oops caused by invalid PCM idx Takashi Iwai
2019-12-02  4:44   ` Nikhil Mahale

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hwobdmrly.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=nmahale@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.