mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-19 08:58:32 -05:00
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> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://patch.msgid.link/20250619084222.559-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
committed by
Mark Brown
parent
2d91cb261c
commit
8659190752
@@ -85,6 +85,18 @@ skl_hda_get_board_quirk(struct snd_soc_acpi_mach_params *mach_params)
|
||||
return board_quirk;
|
||||
}
|
||||
|
||||
static int skl_hda_add_dai_link(struct snd_soc_card *card,
|
||||
struct snd_soc_dai_link *link)
|
||||
{
|
||||
struct sof_card_private *ctx = snd_soc_card_get_drvdata(card);
|
||||
|
||||
/* Ignore the HDMI PCM link if iDisp is not present */
|
||||
if (strstr(link->stream_name, "HDMI") && !ctx->hdmi.idisp_codec)
|
||||
link->ignore = true;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int skl_hda_audio_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct snd_soc_acpi_mach *mach = pdev->dev.platform_data;
|
||||
@@ -101,6 +113,7 @@ static int skl_hda_audio_probe(struct platform_device *pdev)
|
||||
card->owner = THIS_MODULE;
|
||||
card->fully_routed = true;
|
||||
card->late_probe = skl_hda_card_late_probe;
|
||||
card->add_dai_link = skl_hda_add_dai_link;
|
||||
|
||||
dev_dbg(&pdev->dev, "board_quirk = %lx\n", board_quirk);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user