From patchwork Fri Apr 19 08:48:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 790224 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 D0241C4345F for ; Fri, 19 Apr 2024 08:48:20 +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 D5C6BB76; Fri, 19 Apr 2024 10:48:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D5C6BB76 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1713516498; bh=ojVZrBBLkQUiA+8w8ZReZUeAU4aBcYejjyFtUBkDAaY=; h=From:To:Cc:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=qm91QuLxOYvqNp2ZYfhVEr99GYzPTloxP0caxtn0J9DdqGyoKr+GWDsOyJnqVMi6i fCjQan9xplewKSM/cHye3OHz+NDECLLMhGnSQ97yrbGw4OLCjvVq0e8PA+07beOVU/ ySt4pUBgGQHdKQgnXuwhdH79vWoSNVOfjezNG04Y= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 03615F805E9; Fri, 19 Apr 2024 10:47:36 +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 57EB7F8058C; Fri, 19 Apr 2024 10:47:35 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4375DF8058C; Fri, 19 Apr 2024 10:47:29 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (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 06D47F80236 for ; Fri, 19 Apr 2024 10:47:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 06D47F80236 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=HjnUROfz DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1713516444; x=1745052444; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ojVZrBBLkQUiA+8w8ZReZUeAU4aBcYejjyFtUBkDAaY=; b=HjnUROfztgXo8P6jwY2Us+hfi7/Cb+Xfzofv3ZEaIvcdKNxPQUYyp0ts V0pTNvFYHn4ghIfo7RVFRO22W8geZM3h/ARVYX2PaDX4CRFHXFWmphSeP f0pCXP7/OSeUAAw/32jrBIm5lhIwM7aY78S8vOB0ml2VqzGBpECSUkN7W TPoD+MUCHHnlJAprwtQRHS/GWuMmun9b2GzLlDYrZpX3+by4RRRRj5ttw 1LA638J+PpsikJ6I7YjccZ+6M8KJsuXxKBMFg6VrS111yKawiQgEoJEsy A2ShaiKNPGBMvo/xsyrTryXNMaBVlcooXyolV2nylXi+fS9m2oQ2CEB1x w==; X-CSE-ConnectionGUID: OssrktPHTOOmcr+Y2s3hzw== X-CSE-MsgGUID: ILn1BN+8TpSQotTWcz+hwA== X-IronPort-AV: E=McAfee;i="6600,9927,11047"; a="12941962" X-IronPort-AV: E=Sophos;i="6.07,213,1708416000"; d="scan'208";a="12941962" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2024 01:47:19 -0700 X-CSE-ConnectionGUID: jQ0m5LCPSBqotRGCA+/r9g== X-CSE-MsgGUID: +2+E6CDwSheR+Hp3Oc417g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,213,1708416000"; d="scan'208";a="46551798" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by fmviesa002.fm.intel.com with ESMTP; 19 Apr 2024 01:47:16 -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 0/2] ASoC: Intel: avs: Refactor IRQ handling Date: Fri, 19 Apr 2024 10:48:55 +0200 Message-Id: <20240419084857.2719593-1-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Message-ID-Hash: KA6AU2ID4K6GROMTRSYDDU6PT5PRTPQ7 X-Message-ID-Hash: KA6AU2ID4K6GROMTRSYDDU6PT5PRTPQ7 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: The existing code can be both improved and simplified. To make this change easier to manage, first add new implementation and then remove deadcode in a separate patch. Simplification achieved with: - reduce the amount of resources requested by the driver i.e.: IPC and CLDMA request_irq() merged into one - reduce the number of DSP ops from 2 to 1: irq_handler/thread() vs dsp_interrupt() - drop ambiguity around CLDMA interrupt, let skl.c handle that explicitly as it is the only user With that done, switch to the new implementation and remove unused members. While the change is non-trivial, from functional perspective status quo is achieved. Cezary Rojewski (2): ASoC: Intel: avs: New IRQ handling implementation ASoC: Intel: avs: Remove unused IRQ-related code sound/soc/intel/avs/apl.c | 20 +++++++- sound/soc/intel/avs/avs.h | 8 ++-- sound/soc/intel/avs/cldma.c | 42 ++++------------- sound/soc/intel/avs/cldma.h | 1 + sound/soc/intel/avs/cnl.c | 91 ++++++++++++++++++++++++------------- sound/soc/intel/avs/core.c | 85 ++++++++++++++++------------------ sound/soc/intel/avs/icl.c | 3 +- sound/soc/intel/avs/ipc.c | 48 ------------------- sound/soc/intel/avs/skl.c | 73 +++++++++++++++++++++-------- sound/soc/intel/avs/tgl.c | 3 +- 10 files changed, 186 insertions(+), 188 deletions(-)