Skip to contentSkip to conversation

ASoC: Intel: add HDMI-In DAI link support to skl_hda_dsp_generic

PATCH New Bard Liao 1 participant 4 messages Nov 22

Subsystems (3)
lore
Share & tools
lore

Bard Liao

author maintainer
#0 lore raw

cover ASoC: Intel: add HDMI-In DAI link support to skl_hda_dsp_generic

This series adds HDMI-In capture DAI link support to the skl_hda_dsp_generic machine driver, and prepares skl_hda_dsp_generic and sof_sdw for HDMI-In links.

Patch 1 adds HDMI_IN to SOF_LINK_ORDER. The HDMI-In DAI links are then created when SSP_MASK_HDMI_CAPTURE is set in board_quirk.

Patches 2 and 3 prepare for HDMI-In. So far all HDMI PCMs have been HDMI playback, so matching "HDMI" in the name was enough to ignore them when iDisp is absent. HDMI-In links are named SSP%d-HDMI, and their stream_name may contain "HDMI" as well. The check would therefore also ignore the HDMI-In capture link. These patches limit it to playback FE links, which excludes BE and capture-only links. Patch 2 changes skl_hda_dsp_generic and patch 3 changes sof_sdw.

Bard Liao (3):
ASoC: Intel: skl_hda_dsp_generic: add HDMI IN DAI link support
ASoC: Intel: skl_hda_dsp_generic: Limit HDMI ignore to playback FE
ASoC: Intel: sof_sdw: Limit HDMI ignore to playback FE

 sound/soc/intel/boards/skl_hda_dsp_generic.c | 8 +++++---
 sound/soc/intel/boards/sof_sdw.c             | 3 ++-
 2 files changed, 7 insertions(+), 4 deletions(-)
Signature · 1 line
2.43.0
author maintainer
#1 lore raw

PATCH 1/3 ASoC: Intel: skl_hda_dsp_generic: add HDMI IN DAI link support

Add HDMI_IN to SOF_LINK_ORDER so that the HDMI IN dai links will be createrd if SSP_MASK_HDMI_CAPTURE is set to board_quirk.

---
 sound/soc/intel/boards/skl_hda_dsp_generic.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
sound/soc/intel/boards/skl_hda_dsp_generic.c +3 -2
index 34c8b7fec3ae..e7f5869ff12e 100644
@@ -53,13 +53,14 @@ static void skl_set_hda_codec_autosuspend_delay(struct snd_soc_card *card)
 #define DMIC01_BE_ID		6
 #define DMIC16K_BE_ID		7
 #define BT_OFFLOAD_BE_ID	8
+#define HDMI_IN_BE_ID		13
 
 #define HDA_LINK_ORDER	SOF_LINK_ORDER(SOF_LINK_IDISP_HDMI,  \
 				       SOF_LINK_HDA,        \
 				       SOF_LINK_DMIC01,     \
 				       SOF_LINK_DMIC16K,    \
 				       SOF_LINK_BT_OFFLOAD, \
-				       SOF_LINK_NONE,       \
+				       SOF_LINK_HDMI_IN,    \
 				       SOF_LINK_NONE)
 
 #define HDA_LINK_IDS	SOF_LINK_ORDER(IDISP_HDMI_BE_ID,  \
@@ -67,7 +68,7 @@ static void skl_set_hda_codec_autosuspend_delay(struct snd_soc_card *card)
 				       DMIC01_BE_ID,     \
 				       DMIC16K_BE_ID,    \
 				       BT_OFFLOAD_BE_ID, \
-				       0,                \
+				       HDMI_IN_BE_ID,    \
 				       0)
 
 static unsigned long
Signature · 1 line
2.43.0
author maintainer
#2 lore raw

PATCH 2/3 ASoC: Intel: skl_hda_dsp_generic: Limit HDMI ignore to playback FE

In reply to Bard Liao

When iDisp is absent, limit the HDMI ignore check to playback FE links.

HDMI-In links use names such as SSP%d-HDMI, and their stream_name may contain HDMI as well. Excluding BE and capture-only links prevents the HDMI-In capture link from being ignored.

---
 sound/soc/intel/boards/skl_hda_dsp_generic.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
sound/soc/intel/boards/skl_hda_dsp_generic.c +2 -1
index e7f5869ff12e..3c86bb6546dc 100644
@@ -92,7 +92,8 @@ static int skl_hda_add_dai_link(struct snd_soc_card *card,
 	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)
+	if (strstr(link->stream_name, "HDMI") && !link->no_pcm &&
+	    !link->capture_only && !ctx->hdmi.idisp_codec)
 		link->ignore = true;
 
 	return 0;
Signature · 1 line
2.43.0
author maintainer
#3 lore raw

PATCH 3/3 ASoC: Intel: sof_sdw: Limit HDMI ignore to playback FE

In reply to Bard Liao

When iDisp is absent, limit the HDMI ignore check to playback FE links.

HDMI-In links use names such as SSP%d-HDMI, and their stream_name may contain HDMI as well. Excluding BE and capture-only links prevents the HDMI-In capture link from being ignored.

---
 sound/soc/intel/boards/sof_sdw.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
sound/soc/intel/boards/sof_sdw.c +2 -1
index 1e5de71c0f21..b3e88dce0c25 100644
@@ -1447,7 +1447,8 @@ static int sof_sdw_add_dai_link(struct snd_soc_card *card,
 	struct intel_mc_ctx *intel_ctx = (struct intel_mc_ctx *)ctx->private;
 
 	/* Ignore the HDMI PCM link if iDisp is not present */
-	if (strstr(link->stream_name, "HDMI") && !intel_ctx->hdmi.idisp_codec)
+	if (strstr(link->stream_name, "HDMI") && !link->no_pcm &&
+	    !link->capture_only && !intel_ctx->hdmi.idisp_codec)
 		link->ignore = true;
 
 	return 0;
Signature · 1 line
2.43.0