All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cezary Rojewski <cezary.rojewski@intel.com>
To: alsa-devel@alsa-project.org, broonie@kernel.org
Cc: pierre-louis.bossart@linux.intel.com,
	Cezary Rojewski <cezary.rojewski@intel.com>,
	upstream@semihalf.com, rad@semihalf.com, tiwai@suse.com,
	hdegoede@redhat.com, amadeuszx.slawinski@linux.intel.com,
	cujomalainey@chromium.org, lma@semihalf.com
Subject: [PATCH v2 5/6] ASoC: Intel: Skylake: Fix driver hang during shutdown
Date: Mon,  5 Dec 2022 09:53:29 +0100	[thread overview]
Message-ID: <20221205085330.857665-6-cezary.rojewski@intel.com> (raw)
In-Reply-To: <20221205085330.857665-1-cezary.rojewski@intel.com>

AudioDSP cores and HDAudio links need to be turned off on shutdown to
ensure no communication or data transfer occurs during the procedure.

Fixes: c5a76a246989 ("ASoC: Intel: Skylake: Add shutdown callback")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
---
 sound/soc/intel/skylake/skl.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c
index 9bd9f9866898..998bd0232cf1 100644
--- a/sound/soc/intel/skylake/skl.c
+++ b/sound/soc/intel/skylake/skl.c
@@ -1107,7 +1107,10 @@ static void skl_shutdown(struct pci_dev *pci)
 	if (!skl->init_done)
 		return;
 
-	snd_hdac_stop_streams_and_chip(bus);
+	snd_hdac_stop_streams(bus);
+	snd_hdac_ext_bus_link_power_down_all(bus);
+	skl_dsp_sleep(skl->dsp);
+
 	list_for_each_entry(s, &bus->stream_list, list) {
 		stream = stream_to_hdac_ext_stream(s);
 		snd_hdac_ext_stream_decouple(bus, stream, false);
-- 
2.25.1


  parent reply	other threads:[~2022-12-05  8:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-05  8:53 [PATCH v2 0/6] ASoC: Intel: Skylake: Topology and shutdown fixes Cezary Rojewski
2022-12-05  8:53 ` [PATCH v2 1/6] ASoC: Intel: Skylake: Update pipe_config_idx before filling BE params Cezary Rojewski
2022-12-05  8:53 ` [PATCH v2 2/6] ASoC: Intel: Skylake: Remove skl_tplg_is_multi_fmt() Cezary Rojewski
2022-12-05  8:53 ` [PATCH v2 3/6] ASoC: Intel: Skylake: Drop pipe_config_idx Cezary Rojewski
2022-12-05  8:53 ` [PATCH v2 4/6] ASoC: Intel: Skylake: Introduce single place for pipe-config selection Cezary Rojewski
2022-12-05  8:53 ` Cezary Rojewski [this message]
2022-12-05  8:53 ` [PATCH v2 6/6] ASoC: Intel: Skylake: Use SG allocation for SKL-based firmware load Cezary Rojewski
2022-12-05 10:29 ` [PATCH v2 0/6] ASoC: Intel: Skylake: Topology and shutdown fixes Lukasz Majczak
2022-12-07 17:37 ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221205085330.857665-6-cezary.rojewski@intel.com \
    --to=cezary.rojewski@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=amadeuszx.slawinski@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=cujomalainey@chromium.org \
    --cc=hdegoede@redhat.com \
    --cc=lma@semihalf.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=rad@semihalf.com \
    --cc=tiwai@suse.com \
    --cc=upstream@semihalf.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.