]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ASoC: Intel: Skylake: Fix driver hang during shutdown
authorCezary Rojewski <cezary.rojewski@intel.com>
Mon, 5 Dec 2022 08:53:29 +0000 (09:53 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:41:39 +0000 (11:41 +0100)
[ Upstream commit 82b338c10a550a7074570b1f42c598f7cc9d08e7 ]

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

Fixes: 850e694fff31 ("ASoC: Intel: Skylake: Add shutdown callback")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Tested-by: Lukasz Majczak <lma@semihlaf.com>
Link: https://lore.kernel.org/r/20221205085330.857665-6-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/intel/skylake/skl.c

index dc6937a59443fb63e92a82b418801ddcc99b2b7c..80cff74c23af0e7425ad6080e60dca292137b05a 100644 (file)
@@ -1116,7 +1116,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);