From patchwork Fri Sep 29 11:24:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= X-Patchwork-Id: 727635 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6CDB9E80ABE for ; Fri, 29 Sep 2023 11:27:37 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 75C94DF6; Fri, 29 Sep 2023 13:26:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 75C94DF6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1695986855; bh=y6Mwcl6axdFMs+v5QocUpeNfVhM+JKBzo1ifiiJ1gB0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Y1pix0IAF/fDHCk3qWGW8PB5U30mxl1JYWXIRYiulUiTxwVvWU2BimLwENo3FjACI /exdji5NDACMpHRNU2IqgB9OdXFwlN3dXqzs8xB+sT9NS+Y7wEvLS/a4QGigbhEnf/ En9fa9mYPxVHf2Net6irRFdp1u8p11xpFaOJSyy4= Received: by alsa1.perex.cz (Postfix, from userid 50401) id D4798F805B3; Fri, 29 Sep 2023 13:25:10 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 37A50F805B5; Fri, 29 Sep 2023 13:25:10 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 87493F8055B; Fri, 29 Sep 2023 13:24:58 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 8F559F80549 for ; Fri, 29 Sep 2023 13:24:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8F559F80549 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=LmQ3tTfd DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695986681; x=1727522681; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=y6Mwcl6axdFMs+v5QocUpeNfVhM+JKBzo1ifiiJ1gB0=; b=LmQ3tTfdNFmAUqmtAdziZ+dcdlOpR2H49RkqIAeCBjXZcvgrjt1tTB1L Q8+bzEojj1oHSEilx7VgbjFdmUi0KzU/lxytE2+bxp7ql7b6Vjh70oZ9o O8duQNlH7f0O9pJlSBPgpEjj6hqZSqZ3QxxjtzGi8V7MXtjxTgva3VVLu i8e1PK6UvOgY1o5yOijI+wlcCPCi3CkueRMRJ7kFHQ5WLARfCevUGUedb ng0AFuGRcJm3K63M+j2NVaZAwutIaSANUlC9dFYoFVeScJfrmIg6yyZbX Pin2d4MKO6L3kJ2X44jdkuaLLSLtQi5htdT6MK4Sjld86Guk3IFT8XMhB g==; X-IronPort-AV: E=McAfee;i="6600,9927,10847"; a="880261" X-IronPort-AV: E=Sophos;i="6.03,187,1694761200"; d="scan'208";a="880261" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2023 04:24:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10847"; a="753353760" X-IronPort-AV: E=Sophos;i="6.03,187,1694761200"; d="scan'208";a="753353760" Received: from dev2 (HELO DEV2.igk.intel.com) ([10.237.148.94]) by fmsmga007.fm.intel.com with ESMTP; 29 Sep 2023 04:24:35 -0700 From: =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= To: Mark Brown Cc: Cezary Rojewski , Takashi Iwai , Jaroslav Kysela , alsa-devel@alsa-project.org, Wu Zhou , Libin Yang , =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= Subject: [PATCH 5/6] ASoC: Intel: avs: Disable DSP before loading basefw Date: Fri, 29 Sep 2023 13:24:35 +0200 Message-Id: <20230929112436.787058-6-amadeuszx.slawinski@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230929112436.787058-1-amadeuszx.slawinski@linux.intel.com> References: <20230929112436.787058-1-amadeuszx.slawinski@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: XEVE4MOMS2ILJFIDDULFFD5I4LAKDXYO X-Message-ID-Hash: XEVE4MOMS2ILJFIDDULFFD5I4LAKDXYO X-MailFrom: amadeuszx.slawinski@linux.intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Wu Zhou 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 --- 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 56bb0a59249d..65dd8f140fc1 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);