summaryrefslogtreecommitdiffstats
path: root/sound/soc/sof
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2019-09-09 14:55:18 +0100
committerMark Brown <broonie@kernel.org>2019-09-09 14:55:18 +0100
commit6652ddbb5d83ecfc2591b92be063519714e40ebf (patch)
treeb1d088382aadb792e703b2f4035e0fc6584ca3c1 /sound/soc/sof
parentf74c2bb98776e2de508f4d607cd519873065118e (diff)
parent73681f4f1426847b421649c6aa6c2dc303acc7c8 (diff)
downloadlinux-6652ddbb5d83ecfc2591b92be063519714e40ebf.tar.gz
linux-6652ddbb5d83ecfc2591b92be063519714e40ebf.tar.bz2
linux-6652ddbb5d83ecfc2591b92be063519714e40ebf.zip
Merge branch 'asoc-5.3' into asoc-linus
Diffstat (limited to 'sound/soc/sof')
-rw-r--r--sound/soc/sof/intel/hda.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c
index 7f665392618f..ae50839fddfe 100644
--- a/sound/soc/sof/intel/hda.c
+++ b/sound/soc/sof/intel/hda.c
@@ -329,10 +329,23 @@ static int hda_init_caps(struct snd_sof_dev *sdev)
if (bus->ppcap)
dev_dbg(sdev->dev, "PP capability, will probe DSP later.\n");
+#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)
+ /* init i915 and HDMI codecs */
+ ret = hda_codec_i915_init(sdev);
+ if (ret < 0) {
+ dev_err(sdev->dev, "error: init i915 and HDMI codec failed\n");
+ return ret;
+ }
+#endif
+
+ /* Init HDA controller after i915 init */
ret = hda_dsp_ctrl_init_chip(sdev, true);
if (ret < 0) {
dev_err(bus->dev, "error: init chip failed with ret: %d\n",
ret);
+#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)
+ hda_codec_i915_exit(sdev);
+#endif
return ret;
}
@@ -340,13 +353,6 @@ static int hda_init_caps(struct snd_sof_dev *sdev)
if (bus->mlcap)
snd_hdac_ext_bus_get_ml_capabilities(bus);
- /* init i915 and HDMI codecs */
- ret = hda_codec_i915_init(sdev);
- if (ret < 0) {
- dev_err(sdev->dev, "error: no HDMI audio devices found\n");
- return ret;
- }
-
/* codec detection */
if (!bus->codec_mask) {
dev_info(bus->dev, "no hda codecs found!\n");