ASoC: SOF: Intel: hda: use the SOF defined ppcap functions
Unify ppcap function setup by using SOF common functions for both HDA and non-HDA cases. Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
7fd572e7d3
commit
24b6ff686f
@ -307,18 +307,14 @@ static int hda_suspend(struct snd_sof_dev *sdev, int state)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)
|
|
||||||
/* disable ppcap interrupt */
|
|
||||||
snd_hdac_ext_bus_ppcap_int_enable(bus, false);
|
|
||||||
snd_hdac_ext_bus_ppcap_enable(bus, false);
|
|
||||||
|
|
||||||
/* disable hda bus irq and i/o */
|
|
||||||
snd_hdac_bus_stop_chip(bus);
|
|
||||||
#else
|
|
||||||
/* disable ppcap interrupt */
|
/* disable ppcap interrupt */
|
||||||
hda_dsp_ctrl_ppcap_enable(sdev, false);
|
hda_dsp_ctrl_ppcap_enable(sdev, false);
|
||||||
hda_dsp_ctrl_ppcap_int_enable(sdev, false);
|
hda_dsp_ctrl_ppcap_int_enable(sdev, false);
|
||||||
|
|
||||||
|
#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)
|
||||||
|
/* disable hda bus irq and i/o */
|
||||||
|
snd_hdac_bus_stop_chip(bus);
|
||||||
|
#else
|
||||||
/* disable hda bus irq */
|
/* disable hda bus irq */
|
||||||
snd_sof_dsp_update_bits(sdev, HDA_DSP_HDA_BAR, SOF_HDA_INTCTL,
|
snd_sof_dsp_update_bits(sdev, HDA_DSP_HDA_BAR, SOF_HDA_INTCTL,
|
||||||
SOF_HDA_INT_CTRL_EN | SOF_HDA_INT_GLOBAL_EN,
|
SOF_HDA_INT_CTRL_EN | SOF_HDA_INT_GLOBAL_EN,
|
||||||
@ -370,10 +366,6 @@ static int hda_resume(struct snd_sof_dev *sdev)
|
|||||||
bus->io_ops->reg_writel(0, hlink->ml_addr + AZX_REG_ML_LOSIDV);
|
bus->io_ops->reg_writel(0, hlink->ml_addr + AZX_REG_ML_LOSIDV);
|
||||||
|
|
||||||
hda_dsp_ctrl_misc_clock_gating(sdev, true);
|
hda_dsp_ctrl_misc_clock_gating(sdev, true);
|
||||||
|
|
||||||
/* enable ppcap interrupt */
|
|
||||||
snd_hdac_ext_bus_ppcap_enable(bus, true);
|
|
||||||
snd_hdac_ext_bus_ppcap_int_enable(bus, true);
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
hda_dsp_ctrl_misc_clock_gating(sdev, false);
|
hda_dsp_ctrl_misc_clock_gating(sdev, false);
|
||||||
@ -400,11 +392,11 @@ static int hda_resume(struct snd_sof_dev *sdev)
|
|||||||
SOF_HDA_INT_CTRL_EN | SOF_HDA_INT_GLOBAL_EN);
|
SOF_HDA_INT_CTRL_EN | SOF_HDA_INT_GLOBAL_EN);
|
||||||
|
|
||||||
hda_dsp_ctrl_misc_clock_gating(sdev, true);
|
hda_dsp_ctrl_misc_clock_gating(sdev, true);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* enable ppcap interrupt */
|
/* enable ppcap interrupt */
|
||||||
hda_dsp_ctrl_ppcap_enable(sdev, true);
|
hda_dsp_ctrl_ppcap_enable(sdev, true);
|
||||||
hda_dsp_ctrl_ppcap_int_enable(sdev, true);
|
hda_dsp_ctrl_ppcap_int_enable(sdev, true);
|
||||||
#endif
|
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)
|
#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)
|
||||||
/* turn off the links that were off before suspend */
|
/* turn off the links that were off before suspend */
|
||||||
|
Loading…
Reference in New Issue
Block a user