From patchwork Fri Jun 23 12:03:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 106259 Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp171037qgd; Fri, 23 Jun 2017 05:06:33 -0700 (PDT) X-Received: by 10.28.13.139 with SMTP id 133mr5325918wmn.82.1498219593474; Fri, 23 Jun 2017 05:06:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498219593; cv=none; d=google.com; s=arc-20160816; b=E+VwpADVvx9jaGNSowCwjZdETubyFRWya5H70slA0LQKyQqyY8CKflYIfJwdbmsy3E ak4gjAhOG8YJ036Kd8uJpFqlL3SpoyKWJoDkpCLCxuvkqbpSmoanJuHVeObQMXf2VGHq kPTZEzysLYngmAX4VhOO+32z9iBvjTxvvKH8DvoUhIjuoO0Yn1YrW58NAoestQ14S1kb T7BwRDQsZSYgGuMadI3K/uelPAhGMvt5OH4D1shdl5x98kWR4I87xYgXdI0IVUhGBqVj AaaGGK635/01YMaHAimVmJizMojwexuXtOFH+tSXrMQfv9YA6B/R1d7fQLc2c7FL5JyM 2nvQ== 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 :delivered-to:arc-authentication-results; bh=H6sRSzmoq3VlIF0rozEF1QEwqWNHlznZ2lwOoRJk+bs=; b=wByUYNDfP6eIEDGDpCxlC/7k2d1joViRUHMYkIJLN0JHUpRq0hHFJrfqPGsQNCUJWW opQI+UpZnOaEgFbtB7zTICLaOPVcrwg+vQrMq2cuWtdlRgHlhEnVwFXr8Jj3BrpKGfDu Pmf0gNK0J+hT41IS9GPBNvp6dvwaKvrE2YGOhE2F//ofFRi8LFRdhfJOP4h81nkB+ssM eDTyD16O/w2Hj1w70JYHv12pIIIcgUgzKJzJ1IFLsRMa1oDJ49rC7EQ6lNJJCA0h5Gzz 3Ucck259C5n/hb4/UR5gVQDI823lugj0EutZkjMoRiw5Qq/d0inDuhBWZCm2Pp2GHzdo DSug== ARC-Authentication-Results: i=1; mx.google.com; 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 g89si4278201wrd.274.2017.06.23.05.06.33; Fri, 23 Jun 2017 05:06:33 -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; 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 5046A2674E4; Fri, 23 Jun 2017 14:04:55 +0200 (CEST) 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 3C56E26748E; Fri, 23 Jun 2017 14:04:52 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=PRX_BODY_13, RCVD_IN_DNSWL_NONE, SPF_PASS,T_RP_MATCHES_RCVD autolearn=disabled version=3.4.0 Received: from mezzanine.sirena.org.uk (mezzanine.sirena.org.uk [106.187.55.193]) by alsa0.perex.cz (Postfix) with ESMTP id 9C76E2674A2 for ; Fri, 23 Jun 2017 14:04:13 +0200 (CEST) Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by mezzanine.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1dONJg-0003Wl-0N; Fri, 23 Jun 2017 12:04:02 +0000 Received: from broonie by debutante with local (Exim 4.89) (envelope-from ) id 1dONJd-0006Ni-Cs; Fri, 23 Jun 2017 13:03:57 +0100 From: Mark Brown To: John Hsu In-Reply-To: <1498028154-10888-1-git-send-email-KCHSU0@nuvoton.com> Message-Id: Date: Fri, 23 Jun 2017 13:03:57 +0100 X-SA-Exim-Connect-IP: 2001:470:1f1d:6b5::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: No (on mezzanine.sirena.org.uk); Unknown failure Cc: alsa-devel@alsa-project.org, anatol.pomozov@gmail.com, benzh@chromium.org, John Hsu , lgirdwood@gmail.com, YHCHuang@nuvoton.com, mac.chiang@intel.com, broonie@kernel.org, CTLIN0@nuvoton.com, yong.zhi@intel.com, mhkuo@nuvoton.com Subject: [alsa-devel] Applied "ASoC: nau8825: make crosstalk function optional" 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: nau8825: make crosstalk function optional has been applied to the asoc tree at git://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 2bda4288e771e51946e70329c9b79605e4612f10 Mon Sep 17 00:00:00 2001 From: John Hsu Date: Thu, 22 Jun 2017 11:57:55 +0800 Subject: [PATCH] ASoC: nau8825: make crosstalk function optional Make crosstalk functoin optional. The jack detection can speed up without crosstalk detection. Let the decision of function usage to platform design. The patch helps the issue concern as follows: Google issue 35574278: Chell_headphone pop back from S3 There is a concern as follows: cras getting blocked for 2 seconds (worst-case 3 seconds) As I understand, ChromeOS expects resume finishes in 1 seconds. Video/Audio playing after 3 seconds of resume seems against the spec. If we really have to make the choice I would choose pop noise instead of waiting for 3 seconds. Signed-off-by: John Hsu Signed-off-by: John Hsu Signed-off-by: Mark Brown --- sound/soc/codecs/nau8825.c | 6 +++++- sound/soc/codecs/nau8825.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) -- 2.13.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/nau8825.c b/sound/soc/codecs/nau8825.c index 503a6d8130b7..a8c7a556a6a8 100644 --- a/sound/soc/codecs/nau8825.c +++ b/sound/soc/codecs/nau8825.c @@ -1686,7 +1686,7 @@ static irqreturn_t nau8825_interrupt(int irq, void *data) } else if (active_irq & NAU8825_HEADSET_COMPLETION_IRQ) { if (nau8825_is_jack_inserted(regmap)) { event |= nau8825_jack_insert(nau8825); - if (!nau8825->high_imped) { + if (!nau8825->xtalk_bypass && !nau8825->high_imped) { /* Apply the cross talk suppression in the * headset without high impedance. */ @@ -2504,6 +2504,10 @@ static int nau8825_read_device_properties(struct device *dev, &nau8825->jack_eject_debounce); if (ret) nau8825->jack_eject_debounce = 0; + ret = device_property_read_u32(dev, "nuvoton,crosstalk-bypass", + &nau8825->xtalk_bypass); + if (ret) + nau8825->xtalk_bypass = 1; nau8825->mclk = devm_clk_get(dev, "mclk"); if (PTR_ERR(nau8825->mclk) == -EPROBE_DEFER) { diff --git a/sound/soc/codecs/nau8825.h b/sound/soc/codecs/nau8825.h index 514fd13c2f46..8aee5c8647ae 100644 --- a/sound/soc/codecs/nau8825.h +++ b/sound/soc/codecs/nau8825.h @@ -476,6 +476,7 @@ struct nau8825 { int xtalk_event_mask; bool xtalk_protect; int imp_rms[NAU8825_XTALK_IMM]; + int xtalk_bypass; }; int nau8825_enable_jack_detect(struct snd_soc_codec *codec,