From patchwork Thu Mar 1 19:25:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 130394 Delivered-To: patch@linaro.org Received: by 10.80.172.228 with SMTP id x91csp3189581edc; Thu, 1 Mar 2018 11:26:26 -0800 (PST) X-Google-Smtp-Source: AG47ELv7N7tF0bXu6ZoAuMmaZeNlAYgyIpMzUTcFISf28Ps3qeuW2EiOLyxWqZ5R+kxjSZzQ3IgT X-Received: by 10.28.228.197 with SMTP id b188mr2942524wmh.65.1519932386325; Thu, 01 Mar 2018 11:26:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519932386; cv=none; d=google.com; s=arc-20160816; b=sa62Fiir45bhRG4a6WR4Ik6zweK/0iqPyoLH+N37sRKtazc5p01pNGfj9VVVwI+3SN YnTFc6gjU+bFHz5WsdaoL/Dp1YBB4zUA5CqYRcB39WVIGGpwF8uxhQkbNClMWen4GAtg 0Byi03AxksMJzWrv2IKUKDBeE/Izo+FAG4lN2QodbXvsUz3TTizCwsuswXL5XogPi2ax OIXw8ziYBzo3sBO3WiHtF/Ct4Nntuq7Q1FSPU0pQcSobIy57uUEKO9dLLl7XRCNeHi8E VEQAQUfqo3sy2ao2PD0MV0uQTNVW3HlE6AS+lCufdiVo1DJBylLA/Oiw9murg8X5TsF2 UKKw== 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=vkBW2hPAbOhGTue1Nob59fP2rMIbpbrrkgVa90BXfZs=; b=gwcc4uYZ8fDyo9T2PCF001St1ycD20m+Y3MQrbeFGdU2/cWjryezt8AnxXrwxCL14X cN54yegsqD1zMCIZRPxrdpNZv+ZvQWcAepQxfelPWWiWuk8dU11q/Wi13f3PCgpu4GvW o9oXzx2GHnUGuFHN82l9V5aal6fEM7oIncx8eXVJjO26aKpDxQk8s8u2flHd1oLdkntS 3rtr3K6T62Bfxeu8Sxa1D3/r/c5vwAVIBtT41dcvcbfS2oZv63Q0ze2264hWwyf1tYV5 DE7ZQVjNX2iWjJqFkAsS9tfLHY6q++SwLJxzmNFl5dIAMRIsC9m6fxJ/Ab43HhyyVy/W 6qKw== 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=aQsHRcbe; 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 h21si3690830wrc.287.2018.03.01.11.26.26; Thu, 01 Mar 2018 11:26:26 -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=aQsHRcbe; 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 D74DA267B97; Thu, 1 Mar 2018 20:26:07 +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 BE66B267B99; Thu, 1 Mar 2018 20:26:04 +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.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, SPF_PASS, T_RP_MATCHES_RCVD 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 0081A267190 for ; Thu, 1 Mar 2018 20:26:02 +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=XkT1Ra9q/+tBkB1QTdT3S8yFsdj9qoFwBLJu6gWIhsc=; b=aQsHRcbe8yW2 HIFv8XnbbvhgHJeBIjjmN0vWv/hVSYW7Mh1lttjZCIxQjPSRiZa42ZZQOF25BjCPiSVvfrUo8kiTr C0T2kgDpP+bvWxAUKZbuLvdCYMUw1TqT/uBd1WlWRqZdqvsq/wcHFtNk2GgLzcX6getCXsMq5Kg5C rtgb0=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1erTpx-0005iU-3r; Thu, 01 Mar 2018 19:25:53 +0000 Received: from broonie by debutante with local (Exim 4.90_1) (envelope-from ) id 1erTpw-0001SD-Lf; Thu, 01 Mar 2018 19:25:52 +0000 From: Mark Brown To: Hans de Goede In-Reply-To: <20180225104713.4745-16-hdegoede@redhat.com> Message-Id: Date: Thu, 01 Mar 2018 19:25:52 +0000 Cc: Oder Chiou , alsa-devel@alsa-project.org, Pierre-Louis Bossart , Takashi Iwai , Mark Brown , Carlo Caione , Bard Liao Subject: [alsa-devel] Applied "ASoC: rt5651: Only configure OVCD once at set_jack time" 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: rt5651: Only configure OVCD once at set_jack time 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 9e1795925d0e967d2a0191b1487b5caf0693f2ae Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sun, 25 Feb 2018 11:46:56 +0100 Subject: [PATCH] ASoC: rt5651: Only configure OVCD once at set_jack time Only configure OVCD once at set_jack time, rather then configuring it on every jack-insertion event and switch to using bit field defines instead of hardcoding a magic value. Tested-by: Carlo Caione Signed-off-by: Hans de Goede Signed-off-by: Mark Brown --- sound/soc/codecs/rt5651.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) -- 2.16.2 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/codecs/rt5651.c b/sound/soc/codecs/rt5651.c index be942886700d..41d7c192ac03 100644 --- a/sound/soc/codecs/rt5651.c +++ b/sound/soc/codecs/rt5651.c @@ -1637,7 +1637,15 @@ static int rt5651_set_jack(struct snd_soc_component *component, snd_soc_component_update_bits(component, RT5651_PWR_ANLG2, RT5651_PWR_JD_M, RT5651_PWR_JD_M); - snd_soc_component_update_bits(component, RT5651_MICBIAS, 0x38, 0x38); + snd_soc_component_update_bits(component, RT5651_MICBIAS, + RT5651_MIC1_OVCD_MASK | + RT5651_MIC1_OVTH_MASK | + RT5651_PWR_CLK12M_MASK | + RT5651_PWR_MB_MASK, + RT5651_MIC1_OVCD_DIS | + RT5651_MIC1_OVTH_600UA | + RT5651_PWR_MB_PU | + RT5651_PWR_CLK12M_PU); rt5651->hp_jack = hp_jack; @@ -1842,14 +1850,8 @@ static int rt5651_jack_detect(struct snd_soc_component *component, int jack_inse if (jack_insert) { rt5651_enable_micbias1_for_ovcd(component); snd_soc_component_update_bits(component, RT5651_MICBIAS, - RT5651_MIC1_OVCD_MASK | - RT5651_MIC1_OVTH_MASK | - RT5651_PWR_CLK12M_MASK | - RT5651_PWR_MB_MASK, - RT5651_MIC1_OVCD_EN | - RT5651_MIC1_OVTH_600UA | - RT5651_PWR_MB_PU | - RT5651_PWR_CLK12M_PU); + RT5651_MIC1_OVCD_MASK, + RT5651_MIC1_OVCD_EN); msleep(100); if (snd_soc_component_read32(component, RT5651_IRQ_CTRL2) & RT5651_MB1_OC_CLR) jack_type = SND_JACK_HEADPHONE;