[5/5] ASoC: SOF: Intel: hda: call codec wake at chip init
diff mbox series

Message ID 20200325211233.27394-6-pierre-louis.bossart@linux.intel.com
State Accepted
Commit 7e26df0ced1643679922d197e798d469ac3bf9c0
Headers show
  • ASoC: SOF: cleanups and improvements
Related show

Commit Message

Pierre-Louis Bossart March 25, 2020, 9:12 p.m. UTC
From: Kai Vehmanen <kai.vehmanen@linux.intel.com>

Further align HDA init sequence to the legacy non-DSP HDA driver by
calling snd_hdac_set_codec_wakeup() during the chip init sequence.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
 sound/soc/sof/intel/hda-ctrl.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff mbox series

diff --git a/sound/soc/sof/intel/hda-ctrl.c b/sound/soc/sof/intel/hda-ctrl.c
index 93be6fc51ccd..f88dbcc4ba66 100644
--- a/sound/soc/sof/intel/hda-ctrl.c
+++ b/sound/soc/sof/intel/hda-ctrl.c
@@ -18,6 +18,7 @@ 
 #include <linux/module.h>
 #include <sound/hdaudio_ext.h>
 #include <sound/hda_register.h>
+#include <sound/hda_component.h>
 #include "../ops.h"
 #include "hda.h"
@@ -176,6 +177,9 @@  int hda_dsp_ctrl_init_chip(struct snd_sof_dev *sdev, bool full_reset)
 	if (bus->chip_init)
 		return 0;
+	snd_hdac_set_codec_wakeup(bus, true);
 	hda_dsp_ctrl_misc_clock_gating(sdev, false);
 	if (full_reset) {
@@ -271,6 +275,9 @@  int hda_dsp_ctrl_init_chip(struct snd_sof_dev *sdev, bool full_reset)
 	hda_dsp_ctrl_misc_clock_gating(sdev, true);
+	snd_hdac_set_codec_wakeup(bus, false);
 	return ret;