From patchwork Thu Jan 9 12:22:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 13932442 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1FD9B217641 for ; Thu, 9 Jan 2025 12:08:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736424495; cv=none; b=qO63umrrjaeTSIMZXyQrRVv4IHOJMU5opxe0jPUrHnStXWS+/SXvZTv9/HvXZCGTfmTktkci3Km3UhvUCmH1w9B+LfCFgQUDxa7XeUgqGhsvYURCr/gAdGSia9YZ94INIx5fOAZqH7agcESUmc/FCigw9UcqiEHVrZ3WvbcYHmg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736424495; c=relaxed/simple; bh=NYTgj4in9aBGoh4IsdOAZ9NY0x/JqpZ4WxctqueYYNo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ccKmSJQ9lrZ/RdpiS+9u4aVb+2zq+fneTsaAGqzQDEaVGsZsL7S21S8OuJqm21/t8CHQvDqtZ1+X0K6ioMhUBYNcWrFqfCFxMeSVlYOwPTH3lN19ihS+6sj7kpfuIfqf10gR569ziwzwc3kcO3wBX/CXmGmnbtO9dAKnpI6IzSQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=epVDDs4v; arc=none smtp.client-ip=198.175.65.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="epVDDs4v" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1736424494; x=1767960494; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=NYTgj4in9aBGoh4IsdOAZ9NY0x/JqpZ4WxctqueYYNo=; b=epVDDs4vgL8SGuYGte8QhbUwrgvnb2Xxt6J1N1k9j9VrkOXNSdqL+mzC Gqv7G67If9j9Z3uFe6AtuJJHXaMlqXVsMNz1VEAfwd2fn443oT0v9N8iI IYSqmMkftCiXAuBz5Z5CsiMuWgy9YTVCLh2IdXKnmjd3e3HLcm/Rx82cd hytm0nBrCIUguyzHou+WnrHqfrkLvefkehLdVaZEog+MJbBZu7yPuZ3aI fk9dYBwtH/QvfRUj9o41EzChWueJJKT7iEUno3ORJoyGvlo72AHmiPIdS RucakI4hEUjELOERNzMiTK6LBbsPD1/M98QbyHFXZbMeMB8CRP05xAo9T g==; X-CSE-ConnectionGUID: lSzVcppBQsGWV3gutGMgxw== X-CSE-MsgGUID: +PBsEiCDQlmr1fXbvsgPDQ== X-IronPort-AV: E=McAfee;i="6700,10204,11309"; a="47179550" X-IronPort-AV: E=Sophos;i="6.12,301,1728975600"; d="scan'208";a="47179550" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2025 04:08:12 -0800 X-CSE-ConnectionGUID: 31K/nXNYRhW7F0HztM7eRA== X-CSE-MsgGUID: Qebgs85LQde095Yk+14nOg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="140710265" Received: from crojewsk-ctrl.igk.intel.com ([10.237.149.254]) by orviesa001.jf.intel.com with ESMTP; 09 Jan 2025 04:08:10 -0800 From: Cezary Rojewski To: broonie@kernel.org Cc: linux-sound@vger.kernel.org, tiwai@suse.com, perex@perex.cz, amadeuszx.slawinski@linux.intel.com, Cezary Rojewski Subject: [PATCH 01/13] ASoC: Intel: avs: Do not readq() u32 registers Date: Thu, 9 Jan 2025 13:22:04 +0100 Message-Id: <20250109122216.3667847-2-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250109122216.3667847-1-cezary.rojewski@intel.com> References: <20250109122216.3667847-1-cezary.rojewski@intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Register reporting ROM status is 4-bytes wide. Fixes: 092cf7b26a48 ("ASoC: Intel: avs: Code loading over HDA") Signed-off-by: Cezary Rojewski --- sound/soc/intel/avs/loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/intel/avs/loader.c b/sound/soc/intel/avs/loader.c index 890efd2f1fea..37de077a9983 100644 --- a/sound/soc/intel/avs/loader.c +++ b/sound/soc/intel/avs/loader.c @@ -308,7 +308,7 @@ avs_hda_init_rom(struct avs_dev *adev, unsigned int dma_id, bool purge) } /* await ROM init */ - ret = snd_hdac_adsp_readq_poll(adev, spec->sram->rom_status_offset, reg, + ret = snd_hdac_adsp_readl_poll(adev, spec->sram->rom_status_offset, reg, (reg & 0xF) == AVS_ROM_INIT_DONE || (reg & 0xF) == APL_ROM_FW_ENTERED, AVS_ROM_INIT_POLLING_US, APL_ROM_INIT_TIMEOUT_US); From patchwork Thu Jan 9 12:22:05 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 13932441 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 05B4F216E3E for ; Thu, 9 Jan 2025 12:08:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736424495; cv=none; b=aQaYvm0wv4LlF4QrBnt8TZlKeIujkqNXwXumElLIjZWBAOMtuo4WLt8MqKa2ZIw7htOoiRv8/5pDGlOf5BtY/R9qd0sVEEdBn9c1aanZe7rDhsOWF1rcPjJ6OjMC5eRDL+tBZvXTlRaPFT67RkpcXFoIX2UnS4bDrGCTECzXM+o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736424495; c=relaxed/simple; bh=nj5BKZOSU/j2hFYzWQfRSHW43/gnCeYMukwnbrezu14=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=cYj+iStaRcShTysdaxBpRLQhrEJ04cpoqZ6VglW4zEhTPXhUcEhxj+O2CxBL/4rkCaeyfNRy4PUqzQxHnaLQjhsIyzRpdc0kUOBCrAd08pXVvfb1uz96u/6BdZlc8jds4MzG+L2OP96QMtUE4HlQhEMZ2LbsmYkO+USI6aAO59Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=fxOyQATL; arc=none smtp.client-ip=198.175.65.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="fxOyQATL" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1736424494; x=1767960494; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=nj5BKZOSU/j2hFYzWQfRSHW43/gnCeYMukwnbrezu14=; b=fxOyQATLkVkJN0sIQaDgrdyFyIrDueP3vIYJwQbiIvKP0zrNBjpLcZRQ 90OS6cKzxq5+cVFAKF5ZUK8uur+WgAyiB6MYnT3EHbzHNKNQ902vZxm8K J8eADNhn9icD/IN2ukV7Ad+/wU6ReM2uuBnb/GsM6iGW8d/Kz0k1+9oRA 6o/VTdZ3ERq8fyWAJs3kFHef1rS6LucqAwnnYdi3+dS0gnTIC0IRNGcOc Tuqq0vD/RkEvXeJYrFrKb6JQlOi8143AVQ5Ph+4RmDJcd1ATLEeW6Op5L HELnQ3zo1jaCz9u1RqeaqOAXIWKM+/OUB8428+4T4yUNUZdoCv8upLYQp g==; X-CSE-ConnectionGUID: 42OmZLEPT4KlKk30iTuhNQ== X-CSE-MsgGUID: ja/qh04pSoy0s/LXrRbhzw== X-IronPort-AV: E=McAfee;i="6700,10204,11309"; a="47179560" X-IronPort-AV: E=Sophos;i="6.12,301,1728975600"; d="scan'208";a="47179560" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2025 04:08:14 -0800 X-CSE-ConnectionGUID: gimiaQFqS+mxqsXDH9VPXQ== X-CSE-MsgGUID: wzSKHWsYRVO3YlUtVInc2Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="140710281" Received: from crojewsk-ctrl.igk.intel.com ([10.237.149.254]) by orviesa001.jf.intel.com with ESMTP; 09 Jan 2025 04:08:11 -0800 From: Cezary Rojewski To: broonie@kernel.org Cc: linux-sound@vger.kernel.org, tiwai@suse.com, perex@perex.cz, amadeuszx.slawinski@linux.intel.com, Cezary Rojewski Subject: [PATCH 02/13] ASoC: Intel: avs: Fix the minimum firmware version numbers Date: Thu, 9 Jan 2025 13:22:05 +0100 Message-Id: <20250109122216.3667847-3-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250109122216.3667847-1-cezary.rojewski@intel.com> References: <20250109122216.3667847-1-cezary.rojewski@intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 For few TGL-based platforms the minor version number for AudioDSP firmware is incorrect forcing users to utilize ignore_fw_version module parameter. Fixes: 5acb19ecd198 ("ASoC: Intel: avs: TGL-based platforms support") Signed-off-by: Cezary Rojewski --- sound/soc/intel/avs/core.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sound/soc/intel/avs/core.c b/sound/soc/intel/avs/core.c index 73d4bde9b2f7..82839d0994ee 100644 --- a/sound/soc/intel/avs/core.c +++ b/sound/soc/intel/avs/core.c @@ -829,10 +829,10 @@ static const struct avs_spec jsl_desc = { .hipc = &cnl_hipc_spec, }; -#define AVS_TGL_BASED_SPEC(sname) \ +#define AVS_TGL_BASED_SPEC(sname, min) \ static const struct avs_spec sname##_desc = { \ .name = #sname, \ - .min_fw_version = { 10, 29, 0, 5646 }, \ + .min_fw_version = { 10, min, 0, 5646 }, \ .dsp_ops = &avs_tgl_dsp_ops, \ .core_init_mask = 1, \ .attributes = AVS_PLATATTR_IMR, \ @@ -840,11 +840,11 @@ static const struct avs_spec sname##_desc = { \ .hipc = &cnl_hipc_spec, \ } -AVS_TGL_BASED_SPEC(lkf); -AVS_TGL_BASED_SPEC(tgl); -AVS_TGL_BASED_SPEC(ehl); -AVS_TGL_BASED_SPEC(adl); -AVS_TGL_BASED_SPEC(adl_n); +AVS_TGL_BASED_SPEC(lkf, 28); +AVS_TGL_BASED_SPEC(tgl, 29); +AVS_TGL_BASED_SPEC(ehl, 30); +AVS_TGL_BASED_SPEC(adl, 35); +AVS_TGL_BASED_SPEC(adl_n, 35); static const struct pci_device_id avs_ids[] = { { PCI_DEVICE_DATA(INTEL, HDA_SKL_LP, &skl_desc) }, From patchwork Thu Jan 9 12:22:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 13932443 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B7CBF217663 for ; Thu, 9 Jan 2025 12:08:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736424497; cv=none; b=uf1X32V9N1Cy1oxFjPtCX+Ij554L5g/e1oiNtsejxrV55+XjJVfAS1GnL14XM7Sdo+aP9dlZBfKGdaUlL06+qpPvVuwDutpn+PBZFePucaBLEGzqZ65Ufn0N5t6z4RdCCOjHGWnnN4BwByyEpbDPT2Z2hdm0QbqghoQh72nTCF8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736424497; c=relaxed/simple; bh=ruLNefVr99qv3YYFJhlKHo929NfoWA9c8LmA3OvEhHQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=FX/kgkWOOe87prjyVwRE6tlcCds7Cewo2CaisCvySw7mlLwgS/Z6Czd2fV7Hf8zXWJT+OV4p/GGNIrFhCFIyinfM1y2nzLLXOF2U6aH0SDWXbZS+n8Q4JHvIDgSeS/mQcKSwJwkNnDvCZz8bnWhV9Vi/ZD/F8nF8Sv7B1SmYdQQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=JF2uUUIF; arc=none smtp.client-ip=198.175.65.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="JF2uUUIF" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1736424496; x=1767960496; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ruLNefVr99qv3YYFJhlKHo929NfoWA9c8LmA3OvEhHQ=; b=JF2uUUIFVZqZp0AFHayAIuagv5LBz3whKoeItYCTq5Su67DK7QPDYdi1 aUlVQJgpEtdd2fN0C3yVNQ4I5+7miOSPq1WpGk/z5A1qOjKQaZkikMbIF TAtSMdOOLiMyaWkVRiec39aKTDcpW7JbDpc6lNvbi409n5ruYLD3v9+Ae ndAf4cu+fBht7j0cfxZZeLjGdozyh/DP+AioylZyuXN7gSMLEcx9xO1SL 4hRJw1MU3zns+OUtpHSXpESNhjklU3btGS0aC9HOf8uDXnCfQceMb03lp 2xhXRCmZmSf18As5Nzk7ftMvrKGe1gsWXq1L3zQFkT1B/cMPWxxjFTuDr Q==; X-CSE-ConnectionGUID: mdSguAG7R+yE72HpB5OQpQ== X-CSE-MsgGUID: diJTKJ9aSxekVbdl4XWd2A== X-IronPort-AV: E=McAfee;i="6700,10204,11309"; a="47179564" X-IronPort-AV: E=Sophos;i="6.12,301,1728975600"; d="scan'208";a="47179564" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2025 04:08:15 -0800 X-CSE-ConnectionGUID: h4sJbkdBQh6Iz9piMk3h3A== X-CSE-MsgGUID: hKOqNiP2QQO5q5VFMFY3mw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="140710290" Received: from crojewsk-ctrl.igk.intel.com ([10.237.149.254]) by orviesa001.jf.intel.com with ESMTP; 09 Jan 2025 04:08:13 -0800 From: Cezary Rojewski To: broonie@kernel.org Cc: linux-sound@vger.kernel.org, tiwai@suse.com, perex@perex.cz, amadeuszx.slawinski@linux.intel.com, Cezary Rojewski Subject: [PATCH 03/13] ASoC: Intel: avs: Fix theoretical infinite loop Date: Thu, 9 Jan 2025 13:22:06 +0100 Message-Id: <20250109122216.3667847-4-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250109122216.3667847-1-cezary.rojewski@intel.com> References: <20250109122216.3667847-1-cezary.rojewski@intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 While 'stack_dump_size' is a u32 bitfield of 16 bits, u32 has a bigger upper bound than the type u16 of loop counter 'offset' what in theory may lead to infinite loop condition. Found out by Coverity static analyzer. Fixes: c8c960c10971 ("ASoC: Intel: avs: APL-based platforms support") Signed-off-by: Cezary Rojewski --- sound/soc/intel/avs/apl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/intel/avs/apl.c b/sound/soc/intel/avs/apl.c index 27516ef57185..d443fe8d51ae 100644 --- a/sound/soc/intel/avs/apl.c +++ b/sound/soc/intel/avs/apl.c @@ -125,7 +125,7 @@ int avs_apl_coredump(struct avs_dev *adev, union avs_notify_msg *msg) struct avs_apl_log_buffer_layout layout; void __iomem *addr, *buf; size_t dump_size; - u16 offset = 0; + u32 offset = 0; u8 *dump, *pos; dump_size = AVS_FW_REGS_SIZE + msg->ext.coredump.stack_dump_size; From patchwork Thu Jan 9 12:22:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 13932445 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 21AA3216E12 for ; Thu, 9 Jan 2025 12:08:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736424501; cv=none; b=rLv8PovfoxJV5sGVjkcKnEE76HNTnESjUXOLVRKjH0rv4dFGJBYazo9PGrf50qkgiCrmQlh6HPAnkrZvKesyYeWSpfPYRi/aoH96ti5I2VjOGLxLpAFZFJ0OAjdmTvHtticIWaI94pnaVyMy4EbRLC6NtD+XMUnv2Y4uBYs83k4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736424501; c=relaxed/simple; bh=EfaGDe+nUOpdSt8pi7KSMTvsjLRfg5ffBULqssoLNWY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=s0gCzxST0eOxNTf6Kh6uJKP44xFzaoOVwoUd538OB3GJ+yjPd89tCOw2FDgOMSvILfVO0/IEH1vqZXnFboPr3ElKfV6gT+0vzJb0tVDH+NJj2KBHZX7hB5e78z8vDF38aoiOiay0tJZG47odA0iblRArwxzWfGWkQ/kXqDdU7PU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=VZTj1Q+y; arc=none smtp.client-ip=198.175.65.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="VZTj1Q+y" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1736424500; x=1767960500; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EfaGDe+nUOpdSt8pi7KSMTvsjLRfg5ffBULqssoLNWY=; b=VZTj1Q+y69ao3YWQH7zqAzzTDlojTHNRrcAMpS6CJ7vIhhX6EDhgpqtw 9TC9qv8FnWZk+biWxK2hm9FimdFTwxb1U3XFJWR4tzxc6EUpP3aooIWum cqDSHJZCVUEJyPpWJGPI56n1snxU4CmERW2A6Uk5j94LYkaBM9rsoS6a1 AjILHSfCDpijAYGIVaeWiYzh3Ug/9XsyehNzrZsMeluCAqCxqIScn2t4m ZhDVU3bCuRez/N52aHWvmhOsYTGiSsDp9Vz3XTtp+dwbAp24SWCYIKb8W fgCQA5ueFZWqQ/vmuKJrwnTORG35zO/HN/pByl4Ste2EEGlsSh2/B0cyt A==; X-CSE-ConnectionGUID: lj3fO4wLQgWr89Q+kyAA8w== X-CSE-MsgGUID: toezZcPITo2lR9p+lwi6hg== X-IronPort-AV: E=McAfee;i="6700,10204,11309"; a="47179576" X-IronPort-AV: E=Sophos;i="6.12,301,1728975600"; d="scan'208";a="47179576" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2025 04:08:19 -0800 X-CSE-ConnectionGUID: vdWCFcDHTsyBO3vY77CZyQ== X-CSE-MsgGUID: i1XiJEHPREySXESFDGml7A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="140710308" Received: from crojewsk-ctrl.igk.intel.com ([10.237.149.254]) by orviesa001.jf.intel.com with ESMTP; 09 Jan 2025 04:08:15 -0800 From: Cezary Rojewski To: broonie@kernel.org Cc: linux-sound@vger.kernel.org, tiwai@suse.com, perex@perex.cz, amadeuszx.slawinski@linux.intel.com, Cezary Rojewski Subject: [PATCH 04/13] ASoC: Intel: avs: Fix init-config parsing Date: Thu, 9 Jan 2025 13:22:07 +0100 Message-Id: <20250109122216.3667847-5-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250109122216.3667847-1-cezary.rojewski@intel.com> References: <20250109122216.3667847-1-cezary.rojewski@intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Amadeusz Sławiński When parsing init configs correct token should be looked up. Fixes: 1b4217ebbb3e ("ASoC: Intel: avs: Add topology parsing support for initial config") Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski --- sound/soc/intel/avs/topology.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/intel/avs/topology.c b/sound/soc/intel/avs/topology.c index 5cda527020c7..d612f20ed989 100644 --- a/sound/soc/intel/avs/topology.c +++ b/sound/soc/intel/avs/topology.c @@ -1466,7 +1466,7 @@ avs_tplg_path_template_create(struct snd_soc_component *comp, struct avs_tplg *o static const struct avs_tplg_token_parser mod_init_config_parsers[] = { { - .token = AVS_TKN_MOD_INIT_CONFIG_ID_U32, + .token = AVS_TKN_INIT_CONFIG_ID_U32, .type = SND_SOC_TPLG_TUPLE_TYPE_WORD, .offset = offsetof(struct avs_tplg_init_config, id), .parse = avs_parse_word_token, @@ -1519,7 +1519,7 @@ static int avs_tplg_parse_initial_configs(struct snd_soc_component *comp, esize = le32_to_cpu(tuples->size) + le32_to_cpu(tmp->size); ret = parse_dictionary_entries(comp, tuples, esize, config, 1, sizeof(*config), - AVS_TKN_MOD_INIT_CONFIG_ID_U32, + AVS_TKN_INIT_CONFIG_ID_U32, mod_init_config_parsers, ARRAY_SIZE(mod_init_config_parsers)); From patchwork Thu Jan 9 12:22:08 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 13932444 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6FED4216E0A for ; Thu, 9 Jan 2025 12:08:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736424500; cv=none; b=tMHu4NkSuMIaZWMwKaWCeLBRogpDUvq3d9J3hQlzXSro8iRcshatBSQE7Q1nmVWFD7gVHfqw9UMTMJS2P6a8C/QKBnibXlDufGvtlj041lWCVyHCXlF74VSJXmHlHgh7AklZkNHtPr56LLvqfqa7hPQNCRgJocZb6H0Bi8Ez4nQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736424500; c=relaxed/simple; bh=vVbqBhAqyBbwTGWODTf63p1mVMqg9nde0223Q4DtXEE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=iWu2srNGPxExPyMtnjpSkDhLWXQ8a6Zg9WKXwLHcT9jUuUwtSMHfr7lyaZ4iek/W/MXFgnHrcdvgd4j4ho8Z233XfFYh7HL/75RSvZrIG9pgcuFSjwrN2XwetsTRvEDOS8nvB+czsfggOASn2/eFiJMUeTrbLHZjFmfKZXCieZ4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=DwAa1kSg; arc=none smtp.client-ip=198.175.65.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="DwAa1kSg" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1736424499; x=1767960499; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vVbqBhAqyBbwTGWODTf63p1mVMqg9nde0223Q4DtXEE=; b=DwAa1kSgl73LjYDtF22b02WrsmpRNz1OQqk0xJhvO03Mjqtbm93JHOZC ZzVHSzFQbmQ0FC61OcVR3Y5uAkz8LZ4uEz4JNXfmlFnBlUg41ZtzWjY+d ps5FFMNpfgb9ZN98++JE7afoL4fC7MwBkdb3e8CpJB+UoQBWerBQp4k1o C9BUpJvBfw+vniaFT9FxXt7RiylHgM7BpQkvLtn00atBpBaQnjGzUryaL Ymb20VumuIziqzOkJRFTHiy7zyC6ZuiRLDX0mJxT0RpSdwCfFHNnzmGOd MJrmSxgRvqD1+QQ+OMJUAJAp0sBFzSOuHTSBdHEVjdGF+LjCHC2Vv7zBx w==; X-CSE-ConnectionGUID: WKb1c0zxQCWvfF5lFVXLxA== X-CSE-MsgGUID: d5uL+jFxRSOrOGP1Sjq25A== X-IronPort-AV: E=McAfee;i="6700,10204,11309"; a="47179572" X-IronPort-AV: E=Sophos;i="6.12,301,1728975600"; d="scan'208";a="47179572" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2025 04:08:19 -0800 X-CSE-ConnectionGUID: ZiIfyPfeTQuFjWwoe2NVHg== X-CSE-MsgGUID: 38DaIGf0TqyLA2R5VPYQyQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="140710325" Received: from crojewsk-ctrl.igk.intel.com ([10.237.149.254]) by orviesa001.jf.intel.com with ESMTP; 09 Jan 2025 04:08:17 -0800 From: Cezary Rojewski To: broonie@kernel.org Cc: linux-sound@vger.kernel.org, tiwai@suse.com, perex@perex.cz, amadeuszx.slawinski@linux.intel.com, Cezary Rojewski Subject: [PATCH 05/13] ASoC: Intel: avs: Update hda component teardown sequences Date: Thu, 9 Jan 2025 13:22:08 +0100 Message-Id: <20250109122216.3667847-6-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250109122216.3667847-1-cezary.rojewski@intel.com> References: <20250109122216.3667847-1-cezary.rojewski@intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 If case of failure cleanup recently created DAI and while at it, adjust the remove() operation to match operation order of the probe() function. Signed-off-by: Cezary Rojewski --- sound/soc/intel/avs/pcm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/intel/avs/pcm.c b/sound/soc/intel/avs/pcm.c index 945f9c0a6a54..5878cfdbbee5 100644 --- a/sound/soc/intel/avs/pcm.c +++ b/sound/soc/intel/avs/pcm.c @@ -1564,6 +1564,7 @@ static int avs_component_hda_probe(struct snd_soc_component *component) if (ret < 0) { dev_err(component->dev, "create widgets failed: %d\n", ret); + snd_soc_unregister_dai(dai); goto exit; } } @@ -1578,8 +1579,8 @@ static int avs_component_hda_probe(struct snd_soc_component *component) static void avs_component_hda_remove(struct snd_soc_component *component) { - avs_component_hda_unregister_dais(component); avs_component_remove(component); + avs_component_hda_unregister_dais(component); } static int avs_component_hda_open(struct snd_soc_component *component, From patchwork Thu Jan 9 12:22:09 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 13932447 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D9940216E39 for ; Thu, 9 Jan 2025 12:08:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736424508; cv=none; b=sUwLK0jyN+Eh05CczxlqtNiuspOs6nh04/Lx/oXoOnTBQAWz4C+TZimMH2kCWwbBXM7y+vrG9LP7zNA2ubaP7PYSsDB7M0Tn29eghXcN9W8n97X+OHQGs5bXtKqr6LFkd93EeeFnkNhpZM06CpsxlQpyWibsYe9mpVIG9M1LW1I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736424508; c=relaxed/simple; bh=cujlS02oQb/0aiC0eyfrBWpjg/pvG6XiGOyfMjWxrkY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=LIkqWSZeYfWSD9KIehmAHT18c7HFfzF/gkE/oLAcCoUUsjCMfKQEvkne3SIaTbKGuwHwO8P5jWufJ1v29og8De69IHKo4JGhfN5h1wqZuycqOOv6j5xrYtVmCEOdJIGoawNQlslEWbN/H8sq/y1+pCj6XUzV2ylZmRZI7MUk/S4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=NiP9T1jY; arc=none smtp.client-ip=198.175.65.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="NiP9T1jY" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1736424507; x=1767960507; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cujlS02oQb/0aiC0eyfrBWpjg/pvG6XiGOyfMjWxrkY=; b=NiP9T1jYf3LSUUAt2A3wzcDUAZ88tV8tb0+rZYhrz3kkP5pDUiydT6Rv 8pcvMCtIALxz6LwUThurkPWsAGeKvQIUNEqWsNKtqj8AUT3XHnX/Q2ckK 8kXyquWrY6Wvq95f1C1fbBonqyQ6FiOUAWqZXKDhxFrVQ6KinrLxDmvG2 Z2UORVbfQXeSd2kR/TartvfNyT28O7SZHD/4VIhlENVUILPFcWNqTZI1M 0znBct7xv18cHZhLEWkc924cJkfyCvsFz+TAIo7Oux3EnZvnQh+aEIQZU aXL0QMuvk/pVioeyELJ2wGMHNEjP2dFo/0z9ByKpDQLlPh0JP/0fnfZ6O w==; X-CSE-ConnectionGUID: BLNXEnikSrCEC8JDYkkRBA== X-CSE-MsgGUID: /ii4TjXORqOHDIfxKHrQsg== X-IronPort-AV: E=McAfee;i="6700,10204,11309"; a="47179589" X-IronPort-AV: E=Sophos;i="6.12,301,1728975600"; d="scan'208";a="47179589" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2025 04:08:26 -0800 X-CSE-ConnectionGUID: SfKZBd3uQKmMKBIAzsI2RA== X-CSE-MsgGUID: /SF+zG0lRAa9czYxCugKvQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="140710336" Received: from crojewsk-ctrl.igk.intel.com ([10.237.149.254]) by orviesa001.jf.intel.com with ESMTP; 09 Jan 2025 04:08:19 -0800 From: Cezary Rojewski To: broonie@kernel.org Cc: linux-sound@vger.kernel.org, tiwai@suse.com, perex@perex.cz, amadeuszx.slawinski@linux.intel.com, Cezary Rojewski Subject: [PATCH 06/13] ASoC: Intel: avs: Print IPC error messages in lower layer Date: Thu, 9 Jan 2025 13:22:09 +0100 Message-Id: <20250109122216.3667847-7-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250109122216.3667847-1-cezary.rojewski@intel.com> References: <20250109122216.3667847-1-cezary.rojewski@intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Amadeusz Sławiński It is preferred to send error message in handler itself instead of leaving it to caller. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski --- sound/soc/intel/avs/loader.c | 8 ++------ sound/soc/intel/avs/messages.c | 22 ++++++++++++++++------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/sound/soc/intel/avs/loader.c b/sound/soc/intel/avs/loader.c index 37de077a9983..4203b216ae13 100644 --- a/sound/soc/intel/avs/loader.c +++ b/sound/soc/intel/avs/loader.c @@ -675,16 +675,12 @@ int avs_dsp_first_boot_firmware(struct avs_dev *adev) } ret = avs_ipc_get_hw_config(adev, &adev->hw_cfg); - if (ret) { - dev_err(adev->dev, "get hw cfg failed: %d\n", ret); + if (ret) return AVS_IPC_RET(ret); - } ret = avs_ipc_get_fw_config(adev, &adev->fw_cfg); - if (ret) { - dev_err(adev->dev, "get fw cfg failed: %d\n", ret); + if (ret) return AVS_IPC_RET(ret); - } adev->core_refs = devm_kcalloc(adev->dev, adev->hw_cfg.dsp_cores, sizeof(*adev->core_refs), GFP_KERNEL); diff --git a/sound/soc/intel/avs/messages.c b/sound/soc/intel/avs/messages.c index ec458bd51b10..30b666f8909b 100644 --- a/sound/soc/intel/avs/messages.c +++ b/sound/soc/intel/avs/messages.c @@ -400,10 +400,12 @@ int avs_ipc_get_fw_config(struct avs_dev *adev, struct avs_fw_cfg *cfg) AVS_BASEFW_FIRMWARE_CONFIG, NULL, 0, &payload, &payload_size); if (ret) - return ret; + goto err; /* Non-zero payload expected for FIRMWARE_CONFIG. */ - if (!payload_size) - return -EREMOTEIO; + if (!payload_size) { + ret = -EREMOTEIO; + goto err; + } while (offset < payload_size) { tlv = (struct avs_tlv *)(payload + offset); @@ -502,6 +504,9 @@ int avs_ipc_get_fw_config(struct avs_dev *adev, struct avs_fw_cfg *cfg) /* No longer needed, free it as it's owned by the get_large_config() caller. */ kfree(payload); +err: + if (ret) + dev_err(adev->dev, "get fw cfg failed: %d\n", ret); return ret; } @@ -517,10 +522,12 @@ int avs_ipc_get_hw_config(struct avs_dev *adev, struct avs_hw_cfg *cfg) AVS_BASEFW_HARDWARE_CONFIG, NULL, 0, &payload, &payload_size); if (ret) - return ret; + goto err; /* Non-zero payload expected for HARDWARE_CONFIG. */ - if (!payload_size) - return -EREMOTEIO; + if (!payload_size) { + ret = -EREMOTEIO; + goto err; + } while (offset < payload_size) { tlv = (struct avs_tlv *)(payload + offset); @@ -590,6 +597,9 @@ int avs_ipc_get_hw_config(struct avs_dev *adev, struct avs_hw_cfg *cfg) exit: /* No longer needed, free it as it's owned by the get_large_config() caller. */ kfree(payload); +err: + if (ret) + dev_err(adev->dev, "get hw cfg failed: %d\n", ret); return ret; } From patchwork Thu Jan 9 12:22:10 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 13932448 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BB147217642 for ; Thu, 9 Jan 2025 12:08:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736424509; cv=none; b=KYLM8t6wGEtr3Om0mYk45RXYmHrMySFIl+2ax0FJ7ey0a0Ql2eLbr3DjgFcuuHoP4o+klXOQaosoyPJt6X1iy4WPf99+oKCTDmMSO5UOWwjz2QCEtbVoiRJNlF1mUxZCS4DtPGtDOoUOsverTEw8zP9f0w+z6Na5bpAgTh/4VrI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736424509; c=relaxed/simple; bh=UX9TkIm0WrI2teyBj/nvmsScgxAV2V/zR89+LhB6pPs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=hPUctJJIQ8W88KU+HPQCvstdB3gR2XPl1eyVNQtMLT2W8i527KO6UjhIq75XY/y8ddG8QM7cdtBY0ZIcGtJ/rGDLJgNGJqEpu7Ijjk3rb3nYiKupSOQmntqvyV51EsUZoEFtSgsDdbcGzf5UQGw9hFtlzohg4sZtD9TArnk468c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Gkt9x1pX; arc=none smtp.client-ip=198.175.65.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Gkt9x1pX" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1736424508; x=1767960508; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UX9TkIm0WrI2teyBj/nvmsScgxAV2V/zR89+LhB6pPs=; b=Gkt9x1pXt93CstTypuC6mYYvwmQVSiw4gVEcfhWXMX61HPUMx9lCLYwk aCul94YVaov63AsvX0NlUl1Or+OIsQGN0kFwyfuLJw+3ZiKgfGIDccJwY WPWUZAQXSN9IsrGZQHY49qE8u+9+i8XCngJkJJ/LdBOb3ivrrLE5UhinS HZ77LhdgGeXrQGiydpi3/+6GVSSMY4KdgPIUqCvUxiy0z2BW87W4CYehr GnpKT7IbHnyroNtT9csA3aboJzcHaxu6fNoe72tS2DKR6TTQ6NwW3aujk zcLsAmgCh34MnTJwXlSdOqcC0s813XXvHN/8t+EnDVosmVmqD40srtXDJ g==; X-CSE-ConnectionGUID: m/o0AI7sQ8+TRaQL36+TMA== X-CSE-MsgGUID: zSLi9kPLTpaBEM/N3/KWKQ== X-IronPort-AV: E=McAfee;i="6700,10204,11309"; a="47179592" X-IronPort-AV: E=Sophos;i="6.12,301,1728975600"; d="scan'208";a="47179592" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2025 04:08:26 -0800 X-CSE-ConnectionGUID: 56jHzzEHQSyM3kzn7mj1PQ== X-CSE-MsgGUID: yaKyqn3fSKi40hsyBTGjxQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="140710352" Received: from crojewsk-ctrl.igk.intel.com ([10.237.149.254]) by orviesa001.jf.intel.com with ESMTP; 09 Jan 2025 04:08:21 -0800 From: Cezary Rojewski To: broonie@kernel.org Cc: linux-sound@vger.kernel.org, tiwai@suse.com, perex@perex.cz, amadeuszx.slawinski@linux.intel.com, Cezary Rojewski Subject: [PATCH 07/13] ASoC: Intel: avs: Add MODULE_FIRMWARE to inform about FW Date: Thu, 9 Jan 2025 13:22:10 +0100 Message-Id: <20250109122216.3667847-8-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250109122216.3667847-1-cezary.rojewski@intel.com> References: <20250109122216.3667847-1-cezary.rojewski@intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Amadeusz Sławiński MODULE_FIRMWARE macro adds hint to module information about which FW is expected to be present on file system. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski --- sound/soc/intel/avs/core.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sound/soc/intel/avs/core.c b/sound/soc/intel/avs/core.c index 82839d0994ee..0e750e9e01d9 100644 --- a/sound/soc/intel/avs/core.c +++ b/sound/soc/intel/avs/core.c @@ -902,3 +902,13 @@ MODULE_AUTHOR("Cezary Rojewski "); MODULE_AUTHOR("Amadeusz Slawinski "); MODULE_DESCRIPTION("Intel cAVS sound driver"); MODULE_LICENSE("GPL"); +MODULE_FIRMWARE("intel/skl/dsp_basefw.bin"); +MODULE_FIRMWARE("intel/apl/dsp_basefw.bin"); +MODULE_FIRMWARE("intel/cnl/dsp_basefw.bin"); +MODULE_FIRMWARE("intel/icl/dsp_basefw.bin"); +MODULE_FIRMWARE("intel/jsl/dsp_basefw.bin"); +MODULE_FIRMWARE("intel/lkf/dsp_basefw.bin"); +MODULE_FIRMWARE("intel/tgl/dsp_basefw.bin"); +MODULE_FIRMWARE("intel/ehl/dsp_basefw.bin"); +MODULE_FIRMWARE("intel/adl/dsp_basefw.bin"); +MODULE_FIRMWARE("intel/adl_n/dsp_basefw.bin"); From patchwork Thu Jan 9 12:22:11 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 13932446 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 18F16216E05 for ; Thu, 9 Jan 2025 12:08:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736424507; cv=none; b=ZLnnooSms1KAfvb5xaT5cAK0MFsnU8D99BjJ1TtUfPDmjmSiETvAP5p7xxZJ+Q++x2Ma5S44AxX9L8fOhtJLWXsNEE2xuRmWFJYC/sxqka08w6k67AWxSkO/EPxMyDBW7ZeuiQzaAjzAXamOqpoU0VPT4VJEfQyEqKbAnNwKAK4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736424507; c=relaxed/simple; bh=A6UY/B0aGXy1N+UkDGV7z9BiloQ2PEZZqOjCfse7PuA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=MarJBYTP83LUp6x+hRQQV/7eXBXkdYHXzAr0sE3A4oH5rGraWHNgOg1xkL6CBfChUkdAuCmKEv7fJRz80r8jKEPv7J+qJgyaiVf8G+jcPacWwREHWJZcW+35UkWRJO2Mzq2vrhSQzBXEyEAE/Z9teBzRs9bF6hXg5z67wsV5nhU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=N+u1SPXN; arc=none smtp.client-ip=198.175.65.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="N+u1SPXN" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1736424506; x=1767960506; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=A6UY/B0aGXy1N+UkDGV7z9BiloQ2PEZZqOjCfse7PuA=; b=N+u1SPXNAIuXn1GNMSy4kghGswlEWmeALHwKnncmfKD1haAWDabtFO8/ /FBk6VvLtfspWYLZzVxDQF8VqKKsYNVpuVifAcCWPYJ3MaktlNSLAk3+0 S1FZin8a9enLy8K0Lkb4zjRn1mU3Y6WYVKLZix/PLkQSTQddhJiGF1cWJ chd6Cg/ZiAnU9Aa4/p8JJ6e1EOBTFbod33OJIdzDv5gI5vUv9XrZ08Gl4 8vDWwvpcoUjDGNboaeS9+6Qd6uxnTF9sq+I3pXPjvu5Jw/l1Ud5XIwCGF +hBtDuG9aM+wu69vOj1ZRZed1kMgJ0zIkvGwk9AHrFVMJJIDET3H/iUs2 g==; X-CSE-ConnectionGUID: FZ9zXwcjSXyNbU33xN9a/g== X-CSE-MsgGUID: 0eMLcSA1Sp+yM45kWVDOzg== X-IronPort-AV: E=McAfee;i="6700,10204,11309"; a="47179584" X-IronPort-AV: E=Sophos;i="6.12,301,1728975600"; d="scan'208";a="47179584" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2025 04:08:25 -0800 X-CSE-ConnectionGUID: /ECJTuLBTMOzPaPOS3YiHg== X-CSE-MsgGUID: 94AP15oNQ9WL8Zbk4A6f3g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="140710361" Received: from crojewsk-ctrl.igk.intel.com ([10.237.149.254]) by orviesa001.jf.intel.com with ESMTP; 09 Jan 2025 04:08:23 -0800 From: Cezary Rojewski To: broonie@kernel.org Cc: linux-sound@vger.kernel.org, tiwai@suse.com, perex@perex.cz, amadeuszx.slawinski@linux.intel.com, Cezary Rojewski Subject: [PATCH 08/13] ASoC: Intel: avs: Clearly state assumptions of hw_params() Date: Thu, 9 Jan 2025 13:22:11 +0100 Message-Id: <20250109122216.3667847-9-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250109122216.3667847-1-cezary.rojewski@intel.com> References: <20250109122216.3667847-1-cezary.rojewski@intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 There are no NULL-checks for fe/be_hw_params as there is an implicit assumption that framework opens valid DPCMs only. State that clearly. Signed-off-by: Cezary Rojewski --- sound/soc/intel/avs/pcm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/intel/avs/pcm.c b/sound/soc/intel/avs/pcm.c index 5878cfdbbee5..4bfbcb5a5ae8 100644 --- a/sound/soc/intel/avs/pcm.c +++ b/sound/soc/intel/avs/pcm.c @@ -161,6 +161,7 @@ static int avs_dai_be_hw_params(struct snd_pcm_substream *substream, struct snd_soc_dpcm *dpcm; be = snd_soc_substream_to_rtd(substream); + /* dpcm_fe_dai_open() guarantees the list is not empty at this point. */ for_each_dpcm_fe(be, substream->stream, dpcm) { fe = dpcm->fe; fe_hw_params = &fe->dpcm[substream->stream].hw_params; @@ -576,6 +577,7 @@ static int avs_dai_fe_hw_params(struct snd_pcm_substream *substream, hdac_stream(host_stream)->format_val = 0; fe = snd_soc_substream_to_rtd(substream); + /* dpcm_fe_dai_open() guarantees the list is not empty at this point. */ for_each_dpcm_be(fe, substream->stream, dpcm) { be = dpcm->be; be_hw_params = &be->dpcm[substream->stream].hw_params; From patchwork Thu Jan 9 12:22:12 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 13932449 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 47382216E01 for ; Thu, 9 Jan 2025 12:08:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736424509; cv=none; b=V4QvVERUTa8kpTmJCxEoa6llfjp5OG9BtQFeCVloutuP6wuojxql5VLNbK8AgXw/Xl9AZ/k6sVPovW+81yjddnBNcQAUJQA5xqTLYZ6lLG/0ZW61gmUE7DUpXLzPNtk5yZzXMdqF8jBNsozrArs9islZIEL80Lslgwq3soaSzvM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736424509; c=relaxed/simple; bh=+uZClC7iRu1a4PdHneo+LFnMmfb9D7wAhmIJ/lq/Fb8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=W4vGshUsJsrMK1D546kN0TupyhGhwfxo3+LbpYcq3wfFIAGgGBOKlB0RtT4mE7N8flZ3O9oX2RswTma264UB5fGqWC0pcznFbKgC1WfH6k7rZbqnXzt91iG1tz3CsHwdua6sgTwqLfCBbTJTUoy5eQ1dP7uzNLDMEeBdLo+zt/k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=jCmrsoDJ; arc=none smtp.client-ip=198.175.65.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="jCmrsoDJ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1736424508; x=1767960508; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+uZClC7iRu1a4PdHneo+LFnMmfb9D7wAhmIJ/lq/Fb8=; b=jCmrsoDJIk5K/86AJ6rR4j11bjRr3WsSamEyuskd2RLIIvC7VZAQVz5k rcG7S/SFmO5XdjQwtU8v6WULrNVts8eyDpI9MkOev+hHeO8IQKS2w14Dv ZsYuwNjYXy7db2NNfdge2V6ASkRAW9h2QvC+RQbQ5Uqqj9/+cmMFymUQ5 bRSyt6cMMKnlcC8BCygdDTndlSyijNB+PlyFH18og+fBW1qmih4d0DO3j FK6nOABr8z2Wb1siT+mvi5GBHGKqTea7ht1H3lOchF368/gebN6C4aLz+ lnfFTd+OaseT+rgoZikv7K/OJ/1s4/V7FNNs/Gc93+FCqXMSUTg24iNPo w==; X-CSE-ConnectionGUID: I+7eX0bYRxqXX3owRrxGeQ== X-CSE-MsgGUID: LDtAYqptR3KTriwh1vkFLQ== X-IronPort-AV: E=McAfee;i="6700,10204,11309"; a="47179597" X-IronPort-AV: E=Sophos;i="6.12,301,1728975600"; d="scan'208";a="47179597" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2025 04:08:27 -0800 X-CSE-ConnectionGUID: rlyFlxe5TOmFGpzzeqJ3Rg== X-CSE-MsgGUID: b4Gf5ITVQhObr9nePJwLKQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="140710372" Received: from crojewsk-ctrl.igk.intel.com ([10.237.149.254]) by orviesa001.jf.intel.com with ESMTP; 09 Jan 2025 04:08:24 -0800 From: Cezary Rojewski To: broonie@kernel.org Cc: linux-sound@vger.kernel.org, tiwai@suse.com, perex@perex.cz, amadeuszx.slawinski@linux.intel.com, Cezary Rojewski Subject: [PATCH 09/13] ASoC: Intel: avs: Improve logging of firmware loading Date: Thu, 9 Jan 2025 13:22:12 +0100 Message-Id: <20250109122216.3667847-10-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250109122216.3667847-1-cezary.rojewski@intel.com> References: <20250109122216.3667847-1-cezary.rojewski@intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Crucial debug information regarding the ROM/firmware status and last known error code is missing in the code loading functions. Signed-off-by: Cezary Rojewski --- sound/soc/intel/avs/loader.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/sound/soc/intel/avs/loader.c b/sound/soc/intel/avs/loader.c index 4203b216ae13..b3ea35d267e9 100644 --- a/sound/soc/intel/avs/loader.c +++ b/sound/soc/intel/avs/loader.c @@ -167,7 +167,8 @@ int avs_cldma_load_basefw(struct avs_dev *adev, struct firmware *fw) (reg & AVS_ROM_INIT_DONE) == AVS_ROM_INIT_DONE, AVS_ROM_INIT_POLLING_US, SKL_ROM_INIT_TIMEOUT_US); if (ret < 0) { - dev_err(adev->dev, "rom init timeout: %d\n", ret); + dev_err(adev->dev, "rom init failed: %d, status: 0x%08x, lec: 0x%08x\n", + ret, reg, snd_hdac_adsp_readl(adev, AVS_FW_REG_ERROR_CODE(adev))); avs_dsp_core_disable(adev, AVS_MAIN_CORE_MASK); return ret; } @@ -180,7 +181,8 @@ int avs_cldma_load_basefw(struct avs_dev *adev, struct firmware *fw) AVS_FW_INIT_POLLING_US, AVS_FW_INIT_TIMEOUT_US); hda_cldma_stop(cl); if (ret < 0) { - dev_err(adev->dev, "transfer fw failed: %d\n", ret); + dev_err(adev->dev, "transfer fw failed: %d, status: 0x%08x, lec: 0x%08x\n", + ret, reg, snd_hdac_adsp_readl(adev, AVS_FW_REG_ERROR_CODE(adev))); avs_dsp_core_disable(adev, AVS_MAIN_CORE_MASK); return ret; } @@ -313,7 +315,8 @@ avs_hda_init_rom(struct avs_dev *adev, unsigned int dma_id, bool purge) (reg & 0xF) == APL_ROM_FW_ENTERED, AVS_ROM_INIT_POLLING_US, APL_ROM_INIT_TIMEOUT_US); if (ret < 0) { - dev_err(adev->dev, "rom init timeout: %d\n", ret); + dev_err(adev->dev, "rom init failed: %d, status: 0x%08x, lec: 0x%08x\n", + ret, reg, snd_hdac_adsp_readl(adev, AVS_FW_REG_ERROR_CODE(adev))); goto err; } @@ -337,15 +340,15 @@ static int avs_imr_load_basefw(struct avs_dev *adev) /* DMA id ignored when flashing from IMR as no transfer occurs. */ ret = avs_hda_init_rom(adev, 0, false); - if (ret < 0) { - dev_err(adev->dev, "rom init failed: %d\n", ret); + if (ret < 0) return ret; - } ret = wait_for_completion_timeout(&adev->fw_ready, msecs_to_jiffies(AVS_FW_INIT_TIMEOUT_MS)); if (!ret) { - dev_err(adev->dev, "firmware ready timeout\n"); + dev_err(adev->dev, "firmware ready timeout, status: 0x%08x, lec: 0x%08x\n", + snd_hdac_adsp_readl(adev, AVS_FW_REG_STATUS(adev)), + snd_hdac_adsp_readl(adev, AVS_FW_REG_ERROR_CODE(adev))); avs_dsp_core_disable(adev, AVS_MAIN_CORE_MASK); return -ETIMEDOUT; } @@ -392,7 +395,7 @@ int avs_hda_load_basefw(struct avs_dev *adev, struct firmware *fw) ret = avs_hda_init_rom(adev, dma_id, true); if (!ret) break; - dev_info(adev->dev, "#%d rom init fail: %d\n", i + 1, ret); + dev_info(adev->dev, "#%d rom init failed: %d\n", i + 1, ret); } if (ret < 0) goto cleanup_resources; @@ -404,7 +407,8 @@ int avs_hda_load_basefw(struct avs_dev *adev, struct firmware *fw) AVS_FW_INIT_POLLING_US, AVS_FW_INIT_TIMEOUT_US); snd_hdac_dsp_trigger(hstream, false); if (ret < 0) { - dev_err(adev->dev, "transfer fw failed: %d\n", ret); + dev_err(adev->dev, "transfer fw failed: %d, status: 0x%08x, lec: 0x%08x\n", + ret, reg, snd_hdac_adsp_readl(adev, AVS_FW_REG_ERROR_CODE(adev))); avs_dsp_core_disable(adev, AVS_MAIN_CORE_MASK); } @@ -584,7 +588,9 @@ static int avs_dsp_load_basefw(struct avs_dev *adev) ret = wait_for_completion_timeout(&adev->fw_ready, msecs_to_jiffies(AVS_FW_INIT_TIMEOUT_MS)); if (!ret) { - dev_err(adev->dev, "firmware ready timeout\n"); + dev_err(adev->dev, "firmware ready timeout, status: 0x%08x, lec: 0x%08x\n", + snd_hdac_adsp_readl(adev, AVS_FW_REG_STATUS(adev)), + snd_hdac_adsp_readl(adev, AVS_FW_REG_ERROR_CODE(adev))); avs_dsp_core_disable(adev, AVS_MAIN_CORE_MASK); ret = -ETIMEDOUT; goto release_fw; From patchwork Thu Jan 9 12:22:13 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 13932450 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E473F216E39 for ; Thu, 9 Jan 2025 12:08:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736424510; cv=none; b=gR7B8Ok4aO29UjIEJJRpZDOTUlrSgk1ENVhFJexs1Z6oNwTMaBVrqlHgRbKHwPZU4peW2cHGYsGl9t8y4CDLeBRPBi9sJbJ33JVFoifJ3/Nn0AUl2Q9LbdZofZg+5JEIBfkqx2wMztkeL/Pa6mNE1WBuGSxsFAdKf9ZQmGEcsiU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736424510; c=relaxed/simple; bh=6nQT3t5eXtdwRp5a1gqM7dTRJxYSL22xW0hR3ArMxh0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=d+BAp90TfUtArrgVRmFtH+IHX2cLO8z09Jqae0TF3SzppauOAc8qB77Ekhh6Wp7xB/isFmu9wSUytPoAwXl1hV6gc50dQOrlZ6T+1HDOBho8Bp4/KsJwzmMq08XvX6UnfDTgiUKpwKlULMoeJs5773NzkHAzqV4GY6T/ip3bqnQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=fxEqeUjl; arc=none smtp.client-ip=198.175.65.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="fxEqeUjl" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1736424509; x=1767960509; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6nQT3t5eXtdwRp5a1gqM7dTRJxYSL22xW0hR3ArMxh0=; b=fxEqeUjlYIgWDhvEaPNeSVwvJlnkW4FsNnKVng5LfoHmsczGgxxHsiic EnFdV6KIFPSHCJZkwylW0++0+RNkTW3KWrbXE+ahrmsuArHPGN7O+5sRp FnmLLvzWRjWwttW6x/EwmCwORdQe3wGfOG7EePzm7w4/XNDMmwDE7Pi9c 2CEGJp6aa6uPqYDlhbazACd4GZ2Pizrhl3jrLfbEEUeNdtm4+grn0Byj7 QsQDhhWGOkGNQn+KS8QOgaTjoDgWSQ31/2u40Pdwajo5+L+ckgzwofOO1 fXp5/2SyBT/LkoY1EFtjy/v23SHFttRcJ3GI+qb/fXvuOQo4JKppU0yN4 w==; X-CSE-ConnectionGUID: Z4GdYnAwQqKfbetDTEyhJg== X-CSE-MsgGUID: 5lKRB3yqSEG6usSLSoC0MA== X-IronPort-AV: E=McAfee;i="6700,10204,11309"; a="47179606" X-IronPort-AV: E=Sophos;i="6.12,301,1728975600"; d="scan'208";a="47179606" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2025 04:08:29 -0800 X-CSE-ConnectionGUID: oyfz2IK0SzG3zr9+eihPbA== X-CSE-MsgGUID: 84I4MUCYTI6PLuPBsvKZ5w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="140710380" Received: from crojewsk-ctrl.igk.intel.com ([10.237.149.254]) by orviesa001.jf.intel.com with ESMTP; 09 Jan 2025 04:08:27 -0800 From: Cezary Rojewski To: broonie@kernel.org Cc: linux-sound@vger.kernel.org, tiwai@suse.com, perex@perex.cz, amadeuszx.slawinski@linux.intel.com, Cezary Rojewski Subject: [PATCH 10/13] ASoC: Intel: avs: Update ASRC definition Date: Thu, 9 Jan 2025 13:22:13 +0100 Message-Id: <20250109122216.3667847-11-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250109122216.3667847-1-cezary.rojewski@intel.com> References: <20250109122216.3667847-1-cezary.rojewski@intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Amadeusz Sławiński To support ASRC for playback streams, update its descriptor. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski --- sound/soc/intel/avs/messages.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/intel/avs/messages.h b/sound/soc/intel/avs/messages.h index d0bdb7d9266c..0378633c7f96 100644 --- a/sound/soc/intel/avs/messages.h +++ b/sound/soc/intel/avs/messages.h @@ -859,8 +859,7 @@ static_assert(sizeof(struct avs_aec_cfg) == 92); struct avs_asrc_cfg { struct avs_modcfg_base base; u32 out_freq; - u32 rsvd0:1; - u32 mode:1; + u32 mode:2; u32 rsvd2:2; u32 disable_jitter_buffer:1; u32 rsvd3:27; From patchwork Thu Jan 9 12:22:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 13932451 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C5DD0216E39 for ; Thu, 9 Jan 2025 12:08:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736424512; cv=none; b=GWOv02lAWWAEkD6UyQWkKBj/e3JF6nLZiXG07Avc+4mu3lePe6svj4KOlwrflpJgN3Cfu8CdpNkvETtB5Tf93jwIPc27F4bP+hFti1RrFbpaeUpOpoOsvDIlaUethT4RPFOBjHEu0Mol4B6nl/IkI38i8lflu3/A3mCKKVB6fwU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736424512; c=relaxed/simple; bh=6Ytc4WyZvnHBDjP6/5hUynRH7SsDbU4VsW0veBiJEUA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=FXD9ytvmLL5TmFknBBuogbvvg0RatM8mL0GYHVX44F00s5gRijZmZcbXo5uY5aEaHEw2m+VfxNz1wvUr7XsF47R2xtV5XceU6c43RpNS8jjvtqajQLwYZRN+4+4r1XFiX5mRYHoywEuf1jEQUcrRSJtTUuHVypOV6a6OE8AiKRI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=KZEbIOkn; arc=none smtp.client-ip=198.175.65.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="KZEbIOkn" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1736424511; x=1767960511; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6Ytc4WyZvnHBDjP6/5hUynRH7SsDbU4VsW0veBiJEUA=; b=KZEbIOknY1zYCMMEIT76wlN4kZfcvW1C1IJ3Tn5uApjUkKz4FW64gO8Z YygYyPbQlo7LSGs6sRkwFh/qGqYvZWyQXxO7+o46ev1kpUfZiwxu0kujH 7uhogEaPbJwN6MuyoMuSMJy/8namBWII+CZsRZMbuwH4vvrLl6kXN3P0E 3D1OE2TA19qdpp1kJCfizE5EnWkeYSBuXWgdUG1yc6iy3gqB+VqT/F0Ii j0gsqhBNDT1x337afefYS4s9IiEfG8R2UKpXXN7UA/jRRRw/gU/DSlxGy D206vExRjBQtcgWfwDj/h1M8dDxUyVfu2bma0dY9KplgKni7ahl+zSRB/ A==; X-CSE-ConnectionGUID: EilMFpHkSBufdYqmdXp1Kw== X-CSE-MsgGUID: IEA/VhopRBSbqi9AW26O6Q== X-IronPort-AV: E=McAfee;i="6700,10204,11309"; a="47179611" X-IronPort-AV: E=Sophos;i="6.12,301,1728975600"; d="scan'208";a="47179611" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2025 04:08:31 -0800 X-CSE-ConnectionGUID: te2O5fMbSKeJBIIbG9N1Hg== X-CSE-MsgGUID: 5R9ADxgfSUObIoqJd4qHmg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="140710387" Received: from crojewsk-ctrl.igk.intel.com ([10.237.149.254]) by orviesa001.jf.intel.com with ESMTP; 09 Jan 2025 04:08:28 -0800 From: Cezary Rojewski To: broonie@kernel.org Cc: linux-sound@vger.kernel.org, tiwai@suse.com, perex@perex.cz, amadeuszx.slawinski@linux.intel.com, Cezary Rojewski Subject: [PATCH 11/13] ASoC: Intel: avs: Adjust DSP status register names Date: Thu, 9 Jan 2025 13:22:14 +0100 Message-Id: <20250109122216.3667847-12-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250109122216.3667847-1-cezary.rojewski@intel.com> References: <20250109122216.3667847-1-cezary.rojewski@intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Both status and error are "codes". Update the wording to make code cohesive. Signed-off-by: Cezary Rojewski --- sound/soc/intel/avs/loader.c | 12 ++++++------ sound/soc/intel/avs/registers.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sound/soc/intel/avs/loader.c b/sound/soc/intel/avs/loader.c index b3ea35d267e9..9ff7818395cd 100644 --- a/sound/soc/intel/avs/loader.c +++ b/sound/soc/intel/avs/loader.c @@ -168,7 +168,7 @@ int avs_cldma_load_basefw(struct avs_dev *adev, struct firmware *fw) AVS_ROM_INIT_POLLING_US, SKL_ROM_INIT_TIMEOUT_US); if (ret < 0) { dev_err(adev->dev, "rom init failed: %d, status: 0x%08x, lec: 0x%08x\n", - ret, reg, snd_hdac_adsp_readl(adev, AVS_FW_REG_ERROR_CODE(adev))); + ret, reg, snd_hdac_adsp_readl(adev, AVS_FW_REG_ERROR(adev))); avs_dsp_core_disable(adev, AVS_MAIN_CORE_MASK); return ret; } @@ -182,7 +182,7 @@ int avs_cldma_load_basefw(struct avs_dev *adev, struct firmware *fw) hda_cldma_stop(cl); if (ret < 0) { dev_err(adev->dev, "transfer fw failed: %d, status: 0x%08x, lec: 0x%08x\n", - ret, reg, snd_hdac_adsp_readl(adev, AVS_FW_REG_ERROR_CODE(adev))); + ret, reg, snd_hdac_adsp_readl(adev, AVS_FW_REG_ERROR(adev))); avs_dsp_core_disable(adev, AVS_MAIN_CORE_MASK); return ret; } @@ -316,7 +316,7 @@ avs_hda_init_rom(struct avs_dev *adev, unsigned int dma_id, bool purge) AVS_ROM_INIT_POLLING_US, APL_ROM_INIT_TIMEOUT_US); if (ret < 0) { dev_err(adev->dev, "rom init failed: %d, status: 0x%08x, lec: 0x%08x\n", - ret, reg, snd_hdac_adsp_readl(adev, AVS_FW_REG_ERROR_CODE(adev))); + ret, reg, snd_hdac_adsp_readl(adev, AVS_FW_REG_ERROR(adev))); goto err; } @@ -348,7 +348,7 @@ static int avs_imr_load_basefw(struct avs_dev *adev) if (!ret) { dev_err(adev->dev, "firmware ready timeout, status: 0x%08x, lec: 0x%08x\n", snd_hdac_adsp_readl(adev, AVS_FW_REG_STATUS(adev)), - snd_hdac_adsp_readl(adev, AVS_FW_REG_ERROR_CODE(adev))); + snd_hdac_adsp_readl(adev, AVS_FW_REG_ERROR(adev))); avs_dsp_core_disable(adev, AVS_MAIN_CORE_MASK); return -ETIMEDOUT; } @@ -408,7 +408,7 @@ int avs_hda_load_basefw(struct avs_dev *adev, struct firmware *fw) snd_hdac_dsp_trigger(hstream, false); if (ret < 0) { dev_err(adev->dev, "transfer fw failed: %d, status: 0x%08x, lec: 0x%08x\n", - ret, reg, snd_hdac_adsp_readl(adev, AVS_FW_REG_ERROR_CODE(adev))); + ret, reg, snd_hdac_adsp_readl(adev, AVS_FW_REG_ERROR(adev))); avs_dsp_core_disable(adev, AVS_MAIN_CORE_MASK); } @@ -590,7 +590,7 @@ static int avs_dsp_load_basefw(struct avs_dev *adev) if (!ret) { dev_err(adev->dev, "firmware ready timeout, status: 0x%08x, lec: 0x%08x\n", snd_hdac_adsp_readl(adev, AVS_FW_REG_STATUS(adev)), - snd_hdac_adsp_readl(adev, AVS_FW_REG_ERROR_CODE(adev))); + snd_hdac_adsp_readl(adev, AVS_FW_REG_ERROR(adev))); avs_dsp_core_disable(adev, AVS_MAIN_CORE_MASK); ret = -ETIMEDOUT; goto release_fw; diff --git a/sound/soc/intel/avs/registers.h b/sound/soc/intel/avs/registers.h index f76e91cff2a9..64afd56b1897 100644 --- a/sound/soc/intel/avs/registers.h +++ b/sound/soc/intel/avs/registers.h @@ -74,7 +74,7 @@ /* Constants used when accessing SRAM, space shared with firmware */ #define AVS_FW_REG_BASE(adev) ((adev)->spec->sram->base_offset) #define AVS_FW_REG_STATUS(adev) (AVS_FW_REG_BASE(adev) + 0x0) -#define AVS_FW_REG_ERROR_CODE(adev) (AVS_FW_REG_BASE(adev) + 0x4) +#define AVS_FW_REG_ERROR(adev) (AVS_FW_REG_BASE(adev) + 0x4) #define AVS_WINDOW_CHUNK_SIZE SZ_4K #define AVS_FW_REGS_SIZE AVS_WINDOW_CHUNK_SIZE From patchwork Thu Jan 9 12:22:15 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 13932452 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B8D19216E28 for ; Thu, 9 Jan 2025 12:08:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736424516; cv=none; b=ky0s4CoveR0AQtsOT713eCUxbIE/kOMXJZ8N4HuPdtuP4l8kEQjwIbMJW17S4AvHNt/3aGbDzz3uTZdwKXmop4LgfqtW1Sou/i8LKdpBOmYXdv6Td/CMkJVGJUTTWqSb0/HVf0nf9DOmBOKM9gb5DCAFyvbqX7cNz5EsVnH5Gw4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736424516; c=relaxed/simple; bh=edJ1PitbeCfSC5vGpbAkDVONXA4avlwa1j8k3lMRdO8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=i6nHSnQCoIUprjxKKpnjx1D1f7Xxj9WZviqcbihSVGG2OSnNabc1RAolNb5v9/6gExhnAqacA/87hO/6aomcu9SjPYoSwlxChBooll1RyVM7FeSYQmDp90JjUFbz6ZDOFKAfm9PeSS6CswhRRAdd27a338Kysj3u2jVmprqLHAE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=UGH4qNHG; arc=none smtp.client-ip=198.175.65.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="UGH4qNHG" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1736424513; x=1767960513; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=edJ1PitbeCfSC5vGpbAkDVONXA4avlwa1j8k3lMRdO8=; b=UGH4qNHGnVbPTFTL0JGuhrK8CT3s20dQ/px8tt/d1espCjcdbTRGvQ8g bwEvJ1+puw12S3mhSiLADe/iBF8OF1uBQfgo5luLQNvYPPThQwL+xZfk3 jlWodPIJhdTkcB3FJrlM57tGglYCRL67pRTTZkEK8FosrBaF17VlTjqJz k+zdb0eAcWYYBB0snNBk0Fj3saLuFBBGA74HUYicYwQ8SoakqSw70QtGQ 4O6QkIbJSq1IxvvDXNrs2HI1Rq+K5f8lB8NHLVQRCWzPXo2VoBew1dVCm YeuOCtpYcxJ5GKcaGg8wmgsLEESVsJAPN9qkrF5niKrkNxb71Su0SuCNo A==; X-CSE-ConnectionGUID: cYGetBnATsmz9kSv9hEXnQ== X-CSE-MsgGUID: 72gayrBmQ7uPcaYTYn6Fsg== X-IronPort-AV: E=McAfee;i="6700,10204,11309"; a="47179616" X-IronPort-AV: E=Sophos;i="6.12,301,1728975600"; d="scan'208";a="47179616" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2025 04:08:33 -0800 X-CSE-ConnectionGUID: YovuC7kkRHeRpOCYc5JDVA== X-CSE-MsgGUID: cylsQvcPT9eMNmdGsihs8A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="140710398" Received: from crojewsk-ctrl.igk.intel.com ([10.237.149.254]) by orviesa001.jf.intel.com with ESMTP; 09 Jan 2025 04:08:30 -0800 From: Cezary Rojewski To: broonie@kernel.org Cc: linux-sound@vger.kernel.org, tiwai@suse.com, perex@perex.cz, amadeuszx.slawinski@linux.intel.com, Cezary Rojewski Subject: [PATCH 12/13] ASoC: Intel: avs: Adjust IPC traces Date: Thu, 9 Jan 2025 13:22:15 +0100 Message-Id: <20250109122216.3667847-13-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250109122216.3667847-1-cezary.rojewski@intel.com> References: <20250109122216.3667847-1-cezary.rojewski@intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The firmware status and the firmware error registers are 4-bytes wide. Update trace macros and their usage to reflect that. Signed-off-by: Cezary Rojewski --- sound/soc/intel/avs/ipc.c | 25 ++++++++++++++---------- sound/soc/intel/avs/trace.h | 38 +++++++++++++++++++------------------ 2 files changed, 35 insertions(+), 28 deletions(-) diff --git a/sound/soc/intel/avs/ipc.c b/sound/soc/intel/avs/ipc.c index 4fba46e77c47..08ed9d96738a 100644 --- a/sound/soc/intel/avs/ipc.c +++ b/sound/soc/intel/avs/ipc.c @@ -184,10 +184,11 @@ static void avs_dsp_receive_rx(struct avs_dev *adev, u64 header) { struct avs_ipc *ipc = adev->ipc; union avs_reply_msg msg = AVS_MSG(header); - u64 reg; + u32 sts, lec; - reg = readq(avs_sram_addr(adev, AVS_FW_REGS_WINDOW)); - trace_avs_ipc_reply_msg(header, reg); + sts = snd_hdac_adsp_readl(adev, AVS_FW_REG_STATUS(adev)); + lec = snd_hdac_adsp_readl(adev, AVS_FW_REG_ERROR(adev)); + trace_avs_ipc_reply_msg(header, sts, lec); ipc->rx.header = header; /* Abort copying payload if request processing was unsuccessful. */ @@ -209,10 +210,11 @@ static void avs_dsp_process_notification(struct avs_dev *adev, u64 header) union avs_notify_msg msg = AVS_MSG(header); size_t data_size = 0; void *data = NULL; - u64 reg; + u32 sts, lec; - reg = readq(avs_sram_addr(adev, AVS_FW_REGS_WINDOW)); - trace_avs_ipc_notify_msg(header, reg); + sts = snd_hdac_adsp_readl(adev, AVS_FW_REG_STATUS(adev)); + lec = snd_hdac_adsp_readl(adev, AVS_FW_REG_ERROR(adev)); + trace_avs_ipc_notify_msg(header, sts, lec); /* Ignore spurious notifications until handshake is established. */ if (!adev->ipc->ready && msg.notify_msg_type != AVS_NOTIFY_FW_READY) { @@ -367,13 +369,16 @@ static void avs_ipc_msg_init(struct avs_ipc *ipc, struct avs_ipc_msg *reply) static void avs_dsp_send_tx(struct avs_dev *adev, struct avs_ipc_msg *tx, bool read_fwregs) { const struct avs_spec *const spec = adev->spec; - u64 reg = ULONG_MAX; + u32 sts = UINT_MAX; + u32 lec = UINT_MAX; tx->header |= spec->hipc->req_busy_mask; - if (read_fwregs) - reg = readq(avs_sram_addr(adev, AVS_FW_REGS_WINDOW)); + if (read_fwregs) { + sts = snd_hdac_adsp_readl(adev, AVS_FW_REG_STATUS(adev)); + lec = snd_hdac_adsp_readl(adev, AVS_FW_REG_ERROR(adev)); + } - trace_avs_request(tx, reg); + trace_avs_request(tx, sts, lec); if (tx->size) memcpy_toio(avs_downlink_addr(adev), tx->data, tx->size); diff --git a/sound/soc/intel/avs/trace.h b/sound/soc/intel/avs/trace.h index c9eaa5a60ed3..f4288d0ad5ef 100644 --- a/sound/soc/intel/avs/trace.h +++ b/sound/soc/intel/avs/trace.h @@ -37,60 +37,62 @@ TRACE_EVENT(avs_dsp_core_op, void trace_avs_msg_payload(const void *data, size_t size); -#define trace_avs_request(msg, fwregs) \ +#define trace_avs_request(msg, sts, lec) \ ({ \ - trace_avs_ipc_request_msg((msg)->header, fwregs); \ + trace_avs_ipc_request_msg((msg)->header, sts, lec); \ trace_avs_msg_payload((msg)->data, (msg)->size); \ }) -#define trace_avs_reply(msg, fwregs) \ +#define trace_avs_reply(msg, sts, lec) \ ({ \ - trace_avs_ipc_reply_msg((msg)->header, fwregs); \ + trace_avs_ipc_reply_msg((msg)->header, sts, lec); \ trace_avs_msg_payload((msg)->data, (msg)->size); \ }) -#define trace_avs_notify(msg, fwregs) \ +#define trace_avs_notify(msg, sts, lec) \ ({ \ - trace_avs_ipc_notify_msg((msg)->header, fwregs); \ + trace_avs_ipc_notify_msg((msg)->header, sts, lec); \ trace_avs_msg_payload((msg)->data, (msg)->size); \ }) #endif DECLARE_EVENT_CLASS(avs_ipc_msg_hdr, - TP_PROTO(u64 header, u64 fwregs), + TP_PROTO(u64 header, u32 sts, u32 lec), - TP_ARGS(header, fwregs), + TP_ARGS(header, sts, lec), TP_STRUCT__entry( __field(u64, header) - __field(u64, fwregs) + __field(u32, sts) + __field(u32, lec) ), TP_fast_assign( __entry->header = header; - __entry->fwregs = fwregs; + __entry->sts = sts; + __entry->lec = lec; ), TP_printk("primary: 0x%08X, extension: 0x%08X,\n" - "fwstatus: 0x%08X, fwerror: 0x%08X", + "status: 0x%08X, error: 0x%08X", lower_32_bits(__entry->header), upper_32_bits(__entry->header), - lower_32_bits(__entry->fwregs), upper_32_bits(__entry->fwregs)) + __entry->sts, __entry->lec) ); DEFINE_EVENT(avs_ipc_msg_hdr, avs_ipc_request_msg, - TP_PROTO(u64 header, u64 fwregs), - TP_ARGS(header, fwregs) + TP_PROTO(u64 header, u32 sts, u32 lec), + TP_ARGS(header, sts, lec) ); DEFINE_EVENT(avs_ipc_msg_hdr, avs_ipc_reply_msg, - TP_PROTO(u64 header, u64 fwregs), - TP_ARGS(header, fwregs) + TP_PROTO(u64 header, u32 sts, u32 lec), + TP_ARGS(header, sts, lec) ); DEFINE_EVENT(avs_ipc_msg_hdr, avs_ipc_notify_msg, - TP_PROTO(u64 header, u64 fwregs), - TP_ARGS(header, fwregs) + TP_PROTO(u64 header, u32 sts, u32 lec), + TP_ARGS(header, sts, lec) ); TRACE_EVENT_CONDITION(avs_ipc_msg_payload, From patchwork Thu Jan 9 12:22:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 13932453 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E1B97216E24 for ; Thu, 9 Jan 2025 12:08:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736424517; cv=none; b=h2jTbt4ZArXn60aAxrlwrzG8ukgZVtT12LPJSAt4vFOXnBlPE/8xuWp7iJzegiUVEJ+KZDAeMhrTB9GDK4OnxdZNLBIRA7Ki/9ih5VcnFnj8HuwbL5VtXdalgC9qcF4mlUnFCmTVIC5mfX5xsRlqoRRP6qF9TkV3X3MJe0oXuvk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736424517; c=relaxed/simple; bh=bu5sE31AgKW1QDdWukqjzynF0QuQN68hIEkUdGRaQM4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=CEJ9+kmEYu3BXY2f025GwBtH9q71Abt/VYVq2iHykMr3n5TxzuqIETndrKNyUWoozwnO0eTB6Ar5JtSUr42TBJlTbDDza8ay0T/nj2mPkPm4moX1t0HSCb7cy9PLxvfGc6Sju972PcaGr5h7GIPvmu+0xQsvneMJtoZmY1W3xC0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=VSOfYdxQ; arc=none smtp.client-ip=198.175.65.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="VSOfYdxQ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1736424516; x=1767960516; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bu5sE31AgKW1QDdWukqjzynF0QuQN68hIEkUdGRaQM4=; b=VSOfYdxQBm2RbjRupm0n8TyyVQSS/J+uhVx2BRhsHYiEdGPQre5gkHg9 xJQitYMhoz5ayFvW5APsaXZ0y0oDlkzE3duGJbaPelsk90VKaeJ15viUr hfI3Q3xyuXOnRCgKX/YrdnXng20Y5k1Vk6FK/HV1tc0Rv2SbT2ZsC//w2 t2inBeeoMj3cr5YBSWAxrY7YZQW3LZBXQJ6g7Qy+6M6P/22PKU/qp7OWZ Unwd5CbYW3o7O4zQXYQjvGzbZeQpTNbSLAGxhdPPB4qcaAWS+fFcTsPvq Zo9U/ma63+StvkMyHr+yu/rZlaYG1FHFTgBI41jnv7MqemLpWJOCZXBMs Q==; X-CSE-ConnectionGUID: sgNxHR4kRzyuj4tYB4Kj6g== X-CSE-MsgGUID: TQ1kBBpOSMypNq2hOFf/LQ== X-IronPort-AV: E=McAfee;i="6700,10204,11309"; a="47179622" X-IronPort-AV: E=Sophos;i="6.12,301,1728975600"; d="scan'208";a="47179622" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2025 04:08:34 -0800 X-CSE-ConnectionGUID: BqsnrDsSTbCdQPL7XXd6qQ== X-CSE-MsgGUID: GLywiKRpTsKKjHG3MeXPXg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="140710405" Received: from crojewsk-ctrl.igk.intel.com ([10.237.149.254]) by orviesa001.jf.intel.com with ESMTP; 09 Jan 2025 04:08:32 -0800 From: Cezary Rojewski To: broonie@kernel.org Cc: linux-sound@vger.kernel.org, tiwai@suse.com, perex@perex.cz, amadeuszx.slawinski@linux.intel.com, Cezary Rojewski Subject: [PATCH 13/13] ASoC: Intel: avs: Add missing includes Date: Thu, 9 Jan 2025 13:22:16 +0100 Message-Id: <20250109122216.3667847-14-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250109122216.3667847-1-cezary.rojewski@intel.com> References: <20250109122216.3667847-1-cezary.rojewski@intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The debugfs file utilizes string helpers such as parse_int_array_user() yet does not include the header. Signed-off-by: Cezary Rojewski --- sound/soc/intel/avs/debugfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/intel/avs/debugfs.c b/sound/soc/intel/avs/debugfs.c index 1767ded4d983..8c4edda97f75 100644 --- a/sound/soc/intel/avs/debugfs.c +++ b/sound/soc/intel/avs/debugfs.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include "avs.h" #include "messages.h"