Patch "ALSA: hda/hdmi: fix warning about PCM count when used with SOF" has been added to the 5.17-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ALSA: hda/hdmi: fix warning about PCM count when used with SOF

to the 5.17-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     alsa-hda-hdmi-fix-warning-about-pcm-count-when-used-.patch
and it can be found in the queue-5.17 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit e8d3d2980b3d6c00ced5e204a2baad312673e3b0
Author: Kai Vehmanen <kai.vehmanen@xxxxxxxxxxxxxxx>
Date:   Thu Apr 14 18:05:16 2022 +0300

    ALSA: hda/hdmi: fix warning about PCM count when used with SOF
    
    [ Upstream commit c74193787b2f683751a67603fb5f15c7584f355f ]
    
    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 <kai.vehmanen@xxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20220414150516.3638283-1-kai.vehmanen@xxxxxxxxxxxxxxx
    Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index cf4f277dccdd..26637a695979 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -1387,7 +1387,7 @@ static int hdmi_find_pcm_slot(struct hdmi_spec *spec,
 
  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;
 	}
@@ -2263,7 +2263,9 @@ static int generic_hdmi_build_pcms(struct hda_codec *codec)
 	 * 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;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux