]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda/hdmi: fix warning about PCM count when used with SOF
authorKai Vehmanen <kai.vehmanen@linux.intel.com>
Thu, 14 Apr 2022 15:05:16 +0000 (18:05 +0300)
committerTakashi Iwai <tiwai@suse.de>
Fri, 15 Apr 2022 07:21:02 +0000 (09:21 +0200)
commitd5da0ddd5bb7855b3d80767d891b3e34adcd6092
tree02c8ba90e5caa181521667edb2342574c9b9c569
parent632b4e6c14e6f6c84b1297ae23f324325f408674
ALSA: hda/hdmi: fix warning about PCM count when used with SOF

With commit 2dd2d8369845 ("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: 2dd2d8369845 ("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@linux.intel.com>
Link: https://lore.kernel.org/r/20220414150516.3638283-1-kai.vehmanen@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_hdmi.c