From aca6d59559e349397af928a3909dfbd153ce2343 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 3 Oct 2022 08:35:40 +0200 Subject: [PATCH] 5.10-stable patches added patches: alsa-hda-hdmi-fix-warning-about-pcm-count-when-used-with-sof.patch --- ...g-about-pcm-count-when-used-with-sof.patch | 63 +++++++++++++++++++ queue-5.10/series | 1 + 2 files changed, 64 insertions(+) create mode 100644 queue-5.10/alsa-hda-hdmi-fix-warning-about-pcm-count-when-used-with-sof.patch diff --git a/queue-5.10/alsa-hda-hdmi-fix-warning-about-pcm-count-when-used-with-sof.patch b/queue-5.10/alsa-hda-hdmi-fix-warning-about-pcm-count-when-used-with-sof.patch new file mode 100644 index 00000000000..46368378bf5 --- /dev/null +++ b/queue-5.10/alsa-hda-hdmi-fix-warning-about-pcm-count-when-used-with-sof.patch @@ -0,0 +1,63 @@ +From c74193787b2f683751a67603fb5f15c7584f355f Mon Sep 17 00:00:00 2001 +From: Kai Vehmanen +Date: Thu, 14 Apr 2022 18:05:16 +0300 +Subject: ALSA: hda/hdmi: fix warning about PCM count when used with SOF + +From: Kai Vehmanen + +commit c74193787b2f683751a67603fb5f15c7584f355f upstream. + +With commit 13046370c4d1 ("ALSA: hda/hdmi: let new platforms assign the +pcm slot dynamically"), old behaviour to consider the HDA pin number, +when choosing PCM to assign, was dropped. + +Build on this change and limit the number of PCMs created to number of +converters (= maximum number of concurrent display/receivers) when +"mst_no_extra_pcms" and "dyn_pcm_no_legacy" quirks are both set. + +Fix the check in hdmi_find_pcm_slot() to ensure only spec->pcm_used +entries are considered in the search. Elsewhere in the driver +spec->pcm_used is already checked properly. + +Doing this avoids following warning at SOF driver probe for multiple +machine drivers: + +[ 112.425297] sof_sdw sof_sdw: hda_dsp_hdmi_build_controls: no +PCM in topology for HDMI converter 4 +[ 112.425298] sof_sdw sof_sdw: hda_dsp_hdmi_build_controls: no +PCM in topology for HDMI converter 5 +[ 112.425299] sof_sdw sof_sdw: hda_dsp_hdmi_build_controls: no +PCM in topology for HDMI converter 6 + +Fixes: 13046370c4d1 ("ALSA: hda/hdmi: let new platforms assign the pcm slot dynamically") +BugLink: https://github.com/thesofproject/linux/issues/2573 +Signed-off-by: Kai Vehmanen +Link: https://lore.kernel.org/r/20220414150516.3638283-1-kai.vehmanen@linux.intel.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/pci/hda/patch_hdmi.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/sound/pci/hda/patch_hdmi.c ++++ b/sound/pci/hda/patch_hdmi.c +@@ -1397,7 +1397,7 @@ static int hdmi_find_pcm_slot(struct hdm + + last_try: + /* the last try; check the empty slots in pins */ +- for (i = 0; i < spec->num_nids; i++) { ++ for (i = 0; i < spec->pcm_used; i++) { + if (!test_bit(i, &spec->pcm_bitmap)) + return i; + } +@@ -2273,7 +2273,9 @@ static int generic_hdmi_build_pcms(struc + * dev_num is the device entry number in a pin + */ + +- if (codec->mst_no_extra_pcms) ++ if (spec->dyn_pcm_no_legacy && codec->mst_no_extra_pcms) ++ pcm_num = spec->num_cvts; ++ else if (codec->mst_no_extra_pcms) + pcm_num = spec->num_nids; + else + pcm_num = spec->num_nids + spec->dev_num - 1; diff --git a/queue-5.10/series b/queue-5.10/series index 57a3c37ddf2..d47d881da19 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -49,3 +49,4 @@ clk-imx-imx6sx-remove-the-set_rate_parent-flag-for-q.patch clk-iproc-do-not-rely-on-node-name-for-correct-pll-s.patch kvm-x86-hide-ia32_platform_dca_cap-31-0-from-the-gue.patch x86-alternative-fix-race-in-try_get_desc.patch +alsa-hda-hdmi-fix-warning-about-pcm-count-when-used-with-sof.patch -- 2.47.3