Skip to content

Commit db638a5

Browse files
committed
ASoC: Intel: skl_hda_dsp_generic: Implement add_dai_link to filter HDMI PCMs
If the system does not have iDisp codec then mark the HDMI PCM link as ignore. This ensures that HDMI PCMs will not be created when there is no iDisp codec available. When iDisp codec is not present and the HDMI PCMs were created they were not operational, all operations would fail on them. With this patch it is possible to load the topology with HDMI links, but gives the ability to ignore them and thus prevent the creation of the nonworking PCM devices. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
1 parent a356847 commit db638a5

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

sound/soc/intel/boards/skl_hda_dsp_generic.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,18 @@ skl_hda_get_board_quirk(struct snd_soc_acpi_mach_params *mach_params)
8585
return board_quirk;
8686
}
8787

88+
static int skl_hda_add_dai_link(struct snd_soc_card *card,
89+
struct snd_soc_dai_link *link)
90+
{
91+
struct sof_card_private *ctx = snd_soc_card_get_drvdata(card);
92+
93+
/* Ignore the HDMI PCM link if iDisp is not present */
94+
if (strstr(link->stream_name, "HDMI") && !ctx->hdmi.idisp_codec)
95+
link->ignore = true;
96+
97+
return 0;
98+
}
99+
88100
static int skl_hda_audio_probe(struct platform_device *pdev)
89101
{
90102
struct snd_soc_acpi_mach *mach = pdev->dev.platform_data;
@@ -101,6 +113,7 @@ static int skl_hda_audio_probe(struct platform_device *pdev)
101113
card->owner = THIS_MODULE;
102114
card->fully_routed = true;
103115
card->late_probe = skl_hda_card_late_probe;
116+
card->add_dai_link = skl_hda_add_dai_link;
104117

105118
dev_dbg(&pdev->dev, "board_quirk = %lx\n", board_quirk);
106119

0 commit comments

Comments
 (0)