Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 99887C433E0 for ; Thu, 9 Jul 2020 12:24:59 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 249B22074B for ; Thu, 9 Jul 2020 12:24:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="DTFXEMos" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 249B22074B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 9FBF642; Thu, 9 Jul 2020 14:24:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9FBF642 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1594297497; bh=pXJm1JgAmBBNUElK3GvnvYiqOBFfIMyrcaMkwYYiJPs=; h=Subject:To:References:From:Date:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=DTFXEMos3b8flLCV5H1EhMfRHmuOEpBM05/yMm5qAn6ihS+1LdTVBkel20mfYGiXo O5KE8rLp3k0SnIjFE9m5ql6HorWtybYeBrEEf5qQKAXpnGNkQM9I32ORaD5bln/+y3 Y86uQ4c0/ks9JajhuNZNg2vQYye/kjAyy/1ipHiU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 015F5F801F9; Thu, 9 Jul 2020 14:24:07 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 653ABF80216; Thu, 9 Jul 2020 14:24:04 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 97E4AF80117 for ; Thu, 9 Jul 2020 14:23:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 97E4AF80117 IronPort-SDR: sDS8W9gkCbl4EgjANjU/2lyOEjSyfGQHUZSSuiDtVapUjjzl5wPBfz0qX+PqMhj4dRv+GnLJzz XSX1/uomWibA== X-IronPort-AV: E=McAfee;i="6000,8403,9676"; a="128052778" X-IronPort-AV: E=Sophos;i="5.75,331,1589266800"; d="scan'208";a="128052778" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jul 2020 05:23:46 -0700 IronPort-SDR: zUJRMxFqvXKawZmBVL3m/XHWTrYINnuLqEswthbA/fKG98lMBnra0mnHAwQTfRgZaHtK0Iyxnf 7rV77zFdLPAg== X-IronPort-AV: E=Sophos;i="5.75,331,1589266800"; d="scan'208";a="389126681" Received: from drleon-mobl1.amr.corp.intel.com (HELO [10.254.78.19]) ([10.254.78.19]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jul 2020 05:23:45 -0700 Subject: Re: [PATCH] ASoC: rt286: fix unexpected interrupt happens To: shumingf@realtek.com, broonie@kernel.org, lgirdwood@gmail.com References: <20200709101345.11449-1-shumingf@realtek.com> From: Pierre-Louis Bossart Message-ID: Date: Thu, 9 Jul 2020 06:56:09 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200709101345.11449-1-shumingf@realtek.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Cc: oder_chiou@realtek.com, jack.yu@realtek.com, alsa-devel@alsa-project.org, lars@metafoo.de, derek.fang@realtek.com, flove@realtek.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On 7/9/20 5:13 AM, shumingf@realtek.com wrote: > From: Shuming Fan > > The HV/VREF should not turn off if the headphone jack plug-in. > This patch could solve the unexpected interrupt issue in some devices. > > Tested-by: Pierre-Louis Bossart For more context, this patch removes a recurring click with a ~1s period audible with headphones on Dell XPS13-9343. > Signed-off-by: Shuming Fan > --- > sound/soc/codecs/rt286.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/sound/soc/codecs/rt286.c b/sound/soc/codecs/rt286.c > index 9593a9a27bf8..e8d14eefc41b 100644 > --- a/sound/soc/codecs/rt286.c > +++ b/sound/soc/codecs/rt286.c > @@ -272,13 +272,13 @@ 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; > } > - if (!*mic) { > + > + if (!*hp) { > 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); > + snd_soc_dapm_sync(dapm); > + } > > return 0; > } >