From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Sasha Levin <sashal@kernel.org>,
Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>,
alsa-devel@alsa-project.org,
Kai Vehmanen <kai.vehmanen@linux.intel.com>,
Takashi Iwai <tiwai@suse.de>,
Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Subject: [PATCH AUTOSEL 5.12 030/116] ALSA: hda/hdmi: fix max DP-MST dev_num for Intel TGL+ platforms
Date: Wed, 5 May 2021 12:29:58 -0400 [thread overview]
Message-ID: <20210505163125.3460440-30-sashal@kernel.org> (raw)
In-Reply-To: <20210505163125.3460440-1-sashal@kernel.org>
From: Kai Vehmanen <kai.vehmanen@linux.intel.com>
[ Upstream commit e839fbed26e8b8713803b8ac73da92fd2b0c7594 ]
Increase the device select range to 4 on platforms supporting
4 concurrent displays.
This fixes a problem in scenario where total of 4 displays are active,
and 3 of these are audio capable DP receivers and connected to a DP-MST
hub. Due to incorrect range for device select, audio could not be played
to the 3rd monitor in DP-MST hub.
BugLink: https://github.com/thesofproject/linux/issues/2798
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20210324172337.51730-1-kai.vehmanen@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/pci/hda/patch_hdmi.c | 25 +++++++++++--------------
1 file changed, 11 insertions(+), 14 deletions(-)
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 45ae845e82df..5de3666a7101 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -1848,16 +1848,12 @@ static int hdmi_add_pin(struct hda_codec *codec, hda_nid_t pin_nid)
*/
if (spec->intel_hsw_fixup) {
/*
- * On Intel platforms, device entries number is
- * changed dynamically. If there is a DP MST
- * hub connected, the device entries number is 3.
- * Otherwise, it is 1.
- * Here we manually set dev_num to 3, so that
- * we can initialize all the device entries when
- * bootup statically.
+ * On Intel platforms, device entries count returned
+ * by AC_PAR_DEVLIST_LEN is dynamic, and depends on
+ * the type of receiver that is connected. Allocate pin
+ * structures based on worst case.
*/
- dev_num = 3;
- spec->dev_num = 3;
+ dev_num = spec->dev_num;
} else if (spec->dyn_pcm_assign && codec->dp_mst) {
dev_num = snd_hda_get_num_devices(codec, pin_nid) + 1;
/*
@@ -2942,7 +2938,7 @@ static int parse_intel_hdmi(struct hda_codec *codec)
/* Intel Haswell and onwards; audio component with eld notifier */
static int intel_hsw_common_init(struct hda_codec *codec, hda_nid_t vendor_nid,
- const int *port_map, int port_num)
+ const int *port_map, int port_num, int dev_num)
{
struct hdmi_spec *spec;
int err;
@@ -2957,6 +2953,7 @@ static int intel_hsw_common_init(struct hda_codec *codec, hda_nid_t vendor_nid,
spec->port_map = port_map;
spec->port_num = port_num;
spec->intel_hsw_fixup = true;
+ spec->dev_num = dev_num;
intel_haswell_enable_all_pins(codec, true);
intel_haswell_fixup_enable_dp12(codec);
@@ -2982,12 +2979,12 @@ static int intel_hsw_common_init(struct hda_codec *codec, hda_nid_t vendor_nid,
static int patch_i915_hsw_hdmi(struct hda_codec *codec)
{
- return intel_hsw_common_init(codec, 0x08, NULL, 0);
+ return intel_hsw_common_init(codec, 0x08, NULL, 0, 3);
}
static int patch_i915_glk_hdmi(struct hda_codec *codec)
{
- return intel_hsw_common_init(codec, 0x0b, NULL, 0);
+ return intel_hsw_common_init(codec, 0x0b, NULL, 0, 3);
}
static int patch_i915_icl_hdmi(struct hda_codec *codec)
@@ -2998,7 +2995,7 @@ static int patch_i915_icl_hdmi(struct hda_codec *codec)
*/
static const int map[] = {0x0, 0x4, 0x6, 0x8, 0xa, 0xb};
- return intel_hsw_common_init(codec, 0x02, map, ARRAY_SIZE(map));
+ return intel_hsw_common_init(codec, 0x02, map, ARRAY_SIZE(map), 3);
}
static int patch_i915_tgl_hdmi(struct hda_codec *codec)
@@ -3010,7 +3007,7 @@ static int patch_i915_tgl_hdmi(struct hda_codec *codec)
static const int map[] = {0x4, 0x6, 0x8, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf};
int ret;
- ret = intel_hsw_common_init(codec, 0x02, map, ARRAY_SIZE(map));
+ ret = intel_hsw_common_init(codec, 0x02, map, ARRAY_SIZE(map), 4);
if (!ret) {
struct hdmi_spec *spec = codec->spec;
--
2.30.2
next prev parent reply other threads:[~2021-05-05 16:35 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210505163125.3460440-1-sashal@kernel.org>
2021-05-05 16:29 ` [PATCH AUTOSEL 5.12 002/116] ALSA: usb-audio: Add Pioneer DJM-850 to quirks-table Sasha Levin
2021-05-05 16:29 ` [PATCH AUTOSEL 5.12 012/116] ASoC: Intel: bytcr_rt5640: Enable jack-detect support on Asus T100TAF Sasha Levin
2021-05-05 16:29 ` [PATCH AUTOSEL 5.12 015/116] ASoC: rsnd: core: Check convert rate in rsnd_hw_params Sasha Levin
2021-05-05 16:29 ` [PATCH AUTOSEL 5.12 019/116] ALSA: hdsp: don't disable if not enabled Sasha Levin
2021-05-05 16:29 ` [PATCH AUTOSEL 5.12 020/116] ALSA: hdspm: " Sasha Levin
2021-05-05 16:29 ` [PATCH AUTOSEL 5.12 021/116] ALSA: rme9652: " Sasha Levin
2021-05-05 16:29 ` [PATCH AUTOSEL 5.12 022/116] ALSA: bebob: enable to deliver MIDI messages for multiple ports Sasha Levin
2021-05-05 16:29 ` Sasha Levin [this message]
2021-05-05 16:30 ` [PATCH AUTOSEL 5.12 037/116] ASoC: Intel: bytcr_rt5640: Add quirk for the Chuwi Hi8 tablet Sasha Levin
2021-05-05 16:30 ` [PATCH AUTOSEL 5.12 042/116] ASoC: rt5670: Add a quirk for the Dell Venue 10 Pro 5055 Sasha Levin
2021-05-05 16:30 ` [PATCH AUTOSEL 5.12 051/116] ASoC: soc-compress: lock pcm_mutex to resolve lockdep error Sasha Levin
2021-05-05 16:30 ` [PATCH AUTOSEL 5.12 073/116] ASoC: rsnd: call rsnd_ssi_master_clk_start() from rsnd_ssi_init() Sasha Levin
2021-05-05 16:30 ` [PATCH AUTOSEL 5.12 080/116] ALSA: hda/realtek: Add quirk for Lenovo Ideapad S740 Sasha Levin
2021-05-05 16:30 ` [PATCH AUTOSEL 5.12 081/116] ASoC: Intel: sof_sdw: add quirk for new ADL-P Rvp Sasha Levin
2021-05-05 16:30 ` [PATCH AUTOSEL 5.12 082/116] ALSA: hda/hdmi: fix race in handling acomp ELD notification at resume Sasha Levin
2021-05-05 16:30 ` [PATCH AUTOSEL 5.12 090/116] ASoC: rt286: Generalize support for ALC3263 codec Sasha Levin
2021-05-07 4:34 ` David Ward
2021-05-14 13:04 ` Sasha Levin
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=20210505163125.3460440-30-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=guennadi.liakhovetski@linux.intel.com \
--cc=kai.vehmanen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ranjani.sridharan@linux.intel.com \
--cc=stable@vger.kernel.org \
--cc=tiwai@suse.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox