From: Mark Brown Date: Thu, 8 Aug 2019 22:20:45 +0000 (+0100) Subject: Merge branch 'topic/hda-bus-ops-cleanup' of https://git.kernel.org/pub/scm/linux... X-Git-Tag: Ubuntu-5.10.0-12.13~4438^2~1^2~199 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=c2f16a94a80497e4b28c27f9ca2cd6cd60706fb6;p=mirror_ubuntu-hirsute-kernel.git Merge branch 'topic/hda-bus-ops-cleanup' of https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound into asoc-5.4 --- c2f16a94a80497e4b28c27f9ca2cd6cd60706fb6 diff --cc sound/soc/intel/skylake/skl.c index c847d5241672,c6d8076dc2fd..141dbbf975ac --- a/sound/soc/intel/skylake/skl.c +++ b/sound/soc/intel/skylake/skl.c @@@ -858,11 -854,10 +858,10 @@@ out_err * constructor */ static int skl_create(struct pci_dev *pci, - const struct hdac_io_ops *io_ops, - struct skl **rskl) + struct skl_dev **rskl) { struct hdac_ext_bus_ops *ext_ops = NULL; - struct skl *skl; + struct skl_dev *skl; struct hdac_bus *bus; struct hda_bus *hbus; int err; diff --cc sound/soc/sof/intel/hda-dsp.c index fb55a3c5afd0,8d4ce5b4febd..097727cda5cb --- a/sound/soc/sof/intel/hda-dsp.c +++ b/sound/soc/sof/intel/hda-dsp.c @@@ -354,11 -352,46 +354,50 @@@ static int hda_resume(struct snd_sof_de return ret; } + hda_dsp_ctrl_misc_clock_gating(sdev, false); + + /* Reset stream-to-link mapping */ + list_for_each_entry(hlink, &bus->hlink_list, list) + writel(0, hlink->ml_addr + AZX_REG_ML_LOSIDV); + + hda_dsp_ctrl_misc_clock_gating(sdev, true); + #else + + hda_dsp_ctrl_misc_clock_gating(sdev, false); + + /* reset controller */ + ret = hda_dsp_ctrl_link_reset(sdev, true); + if (ret < 0) { + dev_err(sdev->dev, + "error: failed to reset controller during resume\n"); + return ret; + } + + /* take controller out of reset */ + ret = hda_dsp_ctrl_link_reset(sdev, false); + if (ret < 0) { + dev_err(sdev->dev, + "error: failed to ready controller during resume\n"); + return ret; + } + + /* enable hda bus irq */ + 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); + + hda_dsp_ctrl_misc_clock_gating(sdev, true); + #endif + + /* enable ppcap interrupt */ + hda_dsp_ctrl_ppcap_enable(sdev, true); + hda_dsp_ctrl_ppcap_int_enable(sdev, true); + #if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA) + /* check jack status */ + if (runtime_resume) + hda_codec_jack_check(sdev); + /* turn off the links that were off before suspend */ list_for_each_entry(hlink, &bus->hlink_list, list) { if (!hlink->ref_count)