From a5e6ea01265e9ed9ab8511907ebbc82552cd2e9e Mon Sep 17 00:00:00 2001 From: Wu Zhou Date: Fri, 29 Sep 2023 13:24:35 +0200 Subject: [PATCH] ASoC: Intel: avs: Disable DSP before loading basefw MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When audio controller is passed-through to the guest machine in virtualized environment, the basefw load will fail the next time guest OS reboots. Disable the DSP main core before loading the base firmware to sanitize the environment. Signed-off-by: Wu Zhou Signed-off-by: Libin Yang Signed-off-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20230929112436.787058-6-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown --- sound/soc/intel/avs/loader.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sound/soc/intel/avs/loader.c b/sound/soc/intel/avs/loader.c index 56bb0a59249d5..65dd8f140fc1e 100644 --- a/sound/soc/intel/avs/loader.c +++ b/sound/soc/intel/avs/loader.c @@ -662,6 +662,10 @@ int avs_dsp_first_boot_firmware(struct avs_dev *adev) } } + ret = avs_dsp_core_disable(adev, AVS_MAIN_CORE_MASK); + if (ret < 0) + return ret; + ret = avs_dsp_boot_firmware(adev, true); if (ret < 0) { dev_err(adev->dev, "firmware boot failed: %d\n", ret); -- 2.30.2