From patchwork Thu Nov 16 19:29:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 119081 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp5978370qgn; Thu, 16 Nov 2017 11:30:41 -0800 (PST) X-Google-Smtp-Source: AGs4zMaeuvn8nBe/w9oBTM5cBOjdb8I6uFxBN3cL4t9pbrJbPBsu0C2hjOe5//Y21zXFcj9HSAjP X-Received: by 10.28.136.15 with SMTP id k15mr2481978wmd.147.1510860641807; Thu, 16 Nov 2017 11:30:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510860641; cv=none; d=google.com; s=arc-20160816; b=uUI982bj2pOoiwDaVjM0XY5dcCdtg/0e0oVbcCCmhdj3d6jlItTWeB9aWALfEKVPV4 NizUaFuuM1mfZbEwbyMjx1HX/1ej985k7hxoCLrsQIp71PW0Guide/W4KT3gkoMXepck +WkGS4cCHEFeVKnem3xuWNRbEAhRifvADj8insgTKzxVmqWCkR2+OH7EyLHq0u9SqBp+ 9r10nzjEjutQrktjy43pLCTpiHUhA+iiRTMVq96N5ih2PypGaWEa9jvPo8BvUba72cVn b7O8fncGQdhI9tc9OdDMrfiUbMAyp0uXRFDVcyx3mTXXZ3M3G0oPCj+7+1DgCVuMGCz7 KEdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=U01VpIrNIiNz7GACWutcxK/6dpf9uXK5yQKKiM02oO0=; b=UMhPExROaC/SipNto3zIvYZ15ahelb9Ytb+KZPXsaNiZ6vewa0zT+s74GPAGfaTlKH mUcRh2ThWDGAx6MjWJRo1qs9Y3iWPQjzC2ov6d9CjphKWsWZRG7coQ5sloXtsitwoUt2 lP+74lrGF95VdTr7lG4Pb4UkagVadm5qlzKIF73/vdV53NRPxDQcE5gaswGFerTv5jwt kaxE1QOhwmvI0lhgNlEg7or6hncBH46boLIWd5SWuH7e4+wA16QAcCxKvAF4o1YcrpTV VmDE8beexNJEzSuk08yS6naHFZpo/fmLT5nxafva7sJRwfXas5cgdhumVwGqbbFLg5m4 cwKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=l9TOFGj2; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id 193si1405527wmy.90.2017.11.16.11.30.41; Thu, 16 Nov 2017 11:30:41 -0800 (PST) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=l9TOFGj2; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 84B872677A6; Thu, 16 Nov 2017 20:29:46 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 64B3D2677C6; Thu, 16 Nov 2017 20:29:45 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, RP_MATCHES_RCVD, SPF_PASS autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id 1921C2677A6 for ; Thu, 16 Nov 2017 20:29:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=vgq2DxhuKiIa6w+2/QmxqRD13KNEUY00YUfXaZKXKrk=; b=l9TOFGj2+z/y H18dDkKB/DUDz/+Q6rOyGrspTXEUEBFOoU1rd4I0XIHcblSl5sbFa77mJ9u5Vgy1OCGVDKLJFWZKn 5CcGXU3ICaCXmVJmWS1id6H5+OJnMbTI5mpOrVeE2+KbKn/Q8p0qIJSOUDW4e8gDbT8KBZj5GlkXC wTzjw=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=finisterre.ee.mobilebroadband) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1eFPqk-0006IF-L0; Thu, 16 Nov 2017 19:29:22 +0000 Received: by finisterre.ee.mobilebroadband (Postfix, from userid 1000) id 2DBCF44005B; Thu, 16 Nov 2017 19:29:22 +0000 (GMT) From: Mark Brown To: John Hsu In-Reply-To: <1510045593-21477-1-git-send-email-KCHSU0@nuvoton.com> Message-Id: <20171116192922.2DBCF44005B@finisterre.ee.mobilebroadband> Date: Thu, 16 Nov 2017 19:29:22 +0000 (GMT) Cc: alsa-devel@alsa-project.org, WTLI@nuvoton.com, lgirdwood@gmail.com, YHCHuang@nuvoton.com, broonie@kernel.org, CTLIN0@nuvoton.com Subject: [alsa-devel] Applied "ASoC: nau8824: move key irq after jd done" to the asoc tree X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org The patch ASoC: nau8824: move key irq after jd done has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From cf6b68d192138d67b49002b499eb507af0c8c56d Mon Sep 17 00:00:00 2001 From: John Hsu Date: Tue, 7 Nov 2017 17:06:32 +0800 Subject: [PATCH] ASoC: nau8824: move key irq after jd done It is possible to get the fake key press interruption when the codec do jack detection. We think it's proper to move the key interruption configuration after jack detection done. Signed-off-by: John Hsu Signed-off-by: Mark Brown --- sound/soc/codecs/nau8824.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) -- 2.14.1 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/codecs/nau8824.c b/sound/soc/codecs/nau8824.c index 0240759f951c..b7b63ac037a7 100644 --- a/sound/soc/codecs/nau8824.c +++ b/sound/soc/codecs/nau8824.c @@ -843,6 +843,11 @@ static void nau8824_jdet_work(struct work_struct *work) event_mask |= SND_JACK_HEADSET; snd_soc_jack_report(nau8824->jack, event, event_mask); + /* Enable short key press and release interruption. */ + regmap_update_bits(regmap, NAU8824_REG_INTERRUPT_SETTING, + NAU8824_IRQ_KEY_RELEASE_DIS | + NAU8824_IRQ_KEY_SHORT_PRESS_DIS, 0); + nau8824_sema_release(nau8824); } @@ -850,13 +855,12 @@ static void nau8824_setup_auto_irq(struct nau8824 *nau8824) { struct regmap *regmap = nau8824->regmap; - /* Enable jack ejection, short key press and release interruption. */ + /* Enable jack ejection interruption. */ regmap_update_bits(regmap, NAU8824_REG_INTERRUPT_SETTING_1, NAU8824_IRQ_INSERT_EN | NAU8824_IRQ_EJECT_EN, NAU8824_IRQ_EJECT_EN); regmap_update_bits(regmap, NAU8824_REG_INTERRUPT_SETTING, - NAU8824_IRQ_EJECT_DIS | NAU8824_IRQ_KEY_RELEASE_DIS | - NAU8824_IRQ_KEY_SHORT_PRESS_DIS, 0); + NAU8824_IRQ_EJECT_DIS, 0); /* Enable internal VCO needed for interruptions */ nau8824_config_sysclk(nau8824, NAU8824_CLK_INTERNAL, 0); regmap_update_bits(regmap, NAU8824_REG_ENA_CTRL,