From patchwork Tue Mar 20 01:06:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 132100 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp241419ljb; Mon, 19 Mar 2018 18:06:26 -0700 (PDT) X-Google-Smtp-Source: AG47ELuKEW95CXs/7tZEkk6+2Vk2gBxO7FOtUqnbL3TswN4X9GhpGRODTe1NAumoVh26SZYdeFEQ X-Received: by 10.28.22.208 with SMTP id 199mr550768wmw.79.1521507986061; Mon, 19 Mar 2018 18:06:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521507986; cv=none; d=google.com; s=arc-20160816; b=fqKn/9J0btkS1jA8eTynDaX36qpKUJGSJ5FNo3xJesxQrN3SPqKjFayT2qAJ+iI0Ma YM6NOJrzh6XuYpjJz1p78l1QYSUUrdK+Ok9jrgGtyZQZzAtmel8bhJQqMIeF8OuMpsEQ HscCkIs6+pG83PQvo9EoTZW5ReJIEKWTwAvwIh7H3yQePS9bRjraVGk56+3zxAmFwOw1 8qhb09kUwYqiGsUj7Z2ulZj+IK02geWNFbGCcNsQQ0qUGR7qxNN63smdv+GRKyMX8C9F 1NKtJwC4A3mAMb+V8j5Zkqb1TlmH2LrFx54Mj1Xsx+wSqYWou8WFnt0NiXCeeKnL5boq 62SA== 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=8tXcAy+Msx0hU5T0nvaPxYV349HGHdq/plfo5WMmvQo=; b=X5eYFmsq5stYmHMBc4+yDJYWJTI2aNhsL0ak6D2hxSkScPGSOCLH7JhdAkNDXNwXMr FjpuG/3G+TzS8jwVMPgnovI6jw0BzxnxyHvU7a5VIjI+vhvQWS35EdVgq4cCkbfA8dA6 f7gbaihJr4up22+mOe65OkgeSakEWraI+UVVxaYvXLoccoxxqxDALlgpNliq0tP28Kf/ m9eDaBv8irqEqvBaxyDnBBAotGNGLNEB9G3ZT46meVJSYhXYjoKBYFoXkx2MTf2Pb5RE udtY1BAHZmnr1gzwMesZp6cbou0HHHlUaU+JiwD1pwFW9c+ZHlM/98lzs44VJBczA9cl /DaQ== 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=EBV9cHvX; 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 q124si320509wma.206.2018.03.19.18.06.25; Mon, 19 Mar 2018 18:06:26 -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=EBV9cHvX; 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 D469F2672C1; Tue, 20 Mar 2018 02:06:21 +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 E7DC326739D; Tue, 20 Mar 2018 02:06:18 +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 205862672C1 for ; Tue, 20 Mar 2018 02:06:16 +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=jBxvvOd7nhd2tNFn/RXPHv9lbB0f66+Yu1lfx7xFW4Y=; b=EBV9cHvXOGDF +cqGio8EudBn+u9mHQXKGsOfbBCTrICR+47ktJ4w8KydQOy+G2wvJR5sGvEly6C2BDLXvUAEKo+cL CzI+2dtKV9kZrzp8z5FWsapijNT8MYkfdflShhdWg1pDFLqJQGz5UCJBWEfx8RpOjGKDQa+zTxFas UM1BQ=; 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 1ey5jD-00078k-1V; Tue, 20 Mar 2018 01:06:15 +0000 Received: by finisterre.ee.mobilebroadband (Postfix, from userid 1000) id 59E8E44007A; Tue, 20 Mar 2018 01:06:12 +0000 (GMT) From: Mark Brown To: Bard Liao In-Reply-To: <1521454032-32387-1-git-send-email-bardliao@realtek.com> Message-Id: <20180320010612.59E8E44007A@finisterre.ee.mobilebroadband> Date: Tue, 20 Mar 2018 01:06:12 +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: rt286: 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: rt286: 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 8153362e757a7b971aa73e7747bdc2ca2acbe84b Mon Sep 17 00:00:00 2001 From: Bard Liao Date: Mon, 19 Mar 2018 18:07:12 +0800 Subject: [PATCH] ASoC: rt286: 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/rt286.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/rt286.c b/sound/soc/codecs/rt286.c index af6325c78292..e5c9d59c3967 100644 --- a/sound/soc/codecs/rt286.c +++ b/sound/soc/codecs/rt286.c @@ -275,9 +275,10 @@ static int rt286_jack_detect(struct rt286_priv *rt286, bool *hp, bool *mic) regmap_read(rt286->regmap, RT286_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);