From patchwork Fri Apr 5 09:09:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 786508 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 13198C67861 for ; Fri, 5 Apr 2024 09:14:49 +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 355B02D4C; Fri, 5 Apr 2024 11:14:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 355B02D4C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1712308487; bh=lBShL+hehblXjeItUaZJSU0+d9b1UISWY/cyd8pfpqg=; 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=AI7BlB916o2J+T9rkPOie6lRTJNNgoL004UheWP/8TeC2Cu5BTEn2gyMN3AKwgWsy 0utO+HyV49XGlwrTuv2S1VOx6KOirGYADxkw+tCtKUJte3nmuT19KAN+i3KRu0uvil MPZPC/OSCElSqZRBfkLl9VcwS4+iRtirKB4/wEKY= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 46BE5F8086C; Fri, 5 Apr 2024 11:11:02 +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 C8200F805C1; Fri, 5 Apr 2024 11:11:01 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4FD0CF807D0; Fri, 5 Apr 2024 11:10:56 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (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 191E2F8056F for ; Fri, 5 Apr 2024 11:08:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 191E2F8056F 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=ju15g2ro DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712308104; x=1743844104; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=lBShL+hehblXjeItUaZJSU0+d9b1UISWY/cyd8pfpqg=; b=ju15g2ro25O8t99i6SqpXgiNX3wBXSZaMhKe4ue+n2+PhfyO+sVdTmz/ MMiM/xTkKitVa+EHRGXVLvW58rP/8HxLyqjriHL/DPMwpwFVSup8Q9+7R P1HrkywDi+6FOaKcoGIILH+QjxXgspr6bTk2jYrbTB6naTqS+Ef7zJRgG cA1K5G5va2VNyqA5DgPOuh66JPt7DtBcj8A3THrfs7jGXHu6iKE6mkBSn I4G46g2Xe4mIdKZ7Yf2HS1xKgjYR5pb4Nlhd118w4KF9oobPqv0tAQvEE 3oOs+h/YUiXGmvsf6OeTHLsJnZGTBYjgwgkUFByNAuOKED7JsxUgOYN8M w==; X-CSE-ConnectionGUID: YW66/blgTXWmlVfHXCqZiQ== X-CSE-MsgGUID: 1/VnCZAZSs6xDNh53UrXMw== X-IronPort-AV: E=McAfee;i="6600,9927,11034"; a="7787460" X-IronPort-AV: E=Sophos;i="6.07,181,1708416000"; d="scan'208";a="7787460" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Apr 2024 02:08:22 -0700 X-CSE-ConnectionGUID: cGhFZmbzQvu/P6HmVY4FtQ== X-CSE-MsgGUID: wFPh7wH6Q/CZtRYYpiEwyw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,181,1708416000"; d="scan'208";a="19042437" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by orviesa009.jf.intel.com with ESMTP; 05 Apr 2024 02:08:20 -0700 From: Cezary Rojewski To: broonie@kernel.org Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, tiwai@suse.com, perex@perex.cz, amadeuszx.slawinski@linux.intel.com, hdegoede@redhat.com, Cezary Rojewski Subject: [PATCH 08/13] ASoC: Intel: avs: Test result of avs_get_module_entry() Date: Fri, 5 Apr 2024 11:09:24 +0200 Message-Id: <20240405090929.1184068-9-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240405090929.1184068-1-cezary.rojewski@intel.com> References: <20240405090929.1184068-1-cezary.rojewski@intel.com> MIME-Version: 1.0 Message-ID-Hash: LSTUI6KMOU3THPCTAZNWRTCSYOKKQCR3 X-Message-ID-Hash: LSTUI6KMOU3THPCTAZNWRTCSYOKKQCR3 X-MailFrom: cezary.rojewski@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.9 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: While PROBE_MOD_UUID is always part of the base AudioDSP firmware manifest, from maintenance point of view it is better to check the result. Fixes: dab8d000e25c ("ASoC: Intel: avs: Add data probing requests") Signed-off-by: Cezary Rojewski --- sound/soc/intel/avs/probes.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sound/soc/intel/avs/probes.c b/sound/soc/intel/avs/probes.c index 817e543036f2..7e781a315690 100644 --- a/sound/soc/intel/avs/probes.c +++ b/sound/soc/intel/avs/probes.c @@ -19,8 +19,11 @@ static int avs_dsp_init_probe(struct avs_dev *adev, union avs_connector_node_id struct avs_probe_cfg cfg = {{0}}; struct avs_module_entry mentry; u8 dummy; + int ret; - avs_get_module_entry(adev, &AVS_PROBE_MOD_UUID, &mentry); + ret = avs_get_module_entry(adev, &AVS_PROBE_MOD_UUID, &mentry); + if (ret) + return ret; /* * Probe module uses no cycles, audio data format and input and output @@ -39,11 +42,12 @@ static int avs_dsp_init_probe(struct avs_dev *adev, union avs_connector_node_id static void avs_dsp_delete_probe(struct avs_dev *adev) { struct avs_module_entry mentry; + int ret; - avs_get_module_entry(adev, &AVS_PROBE_MOD_UUID, &mentry); - - /* There is only ever one probe module instance. */ - avs_dsp_delete_module(adev, mentry.module_id, 0, INVALID_PIPELINE_ID, 0); + ret = avs_get_module_entry(adev, &AVS_PROBE_MOD_UUID, &mentry); + if (!ret) + /* There is only ever one probe module instance. */ + avs_dsp_delete_module(adev, mentry.module_id, 0, INVALID_PIPELINE_ID, 0); } static inline struct hdac_ext_stream *avs_compr_get_host_stream(struct snd_compr_stream *cstream)