summaryrefslogtreecommitdiff
path: root/sound/soc/intel/boards/skl_hda_dsp_common.h
diff options
context:
space:
mode:
authorKai Vehmanen <kai.vehmanen@linux.intel.com>2020-02-20 20:10:27 +0300
committerMark Brown <broonie@kernel.org>2020-02-20 23:28:44 +0300
commitd2ad9d6ca5b2435754a0fd811f57d30914c612ce (patch)
treebd5a3e9aae4a758a9500efe237615a9127b01e55 /sound/soc/intel/boards/skl_hda_dsp_common.h
parentdc7f090d9ab2f36fc404f8d903f806a1b811739e (diff)
downloadlinux-d2ad9d6ca5b2435754a0fd811f57d30914c612ce.tar.xz
ASoC: intel/skl/hda - add no-HDMI cases to generic HDA driver
Extend the generic HDA driver to support systems where iDisp/HDMI audio codecs are disabled for some reason. Switch codecs to SoC dummy in the affected DAI links. This allows to reuse existing topologies for this case. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=206085 BugLink: https://bugzilla.opensuse.org/show_bug.cgi?id=1163677 BugLink: https://github.com/thesofproject/linux/issues/1658 Link: https://lore.kernel.org/r/20200220171028.22023-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/boards/skl_hda_dsp_common.h')
-rw-r--r--sound/soc/intel/boards/skl_hda_dsp_common.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/intel/boards/skl_hda_dsp_common.h b/sound/soc/intel/boards/skl_hda_dsp_common.h
index d6150670ca05..e8545d13062f 100644
--- a/sound/soc/intel/boards/skl_hda_dsp_common.h
+++ b/sound/soc/intel/boards/skl_hda_dsp_common.h
@@ -49,6 +49,10 @@ static inline int skl_hda_hdmi_build_controls(struct snd_soc_card *card)
struct snd_soc_component *component;
struct skl_hda_hdmi_pcm *pcm;
+ /* HDMI disabled, do not create controls */
+ if (list_empty(&ctx->hdmi_pcm_list))
+ return 0;
+
pcm = list_first_entry(&ctx->hdmi_pcm_list, struct skl_hda_hdmi_pcm,
head);
component = pcm->codec_dai->component;