From mboxrd@z Thu Jan 1 00:00:00 1970 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 8A449C43334 for ; Fri, 10 Jun 2022 09:34:40 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 45D8B18B2; Fri, 10 Jun 2022 11:33:48 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 45D8B18B2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1654853678; bh=J2frKo07JAZM2IUZ67WQhilvoH6SqJYTVn5+UPh8hvE=; h=Date:Subject:To:References:From:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=IbskzkVtkS1DEknATKFk/kbPlmWjvMCl51/2EBobN2KvCQlns8SYSRbNhsQk8BBUM 4421Sp3S+/9/OCulPCx2FXTZu2da4yF/YJ8zphXtwvejoxJZoD3nhwIsJjOWsTSjSv MQHOuAk6bfSpyhKMcR/IaiTGQvI8rD1eFIqPouk0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id CDA1DF804CF; Fri, 10 Jun 2022 11:33:47 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 26CB6F804D2; Fri, 10 Jun 2022 11:33:46 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 0C097F800DF for ; Fri, 10 Jun 2022 11:33:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0C097F800DF Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="WzkqQwba" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654853623; x=1686389623; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=J2frKo07JAZM2IUZ67WQhilvoH6SqJYTVn5+UPh8hvE=; b=WzkqQwbasOq2Y4bwG3iWvX32d99ePMK0s757fC3/4AjxVdb9WtEqUDME wUuuedZt6j256XqsrWdvYkls3c9JRh2lel86lz04JqWYnSfBD7WUQZjaU Y3Ij+q+W3s+KCXPpIhLB2JDUIZJQ4SSf888pdFvZxgozbpHUETKrm/DsE zkYKm9+UyqBZe0Olynt7EcdmMyriNltJBOJGcxg+dqCbJetHeXBKFUrFF clJWIuI0UrEe/fVRBGuaoyPkAoxJpKF8DSJLzDHouB7p6qMI5MBNTuawb dH5oEY1yDqJ3YsDn00FqoSFXVoEFB47cZn5OtUBIAnbekHrbgMoStISHZ A==; X-IronPort-AV: E=McAfee;i="6400,9594,10373"; a="266342474" X-IronPort-AV: E=Sophos;i="5.91,288,1647327600"; d="scan'208";a="266342474" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2022 02:33:38 -0700 X-IronPort-AV: E=Sophos;i="5.91,288,1647327600"; d="scan'208";a="638042722" Received: from aslawinx-mobl.ger.corp.intel.com (HELO [10.99.241.158]) ([10.99.241.158]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2022 02:33:36 -0700 Message-ID: <4ac15ba3-1f20-5361-1941-2687962ce454@linux.intel.com> Date: Fri, 10 Jun 2022 11:33:34 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH 07/11] ASoC: codecs: rt274: Enable irq only when needed Content-Language: en-US To: Mark Brown References: <20220609133541.3984886-1-amadeuszx.slawinski@linux.intel.com> <20220609133541.3984886-8-amadeuszx.slawinski@linux.intel.com> From: =?UTF-8?Q?Amadeusz_S=c5=82awi=c5=84ski?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: Oder Chiou , Cezary Rojewski , alsa-devel@alsa-project.org, Takashi Iwai , Liam Girdwood , Pierre-Louis Bossart X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On 6/9/2022 4:18 PM, Mark Brown wrote: > On Thu, Jun 09, 2022 at 03:35:37PM +0200, Amadeusz Sławiński wrote: >> Interrupt is only needed when jack detection is enabled, so enable it >> then, similarly disable it when jack detection is being disabled. > >> if (jack == NULL) { >> /* Disable jack detection */ >> + disable_irq(rt274->i2c->irq); > > There is absolutely no need to do this, it'll interfere with any sharing > of the interrupt and if the interrupt isn't firing then there is no cost > to having the interrupt registered. > > The driver could use some cleanup of the interrupt handler, it currently > unconditionally clears anything that fires and reports IRQ_HANDLED but > should only report IRQ_HANDLED if there was anything from the device. > Practically speaking it shouldn't make much difference unless there's > spurious interrupts or the interrupt gets shared. I will recheck this again, but if I remember correctly we may have had problems that codec kept firing interrupts when we unloaded machine board and codec driver kept spamming dmesg due to _dbg message present in irq handler.