From patchwork Tue Mar 20 01:06:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 132099 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp241326ljb; Mon, 19 Mar 2018 18:06:19 -0700 (PDT) X-Google-Smtp-Source: AG47ELvIbYw+Z3YaArjF1aoHrj95tMiNzKbgoyq8k/0AeYucYC9M91yUXg9H0K6/F/abXbI9Lu37 X-Received: by 10.223.153.45 with SMTP id x42mr11052954wrb.124.1521507979829; Mon, 19 Mar 2018 18:06:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521507979; cv=none; d=google.com; s=arc-20160816; b=hZPEaM6s0btauyiQ/AqhrQBzLYaOUTruQcAsed4RfJwvDPcMSB9jpVEnqM4A6KTvv7 JF4ZYvUl+hkL6Cupf1CXS1heDYGOfQ/IUlxYgdXLopdirQu4u1m3ePdGdmC8SKCV7X3S J7wfU7FCYUUf4k6GBL36R2oObelvtJBAXWBGmZZuvmVVqCkbn8UQ1Jsjf+9H5V8Zn95X 7GfT1cFZnumy758LasmP5lvbGvbhZGxvrkf8htWAbDOmr6DuY//ZrU7EzMS/3eNSm9OQ uiNeHyPoGdA4pP2ASm0vA/t6tC/bUhyBD+EZ9nWhShlFZDdNyJjKORO7unCIszFOvF++ XVTQ== 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=1rogRyiimzjsyI+byRczsYPZW1crpjGAFBhIO3dfxrY=; b=ldQbcwDW07boj1hVoYwJYeGSUJgLazKGXbjpIGxkzKgd3DfbSqv8jPK4Va/dS05VBn /pCwWoxvgHq4mqWokdJEIl/dmolrpw+zjCuh5AMukvVWFJF/zhOo84+MGQLj8yPmTLa1 3HDH76Oc7O3ivQ09YmDJpYwC8NfTX42WIw6ABZ98IfV5nZ3S4YFaeavfrzwibbctRY4p SfjWWP7FHWF2ox2838PVPtfFz3lydFkLoKUoALUDADYQG9c3zMUhzTES+ygz80f5Lc0C 05CGkYQcgEEC2GVKB2sjRO8GL2Ajvg4R/sr8L7XwUonelKN2plIKs8gDhgkz3Wj0/Rnr 859Q== 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=dKTGE0/6; 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 z35si373798wrc.437.2018.03.19.18.06.19; Mon, 19 Mar 2018 18:06:19 -0700 (PDT) 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=dKTGE0/6; 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 757EE267345; Tue, 20 Mar 2018 02:06:18 +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 8259026733D; Tue, 20 Mar 2018 02:06:16 +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 B34022672B2 for ; Tue, 20 Mar 2018 02:06:13 +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=Nu0ZWwzqmkh/3dlLloRTF0+5Osyieyj1cItk9Di7kek=; b=dKTGE0/6+S1j +ymYxDN99zkyc1pfia6BibmyQZuMwlnhBnZgxChYOLmfyo9xCMfzFBOMSYL/HkHNA8+5V0VueXFJ7 pi07MLnfxw2ilEmi4GhWF2u0HonmBTERQxql5bXpcqAk/wA49jUFtyOD23VdJkSl49ANxmawymOls 4a0Is=; Received: from [218.255.99.6] (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 1ey5j7-00078h-Ro; Tue, 20 Mar 2018 01:06:10 +0000 Received: by finisterre.ee.mobilebroadband (Postfix, from userid 1000) id B701344007A; Tue, 20 Mar 2018 01:06:06 +0000 (GMT) From: Mark Brown To: Bard Liao In-Reply-To: <1521454049-32435-1-git-send-email-bardliao@realtek.com> Message-Id: <20180320010606.B701344007A@finisterre.ee.mobilebroadband> Date: Tue, 20 Mar 2018 01:06:06 +0000 (GMT) Cc: oder_chiou@realtek.com, jack.yu@realtek.com, alsa-devel@alsa-project.org, lars@metafoo.de, lgirdwood@gmail.com, puneethx.prabhu@intel.com, broonie@kernel.org, shumingf@realtek.com, flove@realtek.com Subject: [alsa-devel] Applied "ASoC: rt298: don't turn off HV and VREF if headset is detected" 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: rt298: don't turn off HV and VREF if headset is detected 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 40d2677bdadbd221f3e398877586a30d8065140c Mon Sep 17 00:00:00 2001 From: Bard Liao Date: Mon, 19 Mar 2018 18:07:29 +0800 Subject: [PATCH] ASoC: rt298: don't turn off HV and VREF if headset is detected "HV" and "VREF" will be powered up when jack type detection process is started and will be powered off when jack type detection process is finished. It will generate an unexpected interrupt signal when they are powered up during the capture process. Codec driver will do the jack type detection process and we can't capture properly before the jack detection process is finished. This patch will not power off the "HV" and "VREF" widgets if headset is detected and it will solve the unexpected interrupt issue. As a result, it will also solve the silence data captured at the beginning in headset mic recording issue. Signed-off-by: Bard Liao Signed-off-by: Mark Brown --- sound/soc/codecs/rt298.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 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/rt298.c b/sound/soc/codecs/rt298.c index ce963768449f..ff52d0365cfa 100644 --- a/sound/soc/codecs/rt298.c +++ b/sound/soc/codecs/rt298.c @@ -290,9 +290,10 @@ static int rt298_jack_detect(struct rt298_priv *rt298, bool *hp, bool *mic) regmap_read(rt298->regmap, RT298_GET_MIC1_SENSE, &buf); *mic = buf & 0x80000000; } - - snd_soc_dapm_disable_pin(dapm, "HV"); - snd_soc_dapm_disable_pin(dapm, "VREF"); + if (!*mic) { + snd_soc_dapm_disable_pin(dapm, "HV"); + snd_soc_dapm_disable_pin(dapm, "VREF"); + } if (!*hp) snd_soc_dapm_disable_pin(dapm, "LDO1"); snd_soc_dapm_sync(dapm);