From: Peter Ujfalusi Date: Fri, 24 Nov 2023 12:40:15 +0000 (+0200) Subject: ASoC: Intel: skl_hda_dsp_generic: Drop HDMI routes when HDMI is not available X-Git-Tag: v6.6.14~693 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e1d391310724e0353ed302e57cf55f1bc056b81c;p=platform%2Fkernel%2Flinux-starfive.git ASoC: Intel: skl_hda_dsp_generic: Drop HDMI routes when HDMI is not available [ Upstream commit 3d1dc8b1030df8ca0fdfd4905c88ee10db943bf8 ] When the HDMI is not present due to disabled display support we will use dummy codec and the HDMI routes will refer to non existent DAPM widgets. Trim the route list from the HDMI routes to be able to probe the card even if the HDMI dais are not registered. Signed-off-by: Peter Ujfalusi Reviewed-by: Bard Liao Reviewed-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20231124124015.15878-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- diff --git a/sound/soc/intel/boards/skl_hda_dsp_generic.c b/sound/soc/intel/boards/skl_hda_dsp_generic.c index a06e051..70c806c 100644 --- a/sound/soc/intel/boards/skl_hda_dsp_generic.c +++ b/sound/soc/intel/boards/skl_hda_dsp_generic.c @@ -154,6 +154,8 @@ static int skl_hda_fill_card_info(struct snd_soc_acpi_mach_params *mach_params) card->dapm_widgets = skl_hda_widgets; card->num_dapm_widgets = ARRAY_SIZE(skl_hda_widgets); if (!ctx->idisp_codec) { + card->dapm_routes = &skl_hda_map[IDISP_ROUTE_COUNT]; + num_route -= IDISP_ROUTE_COUNT; for (i = 0; i < IDISP_DAI_COUNT; i++) { skl_hda_be_dai_links[i].codecs = &asoc_dummy_dlc; skl_hda_be_dai_links[i].num_codecs = 1;